-
Notifications
You must be signed in to change notification settings - Fork 13
Support digest state export for MD5, SHA1, and SHA2 digests #117
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
Conversation
Just skipped these to reduce risk of regression, or because there is something fundamentally harder about making SHA3 exportable? If the implementation is the same shape I would go for it in this PR even if golang won't use it yet. Overall, I think there's more risk of bugs from divergence between how we handle SCOSSL digests in the provider than from being eager with SHA3 #Resolved Refers to: SymCryptProvider/src/digests/p_scossl_digest_generic.c:184 in 520bd0b. [](commit_id = 520bd0b, deletion_comment = False) |
The PR is still a draft. I wanted to validate existing hashes with the golang-fips toolchain first. I'll be pushing SHA3 and cleanup before publishing this PR. In reply to: 2881798636 Refers to: SymCryptProvider/src/digests/p_scossl_digest_generic.c:184 in 520bd0b. [](commit_id = 520bd0b, deletion_comment = False) |
samuel-lee-msft
left a comment
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.
LGTM - assuming everything is working with the golang side, I'm happy to merge.
This reverts commit 520bd0b.
OpenSSL does not currently support resumable hashing, where an in-progress hash operation's state is saved, and can be loaded later to finish the hash. Some crypto libraries do support this such as golang/crypto. For libraries build as a compatibility layer on top of OpenSSL (e.g., golang-fips/openssl, there is no way through the OpenSSL APIs to support resumable hashing.
Adds custom parameters
state(OSSL_PARAM_OCTET_STRING) andrecompute_checksum(OSSL_PARAM_INTEGER) to the SymCrypt provider for MD5, SHA1, and SHA2 digests.stateparameter toEVP_MD_CTX_get_paramsandEVP_MD_CTX_set_paramsrespectively.recompute_checksumcan optionally be set to tell the SymCrypt provider to recalculate the checksum SymCrypt expects at the end of the export blob.Adds imported/exported digest tests to SslPlay.
Add an option to SslPlay to disable loading the SymCrypt engine.
Bump version to 1.9.0
Fixed typo in SymCrypt provider readme
Disable optimizations for debug builds
Fix SslPlay AES-XTS test. This test set an 8 byte IV but didn't explicitly try to change the IV size, causing a buffer overrun if the provider's default IV length was > 8