mirror of
https://github.com/bitcoin/bips.git
synced 2025-11-03 14:19:40 +00:00
BIP324: Fix features bitmask for decoding-case selection
This commit is contained in:
parent
964ce2d371
commit
d51f2dcaeb
@ -95,13 +95,13 @@ def ellswift_create_deterministic(seed, features):
|
||||
have_x1 = "valid_x(x1)" in flags
|
||||
have_x2 = "valid_x(x2)" in flags
|
||||
have_x3 = "valid_x(x3)" in flags
|
||||
if (features & 4) == 0 and not (have_x1 and not have_x2 and not have_x3):
|
||||
if (features & 3) == 0 and not (have_x1 and not have_x2 and not have_x3):
|
||||
continue
|
||||
if (features & 4) == 1 and not (not have_x1 and have_x2 and not have_x3):
|
||||
if (features & 3) == 1 and not (not have_x1 and have_x2 and not have_x3):
|
||||
continue
|
||||
if (features & 4) == 2 and not (not have_x1 and not have_x2 and have_x3):
|
||||
if (features & 3) == 2 and not (not have_x1 and not have_x2 and have_x3):
|
||||
continue
|
||||
if (features & 4) == 3 and not (have_x1 and have_x2 and have_x3):
|
||||
if (features & 3) == 3 and not (have_x1 and have_x2 and have_x3):
|
||||
continue
|
||||
return sec, u.to_bytes(32, 'big') + t.to_bytes()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user