Word-level Fujisaki–Okamoto family with native honest algorithms #
The Fujisaki–Okamoto transforms FO^⊥ and FO-notbot of
CslibFrontier.Crypto.Protocols.KEM.FujisakiOkamoto act on one fixed explicit-coin scheme. This
module states them for a security-parameter family of schemes over words, and proves that the
honest algorithms are uniform strict (oracle) PPT whenever the underlying public-key encryption
family is.
WordPKE is a public-key encryption family with explicit coins
([HHK17], IACR ePrint 2017/604, full version dated 2 November 2021, §2.1):
at parameter n, messages are words of length msgLen n, coins are uniform words of length
coinLen n, and the ciphertext space is the words of length at most ctLen n. Key generation is
randomized; deterministic encryption and decryption are functions of the parameter and their
word arguments. WordPKE.IsEfficient asks for strict PPT key generation and polynomial-time
encryption, decryption and lengths. WordPKE.CiphertextFits says that encryption under generated
keys stays in the ciphertext space, and WordPKE.INDCPA is IND-CPA security of randomized
encryption WordPKE.encrypt with challenge messages in the message space.
At each parameter, WordPKE.scheme P keyLen n is the FO parameter bundle Scheme over words,
with uniform messages, coins and keyLen n-bit keys. Its decryption reports only results of
message length. The native algorithms query two word oracles G and H (RO), reading at most
coinLen n bits of each G reply and keyLen n bits of each H reply:
WordPKE.keyGenNotBotisScheme.keyGenNotBotof the bundle;WordPKE.encapsdrawsm, queriesG(m), encrypts, and queriesH(m, c);WordPKE.decapsNotBotandWordPKE.decapsBotreject words longer thanctLen nwithnone, and otherwise run the oracle-generic decapsulationsScheme.decapsNotBotMandScheme.decapsBotMof the bundle with the word oracles.
The wire encoding of the pair (m, c) is encHQuery (false, m, c). On rejection the same
encoding carries the secret seed in place of the decrypted message.
Deviations from [HHK17] #
- Words longer than
ctLen nare outside the ciphertext space, and decapsulation rejects them withnonebefore any oracle call, for both transforms. In the source, decapsulation is only defined on the ciphertext space. ML-KEM performs the same check, the ciphertext type check of the decapsulation input check ([NIST24b], §7.3). - The source's decryption outputs a message of the finite message space or
⊥(§2.1). Here a decryption result that is not a word of lengthmsgLen nis treated as⊥.
Main definitions #
Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient: the word-level family and its efficiency.Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.encrypt: randomized encryption, the algorithm of the family's IND-CPA security.Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.CiphertextFits,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsMessagePair,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.INDCPA: encryption stays in the ciphertext space, and IND-CPA security of the family with challenge messages in its message space.Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.toExplicitCoin,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.scheme: the explicit-coin scheme and the FO bundle at one parameter.Cslib.Crypto.Protocols.FujisakiOkamoto.encEncDetInput,Cslib.Crypto.Protocols.FujisakiOkamoto.encImplicitSK,Cslib.Crypto.Protocols.FujisakiOkamoto.encDecapsNotBotInput,Cslib.Crypto.Protocols.FujisakiOkamoto.encDecapsBotInput: the encoded inputs of the certificates.Cslib.Crypto.Protocols.FujisakiOkamoto.RO,Cslib.Crypto.Protocols.FujisakiOkamoto.encHQuery,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.queryG,Cslib.Crypto.Protocols.FujisakiOkamoto.queryH: the word random oracles.Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.keyGenNotBot,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.encaps,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.decapsNotBot,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.decapsBot: the native honest algorithms.
Main results #
Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient.isPPTOn_encrypt,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient.isPPTOn_keyGenNotBot,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient.isOraclePPTOn_encaps,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient.isOraclePPTOn_decapsNotBot,Cslib.Crypto.Protocols.FujisakiOkamoto.WordPKE.IsEfficient.isOraclePPTOn_decapsBot: native certificates for every honest algorithm, from the certificates of the PKE family.
References #
- D. Hofheinz, K. Hövelmanns, E. Kiltz, A Modular Analysis of the Fujisaki–Okamoto Transformation (IACR ePrint 2017/604, full version dated 2 November 2021), §2.1 and Definition 2.2, §3.2.1 Fig. 9 and §3.2.2 Fig. 12.
- NIST, FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard, §7.3.
Efficiency of a word-level PKE family: polynomial-time lengths, uniform strict PPT key generation, and polynomial-time deterministic encryption and decryption.
- msgLen : Turing.MultiTapeTM.ComputableInPolyTime P.msgLen Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary
The message length is polynomial-time computable in unary.
- coinLen : Turing.MultiTapeTM.ComputableInPolyTime P.coinLen Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary
The coin length is polynomial-time computable in unary.
- ctLen : Turing.MultiTapeTM.ComputableInPolyTime P.ctLen Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary
The ciphertext length bound is polynomial-time computable in unary.
- keyGen : Probability.IsPPTOn Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) P.keyGen
Key generation is uniform strict PPT.
- encDet : Turing.MultiTapeTM.ComputableInPolyTime (fun (x : ℕ × List Bool × List Bool × List Bool) => match x with | (n, pk, m, r) => P.encDet n pk m r) encEncDetInput Turing.MultiTapeTM.encBits
Deterministic encryption is polynomial-time on
(1ⁿ, pk, m, r). - dec : Turing.MultiTapeTM.ComputableInPolyTime (fun (x : ℕ × List Bool × List Bool) => match x with | (n, sk, c) => P.dec n sk c) (encKeyedInput Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encOption Turing.MultiTapeTM.encBits)
Decryption is polynomial-time on
(1ⁿ, sk, c).
The ciphertexts of P lie in its ciphertext space. At every parameter n, encrypting a
message of length msgLen n with coins of length coinLen n under a generated public key gives a
word of length at most ctLen n. [HHK17] (IACR ePrint 2017/604, full
version dated 2 November 2021, §2.1) measures the spreadness of a scheme over its ciphertext space
C; WordPKE declares that space as the words of length at most ctLen n, and this predicate
says that encryption stays inside it.
IND-CPA security of P ([HHK17], ePrint 2017/604 (2 Nov 2021),
§2.1, Def. 2.2 and Figure 4, pp. 9–10): every uniform strict PPT chosen-message adversary has
negligible advantage in the single-challenge game of randomized encryption encrypt, with
challenge messages in the message space of P. The source defines only the concrete advantage
|Pr[b' = b] - 1/2|; here the advantage between the two experiments, which is twice that, is
negligible. The source's second stage also receives pk; here the first stage passes on what it
needs in its saved state.
The explicit-coin scheme of P at parameter n, over words: coins are uniform words of
length coinLen n, and decryption reports only results of length msgLen n.
The FO parameter bundle of P at parameter n, over words: the explicit-coin scheme
toExplicitCoin n, uniform messages of length msgLen n and uniform keys of length keyLen n.
Native key generation of FO-notbot ([HHK17], ePrint 2017/604
(2 Nov 2021), §3.2.2, Fig. 12): Scheme.keyGenNotBot of the bundle scheme P keyLen n.
Native encapsulation of FO^⊥ and FO-notbot ([HHK17], ePrint
2017/604 (2 Nov 2021), §3.2.1, Fig. 9 and §3.2.2, Fig. 12): draw a uniform message m of length
msgLen n, query r = G(m), encrypt c = encDet n pk m r, query k = H(m, c), and output
(c, k).
Native implicit-rejection decapsulation of FO-notbot ([HHK17],
ePrint 2017/604 (2 Nov 2021), §3.2.2, Fig. 12): reject a word longer than ctLen n with none,
and otherwise run Scheme.decapsNotBotM of the bundle with the word oracles.
Native explicit-rejection decapsulation of FO^⊥ ([HHK17], ePrint
2017/604 (2 Nov 2021), §3.2.1, Fig. 9): reject a word longer than ctLen n with none, and
otherwise run Scheme.decapsBotM of the bundle with the word oracles.
Native certificates #
Randomized encryption is uniform strict PPT on (1ⁿ, pk, m).
Native FO-notbot key generation is uniform strict PPT.
Native encapsulation is uniform strict oracle PPT on (1ⁿ, pk), for every pair of external
oracles G and H.
Native FO-notbot decapsulation is uniform strict oracle PPT on (1ⁿ, dk, c), for every pair
of external oracles G and H.
Native FO^⊥ decapsulation is uniform strict oracle PPT on (1ⁿ, pk, sk, c), for every pair
of external oracles G and H.