Skip to content

More fixes and improvements - #758

Merged
karel-m merged 9 commits into
developfrom
more-fixes-and-improvements
Aug 1, 2026
Merged

More fixes and improvements#758
karel-m merged 9 commits into
developfrom
more-fixes-and-improvements

Conversation

@sjaeckel

@sjaeckel sjaeckel commented May 5, 2026

Copy link
Copy Markdown
Member

Checklist

  • documentation is added or updated
  • tests are added or updated
  • if this fixes something: added a Fixes: tag to the commit message

@sjaeckel
sjaeckel requested a review from karel-m May 5, 2026 09:34
@sjaeckel
sjaeckel force-pushed the more-fixes-and-improvements branch from 6cde560 to 1ee37a5 Compare May 5, 2026 11:16
@karel-m

karel-m commented May 5, 2026

Copy link
Copy Markdown
Member

Do we actually still need sha1_x86_init and sha1_c_init when they are both equal to sha1_init?

@sjaeckel

sjaeckel commented May 5, 2026

Copy link
Copy Markdown
Member Author

Do we actually still need sha1_x86_init and sha1_c_init when they are both equal to sha1_init?

Nope, they could be defined to sha1_init! Will do that :) Thanks!

@karel-m

karel-m commented May 5, 2026

Copy link
Copy Markdown
Member

similarly sha224_x86_init / sha256_x86_init vs sha224_c_init / sha256_c_init

@sjaeckel
sjaeckel force-pushed the more-fixes-and-improvements branch from 1ee37a5 to 2e881d6 Compare May 7, 2026 14:15
@sjaeckel sjaeckel linked an issue May 7, 2026 that may be closed by this pull request
@sjaeckel
sjaeckel force-pushed the more-fixes-and-improvements branch from 2e881d6 to bb93c6e Compare May 7, 2026 14:21
Comment thread src/hashes/sha2/sha256.c Outdated
@sjaeckel
sjaeckel force-pushed the more-fixes-and-improvements branch 2 times, most recently from 14477e7 to 207c61f Compare May 19, 2026 10:03
@sjaeckel
sjaeckel requested a review from MarekKnapek May 19, 2026 10:04

@MarekKnapek MarekKnapek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe also unify the *_done functions. As there is no x86specific logic inside them. They do call the *_process functions which might get dispatched to portable or x86 version, but themselves do not contain any added smart-ness over the portable version.

Comment thread tests/cipher_hash_test.c Outdated
Comment thread src/hashes/sha1.c Outdated
Comment thread src/hashes/sha1_x86.c Outdated
Comment thread src/hashes/sha2/sha256.c Outdated
Comment thread src/hashes/sha2/sha256_x86.c Outdated
@sjaeckel
sjaeckel force-pushed the more-fixes-and-improvements branch 2 times, most recently from 5f7af18 to 3432f47 Compare May 20, 2026 11:44
@karel-m

karel-m commented Jul 30, 2026

Copy link
Copy Markdown
Member

Can we move the changes related to "... state memcpy()'able again" out of this PR?

They are IMO not easy, whereas the rest of this PR are mostly non-controversial cleanups/improvements.

@MarekKnapek MarekKnapek mentioned this pull request Jul 30, 2026
3 tasks
@karel-m
karel-m force-pushed the more-fixes-and-improvements branch from 3432f47 to 4eb7518 Compare July 31, 2026 21:51

@sjaeckel sjaeckel left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like this can be merged!?

sjaeckel added 8 commits July 31, 2026 23:57
They're the only ones which don't follow the same pattern.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Fixes: 6c885c7 ("SM3 hash function")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
* Use a shared init function.
* Fix some functions used in descriptors and implementation.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
While running the tests in verbose mode I saw that
`tests/pem/openssl_ed448_x509.pem` is skipped instead of processed.

Fixes: 076a110 ("Ed448 + X448")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
@karel-m
karel-m force-pushed the more-fixes-and-improvements branch from 4eb7518 to 97f5d72 Compare July 31, 2026 21:57
@karel-m

karel-m commented Jul 31, 2026

Copy link
Copy Markdown
Member

Looks like this can be merged!?

Yes, I have removed stuff related to "... state memcpy()'able again"

@karel-m
karel-m merged commit 4d9e2a1 into develop Aug 1, 2026
202 checks passed
@karel-m
karel-m deleted the more-fixes-and-improvements branch August 1, 2026 08:20
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.

SHA1/SHA224/SHA256 state layouts are not memcpy-safe

3 participants