From 77bee0d54e85a5e7a517d492f1524362c0c881c8 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sun, 10 Sep 2023 01:00:51 +0000 Subject: [PATCH] ed448: clarify why there are 56 or 57 byte keys --- src/ed448.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ed448.ts b/src/ed448.ts index 64fb347..af66383 100644 --- a/src/ed448.ts +++ b/src/ed448.ts @@ -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,