Skip to content

Remove SIMD support for BLAKE-2 and HMAC-BLAKE-2 #160333

Open

Description

@picnixz

Feature or enhancement

As announced on DPO, I will remove SIMD support for BLAKE2 and HMAC-BLAKE2. I want to reduce the API surface of BLAKE-2 to what OpenSSL provides
(digest, MAC)
. More precisely:

  • Deprecate the tree-hashing parameters of hashlib.blake2b and hashlib.blake2s, namely fanout, depth, leaf_size, node_offset, node_depth, inner_size and last_node.
  • Deprecate salt and person when key is not given. Keyed BLAKE-2 still accepts them.
  • Remove SIMD support from blake2module.c and hmacmodule.c, together with the corresponding checks in configure.ac. This does not change the API, so there is no deprecation period. SIMD was only enabled on (some) x86-64 platforms and broke the build on many others. This also fixes HACL* HMAC does not properly use vectorized BLAKE-2 #1381141

Deprecation starts in 3.16 and removal is planned for 3.21. Exposing the OpenSSL BLAKE-2 API (and handling the usedforsecurity parameter) will be done separately.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/remove-simd-support-for-blake2/109603/14

Linked PRs

Footnotes

  1. In the DPO thread, I said that I will remove HMAC-BLAKE2 from the HACL* HMAC module but the way the module is constructed isn't really important and I can simply make it work properly. I need to know what kind of "defaults" I would use (because OpenSSL's BLAKE2 with HMAC is only EVP_blake2b512 and EVP_blake2s256). If this is too annoying I will simply remove it altogether. ↩

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 22, 2026
  3. changed the title [-]Reduce the API surface of BLAKE-2 to match OpenSSL[/-] [+]Remove SIMD support for BLAKE-2 and HMAC-BLAKE-2[/+] on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions