@noble/post-quantum 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/README.md +158 -180
  2. package/_crystals.d.ts +0 -1
  3. package/_crystals.d.ts.map +1 -1
  4. package/_crystals.js +1 -31
  5. package/_crystals.js.map +1 -1
  6. package/esm/_crystals.d.ts +33 -0
  7. package/esm/_crystals.d.ts.map +1 -0
  8. package/esm/_crystals.js +0 -30
  9. package/esm/_crystals.js.map +1 -1
  10. package/esm/index.d.ts +2 -0
  11. package/esm/index.d.ts.map +1 -0
  12. package/esm/ml-dsa.d.ts +44 -0
  13. package/esm/ml-dsa.d.ts.map +1 -0
  14. package/esm/ml-dsa.js +67 -88
  15. package/esm/ml-dsa.js.map +1 -1
  16. package/esm/ml-kem.d.ts +55 -0
  17. package/esm/ml-kem.d.ts.map +1 -0
  18. package/esm/ml-kem.js +26 -83
  19. package/esm/ml-kem.js.map +1 -1
  20. package/esm/slh-dsa.d.ts +46 -0
  21. package/esm/slh-dsa.d.ts.map +1 -0
  22. package/esm/slh-dsa.js +27 -111
  23. package/esm/slh-dsa.js.map +1 -1
  24. package/esm/utils.d.ts +38 -0
  25. package/esm/utils.d.ts.map +1 -0
  26. package/esm/utils.js +2 -1
  27. package/esm/utils.js.map +1 -1
  28. package/ml-dsa.d.ts +27 -20
  29. package/ml-dsa.d.ts.map +1 -1
  30. package/ml-dsa.js +66 -87
  31. package/ml-dsa.js.map +1 -1
  32. package/ml-kem.d.ts +1 -80
  33. package/ml-kem.d.ts.map +1 -1
  34. package/ml-kem.js +26 -83
  35. package/ml-kem.js.map +1 -1
  36. package/package.json +14 -22
  37. package/slh-dsa.d.ts +0 -24
  38. package/slh-dsa.d.ts.map +1 -1
  39. package/slh-dsa.js +27 -111
  40. package/slh-dsa.js.map +1 -1
  41. package/src/_crystals.ts +0 -33
  42. package/src/ml-dsa.ts +75 -92
  43. package/src/ml-kem.ts +28 -87
  44. package/src/slh-dsa.ts +27 -121
  45. package/src/utils.ts +2 -1
  46. package/utils.d.ts +2 -2
  47. package/utils.d.ts.map +1 -1
  48. package/utils.js +7 -6
  49. package/utils.js.map +1 -1
package/ml-dsa.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ml-dsa.js","sourceRoot":"","sources":["src/ml-dsa.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,6CAA8C;AAC9C,iDAA2E;AAC3E,yCASoB;AAEpB;;;;;;;;;;;EAWE;AAEF,YAAY;AACZ,MAAM,CAAC,GAAG,GAAG,CAAC;AACd,mGAAmG;AACnG,MAAM,CAAC,GAAG,OAAO,CAAC;AAClB,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,yDAAyD;AACzD,MAAM,CAAC,GAAG,OAAO,CAAC;AAClB,MAAM,CAAC,GAAG,EAAE,CAAC;AACb,+FAA+F;AAC/F,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;AAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;AAc9C,kBAAkB;AACL,QAAA,MAAM,GAA0B;IAC3C,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnF,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnF,C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AAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,EAAE,CAAC,SAAqB,EAAE,GAAe,EAAE,GAAe,EAAE,GAAG,GAAG,KAAK,EAAE,EAAE;YAC/E,OAAO,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS;AACI,QAAA,QAAQ,GAAmB,YAAY,CAAC;IACnD,GAAG,cAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM,EAAN,qBAAM;IACN,MAAM,EAAN,qBAAM;CACP,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAmB,YAAY,CAAC;IACnD,GAAG,cAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM,EAAN,qBAAM;IACN,MAAM,EAAN,qBAAM;CACP,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAmB,YAAY,CAAC;IACnD,GAAG,cAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM,EAAN,qBAAM;IACN,MAAM,EAAN,qBAAM;CACP,CAAC,CAAC"}
package/ml-kem.d.ts CHANGED
@@ -9,87 +9,8 @@ type ParameterSet = {
9
9
  RBGstrength: number;
10
10
  };
