Skip to content

Commit

Permalink
rebase edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemas committed Nov 22, 2024
1 parent 4f1bc91 commit 69e15e7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crypto/dilithium/p_pqdsa_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ TEST_P(PQDSAParameterTest, KAT) {
std::vector<uint8_t> pub(pk_len);
std::vector<uint8_t> priv(sk_len);
std::vector<uint8_t> signature(sig_len);

std::string name = GetParam().name;
size_t mlen_int = std::stoi(mlen);

Expand Down
1 change: 1 addition & 0 deletions crypto/dilithium/pqcrystals_dilithium_ref_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The code was refactored in [this PR](https://github.com/aws/aws-lc/pull/1910) by
that initialize a given structure with values corresponding to a parameter set. This structure is then passed to every function that requires it as a function argument. In addition, the following changes were made to the source code in `pqcrystals_dilithium_ref_common` directory:

- `randombytes.{h|c}` are deleted because we are using the randomness generation functions provided by AWS-LC.
- `fips202.{h|c}` are deleted as all SHA3/SHAKE functionality is provided instead by AWS-LC fipsmodule/sha rather than the reference implementation.
- `sign.c`: calls to `randombytes` function is replaced with calls to `RAND_bytes` and the appropriate header file is included (`openssl/rand.h`).
- `ntt.c`, `poly.c`, `reduce.c`, `reduce.h`: have been modified with a code refactor. The function `fqmul` has been added to bring mode code consistency with Kyber/ML-KEM. See https://github.com/aws/aws-lc/pull/1748 for more details on this change.
- `reduce.c`: a small fix to documentation has been made on the bounds of `reduce32`.
Expand Down
2 changes: 0 additions & 2 deletions crypto/dilithium/pqcrystals_dilithium_ref_common/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ int crypto_sign_signature_internal(ml_dsa_params *params,
SHA3_Update(&state, mu, CRHBYTES);
SHAKE_Final(rhoprime, &state, CRHBYTES);


/* FIPS 204: line 5 Expand matrix and transform vectors */
polyvec_matrix_expand(params, mat, rho);
polyvecl_ntt(params, &s1);
Expand Down Expand Up @@ -349,7 +348,6 @@ int crypto_sign_verify_internal(ml_dsa_params *params,
if(siglen != params->bytes) {
return -1;
}

/* FIPS 204: line 1 */
unpack_pk(params, rho, &t1, pk);
/* FIPS 204: line 2 */
Expand Down

0 comments on commit 69e15e7

Please sign in to comment.