Package-level declarations
Types
The operation a FakeKeyScheme is about to run, as its before hook sees it. The arrays are the caller's own, not copies: read them, do not change them.
A KeyScheme for tests: it makes keys, reads keys, signs and checks without ever waiting on the platform's cryptographic provider, so a room test on wasmJs stays on virtual time. Anyone can forge its signatures: a signature is SHA-512 of a fixed tag, the key's compressed point and the message.
Marks the fake key scheme, which is for tests only. A room built on it accepts signatures anyone can compute.
Functions
The fixed fake key numbered index, made without suspending: the same key in every run and on every target, so a hand-built frame, a seeded roster or a golden vector can name it. It signs at once, with no hook; FakeKeyScheme.key makes the same key with its scheme's hook. Distinct indices are distinct keys.
The name of fakeDeviceKey(index), made without suspending: a syntactically valid P-256 did:key whose point is 0x02 followed by the first 32 bytes of SHA-512 of a fixed tag and index. Its point need not be on the curve, so the real KeyScheme.P256 may refuse to parse it; a room on the fake scheme reads it as any other key.
The fake device numbered index: a DeviceKeyStore whose key is fakeDeviceKey(index), and on which a room signs and checks with scheme. It keeps grants by the same rules as every other store, since an InMemoryDeviceKeyStore keeps them underneath.