gh-135004: rewrite and cleanup blake2module.c#135006
Merged
Merged
Conversation
_blake2module.cblake2module.c
Member
Author
|
!buildbot FIPS |
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 17365bd 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135006%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 4b4b66c 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135006%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
- use this new helper in `py_blake2b_get_digest_size` - in the future, exposing `key_length` will be easier
4b4b66c to
ce0e848
Compare
picnixz
commented
Jun 7, 2025
70ea98e to
b16e301
Compare
gpshead
approved these changes
Jun 8, 2025
lkollar
pushed a commit
to lkollar/cpython
that referenced
this pull request
Jun 19, 2025
* Cleanup imports and update module docstring. * Simplify detection of SIMD support. * Correctly guard `update()` cases. * Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`. * Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`. * Refactor computations of `digest` and `hexdigest`. * Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`. * Add `hacl_get_blake2_info` to extract static BLAKE-2 information. This new helper is used by `py_blake2b_get_digest_size`, but can be later used to expose `key_length` more easily.
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
* Cleanup imports and update module docstring. * Simplify detection of SIMD support. * Correctly guard `update()` cases. * Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`. * Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`. * Refactor computations of `digest` and `hexdigest`. * Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`. * Add `hacl_get_blake2_info` to extract static BLAKE-2 information. This new helper is used by `py_blake2b_get_digest_size`, but can be later used to expose `key_length` more easily.
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
* Cleanup imports and update module docstring. * Simplify detection of SIMD support. * Correctly guard `update()` cases. * Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`. * Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`. * Refactor computations of `digest` and `hexdigest`. * Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`. * Add `hacl_get_blake2_info` to extract static BLAKE-2 information. This new helper is used by `py_blake2b_get_digest_size`, but can be later used to expose `key_length` more easily.
Agent-Hellboy
pushed a commit
to Agent-Hellboy/cpython
that referenced
this pull request
Aug 19, 2025
* Cleanup imports and update module docstring. * Simplify detection of SIMD support. * Correctly guard `update()` cases. * Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`. * Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`. * Refactor computations of `digest` and `hexdigest`. * Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`. * Add `hacl_get_blake2_info` to extract static BLAKE-2 information. This new helper is used by `py_blake2b_get_digest_size`, but can be later used to expose `key_length` more easily.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Strictly speaking, we're gaining a bit as well:
I've updated
hmacmodule.cas well so that my two functions for detecting SIMD features have the same body. I could have a separate header, but it's easier that way (ideally, I'd like to rely on #125022 for SIMD detection in the future).blake2module.c#135004