rootcard 0.0.0 → 0.1.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/CHANGELOG.md +9 -1
- package/README.md +21 -3
- package/keytool.html +3106 -0
- package/package.json +29 -6
- package/src/account.js +89 -0
- package/src/argon2.js +239 -0
- package/src/blake2b.js +120 -0
- package/src/crypto.js +186 -0
- package/src/encoding.js +145 -0
- package/src/errors.js +38 -0
- package/src/file.js +118 -0
- package/src/id.js +107 -0
- package/src/index.js +28 -17
- package/src/json.js +280 -0
- package/src/keys.js +134 -0
- package/src/labels.js +17 -0
- package/src/log.js +316 -0
- package/src/messages.js +82 -0
- package/src/profile.js +89 -0
- package/src/proof.js +66 -0
- package/src/recovery.js +49 -0
- package/src/testing.js +34 -0
- package/src/vault-index.js +9 -0
- package/src/vault.js +294 -0
- package/src/vaultcheck.js +180 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,4 +4,12 @@ All notable changes to this package are recorded here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 0.1.0 - 2026-11-04
|
|
8
|
+
|
|
9
|
+
- First release of the JavaScript implementation of format version 1, byte for byte equal to the Rust crate on every
|
|
10
|
+
shared vector. Zero dependencies; WebCrypto for Ed25519, X25519, SHA-256, HKDF and AES-GCM; its own BLAKE2b and
|
|
11
|
+
Argon2id (RFC 9106).
|
|
12
|
+
- `rootcard`: verification (JSON, encodings, keys, recovery keys, identities, logs, vault and profile checks,
|
|
13
|
+
messages, proofs, account files, cards). `rootcard/vault`: password locks, vault encryption, registration, password
|
|
14
|
+
change, new instances and rotation. `rootcard/testing`: the deterministic stream of the vectors.
|
|
15
|
+
- `keytool.html`: the standalone key tool page, works from `file://`.
|
package/README.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# rootcard (npm)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[rootcard](https://github.com/Hexagon/rootcard) in plain ES modules: a portable, self-certifying identity for online
|
|
4
|
+
logins. Zero dependencies, no build step, WebCrypto only; runs in browsers and Node 20 or later. It produces and checks
|
|
5
|
+
exactly the bytes of the Rust crate `rootcard`; both are tested against the shared vectors of the specification.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
```js
|
|
8
|
+
import { verifyLog, verifyProof } from "rootcard"; // verification: hosts, relying parties, clients
|
|
9
|
+
import { register, unlockVault, changePassword } from "rootcard/vault"; // passwords, Argon2id, vault encryption
|
|
10
|
+
|
|
11
|
+
const state = await verifyLog(events, { realms: ["global"], now: Math.floor(Date.now() / 1000) });
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- `rootcard` is the verification core: canonical JSON, keys, recovery keys, identities and handles, logs
|
|
15
|
+
(`verifyLog`, `extendLog`, `compareLogs`), vault and profile checks, login and fetch messages, proofs, account files
|
|
16
|
+
and recovery cards.
|
|
17
|
+
- `rootcard/vault` adds password locks (Argon2id implemented in this package, the only primitive not taken from
|
|
18
|
+
WebCrypto), vault encryption and the high-level flows: registration, password change, new instances and rotation.
|
|
19
|
+
A server bundle that does not import it never loads it.
|
|
20
|
+
- `keytool.html` is the standalone key tool page: open it from your own disk (`file://`). It talks only to the hosts you
|
|
21
|
+
enter. It is generated from these modules by `npm run build`.
|
|
22
|
+
|
|
23
|
+
Functions that need randomness take `random(n)`; pass `systemRandom` (WebCrypto `getRandomValues`). Errors are
|
|
24
|
+
`RootcardError` with the stable `code` of SPEC §20.
|