Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(35911)

Side by Side Diff: Doc/library/hashlib.rst

Issue 26798: add BLAKE2 to hashlib
Patch Set: Created 3 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/hashlib.blake2.rst ('k') | Lib/hashlib.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`hashlib` --- Secure hashes and message digests 1 :mod:`hashlib` --- Secure hashes and message digests
2 ==================================================== 2 ====================================================
3 3
4 .. module:: hashlib 4 .. module:: hashlib
5 :synopsis: Secure hash and message digest algorithms. 5 :synopsis: Secure hash and message digest algorithms.
6 .. moduleauthor:: Gregory P. Smith <greg@krypto.org> 6 .. moduleauthor:: Gregory P. Smith <greg@krypto.org>
7 .. sectionauthor:: Gregory P. Smith <greg@krypto.org> 7 .. sectionauthor:: Gregory P. Smith <greg@krypto.org>
8 8
9 9
10 .. index:: 10 .. index::
11 single: message digest, MD5 11 single: message digest, MD5
12 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512 12 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512
13 single: blake2b, blake2s
13 14
14 **Source code:** :source:`Lib/hashlib.py` 15 **Source code:** :source:`Lib/hashlib.py`
15 16
16 -------------- 17 --------------
17 18
18 This module implements a common interface to many different secure hash and 19 This module implements a common interface to many different secure hash and
19 message digest algorithms. Included are the FIPS secure hash algorithms SHA1, 20 message digest algorithms. Included are the FIPS secure hash algorithms SHA1,
20 SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA's MD5 21 SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA's MD5
21 algorithm (defined in Internet :rfc:`1321`). The terms "secure hash" and 22 algorithm (defined in Internet :rfc:`1321`). The terms "secure hash" and
22 "message digest" are interchangeable. Older algorithms were called message 23 "message digest" are interchangeable. Older algorithms were called message
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 >>> binascii.hexlify(dk) 209 >>> binascii.hexlify(dk)
209 b'0394a2ede332c9a13eb82e9b24631604c31df978b4e2f0fbd2c549944f9d79a5' 210 b'0394a2ede332c9a13eb82e9b24631604c31df978b4e2f0fbd2c549944f9d79a5'
210 211
211 .. versionadded:: 3.4 212 .. versionadded:: 3.4
212 213
213 .. note:: 214 .. note::
214 215
215 A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The 216 A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The
216 Python implementation uses an inline version of :mod:`hmac`. It is about 217 Python implementation uses an inline version of :mod:`hmac`. It is about
217 three times slower and doesn't release the GIL. 218 three times slower and doesn't release the GIL.
219
220 BLAKE2
221 ------
222
223 BLAKE2 takes additional arguments, see :ref:`hashlib-blake2`.
218 224
219 225
220 .. seealso:: 226 .. seealso::
221 227
222 Module :mod:`hmac` 228 Module :mod:`hmac`
223 A module to generate message authentication codes using hashes. 229 A module to generate message authentication codes using hashes.
224 230
225 Module :mod:`base64` 231 Module :mod:`base64`
226 Another way to encode binary hashes for non-binary environments. 232 Another way to encode binary hashes for non-binary environments.
233
234 See :ref:`hashlib-blake2`.
227 235
228 http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf 236 http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
229 The FIPS 180-2 publication on Secure Hash Algorithms. 237 The FIPS 180-2 publication on Secure Hash Algorithms.
230 238
231 https://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_ algorithms 239 https://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_ algorithms
232 Wikipedia article with information on which algorithms have known issues a nd 240 Wikipedia article with information on which algorithms have known issues a nd
233 what that means regarding their use. 241 what that means regarding their use.
234 242
235 https://www.ietf.org/rfc/rfc2898.txt 243 https://www.ietf.org/rfc/rfc2898.txt
236 PKCS #5: Password-Based Cryptography Specification Version 2.0 244 PKCS #5: Password-Based Cryptography Specification Version 2.0
OLDNEW
« no previous file with comments | « Doc/library/hashlib.blake2.rst ('k') | Lib/hashlib.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+