20 std::array<std::byte, 32> key_data;
30 key.
Set(key_data.data(), key_data.data() + 32,
true);
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);
BENCHMARK(BIP324_ECDH, benchmark::PriorityLevel::HIGH)
static void BIP324_ECDH(benchmark::Bench &bench)
An encapsulated private key.
ECDHSecret ComputeBIP324ECDHSecret(const EllSwiftPubKey &their_ellswift, const EllSwiftPubKey &our_ellswift, bool initiating) const
Compute a BIP324-style ECDH shared secret.
void Set(const T pbegin, const T pend, bool fCompressedIn)
Initialize using begin and end iterators to byte data.
RAII class initializing and deinitializing global state for elliptic curve support.
void fillrand(Span< std::byte > output) noexcept
Fill a byte Span with random bytes.
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
Bench & batch(T b) noexcept
Sets the batch size.
Bench & unit(char const *unit)
Sets the operation unit.
An ElligatorSwift-encoded public key.
static constexpr size_t size()