Skip to content

pextlib: Add SHA3-256 as a supported checksum type#397

Open
herbygillot wants to merge 1 commit intomacports:masterfrom
herbygillot:sha3-256
Open

pextlib: Add SHA3-256 as a supported checksum type#397
herbygillot wants to merge 1 commit intomacports:masterfrom
herbygillot:sha3-256

Conversation

@herbygillot
Copy link
Member

Add sha3-256 alongside the existing rmd160 and sha256 checksum types. SHA3-256 (Keccak, FIPS 202) is structurally independent from the SHA-2 family, providing genuine defense-in-depth rather than two variants of the same algorithm design.

The Keccak-f[1600] permutation is taken from the XKCP reference implementation by the SHA3 designers (CC0 public domain), wrapped in a streaming Init/Update/Final API for compatibility with md_wrappers.h. The bundled implementation is used unconditionally since CommonCrypto lacks SHA3 before macOS 10.15 and the OpenSSL low-level SHA3 API is inconsistent across versions.

For now, rmd160 remains in default_checksum_types and secure_checksum_types to allow the release containing this change to propagate before nudging maintainers to transition. The portfile(7) man page documents the recommended set as sha256, sha3-256 and size.

See: https://trac.macports.org/ticket/63885

@herbygillot
Copy link
Member Author

Need help testing this on older platforms, like PPC.

@herbygillot herbygillot force-pushed the sha3-256 branch 2 times, most recently from b4cc0f8 to b61d97d Compare March 20, 2026 09:35
@herbygillot herbygillot changed the title port: Add SHA3-256 as a supported checksum type pextlib: Add SHA3-256 as a supported checksum type Mar 20, 2026
Add sha3-256 alongside the existing rmd160 and sha256 checksum types.
SHA3-256 (Keccak, FIPS 202) is structurally independent from the SHA-2
family, providing genuine defense-in-depth rather than two variants of
the same algorithm design.

The Keccak-f[1600] permutation is taken from the XKCP reference
implementation by the SHA3 designers (CC0 public domain), wrapped in a
streaming Init/Update/Final API for compatibility with md_wrappers.h.
The bundled implementation is used unconditionally since CommonCrypto
lacks SHA3 before macOS 10.15 and the OpenSSL low-level SHA3 API is
inconsistent across versions.

For now, rmd160 remains in default_checksum_types and
secure_checksum_types to allow the release containing this change to
propagate before nudging maintainers to transition.  The portfile(7) man
page documents the recommended set as sha256, sha3-256 and size.

See: https://trac.macports.org/ticket/63885

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant