Parity-constrained quasi-cyclic syndrome distributions #
The real and comparison laws are the finite distributions in [GAMA+26], Definitions
2.3.6–2.3.9, pp. 12–13. A public vector represents its circulant matrix, using Mathlib's
Matrix.circulant. The two-block syndrome is x + circulant h *ᵥ y. The three-block law
uses the same third sparse vector in both syndrome components and retains only a prefix of
the second component. Here m is the retained length, equal to the source's n - ℓ.
Public blocks and the first comparison syndrome have the prescribed parities. The second
comparison component is uniform on all m bits. These are distributions, not hardness
assumptions: no adversary class, efficient sampler, seed expansion, or security reduction is
asserted. Zero and full weights and zero/full retained length are admitted as explicit finite
extensions; source security claims use their stated positive parameters and primitive primes.
Main definitions #
Cslib.Crypto.HQC.syndrome: a systematic two-block syndrome.Cslib.Crypto.HQC.SyndromeSample: the public circulant and syndrome.Cslib.Crypto.HQC.TruncatedSyndromeSample: two public circulants and the two output blocks.Cslib.Crypto.HQC.realSyndromeLaw,Cslib.Crypto.HQC.uniformSyndromeLaw: the 2-QCSD-P laws.Cslib.Crypto.HQC.realTruncatedSyndromeLaw,Cslib.Crypto.HQC.uniformTruncatedSyndromeLaw: the 3-QCSD-PT laws.
Main results #
Cslib.Crypto.HQC.parity_syndrome: the exact syndrome parity from its three inputs.Cslib.Crypto.HQC.parity_syndrome_of_weight: the parity forced by the two fixed weights.Cslib.Crypto.HQC.eval_idealSupport_map_indicatorVector: the source's ideal support sampler is the uniform fixed-weight bit-string law used below.Cslib.Crypto.HQC.mem_support_realTruncatedSyndromeLaw_iff: a sample is real exactly when both public parities hold and one shared third fixed-weight vector produces both components.Cslib.Crypto.HQC.parity_of_mem_support_realSyndromeLaw: every real syndrome has that parity.
References #
- HQC specification, version 5.1, Definitions 2.3.6–2.3.9, pp. 12–13.
The source's ideal support sampler, converted to a Boolean indicator, is exactly the uniform fixed-weight bit-string law used in the syndrome distributions.
A systematic binary syndrome, with public block circulant h and two secret blocks.
The parity obtained when both secret blocks have weight w and the public block parity b.
This is the source's w + b*w mod 2, expressed in the Boolean ring.
Fixed weights in both secret blocks determine the syndrome parity.
A sample for the three-block problem, with a prefix of its second syndrome.
The 2-QCSD-P real distribution: independent uniform fixed-weight secret blocks.
The 2-DQCSD-P comparison distribution retains both public parity constraints.
The 3-QCSD-PT real law. Both syndromes use the same sampled third secret block z.
The 3-DQCSD-PT comparison law: constrain the first syndrome's parity and draw the retained second block independently and uniformly, as in the source distribution.
Support characterization of the three-block real law. In particular, the same witness z
appears in both syndrome equations; replacing it by two independent vectors changes the law.
All real two-block samples satisfy both parity constraints.
The three-block law preserves both public-block parities and the first syndrome parity. No parity is asserted for the truncated second component.
The public parity test is deterministic on real two-block samples. This is why their comparison distribution must also constrain the syndrome parity.
The comparison law preserves the same deterministic syndrome parity as the real law.