mirror of
https://github.com/bitcoin/bips.git
synced 2026-11-16 19:48:35 +00:00
In the previous NonceGen test vectors, every rand_ consists of the byte 0F repeated 32 times, every present sk of the byte 02 repeated 32 times, and every pk has an even Y coordinate. Add a test vector whose rand_ and sk are not a repeated byte and whose pk has an odd Y coordinate. It detects implementations that reverse the byte order of rand_ or sk, that replace the first byte of pk with 02, or that use only the first byte of rand_. With the last mistake, two NonceGen invocations with the same other arguments return the same secnonce with probability 1/256, although the BIP requires that Sign is never executed twice with the same secnonce.