Skip to content

Commit fd7fe26

Browse files
authored
Merge pull request #2016 from real-or-random/202510-fix-gen-test-vectors
2 parents 964ce2d + 713f000 commit fd7fe26

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bip-0324/gen_test_vectors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def ellswift_create_deterministic(seed, features):
9595
have_x1 = "valid_x(x1)" in flags
9696
have_x2 = "valid_x(x2)" in flags
9797
have_x3 = "valid_x(x3)" in flags
98-
if (features & 4) == 0 and not (have_x1 and not have_x2 and not have_x3):
98+
if (features & 3) == 0 and not (have_x1 and not have_x2 and not have_x3):
9999
continue
100-
if (features & 4) == 1 and not (not have_x1 and have_x2 and not have_x3):
100+
if (features & 3) == 1 and not (not have_x1 and have_x2 and not have_x3):
101101
continue
102-
if (features & 4) == 2 and not (not have_x1 and not have_x2 and have_x3):
102+
if (features & 3) == 2 and not (not have_x1 and not have_x2 and have_x3):
103103
continue
104-
if (features & 4) == 3 and not (have_x1 and have_x2 and have_x3):
104+
if (features & 3) == 3 and not (have_x1 and have_x2 and have_x3):
105105
continue
106106
return sec, u.to_bytes(32, 'big') + t.to_bytes()
107107

0 commit comments

Comments
 (0)