quantum-resistant-rustykey 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -14
- package/package.json +25 -8
- package/dist/index.mjs +0 -2404
package/README.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
# Quantum-
|
|
1
|
+
# <img src="./logo-rustykey.png" width="57" align="center" /> Quantum-resistant RustyKey®
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fast, secure WebAssembly implementations of useful post-quantum-resistant tools both for backend (node) and frontend web.
|
|
4
4
|
|
|
5
5
|
## Implementation status
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- NIST derived or NIST 'on-ramp' eg SQISign
|
|
8
|
+
- *signature algorithms (coming soon):*
|
|
9
|
+
- *FN-DSA (Falcon-512, Falcon-1024)*
|
|
10
|
+
- *ML-DSA (Dilithium variants)*
|
|
11
|
+
- *SQISign*
|
|
12
|
+
- module-lattice-based key-encapsulation mechanism
|
|
13
|
+
- **ML-KEM-512**, **ML-KEM-768**, and **ML-KEM-1024** using the same stack: [mlkem-native](https://github.com/pq-code-package/mlkem-native) built with **Emscripten**.
|
|
9
14
|
|
|
10
15
|
## Security assurance and verification
|
|
11
16
|
|
|
@@ -54,12 +59,17 @@ pnpm build:vendor
|
|
|
54
59
|
|
|
55
60
|
Notes:
|
|
56
61
|
- The upstream project documents scope/assumptions in `SOUNDNESS.md`; review this when making compliance assertions.
|
|
57
|
-
- This package uses ML-KEM-1024 (not "1028").
|
|
58
62
|
|
|
59
63
|
## Credits
|
|
60
64
|
|
|
61
|
-
-
|
|
62
|
-
|
|
65
|
+
- NIST
|
|
66
|
+
- signature algorithms:
|
|
67
|
+
- FN-DSA (Falcon-512, Falcon-1024)
|
|
68
|
+
- ML-DSA (Dilithium variants)
|
|
69
|
+
- SQISign
|
|
70
|
+
- module-lattice-based key-encapsulation mechanism
|
|
71
|
+
- ML-KEM
|
|
72
|
+
- approach adapted from Dmitry Chestnykh's `mlkem-wasm`: https://github.com/dchest/mlkem-wasm
|
|
63
73
|
|
|
64
74
|
## Installation
|
|
65
75
|
|
|
@@ -93,7 +103,7 @@ async function main() {
|
|
|
93
103
|
console.log("Private Key:", privateKey);
|
|
94
104
|
|
|
95
105
|
// Encrypt a message
|
|
96
|
-
const message = "
|
|
106
|
+
const message = "Rusty keys, the rustier the better!";
|
|
97
107
|
const encrypt = mlkem.encrypt(keypair.get('public_key'))
|
|
98
108
|
const sharedSecret = encrypt.get('secret')
|
|
99
109
|
const encryptedMessage = await mlkem.encryptMessage(message, sharedSecret)
|
|
@@ -147,7 +157,7 @@ Security note for web apps:
|
|
|
147
157
|
|
|
148
158
|
### Prerequisites
|
|
149
159
|
|
|
150
|
-
- Node.js >=
|
|
160
|
+
- Node.js >= 25.9.0
|
|
151
161
|
- pnpm (or npm)
|
|
152
162
|
- Emscripten **or** Docker — only needed if you run `pnpm build:vendor` to regenerate `src/vendor/mlkem*.js`
|
|
153
163
|
|
|
@@ -198,7 +208,7 @@ See `examples/browser-demo/README.md` for details.
|
|
|
198
208
|
|
|
199
209
|
## Project Structure
|
|
200
210
|
|
|
201
|
-
ML-KEM logic comes from **mlkem-native** (C), compiled with **Emscripten** under `wasm/`, wrapped by TypeScript
|
|
211
|
+
ML-KEM logic comes from **mlkem-native** (C), compiled with **Emscripten** under `wasm/`, wrapped by TypeScript in `mlkem-src/`, then bundled into `src/vendor/mlkem*.js`.
|
|
202
212
|
|
|
203
213
|
## Publishing
|
|
204
214
|
|
|
@@ -224,7 +234,14 @@ This implementation includes patches to withstand side-channel attacks. For more
|
|
|
224
234
|
|
|
225
235
|
ISC
|
|
226
236
|
|
|
227
|
-
##
|
|
228
|
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
237
|
+
## Funding
|
|
238
|
+
This project was generously supported by:
|
|
239
|
+
- University of Quantum Science
|
|
240
|
+
- RustyKey®
|
|
241
|
+
- Customers' Yachts® Advisors
|
|
242
|
+
- [BuzzyBee®](https://buzzybee.ai)
|
|
243
|
+
|
|
244
|
+
<div align="center">
|
|
245
|
+
<img src="./logo-rustykey.png" width="60" alt="RustyKey Logo" />
|
|
246
|
+
<img src="./logo-buzzybee.ai.png" width="60" alt="BuzzyBee Logo" />
|
|
247
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quantum-resistant-rustykey",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "WebAssembly
|
|
3
|
+
"version": "0.6.2",
|
|
4
|
+
"description": "WebAssembly post-quantum-resistant tools for web",
|
|
5
|
+
"author": "Antony R Mott <a@auditcanary.com> (https://rustykey.app)",
|
|
5
6
|
"license": "ISC",
|
|
7
|
+
"funding": [
|
|
8
|
+
{
|
|
9
|
+
"type": "github",
|
|
10
|
+
"url": "https://github.com/antonymott"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/antonymott/quantum-resistant-rustykey.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/antonymott/quantum-resistant-rustykey.git#readme",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"NIST",
|
|
20
|
+
"post-quantum",
|
|
21
|
+
"WebAssembly",
|
|
22
|
+
"cryptography"
|
|
23
|
+
],
|
|
6
24
|
"type": "module",
|
|
7
25
|
"sideEffects": false,
|
|
8
26
|
"main": "./dist/index.js",
|
|
@@ -30,12 +48,11 @@
|
|
|
30
48
|
"example:browser": "pnpm --filter browser-demo dev"
|
|
31
49
|
},
|
|
32
50
|
"devDependencies": {
|
|
33
|
-
"@biomejs/biome": "2.4.
|
|
51
|
+
"@biomejs/biome": "2.4.11",
|
|
34
52
|
"@changesets/cli": "2.30.0",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"vitest": "4.1.2"
|
|
53
|
+
"esbuild": "0.28.0",
|
|
54
|
+
"tsdown": "0.21.8",
|
|
55
|
+
"typescript": "6.0.2",
|
|
56
|
+
"vitest": "4.1.4"
|
|
40
57
|
}
|
|
41
58
|
}
|