Skip to content

bpo-39298: Add BLAKE3 bindings to hashlib. #31686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

larryhastings
Copy link
Contributor

@larryhastings larryhastings commented Mar 4, 2022

bpo-39298: Add BLAKE3 bindings to hashlib.
BLAKE3 is a fast new cryptographic hash algorithm created
by the team behind BLAKE2. Python's BLAKE3 support uses local
SIMD extensions where available, making it Python's fastest
built-in hash algorithm on newer Intel and AMD CPUs for
non-trivial inputs.

https://bugs.python.org/issue39298

BLAKE3 is a fast new cryptographic hash algorithm created
by the team behind BLAKE2. Python's BLAKE3 support uses local
SIMD extensions where available, making it Python's fastest
built-in hash algorithm on newer Intel and AMD CPUs for
non-trivial inputs.
@larryhastings larryhastings requested a review from tiran as a code owner March 4, 2022 15:49
@larryhastings larryhastings requested review from zooba and warsaw March 4, 2022 15:49
@larryhastings larryhastings changed the title Add BLAKE3 bindings to hashlib. bpo-39298: Add BLAKE3 bindings to hashlib. Mar 4, 2022
oconnor663 added a commit to oconnor663/blake3-py that referenced this pull request Mar 4, 2022
This temporary branch is for testing the proposed hashlib implementation
in python/cpython#31686.
Touched up the blake3 object interface so it's a better match
with the the "blake3" package on PyPI:
  * derive_key_context is now a (Unicode) string.
  * Added a reset() method.
  * Enforce that key, if specified, is exactly 32 bytes.
  * Error strings used in exceptions are converging with what's
    in the "blake3" package.

Also, improved the setup.py build logic:
  * It now preserves the .o files from one build to another.
  * It does time stamp comparisons, so it rebuilds the .o file
    if it's out of date.
  * It remembers if building an extension completely failed.
In short, it now behaves completely properly like a normal "make".
It never extraneously re-tries a compilation.
@iritkatriel
Copy link
Member

https://bugs.python.org/issue39298 is closed. What is the status of this PR?

@gpshead
Copy link
Member

gpshead commented May 13, 2022

closing per #83479 (comment)

@gpshead gpshead closed this May 13, 2022
@larryhastings larryhastings deleted the add_blake3_to_hashlib branch April 24, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants