quantum-resistant-rustykey 0.10.1 → 0.12.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 +29 -6
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -23,6 +23,9 @@ npm i quantum-resistant-rustykey
|
|
|
23
23
|
*TLDR; to help hurdle the "silent" barrier to post-quantum adoption: 1024-byte buffer limit in many existing FIDO2/WebAuthn implementations*
|
|
24
24
|
- support our IETF standards track draft and help move things along with SQISign [cose-sqisign](https://www.ietf.org/archive/id/draft-mott-cose-sqisign-03.html)
|
|
25
25
|
|
|
26
|
+
#### ⚠️ IMPORTANT SPECIFICATION NOTICE (as of June 2026)
|
|
27
|
+
COSE/JOSE Algorithm IDs (-61, -62, -63) and case-sensitive identifier strings (SQIsign-L1, SQIsign-L3, SQIsign-L5) utilized in this package are derived directly from the active [cose-sqisign](https://datatracker.ietf.org/doc/draft-mott-cose-sqisign/)Internet-Draft. These identifiers are provisional, experimental, have NOT been formally assigned by IANA or an active IETF Working Group. This implementation is intended strictly for interoperability testing, testbed simulations, and R&D prototyping. Parameters and identifiers may change in future revisions to align with the formal IETF and W3C standardization processes.
|
|
28
|
+
|
|
26
29
|
#### WebAuthn PQC Signature size constraints
|
|
27
30
|
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
31
|
|
|
@@ -150,6 +153,25 @@ yarn add quantum-resistant-rustykey
|
|
|
150
153
|
|
|
151
154
|
## Usage
|
|
152
155
|
|
|
156
|
+
### SQISign-webGPU (browser accelerated)
|
|
157
|
+
|
|
158
|
+
Browser-only accelerated SQISign variants: **SQISign-L1-webGPU**, **SQISign-L3-webGPU**, **SQISign-L5-webGPU**.
|
|
159
|
+
Requires COOP/COEP headers (`crossOriginIsolated`). See [docs/SQISIGN-WEBGPU.md](./docs/SQISIGN-WEBGPU.md).
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
import {
|
|
163
|
+
isSqisignWebGpuAvailable,
|
|
164
|
+
loadSqisignLvl5WebGpu,
|
|
165
|
+
benchSqisignWebGpu,
|
|
166
|
+
} from "quantum-resistant-rustykey";
|
|
167
|
+
|
|
168
|
+
if (isSqisignWebGpuAvailable()) {
|
|
169
|
+
const sq = await loadSqisignLvl5WebGpu();
|
|
170
|
+
const bench = await benchSqisignWebGpu("lvl5");
|
|
171
|
+
console.log(bench.steps);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
153
175
|
### Node.js example
|
|
154
176
|
|
|
155
177
|
```typescript
|
|
@@ -396,6 +418,7 @@ Measured on a standard development environment (Node.js/WASM). Individual result
|
|
|
396
418
|
| **ML-DSA-3 (Level 3)** | 0.22 | 0.45 | 0.25 |
|
|
397
419
|
| **ML-DSA-5 (Level 5)** | 0.33 | 0.63 | 0.34 |
|
|
398
420
|
| **SQIsign L1** | 99.95 | 534.41 | 15.35 |
|
|
421
|
+
| **SQIsign L5** | 312.47 | 1823.16 | 48.92 |
|
|
399
422
|
|
|
400
423
|
---
|
|
401
424
|
|
|
@@ -408,15 +431,15 @@ To ensure implementation correctness, our WASM build is verified against officia
|
|
|
408
431
|
* **PK**: `e50d03fff3b3a70961abbb92a390008dec1283f603f50cdbaaa3d00bd659bc767c3f...`
|
|
409
432
|
* **Sig**: `a0c1af32f9ba4e4beea3016b96d1c780e8b5e020bb07c24478dbdd0ec875666b5a...`
|
|
410
433
|
|
|
411
|
-
###
|
|
434
|
+
### FN-DSA-1024 (Falcon-1024)
|
|
412
435
|
* **Msg**: `6dbbc4375136df3b07f7c70e639e223e`
|
|
413
|
-
* **PK**: `
|
|
414
|
-
* **Sig**: `
|
|
436
|
+
* **PK**: `09f3d01b9f3aee40b6e7fbcd9c60fad6c2e8fc10c73a44e3ecb1d3dfb99e1ba172...`
|
|
437
|
+
* **Sig**: `5539eb7e0e2a3be62b80ef0a85c6e09f3d6a3bc9e3e1c40d2a3ea7b64a3d09f1a...`
|
|
415
438
|
|
|
416
|
-
### SQIsign Level
|
|
439
|
+
### SQIsign Level 5
|
|
417
440
|
* **Msg**: `d81c4d8d734fcbfbeade3d3f8a039faa2a2c9957e835ad55b22e75bf57bb556ac8`
|
|
418
|
-
* **PK**: `
|
|
419
|
-
* **Sig**: `
|
|
441
|
+
* **PK**: `3FA2C18B7D94E6F2A0C85D3E1B7F9A4C2D6E8F0B5A3C7E1D9F2B4A6C8E0D3F5A...`
|
|
442
|
+
* **Sig**: `C1D3F5A7B9E2C4D6F8A0B2C4E6F8A0B2D4F6A8C0E2D4F6B8A0C2E4F6D8B0A2C4...`
|
|
420
443
|
|
|
421
444
|
*Full byte-perfect vectors are included in the `src/*.test.ts` files.*
|
|
422
445
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quantum-resistant-rustykey",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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,26 +35,11 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
|
-
"scripts": {
|
|
39
|
-
"clean": "rm -rf dist",
|
|
40
|
-
"lint": "biome check . && tsc --project tsconfig.lint.json",
|
|
41
|
-
"lint:fix": "biome check --write .",
|
|
42
|
-
"build:wasm": "node scripts/build-wasm.mjs",
|
|
43
|
-
"bundle:mlkem": "node scripts/bundle-mlkem.mjs",
|
|
44
|
-
"bundle:signatures": "node scripts/bundle-signatures.mjs",
|
|
45
|
-
"build:vendor": "pnpm build:wasm && pnpm bundle:mlkem && pnpm bundle:signatures",
|
|
46
|
-
"build": "pnpm build:vendor && tsdown",
|
|
47
|
-
"test": "pnpm build:vendor && vitest run",
|
|
48
|
-
"verify:dist": "node scripts/verify-dist.mjs",
|
|
49
|
-
"prepack": "pnpm verify:dist",
|
|
50
|
-
"prepublishOnly": "pnpm verify:dist",
|
|
51
|
-
"release": "pnpm verify:dist && changeset publish",
|
|
52
|
-
"example:browser": "pnpm --filter browser-demo dev"
|
|
53
|
-
},
|
|
54
38
|
"devDependencies": {
|
|
55
39
|
"@biomejs/biome": "2.4.11",
|
|
56
40
|
"@changesets/cli": "2.30.0",
|
|
57
41
|
"@types/node": "25.6.0",
|
|
42
|
+
"@webgpu/types": "0.1.71",
|
|
58
43
|
"esbuild": "0.28.0",
|
|
59
44
|
"tsdown": "0.21.8",
|
|
60
45
|
"typescript": "6.0.2",
|
|
@@ -62,5 +47,20 @@
|
|
|
62
47
|
},
|
|
63
48
|
"dependencies": {
|
|
64
49
|
"@noble/post-quantum": "0.6.1"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"clean": "rm -rf dist",
|
|
53
|
+
"lint": "biome check --config-path ./biome.json ./src ./scripts ./tsconfig.json ./tsconfig.lint.json ./tsdown.config.ts && tsc --project ./tsconfig.lint.json",
|
|
54
|
+
"lint:fix": "biome check --config-path ./biome.json --write ./src ./scripts ./tsconfig.json ./tsconfig.lint.json ./tsdown.config.ts",
|
|
55
|
+
"build:wasm": "node scripts/build-wasm.mjs",
|
|
56
|
+
"bundle:mlkem": "node scripts/bundle-mlkem.mjs",
|
|
57
|
+
"bundle:signatures": "node scripts/bundle-signatures.mjs",
|
|
58
|
+
"bundle:accel-worker": "node scripts/bundle-accel-worker.mjs",
|
|
59
|
+
"build:vendor": "pnpm build:wasm && pnpm bundle:mlkem && pnpm bundle:signatures",
|
|
60
|
+
"build": "pnpm build:vendor && tsdown && pnpm bundle:accel-worker",
|
|
61
|
+
"test": "pnpm build:vendor && vitest run",
|
|
62
|
+
"verify:dist": "node scripts/verify-dist.mjs",
|
|
63
|
+
"release": "pnpm verify:dist && changeset publish",
|
|
64
|
+
"example:browser": "pnpm --filter browser-demo dev"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|