@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
@@ -0,0 +1,44 @@
1
+ import { Signer } from './utils.js';
2
+ type Param = {
3
+ K: number;
4
+ L: number;
5
+ D: number;
6
+ GAMMA1: number;
7
+ GAMMA2: number;
8
+ TAU: number;
9
+ ETA: number;
10
+ OMEGA: number;
11
+ };
12
+ export declare const PARAMS: Record<string, Param>;
13
+ export declare const ml_dsa44: {
14
+ internal: Signer;
15
+ keygen: (seed: Uint8Array) => {
16
+ secretKey: Uint8Array;
17
+ publicKey: Uint8Array;
18
+ };
19
+ signRandBytes: number;
20
+ sign: (secretKey: Uint8Array, msg: Uint8Array, ctx?: Uint8Array, random?: Uint8Array) => Uint8Array;
21
+ verify: (publicKey: Uint8Array, msg: Uint8Array, sig: Uint8Array, ctx?: Uint8Array) => boolean;
22
+ };
23
+ export declare const ml_dsa65: {
24
+ internal: Signer;
25
+ keygen: (seed: Uint8Array) => {
26
+ secretKey: Uint8Array;
27
+ publicKey: Uint8Array;
28
+ };
29
+ signRandBytes: number;
30
+ sign: (secretKey: Uint8Array, msg: Uint8Array, ctx?: Uint8Array, random?: Uint8Array) => Uint8Array;
31
+ verify: (publicKey: Uint8Array, msg: Uint8Array, sig: Uint8Array, ctx?: Uint8Array) => boolean;
32
+ };
33
+ export declare const ml_dsa87: {
34
+ internal: Signer;
35
+ keygen: (seed: Uint8Array) => {
36
+ secretKey: Uint8Array;
37
+ publicKey: Uint8Array;
38
+ };
39
+ signRandBytes: number;
40
+ sign: (secretKey: Uint8Array, msg: Uint8Array, ctx?: Uint8Array, random?: Uint8Array) => Uint8Array;
41
+ verify: (publicKey: Uint8Array, msg: Uint8Array, sig: Uint8Array, ctx?: Uint8Array) => boolean;
42
+ };
43
+ export {};
44
+ //# sourceMappingURL=ml-dsa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-dsa.d.ts","sourceRoot":"","sources":["../src/ml-dsa.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,MAAM,EAQP,MAAM,YAAY,CAAC;AAwBpB,KAAK,KAAK,GAAG;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAI/B,CAAC;AA0dX,eAAO,MAAM,QAAQ;;;;;;;sBAbC,UAAU,OAAO,UAAU,6BAAwB,UAAU;wBAM3D,UAAU,OAAO,UAAU,OAAO,UAAU;CAclE,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;sBAtBC,UAAU,OAAO,UAAU,6BAAwB,UAAU;wBAM3D,UAAU,OAAO,UAAU,OAAO,UAAU;CAuBlE,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;sBA/BC,UAAU,OAAO,UAAU,6BAAwB,UAAU;wBAM3D,UAAU,OAAO,UAAU,OAAO,UAAU;CAgClE,CAAC"}
package/esm/ml-dsa.js CHANGED
@@ -1,18 +1,13 @@
1
1
  /*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
2
2
  import { shake256 } from '@noble/hashes/sha3';
3
- import { genCrystals, XOF128, XOF256, XOF_AES } from './_crystals.js';
4
- import { cleanBytes, ensureBytes, equalBytes, randomBytes, splitCoder, vecCoder, } from './utils.js';
3
+ import { genCrystals, XOF128, XOF256 } from './_crystals.js';
4
+ import { cleanBytes, ensureBytes, equalBytes, randomBytes, splitCoder, vecCoder, concatBytes, } from './utils.js';
5
5
  /*
6
6
  Lattice-based digital signature algorithm. See
7
7
  [official site](https://www.pq-crystals.org/dilithium/index.shtml),
8
8
  [repo](https://github.com/pq-crystals/dilithium).
9
9
  Dilithium has similar internals to Kyber, but their keys and params are different.
10
10
 
11
- Three versions are provided:
12
-
13
- 1. Dilithium v3.0, v3.0 AES
14
- 2. Dilithium v3.1, v3.1 AES
15
- 3. ML-DSA aka [FIPS-204](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.ipd.pdf)
16
11
  */
