Skip to content

Commit 1c4dd0d

Browse files
committed
Merge #451: Fix getting parity from keypair in fuzzing
f419fe8 Fix getting parity from keypair in fuzzing (Tim Ruffing) Pull request description: This also enables a test that was failung due to the parity bug. ACKs for top commit: tcharding: ACK f419fe8 elichai: ACK f419fe8 apoelstra: ACK f419fe8 Tree-SHA512: bec00d517495cf010c37079e3d71f1d9547a319aac50cecbca74e6d62eca7188aa79d61ee3d50ef81512c30a31b61b947e2f19e45a95b1b17a1f5cf7cf3f1019
2 parents aba2663 + f419fe8 commit 1c4dd0d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

secp256k1-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ mod fuzz_dummy {
11691169
) -> c_int {
11701170
check_context_flags(cx, 0);
11711171
if !pk_parity.is_null() {
1172-
*pk_parity = ((*keypair).0[32] == 0).into();
1172+
*pk_parity = ((*keypair).0[64] == 0).into();
11731173
}
11741174
(*pubkey).0.copy_from_slice(&(*keypair).0[32..]);
11751175
1

src/key.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,8 +2180,6 @@ mod test {
21802180
let (want_tweaked_xonly, tweaked_kp_parity) = XOnlyPublicKey::from_keypair(&tweaked_kp);
21812181

21822182
assert_eq!(tweaked_xonly, want_tweaked_xonly);
2183-
2184-
#[cfg(not(fuzzing))]
21852183
assert_eq!(parity, tweaked_kp_parity);
21862184

21872185
assert!(xonly.tweak_add_check(&s, &tweaked_xonly, parity, tweak));

0 commit comments

Comments
 (0)