-
Notifications
You must be signed in to change notification settings - Fork 479
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
The "(maximum) length" words in OQS_SIG
and OQS_KEM
are misleading
#1744
Comments
Hi @wangweij , I'm not sure that I understand your point. The maximum length actually returns the length, designed for current and the future scheme that are variable in length, if it's variable in length, return the maximum length, otherwise return the exact length. |
Even if a key has a variable length, I don't know how to obtain it. The A variable length only makes sense if the function had been designed as
|
None of the schemes in liboqs have variable-length keys, in theory or practice. As you note, variable-length keys wouldn't fit with the APIs. You can safely use those as exact lengths. Even for signature schemes, the only ones with variable-length signatures are Falcon-{512,1024}. |
@SWilson4, thanks for the confirmation. Then, shall we remove the words from the header files? |
That seems reasonable to me. Please feel free to create a PR and tag me as a reviewer. |
All fields for the lengths of secret keys, public keys, signatures, ciphertexts, and shared secrets in the
OQS_SIG
andOQS_KEM
structs claim they are "The (maximum) length". However, except for the signature length, all of them should be the exact lengths. In fact, only theOQS_SIG_sign
function has an out parameter to retrieve the length of the signature.The text was updated successfully, but these errors were encountered: