mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
3168b08043Bench test for EllSwift ECDH (Pieter Wuille)42d759f239Bench tests for CKey->EllSwift (dhruv)2e5a8a437cFuzz test for Ellswift ECDH (dhruv)c3ac9f5cf4Fuzz test for CKey->EllSwift->CPubKey creation/decoding (dhruv)aae432a764Unit test for ellswift creation/decoding roundtrip (dhruv)eff72a0dffAdd ElligatorSwift key creation and ECDH logic (Pieter Wuille)42239f8390Enable ellswift module in libsecp256k1 (dhruv)901336eee7Squashed 'src/secp256k1/' changes from 4258c54f4e..705ce7ed8c (Pieter Wuille) Pull request description: This replaces #23432 and part of #23561. This PR introduces all of the ElligatorSwift-related changes (libsecp256k1 updates, generation, decoding, ECDH, tests, fuzzing, benchmarks) needed for BIP324. ElligatorSwift is a special 64-byte encoding format for public keys introduced in libsecp256k1 in https://github.com/bitcoin-core/secp256k1/pull/1129. It has the property that *every* 64-byte array is a valid encoding for some public key, and every key has approximately $2^{256}$ encodings. Furthermore, it is possible to efficiently generate a uniformly random encoding for a given public key or private key. This is used for the key exchange phase in BIP324, to achieve a byte stream that is entirely pseudorandom, even before the shared encryption key is established. ACKs for top commit: instagibbs: reACK3168b08043achow101: ACK3168b08043theStack: re-ACK3168b08043Tree-SHA512: 308ac3d33e9a2deecb65826cbf0390480a38de201918429c35c796f3421cdf94c5501d027a043ae8f012cfaa0584656da1de6393bfba3532ab4c20f9533f06a6