Skip to content

SHA-1 x86#717

Draft
MarekKnapek wants to merge 20 commits intolibtom:developfrom
MarekKnapek:SHA-1x86
Draft

SHA-1 x86#717
MarekKnapek wants to merge 20 commits intolibtom:developfrom
MarekKnapek:SHA-1x86

Conversation

@MarekKnapek
Copy link
Copy Markdown
Contributor

WIP - there are still things that need to be resolved, see #716.

@MarekKnapek MarekKnapek mentioned this pull request Apr 10, 2026
* Unify tests into one implementation.
* Re-factor `s_sha1_is_supported()` which simplifies this quite a bit.
* Improve the pattern where choosing which implementation to run in
  `sha1_desc.c`.
* Only register the common descriptor in `register_all_hashes()`.
* Some other minor fixes/improvements.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Fix matching of other uses of a descriptor type, besides their declaration.
@sjaeckel sjaeckel linked an issue Apr 13, 2026 that may be closed by this pull request
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Since there's absolutely no way to ensure that a struct is somehow
aligned -- all those compile-time mechanism are best-effort and no
guarantee -- we align the necessary buffers at run-time.

AES-NI already introduced that, let's improve a bit upon its usage.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
* we try to keep ifdef's at one place
* the last real x86 was launched in 2007, while the SHA instructions were
  only introduced in 2013, so IMO we can safely assume that there's no
  need to handle non-x86-64 instruction sets.
* some minor fixes

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
* we try to keep ifdef's at one place
* the last real x86 was launched in 2007, while the SHA instructions were
  only introduced in 2013, so IMO we can safely assume that there's no
  need to handle non-x86-64 instruction sets.
* some minor fixes

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
@sjaeckel
Copy link
Copy Markdown
Member

sjaeckel commented Apr 14, 2026

FYI: Please feel free to read the commit messages of the commits I added, they contain the reasoning behind most of the changes.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Allow more classes to be filtered.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
(cherry picked from commit 14352f5)
@sjaeckel
Copy link
Copy Markdown
Member

Looking at the results in appveyor it seems like this somehow doesn't result in any improvements on MSVC ...

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
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.

SHA-1 x86

3 participants