10000 gh-135244: use CSPRNG for random UUID node ID by LamentXU123 · Pull Request #135226 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135244: use CSPRNG for random UUID node ID #135226

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

Merged
merged 13 commits into from
Jun 8, 2025
Prev Previous commit
Next Next commit
Update Misc/NEWS.d/next/Library/2025-06-08-10-22-22.gh-issue-135244.Y…
…2SOTJ.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
LamentXU123 and picnixz authored Jun 8, 2025
commit 4b8a59e669ee3359150676b98cf9b804520543f0
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Python used to generare random Node ID of UUID when it failed to get the MAC address by PRNG.
the random Node ID is now generated by a CSPRNG for security reasons.
:mod:`uuid`: when the MAC address cannot be determined, the 48-bit node
ID is now generated with a cryptographically-secure pseudo-random number
generator (CSPRNG) as per :rfc:`RFC 9562, §6.10 <9562#section-6.10>`.
This affects :func:`~uuid.uuid1` and :func:`~uuid.uuid6`.
Loading
0