Skip to content

Commit

Permalink
addressing sig length questions (#1306)
Browse files Browse the repository at this point in the history
* addressing sig length questions

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
  • Loading branch information
baentsch and dstebila committed Sep 15, 2022
1 parent 46deaac commit 222374e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sig/sig.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ typedef struct OQS_SIG {
* compile-time macros `OQS_SIG_*_length_*`.
*
* @param[out] signature The signature on the message represented as a byte string.
* @param[out] signature_len The length of the signature.
* @param[out] signature_len The actual length of the signature. May be smaller than `length_signature` for some algorithms since some algorithms have variable length signatures.
* @param[in] message The message to sign represented as a byte string.
* @param[in] message_len The length of the message to sign.
* @param[in] secret_key The secret key represented as a byte string.
Expand Down
3 changes: 3 additions & 0 deletions tests/speed_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ static OQS_STATUS sig_speed_wrapper(const char *method_name, uint64_t duration,

if (printInfo) {
printf("public key bytes: %zu, secret key bytes: %zu, signature bytes: %zu\n", sig->length_public_key, sig->length_secret_key, sig->length_signature);
if (signature_len != sig->length_signature) {
printf(" Actual signature length returned (%zu) less than declared maximum signature length (%zu)\n", signature_len, sig->length_signature);
}
}

ret = OQS_SUCCESS;
Expand Down

0 comments on commit 222374e

Please sign in to comment.