Skip to content

Commit 73c59e2

Browse files
Deterministic key gen, and right upper bound
1 parent affabe8 commit 73c59e2

File tree

2 files changed

+204
-205
lines changed

2 files changed

+204
-205
lines changed

Diff for: scripts/constants.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
from pathlib import Path
22
import os
33
from py_ecc.optimized_bls12_381 import (
4-
field_modulus as q,
4+
curve_order as r,
55
G1,
66
G2,
77
add,
88
multiply,
99
pairing,
1010
)
11-
import secrets
1211

1312

1413
data_path = Path(os.path.dirname(__file__)) / "fixtures" / "data.json"
1514

1615

1716
N_VALIDATORS = 100
18-
privkeys = [secrets.randbelow(q) for i in range(N_VALIDATORS)]
17+
privkeys = [pow(2, i, r) for i in range(N_VALIDATORS)]
1918

2019
msg = b'\xab'*32
2120
domain = 5566

0 commit comments

Comments
 (0)