17
12
  // Constants
18
13
  const N = 256;
@@ -41,9 +36,10 @@ const { mod, smod, NTT, bitsCoder } = genCrystals({
41
36
  isKyber: false,
42
37
  brvBits: 8,
43
38
  });
44
- const polyCoder = (d, compress) => bitsCoder(d, {
45
- encode: (i) => (compress ? compress(i) : i),
46
- decode: (i) => (compress ? compress(i) : i),
39
+ const id = (n) => n;
40
+ const polyCoder = (d, compress = id, verify = id) => bitsCoder(d, {
41
+ encode: (i) => compress(verify(i)),
42
+ decode: (i) => verify(compress(i)),
47
43
  });
48
44
  const polyAdd = (a, b) => {
49
45
  for (let i = 0; i < a.length; i++)
@@ -94,9 +90,10 @@ function RejNTTPoly(xof) {
94
90
  }
95
91
  return r;
96
92
  }
93
+ const EMPTY = new Uint8Array(0);
97
94
  function getDilithium(opts) {
98
95
  const { K, L, GAMMA1, GAMMA2, TAU, ETA, OMEGA } = opts;
99
- const { FIPS204, V31, CRH_BYTES, TR_BYTES, C_TILDE_BYTES, XOF128, XOF256 } = opts;
96
+ const { CRH_BYTES, TR_BYTES, C_TILDE_BYTES, XOF128, XOF256 } = opts;
100
97
  if (![2, 4].includes(ETA))
101
98
  throw new Error('Wrong ETA');
102
99
  if (![1 << 17, 1 << 19].includes(GAMMA1))
@@ -126,6 +123,8 @@ function getDilithium(opts) {
126
123
  // But they return different results! However, decompose is same.
127
124
  // So, either there is a bug in Dilithium ref implementation or in FIPS204.
128
125
  // For now, lets use dilithium one, so test vectors can be passed.
126
+ // See
127
+ // https://github.com/GiacomoPope/dilithium-py?tab=readme-ov-file#optimising-decomposition-and-making-hints
129
128
  return res0;
130
129
  };
131
130
  const UseHint = (h, r) => {
@@ -179,7 +178,11 @@ function getDilithium(opts) {
179
178
  return h;
180
179
  },
181
180
  };
182
- const ETACoder = polyCoder(ETA === 2 ? 3 : 4, (i) => ETA - i);
181
+ const ETACoder = polyCoder(ETA === 2 ? 3 : 4, (i) => ETA - i, (i) => {
182
+ if (!(-ETA <= i && i <= ETA))
183
+ throw new Error(`malformed key s1/s3 ${i} outside of ETA range [${-ETA}, ${ETA}]`);
184
+ return i;
185
+ });
183
186
  const T0Coder = polyCoder(13, (i) => (1 << (D - 1)) - i);
184
187
  const T1Coder = polyCoder(10);
185
188
  // Requires smod. Need to fix!
@@ -214,7 +217,7 @@ function getDilithium(opts) {
214
217
  const SampleInBall = (seed) => {
215
218
  // Samples a polynomial c ∈ Rq with coeffcients from {−1, 0, 1} and Hamming weight τ
216
219
  const pre = newPoly(N);
217
- const s = shake256.create({}).update(seed.slice(0, 32));
220
+ const s = shake256.create({}).update(seed);
218
221
  const buf = new Uint8Array(shake256.blockLen);
219
222
  s.xofInto(buf);
220
223
  const masks = buf.slice(0, 8);
@@ -261,15 +264,19 @@ function getDilithium(opts) {
261
264
  }
262
265
  return { v, cnt };
263
266
  };
264
- const signRandBytes = FIPS204 ? 32 : CRH_BYTES;
265
- const seedCoder = splitCoder(32, V31 ? 64 : 32, 32);
266
- const seedXOF = V31 ? XOF256 : XOF128;
267
+ const signRandBytes = 32;
268
+ const seedCoder = splitCoder(32, 64, 32);
267
269
  // API & argument positions are exactly as in FIPS204.
268
- return {
270
+ const internal = {
269
271
  signRandBytes,
270
272
  keygen: (seed = randomBytes(32)) => {
271
- const [rho, rhoPrime, K_] = seedCoder.decode(shake256(seed, { dkLen: seedCoder.bytesLen }));
272
- const xofPrime = seedXOF(rhoPrime);
273
+ // H(𝜉||IntegerToBytes(𝑘, 1)||IntegerToBytes(ℓ, 1), 128) 2: expand seed
274
+ const seedDst = new Uint8Array(32 + 2);
275
+ seedDst.set(seed);
276
+ seedDst[32] = K;
277
+ seedDst[33] = L;
278
+ const [rho, rhoPrime, K_] = seedCoder.decode(shake256(seedDst, { dkLen: seedCoder.bytesLen }));
279
+ const xofPrime = XOF256(rhoPrime);
273
280
  const s1 = [];
274
281
  for (let i = 0; i < L; i++)
275
282
  s1.push(RejBoundedPoly(xofPrime.get(i & 0xff, (i >> 8) & 0xff)));
@@ -301,7 +308,7 @@ function getDilithium(opts) {
301
308
  // STATS
302
309
  // Kyber512: { calls: 4, xofs: 12 }, Kyber768: { calls: 9, xofs: 27 }, Kyber1024: { calls: 16, xofs: 48 }
303
310
  // DSA44: { calls: 24, xofs: 24 }, DSA65: { calls: 41, xofs: 41 }, DSA87: { calls: 71, xofs: 71 }
304
- cleanBytes(rho, rhoPrime, K_, s1, s2, s1Hat, t, t0, t1, tr);
311
+ cleanBytes(rho, rhoPrime, K_, s1, s2, s1Hat, t, t0, t1, tr, seedDst);
305
312
  return { publicKey, secretKey };
306
313
  },
307
314
  // NOTE: random is optional.
@@ -327,17 +334,15 @@ function getDilithium(opts) {
327
334
  }
328
335
  // This part is per msg
329
336
  const mu = shake256.create({ dkLen: CRH_BYTES }).update(tr).update(msg).digest(); // 6: µ ← H(tr||M, 512) ▷ Compute message representative µ
330
- let rhoprime; // Compute private random seed
331
- if (FIPS204) {
332
- const rnd = random ? random : new Uint8Array(32);
333
- ensureBytes(rnd);
334
- rhoprime = shake256.create({ dkLen: CRH_BYTES }).update(_K).update(rnd).update(mu).digest(); // ρ′← H(K||rnd||µ, 512)
335
- }
336
- else {
337
- rhoprime = random
338
- ? random
339
- : shake256.create({ dkLen: CRH_BYTES }).update(_K).update(mu).digest();
340
- }
337
+ // Compute private random seed
338
+ const rnd = random ? random : new Uint8Array(32);
339
+ ensureBytes(rnd);
340
+ const rhoprime = shake256
341
+ .create({ dkLen: CRH_BYTES })
342
+ .update(_K)
343
+ .update(rnd)
344
+ .update(mu)
345
+ .digest(); // ρ′← H(K||rnd||µ, 512)
341
346
  ensureBytes(rhoprime, CRH_BYTES);
342
347
  const x256 = XOF256(rhoprime, ZCoder.bytesLen);
343
348
  // Rejection sampling loop
@@ -364,7 +369,7 @@ function getDilithium(opts) {
364
369
  .update(W1Vec.encode(w1))
365
370
  .digest();
366
371
  // Verifer’s challenge
367
- const cHat = NTT.encode(SampleInBall(cTilde.subarray(0, 32))); // c ← SampleInBall(c˜1); cˆ ← NTT(c)
372
+ const cHat = NTT.encode(SampleInBall(cTilde)); // c ← SampleInBall(c˜1); cˆ ← NTT(c)
368
373
  // ⟨⟨cs1⟩⟩ ← NTT−1(cˆ◦ sˆ1)
369
374
  const cs1 = s1.map((i) => MultiplyNTTs(i, cHat));
370
375
  for (let i = 0; i < L; i++) {
@@ -414,7 +419,7 @@ function getDilithium(opts) {
414
419
  return false;
415
420
  const mu = shake256.create({ dkLen: CRH_BYTES }).update(tr).update(msg).digest(); // 7: µ ← H(tr||M, 512)
416
421
  // Compute verifer’s challenge from c˜
417
- const c = NTT.encode(SampleInBall(cTilde.subarray(0, 32))); // c ← SampleInBall(c˜1)
422
+ const c = NTT.encode(SampleInBall(cTilde)); // c ← SampleInBall(c˜1)
418
423
  const zNtt = z.map((i) => i.slice()); // zNtt = NTT(z)
419
424
  for (let i = 0; i < L; i++)
420
425
  NTT.encode(zNtt[i]);
@@ -439,62 +444,42 @@ function getDilithium(opts) {
439
444
  .update(mu)
440
445
  .update(W1Vec.encode(wTick1))
441
446
  .digest();
442
- if (FIPS204) {
443
- // Additional checks in FIPS-204:
444
- // [[ ||z||∞ < γ1 − β ]] and [[c ˜ = c˜′]] and [[number of 1’s in h is ≤ ω]]
445
- for (const t of h) {
446
- const sum = t.reduce((acc, i) => acc + i, 0);
447
- if (!(sum <= OMEGA))
448
- return false;
449
- }
450
- for (const t of z)
451
- if (polyChknorm(t, GAMMA1 - BETA))
452
- return false;
447
+ // Additional checks in FIPS-204:
448
+ // [[ ||z||∞ < γ1 − β ]] and [[c ˜ = c˜′]] and [[number of 1’s in h is ≤ ω]]
449
+ for (const t of h) {
450
+ const sum = t.reduce((acc, i) => acc + i, 0);
451
+ if (!(sum <= OMEGA))
452
+ return false;
453
453
  }
454
+ for (const t of z)
455
+ if (polyChknorm(t, GAMMA1 - BETA))
456
+ return false;
454
457
  return equalBytes(cTilde, c2);
455
458
  },
456
459
  };
457
- }
458
- function getDilithiumVersions(cfg) {
460
+ const getMessage = (msg, ctx = EMPTY) => {
461
+ ensureBytes(msg);
462
+ ensureBytes(ctx);
463
+ if (ctx.length > 255)
464
+ throw new Error('context should be less than 255 bytes');
465
+ return concatBytes(new Uint8Array([0, ctx.length]), ctx, msg);
466
+ };
467
+ // TODO: no hash-dsa vectors for now, so we don't implement it yet
459
468
  return {
460
- dilithium2: getDilithium({ ...PARAMS[2], ...cfg }),
461
- dilithium3: getDilithium({ ...PARAMS[3], ...cfg }),
462
- dilithium5: getDilithium({ ...PARAMS[5], ...cfg }),
469
+ internal,
470
+ keygen: internal.keygen,
471
+ signRandBytes: internal.signRandBytes,
472
+ sign: (secretKey, msg, ctx = EMPTY, random) => {
473
+ const M = getMessage(msg, ctx);
474
+ const res = internal.sign(secretKey, M, random);
475
+ M.fill(0);
476
+ return res;
477
+ },
478
+ verify: (publicKey, msg, sig, ctx = EMPTY) => {
479
+ return internal.verify(publicKey, getMessage(msg, ctx), sig);
480
+ },
463
481
  };
464
482
  }
465
- // v30 is NIST round 3 submission, for original vectors and benchmarking.
466
- // v31 is kyber: more secure than v30.
467
- // ml-dsa is NIST FIPS 204, but it is still a draft and may change.
468
- export const dilithium_v30 = /* @__PURE__ */ getDilithiumVersions({
469
- CRH_BYTES: 48,
470
- TR_BYTES: 48,
471
- C_TILDE_BYTES: 32,
472
- XOF128,
473
- XOF256,
474
- });
475
- export const dilithium_v31 = /* @__PURE__ */ getDilithiumVersions({
476
- CRH_BYTES: 64,
477
- TR_BYTES: 32,
478
- C_TILDE_BYTES: 32,
479
- XOF128,
480
- XOF256,
481
- V31: true,
482
- });
483
- export const dilithium_v30_aes = /* @__PURE__ */ getDilithiumVersions({
484
- CRH_BYTES: 48,
485
- TR_BYTES: 48,
486
- C_TILDE_BYTES: 32,
487
- XOF128: XOF_AES,
488
- XOF256: XOF_AES,
489
- });
490
- export const dilithium_v31_aes = /* @__PURE__ */ getDilithiumVersions({
491
- CRH_BYTES: 64,
492
- TR_BYTES: 32,
493
- C_TILDE_BYTES: 32,
494
- XOF128: XOF_AES,
495
- XOF256: XOF_AES,
496
- V31: true,
497
- });
498
483
  // ML-DSA
499
484
  export const ml_dsa44 = /* @__PURE__ */ getDilithium({
500
485
  ...PARAMS[2],
@@ -503,8 +488,6 @@ export const ml_dsa44 = /* @__PURE__ */ getDilithium({
503
488
  C_TILDE_BYTES: 32,
504
489
  XOF128,
505
490
  XOF256,
506
- V31: true,
507
- FIPS204: true,
508
491
  });
509
492
  export const ml_dsa65 = /* @__PURE__ */ getDilithium({
510
493
  ...PARAMS[3],
@@ -513,8 +496,6 @@ export const ml_dsa65 = /* @__PURE__ */ getDilithium({
513
496
  C_TILDE_BYTES: 48,
514
497
  XOF128,
515
498
  XOF256,
516
- V31: true,
517
- FIPS204: true,
518
499
  });
519
500
  export const ml_dsa87 = /* @__PURE__ */ getDilithium({
520
501
  ...PARAMS[5],
@@ -523,7 +504,5 @@ export const ml_dsa87 = /* @__PURE__ */ getDilithium({
523
504
  C_TILDE_BYTES: 64,
524
505
  XOF128,
525
506
  XOF256,
526
- V31: true,
527
- FIPS204: true,
528
507
  });
529
508
  //# sourceMappingURL=ml-dsa.js.map
package/esm/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,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAO,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAGL,UAAU,EACV,WAAW,EACX,UAAU,EACV,WA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;AAED,SAAS;AACT,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,YAAY,CAAC;IACnD,GAAG,MAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,YAAY,CAAC;IACnD,GAAG,MAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,YAAY,CAAC;IACnD,GAAG,MAAM,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE;IACjB,MAAM;IACN,MAAM;CACP,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ type ParameterSet = {
2
+ N: number;
3
+ K: number;
4
+ Q: number;
5
+ ETA1: number;
6
+ ETA2: number;
7
+ du: number;
8
+ dv: number;
9
+ RBGstrength: number;
10
+ };
11
+ export declare const PARAMS: Record<string, ParameterSet>;
12
+ /**
13
+ * FIPS-203 ML-KEM.
14
+ */
15
+ export declare const ml_kem512: {
16
+ publicKeyLen: number;
17
+ msgLen: number;
18
+ keygen: (seed?: Uint8Array) => {
19
+ publicKey: Uint8Array;
20
+ secretKey: Uint8Array;
21
+ };
22
+ encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
23
+ cipherText: Uint8Array;
24
+ sharedSecret: Uint8Array;
25
+ };
26
+ decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
27
+ };
28
+ export declare const ml_kem768: {
29
+ publicKeyLen: number;
30
+ msgLen: number;
31
+ keygen: (seed?: Uint8Array) => {
32
+ publicKey: Uint8Array;
33
+ secretKey: Uint8Array;
34
+ };
35
+ encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
36
+ cipherText: Uint8Array;
37
+ sharedSecret: Uint8Array;
38
+ };
39
+ decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
40
+ };
41
+ export declare const ml_kem1024: {
42
+ publicKeyLen: number;
43
+ msgLen: number;
44
+ keygen: (seed?: Uint8Array) => {
45
+ publicKey: Uint8Array;
46
+ secretKey: Uint8Array;
47
+ };
48
+ encapsulate: (publicKey: Uint8Array, msg?: Uint8Array) => {
49
+ cipherText: Uint8Array;
50
+ sharedSecret: Uint8Array;
51
+ };
52
+ decapsulate: (cipherText: Uint8Array, secretKey: Uint8Array) => Uint8Array;
53
+ };
54
+ export {};
55
+ //# sourceMappingURL=ml-kem.d.ts.map
@@ -0,0 +1 @@
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"}