-
Notifications
You must be signed in to change notification settings - Fork 503
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
Refactor OpenSSL Implementation of SHA3 SHAKE to use new Squeeze API #1694
Refactor OpenSSL Implementation of SHA3 SHAKE to use new Squeeze API #1694
Conversation
May I ask you to put this changes under some #ifdef? OpenSSL 3.0/3.1 are still available and these branches don't have the Squeeze API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Eddy-M-K for putting this PR together. Conceptually this looks OK. The comment explains why this CI test is failing (it enables "OQS_USE_SHA3_OPENSSL" on a downlevel OpenSSL): You may simply wrap the new code in a suitable #ifdef OPENSSL_VERSION_NUMBER >= ...
(do you happen to know the exact value that would be right, @beldmit ?)
You may also consider adding "-DOQS_USE_SHA3_OPENSSL=ON" to this CI test which is using 3.0.2 and maybe some other "OpenSSL master" test to test-drive the OpenSSL SHA3 code more regularly (as "OQS_USE_SHA3_OPENSSL" is OFF by default).
According to man pages |
@baentsch Do you happen to know which jobs (if any) use OpenSSL |
Good question! I don't (recall us ever having had that goal), so the answer probably is "None". Until this PR I would have said "so what" as |
8482bbd
to
cef780e
Compare
…uantum-safe#1539 Signed-off-by: Eddy Kim <[email protected]>
Signed-off-by: Eddy Kim <[email protected]>
Signed-off-by: Eddy Kim <[email protected]>
Signed-off-by: Eddy Kim <[email protected]>
e9ce69d
to
f5248ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, with one minor suggestion. Thanks, Eddy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Eddy!
c270962
to
64d806d
Compare
64d806d
to
c270962
Compare
Signed-off-by: Eddy Kim <[email protected]> Co-authored-by: Spencer Wilson <[email protected]>
c270962
to
4d9c4a5
Compare
Had to make a couple force pushes due to a failed attempt to sign off the last commit 😰 |
Refactor OpenSSL Implementation of SHA3 SHAKE to use new
EVP_DigestSqueeze()
allowing for multiple calls to squeezeResolves #1539
Please correct me if I'm wrong but it looks like
n_out
ofintrn_shake*_inc_ctx
s are used solely to keep track of the byte number of the input and are unnecessary with the new Squeeze API. Thetest_sha3
test ran fine when I removed all instances ofn_out
so I'm curious if this is no longer necessary.If
n_out
is indeed unnecessary, then perhaps we can also remove the wrapper structsintrn_shake128_inc_ctx
andintrn_shake256_inc_ctx
and instead pointstate->ctx
directly to an instance ofEVP_MD_CTX
.