-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ML-KEM CAST for KeyGen, Encaps, and Decaps (#1846)
### Description of changes: * Per the I.G guidance a CAST using a KAT is required for ML-KEM key generation > if the module implements ML-KEM key generation, the module shall have an ML-KEM key generation CAST. The ML-KEM key generation does not take input and outputs an encapsulation key (ek) and a decapsulation key (dk). The CAST shall use the ML-KEM key generation algorithm (i.e., Algorithm 19 in FIPS 203), and for a KAT, using a fixed/predetermined random values (i.e., z and d), to compare the resulting outputs to the pre-computed values of ek and dk. * Per the I.G guidance a CAST using a KAT is required for ML-KEM encapsulation > if the module implements ML-KEM encapsulation, the module shall have a CAST for the ML-KEM encapsulation mechanism. The encapsulation algorithm of ML-KEM accepts an encapsulation key (ek) as input, requires randomness, and outputs a ciphertext (c) and a shared secret (K). The CAST shall use the ML-KEM encapsulation algorithm (i.e., Algorithm 20 in FIPS 203), and for a KAT, using fixed/predetermined ek and m values, to compare the resulting outputs to pre-computed values of both c and K. * Per the I.G. guidance a CAST using two KATs is required for mL-KEM decapsulation, one to test the non-implicit rejection path, and the other to test the rejection path. > if the module implements ML-KEM decapsulation, the module shall have a CAST for the ML-KEM decapsulation mechanism. The decapsulation algorithm of ML-KEM accepts a decapsulation key (dk) and a ML-KEM ciphertext (c) as input, does not use any randomness, and outputs a shared secret (K’). The CAST shall use the ML-KEM decapsulation algorithm (i.e., Algorithm 21 in FIPS 203), and for a KAT, using fixed/predetermined dk and c values, to compare the resulting outputs to pre- computed value of K'. Note21: The ML-KEM decapsulation CASTs shall cover both the implicit rejection and (unnamed) non-rejection paths. The source of the vectors were sourced from the ML-KEM ACVP demo server vectors that had been previously validated with. Also only one ML-KEM parameter variant needs to be tested per I.G.: > Note22: The above CASTs shall be performed on at least one of the following parameter-sets for ML- KEM that are implemented in the approved mode: ML-KEM-512, ML-KEM-768, or ML-KEM-1024. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
- Loading branch information
Showing
4 changed files
with
749 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.