-
Notifications
You must be signed in to change notification settings - Fork 1
/
secp256r1.py
32 lines (26 loc) · 867 Bytes
/
secp256r1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from keum import PrimeFiniteField
from keum import AffineWeierstrass
class Fr(PrimeFiniteField):
ORDER = (
115792089210356248762697446949407573529996955224135760342422259061068512044369
)
class Fq(PrimeFiniteField):
ORDER = (
115792089210356248762697446949407573530086143415290314195533631308867097853951
)
class AffineWeierstrass(AffineWeierstrass):
Fq = Fq
Fr = Fr
A = Fq(
115792089210356248762697446949407573530086143415290314195533631308867097853948
)
B = Fq(
41058363725152142129326129780047268409114441015993725554835256314039467401291
)
COFACTOR = 1
GENERATOR_X = Fq(
48439561293906451759052585252797914202762949526041747995844080717082404635286
)
GENERATOR_Y = Fq(
36134250956749795798585127919587881956611106672985015071877198253568414405109
)