20 std::array<std::byte, 32> key_data;
21 std::array<std::byte, EllSwiftPubKey::size()> our_ellswift_data;
22 std::array<std::byte, EllSwiftPubKey::size()> their_ellswift_data;
41 std::copy(
ret.begin(),
ret.begin() + 8, key_data.begin() + 12);
43 std::copy(
ret.begin() + 8,
ret.begin() + 16, our_ellswift_data.begin() + 28);
45 std::copy(
ret.begin() + 16,
ret.end(), their_ellswift_data.begin() + 24);
ECDHSecret ComputeBIP324ECDHSecret(const EllSwiftPubKey &their_ellswift, const EllSwiftPubKey &our_ellswift, bool initiating) const
Compute a BIP324-style ECDH shared secret.
BENCHMARK(BIP324_ECDH, benchmark::PriorityLevel::HIGH)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
void fillrand(Span< std::byte > output)
Fill a byte Span with random bytes.
An ElligatorSwift-encoded public key.
void Set(const T pbegin, const T pend, bool fCompressedIn)
Initialize using begin and end iterators to byte data.
Bench & unit(char const *unit)
Sets the operation unit.
static void BIP324_ECDH(benchmark::Bench &bench)
unsigned char * UCharCast(char *c)
Main entry point to nanobench's benchmarking facility.
Bench & batch(T b) noexcept
Sets the batch size.
An encapsulated private key.