Update HQC to 2023-04-30 submission#512
Conversation
f4b1dbe to
168059e
Compare
|
The HQC tests are failing only on PPC due to |
|
Yeah, we need to merge #500 after which astyle should not run on ppc anymore. |
There was a problem hiding this comment.
Wait, what's happening with the NIST kat random number generators? You're touching an awful lot of meta files.
It might also be better that, if this is necessary, nist-kat: nist is the default when not included in a META file.
Additionally, rebasing would be great
168059e to
41c6efe
Compare
The latest submission for HQC uses its own SHA3-based "rng" to produce KATs. I added I'll edit the description to mention this for clarity.
Both done. |
|
I think this looks plausible. @mkannwischer, could you maybe also have a look at the |
|
@thomwiggers @mkannwischer Just bumping this PR in case it's slipped off your radar. |
Refs: PQClean/PQClean#504 Refs: PQClean/PQClean#512 Refs: PQClean/PQClean#519 Refs: PQClean/PQClean#521 Refs: PQClean/PQClean#527 Refs: PQClean/PQClean#534 Refs: PQClean/PQClean#535 Refs: PQClean/PQClean#536 Refs: PQClean/PQClean#540 Refs: PQClean/PQClean#541 Refs: PQClean/PQClean#542 Refs: PQClean/PQClean#543
Refs: PQClean/PQClean#504 Refs: PQClean/PQClean#512 Refs: PQClean/PQClean#519 Refs: PQClean/PQClean#521 Refs: PQClean/PQClean#527 Refs: PQClean/PQClean#534 Refs: PQClean/PQClean#535 Refs: PQClean/PQClean#536 Refs: PQClean/PQClean#540 Refs: PQClean/PQClean#541 Refs: PQClean/PQClean#542 Refs: PQClean/PQClean#543
Update HQC to conform with the latest submission: see https://pqc-hqc.org. This also removes the avx2 optimized version of HQC, as it is not interoperable with the latest standard and renames HQC-RMRS to HQC everywhere, as there are no longer non-RMRS versions of HQC.
I made a number of small changes to the reference code, mostly to eliminate undefined or implementation-defined behaviour. The only substantial change is the addition of a Barrett reduction routine in the code for constant-weight vector sampling. This was to address #482. Please pay special attention to this code when reviewing; it's found in vector.c.
The latest submission of HQC generates KATs using a custom PRNG instead of the one provided by NIST. I added an implementation of this PRNG in the
testdirectory and modified the test files so that it would be used in the NIST KAT tests.It might be easier to review against the reference code: my fork of the
package-pqcleanrepo can help with this.Fixes #482.
Manually checked properties
.github/workflows/generate_workflows.py) (new schemes)for (size_t i=...)stdint.htypes (includinguint8_tinstead ofunsigned char)size_t