HQC PKE seed expansion #
HQC version 5.1 instantiates I(str) as SHA3-512(str || 0x02) in Table 3 (p. 15).
HQC-PKE.Keygen, line 1 (p. 38), splits the 64-byte result into the 32-byte decryption-key and
encryption-key seeds. The two seeds initialize separate SHAKE256 contexts in lines 2--9.
pkeSeedPrefixes gives a one-shot view of requested prefixes of those two SHAKE256 streams. It
does not claim an incremental-context cost, does not formalize SampleFixedWeightVect$, and does
not claim that rejection sampling terminates. Both requested prefix lengths are unary, so the
uniform efficiency theorem charges every output byte and required permutation block.
Main definitions #
Cslib.Crypto.HQC.pkeSeedDigest: HQC's domain-separatedIexpansion.Cslib.Crypto.HQC.pkeSeeds: the 32-byte split of that digest.Cslib.Crypto.HQC.pkeSeedPrefixes: requested one-shot SHAKE256 prefixes from the two seeds.Cslib.Crypto.HQC.encPkeSeedPrefixInput: input bytes followed by the two unary prefix lengths.
Main results #
Cslib.Crypto.HQC.length_pkeSeedDigest: the digest has exactly 64 bytes.Cslib.Crypto.HQC.lengths_pkeSeeds: both derived seeds have exactly 32 bytes.Cslib.Crypto.HQC.lengths_pkeSeedPrefixes: both returned prefixes have their requested lengths.Cslib.Crypto.HQC.computableInPolyTime_pkeSeeds,computableInPolyTime_pkeSeedPrefixes: uniform multitape-Turing-machine certificates.
References #
- HQC specification, version 5.1, Table 3, p. 15, and
HQC-PKE.Keygen, p. 38.
HQC-PKE's domain-separated hash I, before its two 32-byte halves are assigned to the
decryption-key and encryption-key seed streams.
The input is a 32-byte seed in the standardized parameter sets; the executable function remains total on every byte string, which is useful for its uniform machine certificate.
HQC-PKE's I expansion always emits 64 bytes.
Requested one-shot prefixes of the SHAKE256 streams initialized from HQC-PKE's two seeds.
The first requested length belongs to the decryption-key stream and the second to the encryption-key stream. This function recomputes each requested prefix from its seed.
HQC-PKE's domain-separated hash I is uniformly polynomial-time.
HQC's domain-separated SHA3-512 seed split is uniformly polynomial-time.
The two requested one-shot SHAKE256 seed prefixes are uniformly polynomial-time in the framed seed and the two unary output lengths.