Skip to content
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

Fixing typo in comment in md32_common.h #1453

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

fabrice102
Copy link
Contributor

@fabrice102 fabrice102 commented Feb 26, 2024

Description of changes:

Fixing a typo in the comment in md32_common.h

The is 32 bytes (= 256 bits) for SHA-224 and SHA-256, and 64 bytes (= 512 bits) for SHA-384 and SHA-512. See also

struct sha256_state_st {
uint32_t h[8];
uint32_t Nl, Nh;
uint8_t data[SHA256_CBLOCK];
unsigned num, md_len;
};
.

Call-outs:

N/A

Testing:

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

Fixing a typo in the comment in md32_common.h

The <chaining length> is 32 bytes (= 256 bits) for SHA-224 and SHA-256, and 64 bytes (= 512 bits) for SHA-384 and SHA-512. See also https://github.com/aws/aws-lc/blob/0a470e450c6f5492478319abefc6daa0e9999954/include/openssl/sha.h#L174 .
@fabrice102 fabrice102 requested a review from a team as a code owner February 26, 2024 19:13
Copy link
Contributor

@torben-hansen torben-hansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@@ -76,7 +76,7 @@ extern "C" {
// } <NAME>_CTX;
//
// <chaining length> is the output length of the hash in bytes, before
// any truncation (e.g. 64 for SHA-224 and SHA-256, 128 for SHA-384 and
// any truncation (e.g. 32 for SHA-224 and SHA-256, 64 for SHA-384 and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above struct template+description is also not correct for SHA[384,512] that use 64-bit chunks, not 32-bit.

@torben-hansen torben-hansen merged commit 133a5f7 into aws:main Feb 28, 2024
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants