Refactor HQC phase 4 — drop non-constant-time sparseMul
Restore dense Karatsuba multiplication at the four sites previously using GF2x.sparseMul. The phase 1 sparseMul kernel gave a 4-6x speedup but wrote to scratch buffer offsets derived from secret support indices, regressing cache-line side-channel resistance versus the previous dense path. Drop the kernel and revert the four call sites to materialise the support through writeSupportToVector + gf2x.mul. Retain the phase 2 ReedMuller cleanup and the phase 3 addSupportTo fusion at the three addTo-only sites (x in genKeyPair, e and r1 in pkeEncrypt); both preserve L1+L2+L3 constant-time properties and net ~3-6% end-to-end speedup over the original code across Java 8 through Java 25. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
G
gefeili committed
fdaa25cef2d731c6abcd6e25127abecbaa6baaf7
Parent: b1d383e