Add PKCS#11 provider support for ML-KEM#663
Open
olszomal wants to merge 3 commits into
Open
Conversation
Update the bundled PKCS#11 header to version 3.2 and load the optional 3.2 function list through `C_GetInterface`, while preserving the legacy function list. This enables `C_EncapsulateKey` and `C_DecapsulateKey` for ML-KEM.
Add PKCS#11 provider support for ML-KEM-512, ML-KEM-768 and ML-KEM-1024 key generation, encapsulation and decapsulation. Use the PKCS#11 3.2 C_DecapsulateKey interface for private-key decapsulation on the token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Related Issue
Issue number: N/A
Current Behavior
The PKCS#11 provider does not support ML-KEM keys or KEM operations.
PKCS#11 modules are loaded using the legacy function list, so the PKCS#11 3.2
C_DecapsulateKeyfunction is not available.New Behavior
The PKCS#11 provider supports
ML-KEM-512,ML-KEM-768andML-KEM-1024key generation, encapsulation and decapsulation.Encapsulation is performed using the public key, while decapsulation is performed on the token through the PKCS#11 3.2
C_DecapsulateKeyinterface.Scope of Changes
ML-KEM-768example and provider tests.Testing
Tested with:
Additional Notes
License Declaration