Commit a842210
committed
btcec/schnorr: fix signing and verifying to match BIP340 and libsecp256k1
behavior
Sign, and Verify: accept variable length messages, as required by
BIP340 and implemented by libsecp256k1
Sign: don't use RFC6979 when auxRand bytes are not passed by the
caller, instead, match BIP340 spec and libsecp256k1 implementation by
making not passing CustomNonce equivalent to passing a zeroed 32 byte
array.
Deprecated CustomNonce functional option, replaced by AuxRand due to misleading
name.1 parent 1966c38 commit a842210
3 files changed
Lines changed: 183 additions & 186 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
0 commit comments