11
11
  export declare const PARAMS: Record<string, ParameterSet>;
12
- export declare const kyber512_90s: {
13
- publicKeyLen: number;
14
- msgLen: number;
15
- keygen: (seed?: Uint8Array) => {
16
- publicKey: Uint8Array;
17
- secretKey: Uint8Array;
18
- };
19
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
20
- cipherText: Uint8Array;
21
- sharedSecret: Uint8Array;
22
- };
23
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
24
- };
25
- export declare const kyber768_90s: {
26
- publicKeyLen: number;
27
- msgLen: number;
28
- keygen: (seed?: Uint8Array) => {
29
- publicKey: Uint8Array;
30
- secretKey: Uint8Array;
31
- };
32
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
33
- cipherText: Uint8Array;
34
- sharedSecret: Uint8Array;
35
- };
36
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
37
- };
38
- export declare const kyber1024_90s: {
39
- publicKeyLen: number;
40
- msgLen: number;
41
- keygen: (seed?: Uint8Array) => {
42
- publicKey: Uint8Array;
43
- secretKey: Uint8Array;
44
- };
45
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
46
- cipherText: Uint8Array;
47
- sharedSecret: Uint8Array;
48
- };
49
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
50
- };
51
- export declare const kyber512: {
52
- publicKeyLen: number;
53
- msgLen: number;
54
- keygen: (seed?: Uint8Array) => {
55
- publicKey: Uint8Array;
56
- secretKey: Uint8Array;
57
- };
58
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
59
- cipherText: Uint8Array;
60
- sharedSecret: Uint8Array;
61
- };
62
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
63
- };
64
- export declare const kyber768: {
65
- publicKeyLen: number;
66
- msgLen: number;
67
- keygen: (seed?: Uint8Array) => {
68
- publicKey: Uint8Array;
69
- secretKey: Uint8Array;
70
- };
71
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
72
- cipherText: Uint8Array;
73
- sharedSecret: Uint8Array;
74
- };
75
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
76
- };
77
- export declare const kyber1024: {
78
- publicKeyLen: number;
79
- msgLen: number;
80
- keygen: (seed?: Uint8Array) => {
81
- publicKey: Uint8Array;
82
- secretKey: Uint8Array;
83
- };
84
- encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
85
- cipherText: Uint8Array;
86
- sharedSecret: Uint8Array;
87
- };
88
- decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
89
- };
90
12
  /**
91
- * FIPS-203 (draft) ML-KEM.
92
- * Unsafe: we can't cross-verify, because there are no test vectors or other implementations.
13
+ * FIPS-203 ML-KEM.
93
14
  */
