Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small cleanup #85

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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