rootcard 0.2.1 → 0.3.1
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 +40 -0
- package/README.md +6 -4
- package/keytool.html +876 -157
- package/package.json +4 -4
- package/src/account.js +28 -8
- package/src/binding.js +8 -3
- package/src/crypto.js +88 -5
- package/src/index.js +2 -2
- package/src/log.js +2 -2
- package/src/proof.js +2 -3
- package/src/recovery.js +23 -1
- package/src/vault.js +30 -9
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,46 @@ All notable changes to this package are recorded here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.3.1 - 2026-11-05
|
|
8
|
+
|
|
9
|
+
- The package metadata (`homepage`, `repository`, `bugs`) and the README links point to `github.com/rootcard/rootcard`,
|
|
10
|
+
the repository it is built and published from, so npm provenance matches.
|
|
11
|
+
|
|
12
|
+
## 0.3.0 - 2026-11-05
|
|
13
|
+
|
|
14
|
+
- `keytool.html` is redesigned in the rootcard.org theme, with the same operations and checks. It has tabs (open,
|
|
15
|
+
create, verify a proof). An opened identity is shown as a card with its host, and each action says whether it
|
|
16
|
+
works offline, sends to the primary host or to a host you enter. Actions the identity cannot do yet are disabled,
|
|
17
|
+
with the reason: a card-only identity (no instance) can show its card and make root proofs, and "Start at a host"
|
|
18
|
+
puts it on one. Before, reset, revoke, rotate and retire failed with a script error for such an identity. Host
|
|
19
|
+
addresses are checked as you type and show what will be contacted. `https://` is added when no scheme is given
|
|
20
|
+
(`http://` for `localhost`, `127.0.0.1` and `[::1]`), and a trailing `/v0` is refused with an explanation
|
|
21
|
+
([HST-22]). Creating an identity offers "At a host" or "Only on this computer", and asks for a password only
|
|
22
|
+
for a host. "Could not reach the host" replaces the browser's bare fetch error.
|
|
23
|
+
- **Breaking:** every function that creates a password lock enforces the password rules of SPEC [LCK-8]
|
|
24
|
+
(`weak_password`), not only `register`: `newPasswordLock` (and so `addSlot`, `instanceVault`, `newInstance`) and
|
|
25
|
+
`changePassword`. Slots (`{ label, password, kdf }`) need `username`, and `changePassword` has a new parameter
|
|
26
|
+
`username` after `password`. `newInstance` refuses a slot whose `username` is not the identity's (`bad_field`).
|
|
27
|
+
- **Breaking:** `checkBaseUrl` ([HST-22]) refuses dot segments and anything but unreserved characters in the path
|
|
28
|
+
(no percent-encoding), as in the Rust crate. `keytool.html` is rebuilt with both changes.
|
|
29
|
+
- Fixed: in Safari (WebKit), about 1 in 256 X25519 secrets failed with a `DataError`: WebKit's WebCrypto rejects a
|
|
30
|
+
secret whose first byte is zero. Creating locks, wrapping the vault key and unlocking could fail at random, and a
|
|
31
|
+
password whose box secret started with a zero byte could never unlock there. X25519 secrets are now given to
|
|
32
|
+
WebCrypto with a zero first byte as 1 and a zero last byte as 0x40, the same scalar after clamping (RFC 7748 §5),
|
|
33
|
+
so no key, result or vector changes. New vectors in `spec/vectors/primitives.json` cover secrets and seeds with a
|
|
34
|
+
zero byte at either end. `keytool.html` is rebuilt.
|
|
35
|
+
- Ed25519 seeds whose first byte is zero (SPEC [CRY-9], [IMP-6]): WebKit cannot import them at all.
|
|
36
|
+
- New keys never use one: `register` and `newInstance` draw the account seed again, `newPasswordLock`,
|
|
37
|
+
`changePassword` and `addSlot` draw the salt again, and **breaking:** `register` and `rotateRecovery` refuse a
|
|
38
|
+
recovery key whose signing seed is unusable (`bad_key`). The new `newRecoveryKey(realm, username, random)`
|
|
39
|
+
generates a usable one; `checkNewRecoveryKey` and `usableSeed` are exported. Draws change only when a first draw
|
|
40
|
+
is unusable, with vectors for each case.
|
|
41
|
+
- Older such keys keep working: `checkRecoveryKey`, `unlockVault` and `prove` check a seed against its public key on
|
|
42
|
+
record with the new `ed25519PublicIs`, and signing with that seed then imports it as a JWK with that key where
|
|
43
|
+
the platform refuses it. A key on record that is not the seed's is refused.
|
|
44
|
+
- `keytool.html`: generates recovery keys with `newRecoveryKey`, and no longer reports "Done." while a rotation is
|
|
45
|
+
still being sent (the status stays "Working…" until it ends).
|
|
46
|
+
|
|
7
47
|
## 0.2.1 - 2026-11-05
|
|
8
48
|
|
|
9
49
|
- **Fixed:** `keytool.html` 0.2.0 refused every host address ("not a host base URL"), because the page did not include
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# rootcard (npm)
|
|
2
2
|
|
|
3
|
-
[rootcard](https://github.com/
|
|
3
|
+
[rootcard](https://github.com/rootcard/rootcard) in plain ES modules: a portable, self-certifying identity for online
|
|
4
4
|
logins. Zero dependencies, no build step, WebCrypto only; runs in browsers and Node 20 or later. It produces and checks
|
|
5
5
|
exactly the bytes of the Rust crate `rootcard`; both are tested against the shared vectors of the specification.
|
|
6
6
|
|
|
7
|
-
> **New to rootcard?** Start with the [project README](https://github.com/
|
|
7
|
+
> **New to rootcard?** Start with the [project README](https://github.com/rootcard/rootcard#readme): what rootcard is,
|
|
8
8
|
> the two ways to use it (a safer username-and-password login for your own service, or an ID card across services),
|
|
9
9
|
> how it compares with other login methods, and the roadmap.
|
|
10
10
|
|
|
@@ -24,8 +24,10 @@ const state = await verifyLog(events, { realms: ["global"], now: Math.floor(Date
|
|
|
24
24
|
- `keytool.html` is the standalone key tool page: open it from your own disk (`file://`). It talks only to the hosts you
|
|
25
25
|
enter. It is generated from these modules by `npm run build`.
|
|
26
26
|
|
|
27
|
-
Functions that need randomness take `random(n)`; pass `systemRandom` (WebCrypto `getRandomValues`).
|
|
28
|
-
`
|
|
27
|
+
Functions that need randomness take `random(n)`; pass `systemRandom` (WebCrypto `getRandomValues`). Make a new
|
|
28
|
+
recovery key with `newRecoveryKey(realm, username, systemRandom)`, not with 32 bytes of your own: `register` refuses
|
|
29
|
+
the rare key whose signing key some browsers cannot use (SPEC [CRY-9]). Errors are `RootcardError` with the stable
|
|
30
|
+
`code` of SPEC §20.
|
|
29
31
|
|
|
30
32
|
## HTTP binding
|
|
31
33
|
|