94
15
  export declare const ml_kem512: {
95
16
  publicKeyLen: number;
package/ml-kem.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ml-kem.d.ts","sourceRoot":"","sources":["src/ml-kem.ts"],"names":[],"mappings":"AA0DA,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAItC,CAAC;AA4QX,eAAO,MAAM,YAAY;;;;;;;6BA5DI,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAoC7D,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;6BAhEI,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAwC7D,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;6BApEG,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CA4C7D,CAAC;AAkBH,eAAO,MAAM,QAAQ;;;;;;;6BAzFQ,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAiE7D,CAAC;AACH,eAAO,MAAM,QAAQ;;;;;;;6BA7FQ,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAqE7D,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;6BAjGO,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAyE7D,CAAC;AAEH;;;GAGG;AAEH,eAAO,MAAM,SAAS;;;;;;;6BA3GO,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAoF7D,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;6BAhHO,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CAyF7D,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;6BArHM,UAAU;;;;8BA2BT,UAAU,aAAa,UAAU;CA8F7D,CAAC"}
1
+ {"version":3,"file":"ml-kem.d.ts","sourceRoot":"","sources":["src/ml-kem.ts"],"names":[],"mappings":"AAmDA,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAItC,CAAC;AAuQX;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;6BAtDO,UAAU;;;;8BAmBT,UAAU,aAAa,UAAU;CAsC7D,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;6BA1DO,UAAU;;;;8BAmBT,UAAU,aAAa,UAAU;CA0C7D,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;6BA9DM,UAAU;;;;8BAmBT,UAAU,aAAa,UAAU;CA8C7D,CAAC"}
package/ml-kem.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ml_kem1024 = exports.ml_kem768 = exports.ml_kem512 = exports.kyber1024 = exports.kyber768 = exports.kyber512 = exports.kyber1024_90s = exports.kyber768_90s = exports.kyber512_90s = exports.PARAMS = void 0;
3
+ exports.ml_kem1024 = exports.ml_kem768 = exports.ml_kem512 = exports.PARAMS = void 0;
4
4
  /*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
5
- const aes_1 = require("@noble/ciphers/aes");
6
- const sha2_1 = require("@noble/hashes/sha2");
7
5
  const sha3_1 = require("@noble/hashes/sha3");
8
6
  const utils_1 = require("@noble/hashes/utils");
9
7
  const _crystals_js_1 = require("./_crystals.js");
@@ -28,15 +26,10 @@ There are some concerns with regards to security: see
28
26
  [djb blog](https://blog.cr.yp.to/20231003-countcorrectly.html) and
29
27
  [mailing list](https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/W2VOzy0wz_E).
30
28
 
31
- Three versions are provided:
32
-
33
- 1. Kyber
34
- 2. Kyber-90s, using algorithms from 1990s
35
- 3. ML-KEM aka [FIPS-203](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.ipd.pdf)
36
29
  */
37
30
  const N = 256; // Kyber (not FIPS-203) supports different lengths, but all std modes were using 256
38
31
  const Q = 3329; // 13*(2**8)+1, modulo prime
39
- const F = 3303; // 3303 ≡ 128−1 mod q (FIPS-203)
32
+ const F = 3303; // 3303 ≡ 128**(−1) mod q (FIPS-203)
40
33
  const ROOT_OF_UNITY = 17; // ζ = 17 ∈ Zq is a primitive 256-th root of unity modulo Q. ζ**128 ≡−1
41
34
  const { mod, nttZetas, NTT, bitsCoder } = (0, _crystals_js_1.genCrystals)({
42
35
  N,
@@ -149,7 +142,7 @@ function sampleCBD(PRF, seed, nonce, eta) {
149
142
  // K-PKE
150
143
  // As per FIPS-203, it doesn't perform any input validation and can't be used in standalone fashion.
151
144
  const genKPKE = (opts) => {
152
- const { K, PRF, XOF, HASH512, ETA1, ETA2, du, dv, FIPS203 } = opts;
145
+ const { K, PRF, XOF, HASH512, ETA1, ETA2, du, dv } = opts;
153
146
  const poly1 = polyCoder(1);
154
147
  const polyV = polyCoder(dv);
155
148
  const polyU = polyCoder(du);
@@ -163,7 +156,11 @@ const genKPKE = (opts) => {
163
156
  publicKeyLen: publicCoder.bytesLen,
164
157
  cipherTextLen: cipherCoder.bytesLen,
165
158
  keygen: (seed) => {
166
- const [rho, sigma] = seedCoder.decode(HASH512(seed));
159
+ const seedDst = new Uint8Array(33);
160
+ seedDst.set(seed);
161
+ seedDst[32] = K;
162
+ const seedHash = HASH512(seedDst);
163
+ const [rho, sigma] = seedCoder.decode(seedHash);
167
164
  const sHat = [];
168
165
  const tHat = [];
169
166
  for (let i = 0; i < K; i++)
@@ -172,7 +169,7 @@ const genKPKE = (opts) => {
172
169
  for (let i = 0; i < K; i++) {
173
170
  const e = NTT.encode(sampleCBD(PRF, sigma, K + i, ETA1));
174
171
  for (let j = 0; j < K; j++) {
175
- const aji = SampleNTT(FIPS203 ? x.get(i, j) : x.get(j, i)); // A[j][i], inplace
172
+ const aji = SampleNTT(x.get(j, i)); // A[j][i], inplace
176
173
  polyAdd(e, MultiplyNTTs(aji, sHat[j]));
177
174
  }
178
175
  tHat.push(e); // t ← A ◦ s + e
@@ -182,7 +179,7 @@ const genKPKE = (opts) => {
182
179
  publicKey: publicCoder.encode([tHat, rho]),
183
180
  secretKey: secretCoder.encode(sHat),
184
181
  };
185
- (0, utils_js_1.cleanBytes)(rho, sigma, sHat, tHat);
182
+ (0, utils_js_1.cleanBytes)(rho, sigma, sHat, tHat, seedDst, seedHash);
186
183
  return res;
187
184
  },
188
185
  encrypt: (publicKey, msg, seed) => {
@@ -197,7 +194,7 @@ const genKPKE = (opts) => {
197
194
  const e1 = sampleCBD(PRF, seed, K + i, ETA2);
198
195
  const tmp = new Uint16Array(N);
199
196
  for (let j = 0; j < K; j++) {
200
- const aij = SampleNTT(FIPS203 ? x.get(j, i) : x.get(i, j)); // A[i][j], inplace
197
+ const aij = SampleNTT(x.get(i, j)); // A[i][j], inplace
201
198
  polyAdd(tmp, MultiplyNTTs(aij, rHat[j])); // t += aij * rHat[j]
202
199
  }
203
200
  polyAdd(e1, NTT.decode(tmp)); // e1 += tmp
@@ -227,7 +224,7 @@ const genKPKE = (opts) => {
227
224
  };
228
225
  function createKyber(opts) {
229
226
  const KPKE = genKPKE(opts);
230
- const { HASH256, HASH512, KDF, FIPS203 } = opts;
227
+ const { HASH256, HASH512, KDF } = opts;
231
228
  const { secretCoder: KPKESecretCoder, cipherTextLen } = KPKE;
232
229
  const publicKeyLen = KPKE.publicKeyLen; // 384*K+32
233
230
  const secretCoder = (0, utils_js_1.splitCoder)(KPKE.secretKeyLen, KPKE.publicKeyLen, 32, 32);
@@ -248,31 +245,20 @@ function createKyber(opts) {
248
245
  encapsulate: (publicKey, msg = (0, utils_js_1.randomBytes)(32)) => {
249
246
  (0, utils_js_1.ensureBytes)(publicKey, publicKeyLen);
250
247
  (0, utils_js_1.ensureBytes)(msg, msgLen);
251
- if (!FIPS203)
252
- msg = HASH256(msg); // NOTE: ML-KEM doesn't have this step!
253
- else {
254
- // FIPS-203 includes additional verification check for modulus
255
- const eke = publicKey.subarray(0, 384 * opts.K);
256
- const ek = KPKESecretCoder.encode(KPKESecretCoder.decode(eke.slice())); // Copy because of inplace encoding
257
- // (Modulus check.) Perform the computation ek ← ByteEncode12(ByteDecode12(eke)).
258
- // If ek = ̸ eke, the input is invalid. (See Section 4.2.1.)
259
- if (!(0, utils_js_1.equalBytes)(ek, eke)) {
260
- (0, utils_js_1.cleanBytes)(ek);
261
- throw new Error('ML-KEM.encapsulate: wrong publicKey modulus');
262
- }
248
+ // FIPS-203 includes additional verification check for modulus
249
+ const eke = publicKey.subarray(0, 384 * opts.K);
250
+ const ek = KPKESecretCoder.encode(KPKESecretCoder.decode(eke.slice())); // Copy because of inplace encoding
251
+ // (Modulus check.) Perform the computation ek ← ByteEncode12(ByteDecode12(eke)).
252
+ // If ek = ̸ eke, the input is invalid. (See Section 4.2.1.)
253
+ if (!(0, utils_js_1.equalBytes)(ek, eke)) {
263
254
  (0, utils_js_1.cleanBytes)(ek);
255
+ throw new Error('ML-KEM.encapsulate: wrong publicKey modulus');
264
256
  }
257
+ (0, utils_js_1.cleanBytes)(ek);
265
258
  const kr = HASH512.create().update(msg).update(HASH256(publicKey)).digest(); // derive randomness
266
259
  const cipherText = KPKE.encrypt(publicKey, msg, kr.subarray(32, 64));
267
- if (FIPS203)
268
- return { cipherText, sharedSecret: kr.subarray(0, 32) };
269
- const cipherTextHash = HASH256(cipherText);
270
- const sharedSecret = KDF.create({})
271
- .update(kr.subarray(0, 32))
272
- .update(cipherTextHash)
273
- .digest();
274
- (0, utils_js_1.cleanBytes)(kr, cipherTextHash);
275
- return { cipherText, sharedSecret };
260
+ kr.subarray(32).fill(0);
261
+ return { cipherText, sharedSecret: kr.subarray(0, 32) };
276
262
  },
277
263
  decapsulate: (cipherText, secretKey) => {
278
264
  (0, utils_js_1.ensureBytes)(secretKey, secretKeyLen); // 768*k + 96
@@ -283,39 +269,12 @@ function createKyber(opts) {
283
269
  const Khat = kr.subarray(0, 32);
284
270
  const cipherText2 = KPKE.encrypt(publicKey, msg, kr.subarray(32, 64)); // re-encrypt using the derived randomness
285
271
  const isValid = (0, utils_js_1.equalBytes)(cipherText, cipherText2); // if ciphertexts do not match, “implicitly reject”
286
- if (FIPS203) {
287
- const Kbar = KDF.create({ dkLen: 32 }).update(z).update(cipherText).digest();
288
- (0, utils_js_1.cleanBytes)(msg, cipherText2, !isValid ? Khat : Kbar);
289
- return isValid ? Khat : Kbar;
290
- }
291
- const cipherTextHash = HASH256(cipherText);
292
- const sharedSecret = KDF.create({ dkLen: 32 })
293
- .update(isValid ? Khat : z)
294
- .update(cipherTextHash)
295
- .digest();
296
- (0, utils_js_1.cleanBytes)(msg, cipherTextHash, cipherText2, Khat, z);
297
- return sharedSecret;
272
+ const Kbar = KDF.create({ dkLen: 32 }).update(z).update(cipherText).digest();
273
+ (0, utils_js_1.cleanBytes)(msg, cipherText2, !isValid ? Khat : Kbar);
274
+ return isValid ? Khat : Kbar;
298
275
  },
299
276
  };
300
277
  }
301
- function PRF(l, key, nonce) {
302
- const _nonce = new Uint8Array(16);
303
- _nonce[0] = nonce;
304
- return (0, aes_1.ctr)(key, _nonce).encrypt(new Uint8Array(l));
305
- }
306
- const opts90s = { HASH256: sha2_1.sha256, HASH512: sha2_1.sha512, KDF: sha2_1.sha256, XOF: _crystals_js_1.XOF_AES, PRF };
307
- exports.kyber512_90s = createKyber({
308
- ...opts90s,
309
- ...exports.PARAMS[512],
310
- });
311
- exports.kyber768_90s = createKyber({
312
- ...opts90s,
313
- ...exports.PARAMS[768],
314
- });
315
- exports.kyber1024_90s = createKyber({
316
- ...opts90s,
317
- ...exports.PARAMS[1024],
318
- });
319
278
  function shakePRF(dkLen, key, nonce) {
320
279
  return sha3_1.shake256
321
280
  .create({ dkLen })
@@ -330,35 +289,19 @@ const opts = {
330
289
  XOF: _crystals_js_1.XOF128,
331
290
  PRF: shakePRF,
332
291
  };
333
- exports.kyber512 = createKyber({
334
- ...opts,
335
- ...exports.PARAMS[512],
336
- });
337
- exports.kyber768 = createKyber({
338
- ...opts,
339
- ...exports.PARAMS[768],
340
- });
341
- exports.kyber1024 = createKyber({
342
- ...opts,
343
- ...exports.PARAMS[1024],
344
- });
345
292
  /**
346
- * FIPS-203 (draft) ML-KEM.
347
- * Unsafe: we can't cross-verify, because there are no test vectors or other implementations.
293
+ * FIPS-203 ML-KEM.
348
294
  */
349
295
  exports.ml_kem512 = createKyber({
350
296
  ...opts,
351
297
  ...exports.PARAMS[512],
352
- FIPS203: true,
353
298
  });
354
299
  exports.ml_kem768 = createKyber({
355
300
  ...opts,
356
301
  ...exports.PARAMS[768],
357
- FIPS203: true,
358
302
  });
359
303
  exports.ml_kem1024 = createKyber({
360
304
  ...opts,
361
305
  ...exports.PARAMS[1024],
362
- FIPS203: true,
363
306
  });
364
307
  //# sourceMappingURL=ml-kem.js.map
package/ml-kem.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ml-kem.js","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AQ;CACd,CAAC;AAEF;;GAEG;AACU,QAAA,SAAS,GAAmB,WAAW,CAAC;IACnD,GAAG,IAAI;IACP,GAAG,cAAM,CAAC,GAAG,CAAC;CACf,CAAC,CAAC;AACU,QAAA,SAAS,GAAmB,WAAW,CAAC;IACnD,GAAG,IAAI;IACP,GAAG,cAAM,CAAC,GAAG,CAAC;CACf,CAAC,CAAC;AACU,QAAA,UAAU,GAAmB,WAAW,CAAC;IACpD,GAAG,IAAI;IACP,GAAG,cAAM,CAAC,IAAI,CAAC;CAChB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@noble/post-quantum",
3
- "version": "0.1.0",
4
- "description": "Auditable & minimal JS implementation of public-key post-quantum cryptography",
3
+ "version": "0.2.1",
4
+ "description": "Auditable & minimal JS implementation of public-key post-quantum cryptography: FIPS 203, 204, 205",
5
5
  "files": [
6
6
  "esm",
7
7
  "src",
@@ -30,53 +30,45 @@
30
30
  "license": "MIT",
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "@noble/ciphers": "0.5.2",
34
- "@noble/hashes": "1.4.0"
33
+ "@noble/hashes": "1.6.0"
35
34
  },
36
35
  "devDependencies": {
37
- "@paulmillr/jsbt": "0.1.0",
36
+ "@paulmillr/jsbt": "0.2.1",
38
37
  "@scure/base": "1.1.5",
39
38
  "micro-bmark": "0.3.1",
40
39
  "micro-should": "0.4.0",
41
- "prettier": "3.1.1",
42
- "typescript": "5.3.2"
40
+ "prettier": "3.3.2",
41
+ "typescript": "5.5.2"
43
42
  },
44
43
  "main": "index.js",
45
44
  "exports": {
46
45
  ".": {
47
- "types": "./index.d.ts",
48
46
  "import": "./esm/index.js",
49
- "default": "./index.js"
47
+ "require": "./index.js"
50
48
  },
51
49
  "./index": {
52
- "types": "./index.d.ts",
53
50
  "import": "./esm/index.js",
54
- "default": "./index.js"
51
+ "require": "./index.js"
55
52
  },
56
53
  "./_crystals": {
57
- "types": "./_crystals.d.ts",
58
54
  "import": "./esm/_crystals.js",
59
- "default": "./_crystals.js"
55
+ "require": "./_crystals.js"
60
56
  },
61
57
  "./ml-dsa": {
62
- "types": "./ml-dsa.d.ts",
63
58
  "import": "./esm/ml-dsa.js",
64
- "default": "./ml-dsa.js"
59
+ "require": "./ml-dsa.js"
65
60
  },
66
61
  "./ml-kem": {
67
- "types": "./ml-kem.d.ts",
68
62
  "import": "./esm/ml-kem.js",
69
- "default": "./ml-kem.js"
63
+ "require": "./ml-kem.js"
70
64
  },
71
65
  "./slh-dsa": {
72
- "types": "./slh-dsa.d.ts",
73
66
  "import": "./esm/slh-dsa.js",
74
- "default": "./slh-dsa.js"
67
+ "require": "./slh-dsa.js"
75
68
  },
76
69
  "./utils": {
77
- "types": "./utils.d.ts",
78
70
  "import": "./esm/utils.js",
79
- "default": "./utils.js"
71
+ "require": "./utils.js"
80
72
  }
81
73
  },
82
74
  "keywords": [
@@ -97,4 +89,4 @@
97
89
  "cryptography"
98
90
  ],
99
91
  "funding": "https://paulmillr.com/funding/"
100
- }
92
+ }
package/slh-dsa.d.ts CHANGED
@@ -30,36 +30,12 @@ export type GetContext = (opts: SphincsOpts) => (pub_seed: Uint8Array, sk_seed?:
30
30
  type SphincsSigner = Signer & {
31
31
  seedLen: number;
32
32
  };
33
- export declare const sphincs_shake_128f_simple: SphincsSigner;
34
- export declare const sphincs_shake_128f_robust: SphincsSigner;
35
- export declare const sphincs_shake_128s_simple: SphincsSigner;
36
- export declare const sphincs_shake_128s_robust: SphincsSigner;
37
- export declare const sphincs_shake_192f_simple: SphincsSigner;
38
- export declare const sphincs_shake_192f_robust: SphincsSigner;
39
- export declare const sphincs_shake_192s_simple: SphincsSigner;
40
- export declare const sphincs_shake_192s_robust: SphincsSigner;
41
- export declare const sphincs_shake_256f_simple: SphincsSigner;
42
- export declare const sphincs_shake_256f_robust: SphincsSigner;
43
- export declare const sphincs_shake_256s_simple: SphincsSigner;
44
- export declare const sphincs_shake_256s_robust: SphincsSigner;
45
33
  export declare const slh_dsa_shake_128f: SphincsSigner;
46
34
  export declare const slh_dsa_shake_128s: SphincsSigner;
47
35
  export declare const slh_dsa_shake_192f: SphincsSigner;
48
36
  export declare const slh_dsa_shake_192s: SphincsSigner;
49
37
  export declare const slh_dsa_shake_256f: SphincsSigner;
50
38
  export declare const slh_dsa_shake_256s: SphincsSigner;
51
- export declare const sphincs_sha2_128f_simple: SphincsSigner;
52
- export declare const sphincs_sha2_128f_robust: SphincsSigner;
53
- export declare const sphincs_sha2_128s_simple: SphincsSigner;
54
- export declare const sphincs_sha2_128s_robust: SphincsSigner;
55
- export declare const sphincs_sha2_192f_simple: SphincsSigner;
56
- export declare const sphincs_sha2_192f_robust: SphincsSigner;
57
- export declare const sphincs_sha2_192s_simple: SphincsSigner;
58
- export declare const sphincs_sha2_192s_robust: SphincsSigner;
59
- export declare const sphincs_sha2_256f_simple: SphincsSigner;
60
- export declare const sphincs_sha2_256f_robust: SphincsSigner;
61
- export declare const sphincs_sha2_256s_simple: SphincsSigner;
62
- export declare const sphincs_sha2_256s_robust: SphincsSigner;
63
39
  export declare const slh_dsa_sha2_128f: SphincsSigner;
64
40
  export declare const slh_dsa_sha2_128s: SphincsSigner;
65
41
  export declare const slh_dsa_sha2_192f: SphincsSigner;
package/slh-dsa.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"slh-dsa.d.ts","sourceRoot":"","sources":["src/slh-dsa.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,MAAM,EAQP,MAAM,YAAY,CAAC;AAoCpB;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,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