Code-based cryptography (decoding random linear codes) is the third PQC family; HQC is NIST's 2025 fourth-round KEM selection, standardized as the backup to ML-KEM precisely so that a lattice break does not strand deployments. Requires liboqs with HQC.
Examples
if (morie_crypto_liboqs_available()) {
kp <- try(morie_crypto_hqc_keygen(), silent = TRUE)
if (!inherits(kp, "try-error")) {
length(kp$pk)
length(kp$sk)
}
}
