ed448: clarify why there are 56 or 57 byte keys

This commit is contained in:
Paul Miller 2023-09-10 01:00:51 +00:00
parent 6bcab6c24b
commit 77bee0d54e
No known key found for this signature in database
GPG Key ID: 697079DA6878B89B

@ -103,6 +103,7 @@ const ED448_DEF = {
n: BigInt(
'181709681073901722637330951972001133588410340171829515070372549795146003961539585716195755291692375963310293709091662304773755859649779'
),
// RFC 7748 has 56-byte keys, RFC 8032 has 57-byte keys
nBitLength: 456,
// Cofactor
h: BigInt(4),
@ -137,6 +138,7 @@ export const ed448ph = /* @__PURE__ */ twistedEdwards({ ...ED448_DEF, prehash: s
export const x448 = /* @__PURE__ */ (() =>
montgomery({
a: BigInt(156326),
// RFC 7748 has 56-byte keys, RFC 8032 has 57-byte keys
montgomeryBits: 448,
nByteLength: 57,
P: ed448P,