Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/sage/gen_exhaustive_groups.sage
# Define field size and field | load("secp256k1_params.sage") | ||||
P = 2^256 - 2^32 - 977 | |||||
F = GF(P) | |||||
BETA = F(0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee) | |||||
assert(BETA != F(1) and BETA^3 == F(1)) | |||||
orders_done = set() | orders_done = set() | ||||
results = {} | results = {} | ||||
first = True | first = True | ||||
for b in range(1, P): | for b in range(1, P): | ||||
# There are only 6 curves (up to isomorphism) of the form y^2=x^3+B. Stop once we have tried all. | # There are only 6 curves (up to isomorphism) of the form y^2=x^3+B. Stop once we have tried all. | ||||
if len(orders_done) == 6: | if len(orders_done) == 6: | ||||
break | break | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |