summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-10-10 08:29:46 (GMT)
committerGitHub <noreply@github.com>2021-10-10 08:29:46 (GMT)
commitad970e8623523a8656e8c1ff4e1dff3423498a5a (patch)
treeddd33e1925765792c97a500b6d8bf88ca899d53c /Doc
parenta1c3c9e8245a88cf37b084869b3559638116daf7 (diff)
downloadcpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.zip
cpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.tar.gz
cpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.tar.bz2
bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/configure.rst10
-rw-r--r--Doc/whatsnew/3.11.rst5
2 files changed, 12 insertions, 3 deletions
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index a59bee4..75f572c 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -416,15 +416,19 @@ Libraries options
Security Options
----------------
-.. cmdoption:: --with-hash-algorithm=[fnv|siphash24]
+.. cmdoption:: --with-hash-algorithm=[fnv|siphash13|siphash24]
Select hash algorithm for use in ``Python/pyhash.c``:
- * ``siphash24`` (default).
- * ``fnv``;
+ * ``siphash13`` (default);
+ * ``siphash24``;
+ * ``fnv``.
.. versionadded:: 3.4
+ .. versionadded:: 3.11
+ ``siphash13`` is added and it is the new default.
+
.. cmdoption:: --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
Built-in hash modules:
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index ff376d2..e3650a6 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -175,6 +175,11 @@ Other CPython Implementation Changes
support :class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols.
(Contributed by Mark Dickinson and Dong-hee Na in :issue:`24234`.)
+* ``siphash13`` is added as a new internal hashing algorithms. It's has similar security
+ properties as ``siphash24`` but it is slightly faster for long inputs. ``str``, ``bytes``,
+ and some other types now use it as default algorithm for ``hash()``. :pep:`552`
+ hash-based pyc files now use ``siphash13``, too.
+ (Contributed by Inada Naoki in :issue:`29410`.)
New Modules
===========