diff --git a/src/sig/sig.h b/src/sig/sig.h index 8a67b833bf..6dec651664 100644 --- a/src/sig/sig.h +++ b/src/sig/sig.h @@ -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. diff --git a/tests/speed_sig.c b/tests/speed_sig.c index 4a9bd9aa9b..3fba4546a0 100644 --- a/tests/speed_sig.c +++ b/tests/speed_sig.c @@ -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;