Skip to main content

Crate hide_identity

Crate hide_identity 

Source
Expand description

Device enrollment, revocation and recovery for one identity.

An identity is not a key. It is an ordered, hash-linked log of events, each signed by a key that the log itself already authorised. Replaying the log from its root yields the set of devices trusted now, and — because every entry is bound to its predecessor — anyone can check that the history they were shown is the history everyone else was shown.

§The rule that makes revocation mean something

Authority is evaluated at the point in the log where the entry appears, never against the final state. A device revoked at entry n cannot sign entry n+1, so it cannot re-enrol itself, revoke the device that removed it, or rewrite anything after its removal. It also means entries it signed before revocation stay valid: revocation is not retroactive, because pretending otherwise would invalidate every message the device ever sent.

§What this does not do

Nothing here proves the log belongs to a particular person; that is what a transparency log is for, and it lives in hide-transparency. Two divergent copies of a log are both internally valid — detecting that split needs a witness, not a signature. And a compromised device is trusted until someone notices and revokes it; there is no automatic detection.

Structs§

Device
A device trusted at some point in the log.
Entry
One signed, linked record.
EpochBinding
A trusted device’s statement “at identity history H, my epoch chain is C, with N epochs”. Without it anyone can publish a chain for anyone (§15.4).
IdentityLog
The identity itself: an append-only log plus the membership it implies.
Membership
The device set produced by replaying a log.
RecoveryBinding
The founding device’s statement “this identity’s recovery key is K”.

Enums§

Event
What an entry does.
IdentityError

Constants§

EPOCH_BINDING_CONTEXT
EPOCH_BINDING_LENGTH
root(32) || head(32) || chain_head(32) || u64be(epochs) || signer(32) || signature(3373).
RECOVERY_BINDING_CONTEXT
RECOVERY_BINDING_LENGTH
root(32) || recovery_key(1984) || signature(3373).

Functions§

decode
Decodes a log. Accepts the current framing and, for reading only, the legacy 0.6–0.8 framing; see [LEGACY_ENTRY_HEADER].
device_id
encode
Encodes a log for transport. Only public material is ever encodable.

Type Aliases§

DeviceId
A device’s stable name: the hash of its verifying key, so it cannot be chosen and cannot collide with another device’s.
Sequence
Position in the log. The root is zero.