Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1642: Verify
compressed
argument in `secp256k1_eckey_pubkey_…
…serialize` 1823594 Verify `compressed` argument in `secp256k1_eckey_pubkey_serialize` (Sebastian Falbesoner) Pull request description: Due to similarity to the public API function `secp256k1_ec_pubkey_serialize`, public API flags like `SECP256K1_EC_COMPRESSED` are sometimes mistakingly passed to `secp256k1_eckey_pubkey_serialize` in newly proposed code (this is currently the case for several modules in secp256k1-zkp, see BlockstreamResearch/secp256k1-zkp#300), which is currently not detected. To avoid this in the future, a VERIFY_CHECK is added to check that the `compressed` argument is either 0 or 1. ACKs for top commit: real-or-random: utACK 1823594 stratospher: ACK 1823594. Got tests failures when passing public API flags to `secp256k1_eckey_pubkey_serialize`. Tree-SHA512: ca542afc87f33e436ba33dc55b285dfe3759007c446ef94503bc1044c7a0a7f7b2208ae82e2c9743fc5fa38cf386127f3fbfa02d2c242f28fab3041ee46f153b
- Loading branch information