Skip to content

Commit

Permalink
comment fix and rnd size assign
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemas committed Nov 8, 2024
1 parent fa1f036 commit 346ad71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions crypto/dilithium/pqcrystals_dilithium_ref_common/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ int crypto_sign_keypair(ml_dsa_params *params, uint8_t *pk, uint8_t *sk) {
* - size_t *siglen: pointer to output length of signature
* - uint8_t *m: pointer to message to be signed
* - size_t mlen: length of message
* - uint8_t *ctx: pointer to context string
* - size_t ctxlen: length of context string
* - uint8_t *pre: pointer to prefix string
* - size_t prelen: length of prefix string
* - uint8_t *rnd: pointer to random seed
* - uint8_t *sk: pointer to bit-packed secret key
*
* Returns 0 (success) or -1 (context string too long)
Expand Down Expand Up @@ -310,8 +311,8 @@ int crypto_sign(ml_dsa_params *params,
* - size_t siglen: length of signature
* - const uint8_t *m: pointer to message
* - size_t mlen: length of message
* - const uint8_t *ctx: pointer to context string
* - size_t ctxlen: length of context string
* - const uint8_t *pre: pointer to prefix string
* - size_t prelen: length of prefix string
* - const uint8_t *pk: pointer to bit-packed public key
*
* Returns 0 if signature could be verified correctly and -1 otherwise
Expand Down
2 changes: 1 addition & 1 deletion crypto/dilithium/pqcrystals_dilithium_ref_common/sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int crypto_sign_signature_internal(ml_dsa_params *params,
size_t mlen,
const uint8_t *pre,
size_t prelen,
const uint8_t rnd[RNDBYTES],
const uint8_t *rnd,
const uint8_t *sk);

int crypto_sign(ml_dsa_params *params,
Expand Down

0 comments on commit 346ad71

Please sign in to comment.