Add HIP post-quantum cryptography examples - #469
Conversation
|
Hi @firedoil, thanks for contributing to rocm-examples! PQC is an interesting topic that we haven't covered yet in the repo, and your PR is a welcomed addition. To align with rocm-examples existing code base and future maintainability, there are some points that need to be addressed for this PR to land:
|
|
Hi, thank you for the detailed review. I have updated the PR to address the requested changes:
I built and tested all 13 supported parameter-set targets on an AMD Thank you again for the review. |
|
Hi @firedoil, thanks for the follow up. Since this PR covers encryption/cryptography, it requires internal review and approval. I've sent out a request and will let you know if the content can be merged as per ROCm's OSS policies before I review again. Thanks for the understanding. |
Description
This PR adds post-quantum cryptography examples implemented with HIP for AMD GPUs.
The examples demonstrate batched key encapsulation and digital signature workflows using Kyber, Aigis-enc, ML-DSA, and Aigis-sig. The executables provide deterministic CTest self-tests and file-oriented commands for key generation, encapsulation, decapsulation, signing, and verification.
Changes
.hipfiles and headers as.hppfiles.Applications/CMakeLists.txtandApplications/Makefile.gfx1100.Supported Parameter Sets
The following 13 targets are supported:
applications_pqc_kyber512applications_pqc_kyber768applications_pqc_kyber1024applications_pqc_aigis_enc1applications_pqc_aigis_enc2applications_pqc_aigis_enc3applications_pqc_aigis_enc4applications_pqc_mldsa44applications_pqc_mldsa65applications_pqc_mldsa87applications_pqc_aigis_sig1applications_pqc_aigis_sig2applications_pqc_aigis_sig3Four representative targets are built by default. Set
ROCM_EXAMPLES_PQC_BUILD_ALL_VARIANTS=ONto build and test all 13 parameter sets.Build and Test
The examples were built and tested with:
gfx11007.12.6061022.0.0gitAll supported parameter sets were enabled and tested with:
Result:
The self-tests cover KEM shared-secret agreement, signature generation and verification, and rejection of modified signature data.
Notes
This contribution intentionally targets the AMD HIP backend. CUDA backend compatibility is not included in this revision.
The implementation is provided as an educational HIP example and is not intended to be used as a production cryptographic library.