BACAP ratchet and per-context key derivation #
K_i^ctx = HKDF-Expand(HKDF-Extract(salt=ctx, IKM=K_i), info=empty, 32).
Equations
- Cryptlib.Protocols.BACAP.Ratchet.deriveKForContext m hkdf ctx = Vector.ofFn fun (i : Fin 32) => (hkdf.expand (hkdf.extract ctx { data := m.curBlindingFactor.toArray }) ByteArray.empty 32)[i]!
Instances For
E_i^ctx = HKDF-Expand(HKDF-Extract(salt=ctx, IKM=E_i), info=empty, 32).
Equations
- Cryptlib.Protocols.BACAP.Ratchet.deriveEForContext m hkdf ctx = Vector.ofFn fun (i : Fin 32) => (hkdf.expand (hkdf.extract ctx { data := m.curEncryptionKey.toArray }) ByteArray.empty 32)[i]!
Instances For
Advance one step: expand HKDF(IKM=H_i, info=idx64 LE) to 96 bytes, split as
H_{i+1} ‖ E ‖ K, and increment idx64.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Advance to target; none if target is behind the current index.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Protocols.BACAP.Ratchet.advanceTo.go hkdf target 0 a✝ = a✝
Instances For
Advance the ratchet by one step.
Equations
- Cryptlib.Protocols.BACAP.Ratchet.nextIndex m hkdf = Cryptlib.Protocols.BACAP.Ratchet.advanceTo m hkdf (m.idx64 + 1)
Instances For
HKDF info label separating mutateKDFState from ordinary advancement.
Equations
- Cryptlib.Protocols.BACAP.Ratchet.mutateKDFStateLabel = "bacap-mutate-kdf-state-v1".toUTF8
Instances For
Re-seed the ratchet state from ctx, preserving idx64 and the root key. The result
addresses a fresh box sequence that cannot be found without ctx.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A fresh MessageBoxIndex from 48 random bytes: 32 bytes of HKDF state, and a starting
index that is the sum of two 62-bit little-endian draws, then advanced once. A random start
hides how many messages precede a shared capability.
Equations
- One or more equations did not get rendered due to their size.
Instances For
mutateKDFState preserves idx64.