@noble/post-quantum 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/esm/ml-kem.js ADDED
@@ -0,0 +1,361 @@
1
+ /*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
2
+ import { ctr } from '@noble/ciphers/aes';
3
+ import { sha256, sha512 } from '@noble/hashes/sha2';
4
+ import { sha3_256, sha3_512, shake256 } from '@noble/hashes/sha3';
5
+ import { u32 } from '@noble/hashes/utils';
6
+ import { genCrystals, XOF_AES, XOF128 } from './_crystals.js';
7
+ import { cleanBytes, ensureBytes, equalBytes, randomBytes, splitCoder, vecCoder, } from './utils.js';
8
+ /*
9
+ Lattice-based key encapsulation mechanism.
10
+ See [official site](https://www.pq-crystals.org/kyber/resources.shtml),
11
+ [repo](https://github.com/pq-crystals/kyber),
12
+ [spec](https://datatracker.ietf.org/doc/draft-cfrg-schwabe-kyber/).
13
+
14
+ Key encapsulation is similar to DH / ECDH (think X25519), with important differences:
15
+
16
+ - We can't verify if it was "Bob" who've sent the shared secret.
17
+ In ECDH, it's always verified
18
+ - Kyber is probabalistic and relies on quality of randomness (CSPRNG).
19
+ ECDH doesn't (to this extent).
20
+ - Kyber decapsulation never throws an error, even when shared secret was
21
+ encrypted by a different public key. It will just return a different
22
+ shared secret
23
+
24
+ There are some concerns with regards to security: see
25
+ [djb blog](https://blog.cr.yp.to/20231003-countcorrectly.html) and
26
+ [mailing list](https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/W2VOzy0wz_E).
27
+
28
+ Three versions are provided:
29
+
30
+ 1. Kyber
31
+ 2. Kyber-90s, using algorithms from 1990s
32
+ 3. ML-KEM aka [FIPS-203](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.ipd.pdf)
33
+ */
34
+ const N = 256; // Kyber (not FIPS-203) supports different lengths, but all std modes were using 256
35
+ const Q = 3329; // 13*(2**8)+1, modulo prime
36
+ const F = 3303; // 3303 ≡ 128−1 mod q (FIPS-203)
37
+ const ROOT_OF_UNITY = 17; // ζ = 17 ∈ Zq is a primitive 256-th root of unity modulo Q. ζ**128 ≡−1
38
+ const { mod, nttZetas, NTT, bitsCoder } = genCrystals({
39
+ N,
40
+ Q,
41
+ F,
42
+ ROOT_OF_UNITY,
43
+ newPoly: (n) => new Uint16Array(n),
44
+ brvBits: 7,
45
+ isKyber: true,
46
+ });
47
+ // prettier-ignore
48
+ export const PARAMS = {
49
+ 512: { N, Q, K: 2, ETA1: 3, ETA2: 2, du: 10, dv: 4, RBGstrength: 128 },
50
+ 768: { N, Q, K: 3, ETA1: 2, ETA2: 2, du: 10, dv: 4, RBGstrength: 192 },
51
+ 1024: { N, Q, K: 4, ETA1: 2, ETA2: 2, du: 11, dv: 5, RBGstrength: 256 },
52
+ };
53
+ // FIPS-203: compress/decompress
54
+ const compress = (d) => {
55
+ // Special case, no need to compress, pass as is, but strip high bytes on compression
56
+ if (d >= 12)
57
+ return { encode: (i) => i, decode: (i) => i };
58
+ // NOTE: we don't use float arithmetic (forbidden by FIPS-203 and high chance of bugs).
59
+ // Comments map to python implementation in RFC (draft-cfrg-schwabe-kyber)
60
+ // const round = (i: number) => Math.floor(i + 0.5) | 0;
61
+ const a = 2 ** (d - 1);
62
+ return {
63
+ // const compress = (i: number) => round((2 ** d / Q) * i) % 2 ** d;
64
+ encode: (i) => ((i << d) + Q / 2) / Q,
65
+ // const decompress = (i: number) => round((Q / 2 ** d) * i);
66
+ decode: (i) => (i * Q + a) >>> d,
67
+ };
68
+ };
69
+ // NOTE: we merge encoding and compress because it is faster, also both require same d param
70
+ // Converts between bytes and d-bits compressed representation. Kinda like convertRadix2 from @scure/base
71
+ // decode(encode(t)) == t, but there is loss of information on encode(decode(t))
72
+ const polyCoder = (d) => bitsCoder(d, compress(d));
73
+ function polyAdd(a, b) {
74
+ for (let i = 0; i < N; i++)
75
+ a[i] = mod(a[i] + b[i]); // a += b
76
+ }
77
+ function polySub(a, b) {
78
+ for (let i = 0; i < N; i++)
79
+ a[i] = mod(a[i] - b[i]); // a -= b
80
+ }
81
+ // FIPS-203: Computes the product of two degree-one polynomials with respect to a quadratic modulus
82
+ function BaseCaseMultiply(a0, a1, b0, b1, zeta) {
83
+ const c0 = mod(a1 * b1 * zeta + a0 * b0);
84
+ const c1 = mod(a0 * b1 + a1 * b0);
85
+ return { c0, c1 };
86
+ }
87
+ // FIPS-203: Computes the product (in the ring Tq) of two NTT representations. NOTE: works inplace for f
88
+ // NOTE: since multiply defined only for NTT representation, we need to convert to NTT, multiply and convert back
89
+ function MultiplyNTTs(f, g) {
90
+ for (let i = 0; i < N / 2; i++) {
91
+ let z = nttZetas[64 + (i >> 1)];
92
+ if (i & 1)
93
+ z = -z;
94
+ const { c0, c1 } = BaseCaseMultiply(f[2 * i + 0], f[2 * i + 1], g[2 * i + 0], g[2 * i + 1], z);
95
+ f[2 * i + 0] = c0;
96
+ f[2 * i + 1] = c1;
97
+ }
98
+ return f;
99
+ }
100
+ // Return poly in NTT representation
101
+ function SampleNTT(xof) {
102
+ const r = new Uint16Array(N);
103
+ for (let j = 0; j < N;) {
104
+ const b = xof();
105
+ if (b.length % 3)
106
+ throw new Error('SampleNTT: unaligned block');
107
+ for (let i = 0; j < N && i + 3 <= b.length; i += 3) {
108
+ const d1 = ((b[i + 0] >> 0) | (b[i + 1] << 8)) & 0xfff;
109
+ const d2 = ((b[i + 1] >> 4) | (b[i + 2] << 4)) & 0xfff;
110
+ if (d1 < Q)
111
+ r[j++] = d1;
112
+ if (j < N && d2 < Q)
113
+ r[j++] = d2;
114
+ }
115
+ }
116
+ return r;
117
+ }
118
+ // Sampling from the centered binomial distribution
119
+ // Returns poly with small coefficients (noise/errors)
120
+ function sampleCBD(PRF, seed, nonce, eta) {
121
+ const buf = PRF((eta * N) / 4, seed, nonce);
122
+ const r = new Uint16Array(N);
123
+ const b32 = u32(buf);
124
+ let len = 0;
125
+ for (let i = 0, p = 0, bb = 0, t0 = 0; i < b32.length; i++) {
126
+ let b = b32[i];
127
+ for (let j = 0; j < 32; j++) {
128
+ bb += b & 1;
129
+ b >>= 1;
130
+ len += 1;
131
+ if (len === eta) {
132
+ t0 = bb;
133
+ bb = 0;
134
+ }
135
+ else if (len === 2 * eta) {
136
+ r[p++] = mod(t0 - bb);
137
+ bb = 0;
138
+ len = 0;
139
+ }
140
+ }
141
+ }
142
+ if (len)
143
+ throw new Error(`sampleCBD: leftover bits: ${len}`);
144
+ return r;
145
+ }
146
+ // K-PKE
147
+ // As per FIPS-203, it doesn't perform any input validation and can't be used in standalone fashion.
148
+ const genKPKE = (opts) => {
149
+ const { K, PRF, XOF, HASH512, ETA1, ETA2, du, dv, FIPS203 } = opts;
150
+ const poly1 = polyCoder(1);
151
+ const polyV = polyCoder(dv);
152
+ const polyU = polyCoder(du);
153
+ const publicCoder = splitCoder(vecCoder(polyCoder(12), K), 32);
154
+ const secretCoder = vecCoder(polyCoder(12), K);
155
+ const cipherCoder = splitCoder(vecCoder(polyU, K), polyV);
156
+ const seedCoder = splitCoder(32, 32);
157
+ return {
158
+ secretCoder,
159
+ secretKeyLen: secretCoder.bytesLen,
160
+ publicKeyLen: publicCoder.bytesLen,
161
+ cipherTextLen: cipherCoder.bytesLen,
162
+ keygen: (seed) => {
163
+ const [rho, sigma] = seedCoder.decode(HASH512(seed));
164
+ const sHat = [];
165
+ const tHat = [];
166
+ for (let i = 0; i < K; i++)
167
+ sHat.push(NTT.encode(sampleCBD(PRF, sigma, i, ETA1)));
168
+ const x = XOF(rho);
169
+ for (let i = 0; i < K; i++) {
170
+ const e = NTT.encode(sampleCBD(PRF, sigma, K + i, ETA1));
171
+ for (let j = 0; j < K; j++) {
172
+ const aji = SampleNTT(FIPS203 ? x.get(i, j) : x.get(j, i)); // A[j][i], inplace
173
+ polyAdd(e, MultiplyNTTs(aji, sHat[j]));
174
+ }
175
+ tHat.push(e); // t ← A ◦ s + e
176
+ }
177
+ x.clean();
178
+ const res = {
179
+ publicKey: publicCoder.encode([tHat, rho]),
180
+ secretKey: secretCoder.encode(sHat),
181
+ };
182
+ cleanBytes(rho, sigma, sHat, tHat);
183
+ return res;
184
+ },
185
+ encrypt: (publicKey, msg, seed) => {
186
+ const [tHat, rho] = publicCoder.decode(publicKey);
187
+ const rHat = [];
188
+ for (let i = 0; i < K; i++)
189
+ rHat.push(NTT.encode(sampleCBD(PRF, seed, i, ETA1)));
190
+ const x = XOF(rho);
191
+ const tmp2 = new Uint16Array(N);
192
+ const u = [];
193
+ for (let i = 0; i < K; i++) {
194
+ const e1 = sampleCBD(PRF, seed, K + i, ETA2);
195
+ const tmp = new Uint16Array(N);
196
+ for (let j = 0; j < K; j++) {
197
+ const aij = SampleNTT(FIPS203 ? x.get(j, i) : x.get(i, j)); // A[i][j], inplace
198
+ polyAdd(tmp, MultiplyNTTs(aij, rHat[j])); // t += aij * rHat[j]
199
+ }
200
+ polyAdd(e1, NTT.decode(tmp)); // e1 += tmp
201
+ u.push(e1);
202
+ polyAdd(tmp2, MultiplyNTTs(tHat[i], rHat[i])); // t2 += tHat[i] * rHat[i]
203
+ tmp.fill(0);
204
+ }
205
+ x.clean();
206
+ const e2 = sampleCBD(PRF, seed, 2 * K, ETA2);
207
+ polyAdd(e2, NTT.decode(tmp2)); // e2 += tmp2
208
+ const v = poly1.decode(msg); // encode plaintext m into polynomial v
209
+ polyAdd(v, e2); // v += e2
210
+ cleanBytes(tHat, rHat, tmp2, e2);
211
+ return cipherCoder.encode([u, v]);
212
+ },
213
+ decrypt: (cipherText, privateKey) => {
214
+ const [u, v] = cipherCoder.decode(cipherText);
215
+ const sk = secretCoder.decode(privateKey); // s ← ByteDecode_12(dkPKE)
216
+ const tmp = new Uint16Array(N);
217
+ for (let i = 0; i < K; i++)
218
+ polyAdd(tmp, MultiplyNTTs(sk[i], NTT.encode(u[i]))); // tmp += sk[i] * u[i]
219
+ polySub(v, NTT.decode(tmp)); // v += tmp
220
+ cleanBytes(tmp, sk, u);
221
+ return poly1.encode(v);
222
+ },
223
+ };
224
+ };
225
+ function createKyber(opts) {
226
+ const KPKE = genKPKE(opts);
227
+ const { HASH256, HASH512, KDF, FIPS203 } = opts;
228
+ const { secretCoder: KPKESecretCoder, cipherTextLen } = KPKE;
229
+ const publicKeyLen = KPKE.publicKeyLen; // 384*K+32
230
+ const secretCoder = splitCoder(KPKE.secretKeyLen, KPKE.publicKeyLen, 32, 32);
231
+ const secretKeyLen = secretCoder.bytesLen;
232
+ const msgLen = 32;
233
+ return {
234
+ publicKeyLen,
235
+ msgLen,
236
+ keygen: (seed = randomBytes(64)) => {
237
+ ensureBytes(seed, 64);
238
+ const { publicKey, secretKey: sk } = KPKE.keygen(seed.subarray(0, 32));
239
+ const publicKeyHash = HASH256(publicKey);
240
+ // (dkPKE||ek||H(ek)||z)
241
+ const secretKey = secretCoder.encode([sk, publicKey, publicKeyHash, seed.subarray(32)]);
242
+ cleanBytes(sk, publicKeyHash);
243
+ return { publicKey, secretKey };
244
+ },
245
+ encapsulate: (publicKey, msg = randomBytes(32)) => {
246
+ ensureBytes(publicKey, publicKeyLen);
247
+ ensureBytes(msg, msgLen);
248
+ if (!FIPS203)
249
+ msg = HASH256(msg); // NOTE: ML-KEM doesn't have this step!
250
+ else {
251
+ // FIPS-203 includes additional verification check for modulus
252
+ const eke = publicKey.subarray(0, 384 * opts.K);
253
+ const ek = KPKESecretCoder.encode(KPKESecretCoder.decode(eke.slice())); // Copy because of inplace encoding
254
+ // (Modulus check.) Perform the computation ek ← ByteEncode12(ByteDecode12(eke)).
255
+ // If ek = ̸ eke, the input is invalid. (See Section 4.2.1.)
256
+ if (!equalBytes(ek, eke)) {
257
+ cleanBytes(ek);
258
+ throw new Error('ML-KEM.encapsulate: wrong publicKey modulus');
259
+ }
260
+ cleanBytes(ek);
261
+ }
262
+ const kr = HASH512.create().update(msg).update(HASH256(publicKey)).digest(); // derive randomness
263
+ const cipherText = KPKE.encrypt(publicKey, msg, kr.subarray(32, 64));
264
+ if (FIPS203)
265
+ return { cipherText, sharedSecret: kr.subarray(0, 32) };
266
+ const cipherTextHash = HASH256(cipherText);
267
+ const sharedSecret = KDF.create({})
268
+ .update(kr.subarray(0, 32))
269
+ .update(cipherTextHash)
270
+ .digest();
271
+ cleanBytes(kr, cipherTextHash);
272
+ return { cipherText, sharedSecret };
273
+ },
274
+ decapsulate: (cipherText, secretKey) => {
275
+ ensureBytes(secretKey, secretKeyLen); // 768*k + 96
276
+ ensureBytes(cipherText, cipherTextLen); // 32(du*k + dv)
277
+ const [sk, publicKey, publicKeyHash, z] = secretCoder.decode(secretKey);
278
+ const msg = KPKE.decrypt(cipherText, sk);
279
+ const kr = HASH512.create().update(msg).update(publicKeyHash).digest(); // derive randomness, Khat, rHat = G(mHat || h)
280
+ const Khat = kr.subarray(0, 32);
281
+ const cipherText2 = KPKE.encrypt(publicKey, msg, kr.subarray(32, 64)); // re-encrypt using the derived randomness
282
+ const isValid = equalBytes(cipherText, cipherText2); // if ciphertexts do not match, “implicitly reject”
283
+ if (FIPS203) {
284
+ const Kbar = KDF.create({ dkLen: 32 }).update(z).update(cipherText).digest();
285
+ cleanBytes(msg, cipherText2, !isValid ? Khat : Kbar);
286
+ return isValid ? Khat : Kbar;
287
+ }
288
+ const cipherTextHash = HASH256(cipherText);
289
+ const sharedSecret = KDF.create({ dkLen: 32 })
290
+ .update(isValid ? Khat : z)
291
+ .update(cipherTextHash)
292
+ .digest();
293
+ cleanBytes(msg, cipherTextHash, cipherText2, Khat, z);
294
+ return sharedSecret;
295
+ },
296
+ };
297
+ }
298
+ function PRF(l, key, nonce) {
299
+ const _nonce = new Uint8Array(16);
300
+ _nonce[0] = nonce;
301
+ return ctr(key, _nonce).encrypt(new Uint8Array(l));
302
+ }
303
+ const opts90s = { HASH256: sha256, HASH512: sha512, KDF: sha256, XOF: XOF_AES, PRF };
304
+ export const kyber512_90s = /* @__PURE__ */ createKyber({
305
+ ...opts90s,
306
+ ...PARAMS[512],
307
+ });
308
+ export const kyber768_90s = /* @__PURE__ */ createKyber({
309
+ ...opts90s,
310
+ ...PARAMS[768],
311
+ });
312
+ export const kyber1024_90s = /* @__PURE__ */ createKyber({
313
+ ...opts90s,
314
+ ...PARAMS[1024],
315
+ });
316
+ function shakePRF(dkLen, key, nonce) {
317
+ return shake256
318
+ .create({ dkLen })
319
+ .update(key)
320
+ .update(new Uint8Array([nonce]))
321
+ .digest();
322
+ }
323
+ const opts = {
324
+ HASH256: sha3_256,
325
+ HASH512: sha3_512,
326
+ KDF: shake256,
327
+ XOF: XOF128,
328
+ PRF: shakePRF,
329
+ };
330
+ export const kyber512 = /* @__PURE__ */ createKyber({
331
+ ...opts,
332
+ ...PARAMS[512],
333
+ });
334
+ export const kyber768 = /* @__PURE__ */ createKyber({
335
+ ...opts,
336
+ ...PARAMS[768],
337
+ });
338
+ export const kyber1024 = /* @__PURE__ */ createKyber({
339
+ ...opts,
340
+ ...PARAMS[1024],
341
+ });
342
+ /**
343
+ * FIPS-203 (draft) ML-KEM.
344
+ * Unsafe: we can't cross-verify, because there are no test vectors or other implementations.
345
+ */
346
+ export const ml_kem512 = /* @__PURE__ */ createKyber({
347
+ ...opts,
348
+ ...PARAMS[512],
349
+ FIPS203: true,
350
+ });
351
+ export const ml_kem768 = /* @__PURE__ */ createKyber({
352
+ ...opts,
353
+ ...PARAMS[768],
354
+ FIPS203: true,
355
+ });
356
+ export const ml_kem1024 = /* @__PURE__ */ createKyber({
357
+ ...opts,
358
+ ...PARAMS[1024],
359
+ FIPS203: true,
360
+ });
361
+ //# sourceMappingURL=ml-kem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-kem.js","sourceRoot":"","sources":["../src/ml-kem.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,GAAG,EAA4C,MA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