Skip to content

Add support for SHA-512/256#432

Open
bauer-andreas wants to merge 4 commits intomainfrom
andreas-bauer/sha-512-256
Open

Add support for SHA-512/256#432
bauer-andreas wants to merge 4 commits intomainfrom
andreas-bauer/sha-512-256

Conversation

@bauer-andreas
Copy link
Copy Markdown

Add SHA-512/256 digest implementation via BoringSSL

Checklist

  • I've run tests to see all new and existing tests pass
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

If you've made changes to gyb files

  • [N/A] I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request

Motivation:

Neither CryptoKit nor swift-crypto currently explore the SHA-512/256 hashing function. SHA-512/256 provides the same 256-bit security level as SHA-256 but can be significantly faster on 64-bit platforms because it uses the SHA-512 internal structure, which operates on 64-bit words.

Modifications:

We modified CryptoExtras to include support using the BoringSSL implementation.

Result:

Swift ecosystem supports SHA-512/256.

@bauer-andreas bauer-andreas requested a review from Lukasa March 24, 2026 09:36
@bauer-andreas bauer-andreas added the 🆕 semver/minor Adds new public API. label Mar 24, 2026
@bauer-andreas bauer-andreas force-pushed the andreas-bauer/sha-512-256 branch 2 times, most recently from e79323e to 7d3923a Compare March 24, 2026 09:50
@bauer-andreas bauer-andreas force-pushed the andreas-bauer/sha-512-256 branch from 7d3923a to 34a210d Compare March 24, 2026 11:43
@bauer-andreas bauer-andreas requested a review from Lukasa March 24, 2026 11:44
@bauer-andreas bauer-andreas force-pushed the andreas-bauer/sha-512-256 branch 2 times, most recently from 65bb663 to 4630806 Compare March 24, 2026 14:16
@bauer-andreas bauer-andreas force-pushed the andreas-bauer/sha-512-256 branch from 4630806 to 93b3098 Compare March 24, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants