Security preserving KEM combiner #
splitPRF is the PRF-then-XOR core function of Giacon, Heuer & Poettering
("KEM Combiners", https://eprint.iacr.org/2018/024.pdf, Lemma 8), for any number
of KEMs. With BLAKE2b-256 as the PRF:
key_i := BLAKE2b-256(unkeyed)(ss_i)
hash_i := BLAKE2b-256(
key = key_i,
msg = "splitprf-v1" || u32be(n) ||
u32be(len(cct_1)) || cct_1 ||
... ||
u32be(len(cct_n)) || cct_n
)
return hash_1 XOR hash_2 XOR ... XOR hash_n
Each shared secret keys the PRF, and every component hash binds the full, unambiguously encoded ciphertext vector. By Theorem 1 of the paper the combined KEM is IND-CCA2 if at least one component is.
Equations
Instances For
Equations
Instances For
Equations
- Cryptlib.Primitives.KEM.Combiner.xorBytes a b = Vector.ofFn fun (i : Fin 32) => a[i] ^^^ b[i]
Instances For
Split PRF #
Domain-separation tag.
Equations
- Cryptlib.Primitives.KEM.Combiner.splitPRFLabel = "splitprf-v1"
Instances For
Label, component count, then each ciphertext with a 32-bit length prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- noInputs : SplitPRFError
- mismatchedSlices : SplitPRFError
- emptyComponent : SplitPRFError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
splitPRF over separate secret and ciphertext lists, rejecting malformed input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The combined KEM #
combineKEM F k₀ ks combines a head KEM with a possibly empty list of more. Combined keys,
ciphertexts and states for ks are nested products ending in PUnit.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Wire encoding #
Components are concatenated as ByteArrays and converted to Vector only in combineKEM.
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KEM.Combiner.decodePublicKeyN [] x✝ = some PUnit.unit
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KEM.Combiner.decodePrivateKeyN [] x✝ = some PUnit.unit
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KEM.Combiner.decodeCiphertextN [] x✝ = some PUnit.unit
Instances For
Encapsulation and decapsulation over the tail list #
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.
Instances For
Each tail component's encoded (shared secret, ciphertext).
Equations
Instances For
Equations
Instances For
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.
Instances For
Correctness #
Every tail component round-trips for its (pk, sk) pair.
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KEM.Combiner.AllHonestFor [] x_3 x_4 = True
Instances For
decapAllM recovers the (shared secret, ciphertext) list encapAllM produced.
If the head and every tail KEM round-trip for the given (pk, sk) pairs, so does the
combination.
Key pairs for the tail list, with their AllHonestFor witness.
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KEM.Combiner.generateN [] = pure ⟨PUnit.unit, ⟨PUnit.unit, trivial⟩⟩