-
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.
The way the test was generating a public key that is not consistent with a secret key is by xor-ing the first byte of the key with 1. Such key modifications can inadvertently make the key invalid and thus fail the test. For example, before performing encapsulation ML-KEM decodes the public key bytes to an array of 12-bit coefficients and checks that all coefficients are in the range [0, 3328]. If the first two bytes of the key encode the coefficient 3328 then xor-ing the first byte with 1 will make the coefficient equal to 3329. The call to encapsulate will then fail because 3329 is an invalid coefficient.
- Loading branch information
dkostic
committed
Sep 25, 2024
1 parent
c5d3f3d
commit 4754546
Showing
1 changed file
with
20 additions
and
22 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