Skip to content

Commit

Permalink
Merge pull request #85 from GiacomoPope/mlkem
Browse files Browse the repository at this point in the history
Small cleanup
  • Loading branch information
GiacomoPope authored Aug 16, 2024
2 parents f45201a + 31c2e02 commit 9952d21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ implementation which people can learn from.

This code is not constant time, or written to be performant. Rather, it was
written so that the python code closely follows the Kyber specification
[specification](https://pq-crystals.org/kyber/data/kyber-specification-round3-20210804.pdf) and [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final). To cryptographic guarantees are made of this work.
[specification](https://pq-crystals.org/kyber/data/kyber-specification-round3-20210804.pdf) and [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final). No cryptographic guarantees are made of this work.

## History of this Repository

Expand All @@ -56,11 +56,11 @@ and [`test_ml_kem.py`](tests/test_ml_kem.py).

The KAT files were either downloaded or generated:

1. For **Kyber**, the KAT files were generated from the projects [GitHub
1. For **ML-KEM**, the KAT files were download from the GitHub repository
[usnistgov/ACVP-Server/](https://github.com/usnistgov/ACVP-Server/releases/tag/v1.1.0.35) release 1.1.0.35, and are included in `assets/ML-KEM-*` directories.
2. For **Kyber**, the KAT files were generated from the projects [GitHub
repository](https://github.com/pq-crystals/kyber/) and are included in
`assets/PQCLkemKAT_*.rsp`
2. For **ML-KEM**, the KAT files were download from the GitHub repository
[usnistgov/ACVP-Server/](https://github.com/usnistgov/ACVP-Server/releases/tag/v1.1.0.35) release 1.1.0.35, and are included in `assets/ML-KEM-*` directories.

**Note**: for Kyber v3.02, there is a discrepancy between the specification and
reference implementation. To ensure all KATs pass, one has to generate the
Expand Down
2 changes: 1 addition & 1 deletion src/kyber_py/ml_kem/ml_kem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ML_KEM:
def __init__(self, params):
"""
Initialise the ML-KEM with specified lattice parameters
Initialise the ML-KEM with specified lattice parameters.
:param dict params: the lattice parameters
"""
Expand Down
5 changes: 2 additions & 3 deletions tests/test_ml_kem.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ def test_decaps_hash_check_failure(self):

class TestML_KEM_KAT(unittest.TestCase):
"""
Test ML_KEM levels for internal
consistency by generating key pairs
and shared secrets.
Test ML-KEM against test vectors collected from
https://github.com/usnistgov/ACVP-Server/releases/tag/v1.1.0.35
"""

def generic_keygen_kat(self, ML_KEM, index):
Expand Down

0 comments on commit 9952d21

Please sign in to comment.