quantum-resistant-rustykey 0.9.4 → 0.10.0
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 +10 -7
- package/package.json +16 -14
package/README.md
CHANGED
|
@@ -21,10 +21,10 @@ npm i quantum-resistant-rustykey
|
|
|
21
21
|
|
|
22
22
|
### NOTE: Why we support SQISign when it is 'NIST-on-ramp' only
|
|
23
23
|
*TLDR; to help hurdle the "silent" barrier to post-quantum adoption: 1024-byte buffer limit in many existing FIDO2/WebAuthn implementations*
|
|
24
|
-
- please see our IETF standards track draft for inclusion of SQISign [cose-sqisign](https://www.ietf.org/archive/id/draft-mott-cose-sqisign-
|
|
24
|
+
- please see our IETF standards track draft for inclusion of SQISign [cose-sqisign](https://www.ietf.org/archive/id/draft-mott-cose-sqisign-03.html)
|
|
25
25
|
|
|
26
26
|
#### WebAuthn PQC Signature size constraints
|
|
27
|
-
Dilithium variants, and Falcon-1024 are
|
|
27
|
+
Dilithium variants, and Falcon-1024 are physically incompatible with millions of existing FIDO2/WebAuthn authenticators that rely on the CTAP2 1024-byte buffer limit.
|
|
28
28
|
|
|
29
29
|
- CTAP2 protocol, which allows browsers to talk to security keys, often operates within tight memory constraints to maintain the speed and low-power requirements of embedded devices.
|
|
30
30
|
|
|
@@ -35,9 +35,9 @@ Dilithium variants, and Falcon-1024 are physical incompatibile with millions of
|
|
|
35
35
|
#### Critical use case example
|
|
36
36
|
For mission-critical applications like low-latency augmented reality remote telesurgery, where ultra-low latency and hardware-rooted trust are non-negotiable. RustyKey® who financially support this repo and the npm package, required a WASM port of SQIsign specifically because the 204-byte signatures are the only PQC option that worked within their current hardware constraints, enabling immediate quantum-resistant public key ceremonies without breaking the existing WebAuthn ecosystem.
|
|
37
37
|
|
|
38
|
-
## Broad user-friendly live example testbed and playground
|
|
38
|
+
## Broad user-friendly live example testbed and playground
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Live at **[pqc.rustykey.me](https://pqc.rustykey.me)** — a test environment where general-purpose users and seasoned cryptanalysts can encrypt and decrypt and play, using all three variants of KEM and test WebAuthn implementations using the signature algorithms.
|
|
41
41
|
- lattice-based vs isogeny: run tests to check: Montgomery constant times, the surprising difference in time taken for the various steps
|
|
42
42
|
- all are encouraged to suggest improvements, and help a wider audience see how PQC works under the hood and adopt it more quickly and without breaking existing infrastructure.
|
|
43
43
|
|
|
@@ -75,7 +75,7 @@ Increasingly, developers favor Rust => wasm-bindgen over C => emscripten for Rus
|
|
|
75
75
|
|
|
76
76
|
- upstream Reliability: Many NIST-standardized PQC algorithms (like ML-KEM) have highly optimized, audited, and "constant-time" reference implementations written in C. Using C => Emscripten allows RustyKey® to port these vetted "upstream" sources directly, reducing the risk of introducing new implementation bugs during a full rewrite into Rust.
|
|
77
77
|
|
|
78
|
-
- Constant-Time Guarantees: web-assembly is particularly opaque. In cryptography, protection against side-channel attacks (like timing attacks) is often more critical than general-purpose memory safety. Using audited C code that is already proven to be constant-time may be a safer WASM route than a new Rust implementation that might inadvertently introduce timing leaks. We encourage realtime constant time checks in our testbed
|
|
78
|
+
- Constant-Time Guarantees: web-assembly is particularly opaque. In cryptography, protection against side-channel attacks (like timing attacks) is often more critical than general-purpose memory safety. Using audited C code that is already proven to be constant-time may be a safer WASM route than a new Rust implementation that might inadvertently introduce timing leaks. We encourage realtime constant time checks in our [testbed](https://pqc.rustykey.me) and appreciate any feedback to improve.
|
|
79
79
|
|
|
80
80
|
- Toolchain Maturity: Emscripten is a mature leader in the WASM ecosystem (sometimes...bloated!). For projects needing to bridge legacy or specialized C libraries with the web, emscripten provides a stable environment that can, when optimized, outperform wasm-bindgen in raw execution speed for specific linear memory access patterns.
|
|
81
81
|
|
|
@@ -366,6 +366,8 @@ async function main() {
|
|
|
366
366
|
|
|
367
367
|
## Browser example (local)
|
|
368
368
|
|
|
369
|
+
See the live [PQC testbed](https://pqc.rustykey.me) or run the frontend examples above in a Vite/browser project.
|
|
370
|
+
|
|
369
371
|
## Project Structure
|
|
370
372
|
|
|
371
373
|
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`.
|
|
@@ -431,8 +433,9 @@ This project was generously supported by:
|
|
|
431
433
|
|
|
432
434
|
|
|
433
435
|
|
|
434
|
-
## Appendix
|
|
435
|
-
|
|
436
|
+
## Appendix: testbed features
|
|
437
|
+
|
|
438
|
+
Below are some examples of stats and interactivity on the [testbed](https://pqc.rustykey.me), with more planned depending on user interest, to help users understand the trade-offs between lattice-based (ML-KEM/DSA) and isogeny-based (SQISign) crypto:
|
|
436
439
|
|
|
437
440
|
- Memory Peak (Heap Usage): WASM runs in a linear memory space. Tracking performance.memory.usedJSHeapSize (in supported browsers) or monitoring the WASM instance’s memory growth is vital, especially for ML-DSA (Dilithium), which can be memory-intensive.
|
|
438
441
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quantum-resistant-rustykey",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "WebAssembly post-quantum-resistant tools for web",
|
|
5
5
|
"author": "Antony R Mott <a@auditcanary.com> (https://rustykey.app)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -35,18 +35,6 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@biomejs/biome": "2.4.11",
|
|
40
|
-
"@changesets/cli": "2.30.0",
|
|
41
|
-
"@types/node": "25.6.0",
|
|
42
|
-
"esbuild": "0.28.0",
|
|
43
|
-
"tsdown": "0.21.8",
|
|
44
|
-
"typescript": "6.0.2",
|
|
45
|
-
"vitest": "4.1.4"
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@noble/post-quantum": "0.6.1"
|
|
49
|
-
},
|
|
50
38
|
"scripts": {
|
|
51
39
|
"clean": "rm -rf dist",
|
|
52
40
|
"lint": "biome check . && tsc --project tsconfig.lint.json",
|
|
@@ -58,7 +46,21 @@
|
|
|
58
46
|
"build": "pnpm build:vendor && tsdown",
|
|
59
47
|
"test": "pnpm build:vendor && vitest run",
|
|
60
48
|
"verify:dist": "node scripts/verify-dist.mjs",
|
|
49
|
+
"prepack": "pnpm verify:dist",
|
|
50
|
+
"prepublishOnly": "pnpm verify:dist",
|
|
61
51
|
"release": "pnpm verify:dist && changeset publish",
|
|
62
52
|
"example:browser": "pnpm --filter browser-demo dev"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@biomejs/biome": "2.4.11",
|
|
56
|
+
"@changesets/cli": "2.30.0",
|
|
57
|
+
"@types/node": "25.6.0",
|
|
58
|
+
"esbuild": "0.28.0",
|
|
59
|
+
"tsdown": "0.21.8",
|
|
60
|
+
"typescript": "6.0.2",
|
|
61
|
+
"vitest": "4.1.4"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@noble/post-quantum": "0.6.1"
|
|
63
65
|
}
|
|
64
|
-
}
|
|
66
|
+
}
|