Skip to content

Commit

Permalink
add secq256k1 (the scalar field) as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Nov 2, 2023
1 parent ea5a537 commit f14ffa2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crypto/finite-field-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ let pSmall = 101n;
let pBabybear = (1n << 31n) - 1n;
let pGoldilocks = (1n << 64n) - (1n << 32n) + 1n;
let p25519 = (1n << 255n) - 19n;
let pSeqp256k1 = (1n << 256n) - (1n << 32n) - 0b1111010001n;
let pSecp256k1 = (1n << 256n) - (1n << 32n) - 0b1111010001n;
let pSecq256k1 = (1n << 256n) - 0x14551231950b75fc4402da1732fc9bebfn;
let pBls12_381 =
0x01ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d44300000008508c00000000001n;
let qBls12_381 =
Expand All @@ -23,7 +24,8 @@ let exampleFields = {
babybear: createField(pBabybear),
goldilocks: createField(pGoldilocks),
f25519: createField(p25519),
seqp256k1_base: createField(pSeqp256k1),
secp256k1: createField(pSecp256k1),
secq256k1: createField(pSecq256k1),
bls12_381_base: createField(pBls12_381),
bls12_381_scalar: createField(qBls12_381),
};

0 comments on commit f14ffa2

Please sign in to comment.