Hi everyone,
I am a developer interested in post-quantum cryptography (PQC). Recently, I built an experimental key exchange prototype combining CSIDH-512 and HQC (Hamming Quasi-Cyclic), and I wanted to share the technical notes here.
Why combine CSIDH-512 and HQC?
Most hybrid post-quantum schemes run two algorithms in parallel and simply concatenate their shared secrets. However, standalone CSIDH-512 faces reduced quantum security due to sub-exponential quantum sieving and Kuperberg-type attacks, while scaling up CSIDH parameters significantly hurts performance.
To keep the compact 64-byte public key size of CSIDH-512 while mitigating passive key harvesting, I explored a nested, Fujisaki-Okamoto-inspired construction:
- Implicit Public-Key Hiding: Instead of sending the client's ephemeral CSIDH-512 public key (
pk_C) in cleartext, it is encrypted directly as the plaintext payload inside the server's HQC public key. - Cryptographic Coupling: The resulting CSIDH shared secret is hashed via
SHAKE256to deterministically derive the HQC ephemeral noise vectors(r1, r2, e). - Constant-Time Verification: The server decapsulates
pk_C, computes the shared secret, re-derives the noise vectors, and verifies the re-encrypted ciphertext in constant time to achieve IND-CCA2 security.
Bandwidth & Implementation
- Total Handshake Size: 6,779 bytes over a single TCP session (avoiding separate cleartext framing for
pk_C). - Language: Implemented in C with memory zeroization (
OPENSSL_cleanse) and domain-separatedSHAKE256calls. - Note: Because the CSIDH group action branches on secret exponent signs, this prototype strictly enforces ephemeral key rotation per session.
Technical Paper & Source Code
If you are interested in the full protocol breakdown, parameter choices, and C implementation, you can check them out here:
- Technical Analysis (Zenodo DOI): Nested CSIDH-HQC: A Fujisaki-Okamoto-Inspired Post-Quantum Key Exchange Protocol
- Source Code (GitHub): Alpha08-Github
Feedback and thoughts on the protocol design are always welcome!