# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2016, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-10-30 10:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/library/hashlib-blake2.rst:4 msgid ":mod:`hashlib` --- BLAKE2 hash functions" msgstr "" #: ../Doc/library/hashlib-blake2.rst:13 msgid "" "BLAKE2_ is a cryptographic hash function defined in RFC-7693_ that comes in " "two flavors:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:16 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," msgstr "" #: ../Doc/library/hashlib-blake2.rst:19 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." msgstr "" #: ../Doc/library/hashlib-blake2.rst:22 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." msgstr "" #: ../Doc/library/hashlib-blake2.rst:25 msgid "" "Hash objects from this module follow the API of standard library's :mod:" "`hashlib` objects." msgstr "" #: ../Doc/library/hashlib-blake2.rst:30 msgid "Module" msgstr "" #: ../Doc/library/hashlib-blake2.rst:33 msgid "Creating hash objects" msgstr "" #: ../Doc/library/hashlib-blake2.rst:35 msgid "New hash objects are created by calling constructor functions:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:47 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:50 msgid "" "*data*: initial chunk of data to hash, which must be interpretable as buffer " "of bytes." msgstr "" #: ../Doc/library/hashlib-blake2.rst:53 msgid "*digest_size*: size of output digest in bytes." msgstr "" #: ../Doc/library/hashlib-blake2.rst:55 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:58 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:61 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:64 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" #: ../Doc/library/hashlib-blake2.rst:67 msgid "Hash" msgstr "" #: ../Doc/library/hashlib-blake2.rst:67 msgid "digest_size" msgstr "" #: ../Doc/library/hashlib-blake2.rst:67 msgid "len(key)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:67 msgid "len(salt)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:67 msgid "len(person)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:69 msgid "BLAKE2b" msgstr "" #: ../Doc/library/hashlib-blake2.rst:69 msgid "64" msgstr "" #: ../Doc/library/hashlib-blake2.rst:69 msgid "16" msgstr "" #: ../Doc/library/hashlib-blake2.rst:70 msgid "BLAKE2s" msgstr "" #: ../Doc/library/hashlib-blake2.rst:70 msgid "32" msgstr "" #: ../Doc/library/hashlib-blake2.rst:70 msgid "8" msgstr "8" #: ../Doc/library/hashlib-blake2.rst:75 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " "strings of any size up to the specified length. If the length of the " "parameter is less than specified, it is padded with zeros, thus, for " "example, ``b'salt'`` and ``b'salt\\x00'`` is the same value. (This is not " "the case for *key*.)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:82 msgid "These sizes are available as module `constants`_ described below." msgstr "" #: ../Doc/library/hashlib-blake2.rst:84 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:86 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:88 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:91 msgid "" "*leaf_size*: maximal byte length of leaf (0 to 2**32-1, 0 if unlimited or in " "sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:94 msgid "" "*node_offset*: node offset (0 to 2**64-1 for BLAKE2b, 0 to 2**48-1 for " "BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:97 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:99 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:102 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(`False` for sequential mode)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:108 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." msgstr "" #: ../Doc/library/hashlib-blake2.rst:114 msgid "Constants" msgstr "" #: ../Doc/library/hashlib-blake2.rst:119 msgid "Salt length (maximum length accepted by constructors)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:125 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:131 msgid "Maximum key size." msgstr "" #: ../Doc/library/hashlib-blake2.rst:137 msgid "Maximum digest size that the hash function can output." msgstr "" #: ../Doc/library/hashlib-blake2.rst:141 msgid "Examples" msgstr "Exemples" #: ../Doc/library/hashlib-blake2.rst:144 msgid "Simple hashing" msgstr "" #: ../Doc/library/hashlib-blake2.rst:146 msgid "" "To calculate hash of some data, you should first construct a hash object by " "calling the appropriate constructor function (:func:`blake2b` or :func:" "`blake2s`), then update it with the data by calling :meth:`update` on the " "object, and, finally, get the digest out of the object by calling :meth:" "`digest` (or :meth:`hexdigest` for hex-encoded string)." msgstr "" #: ../Doc/library/hashlib-blake2.rst:159 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the first argument (or as *data* keyword argument):" msgstr "" #: ../Doc/library/hashlib-blake2.rst:166 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:179 msgid "Using different digest sizes" msgstr "" #: ../Doc/library/hashlib-blake2.rst:181 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " "changing the size of output, we can tell BLAKE2b to produce 20-byte digests:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:195 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " "produce different outputs even if the output length is the same:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:211 msgid "Keyed hashing" msgstr "" #: ../Doc/library/hashlib-blake2.rst:213 msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_ (HMAC). BLAKE2 can be " "securely used in prefix-MAC mode thanks to the indifferentiability property " "inherited from BLAKE." msgstr "" #: ../Doc/library/hashlib-blake2.rst:219 msgid "" "This example shows how to get a (hex-encoded) 128-bit authentication code " "for message ``b'message data'`` with key ``b'pseudorandom key'``::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:229 msgid "" "As a practical example, a web application can symmetrically sign cookies " "sent to users and later verify them to make sure they weren't tampered with::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:253 msgid "" "Even though there's a native keyed hashing mode, BLAKE2 can, of course, be " "used in HMAC construction with :mod:`hmac` module::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:264 msgid "Randomized hashing" msgstr "" #: ../Doc/library/hashlib-blake2.rst:266 msgid "" "By setting *salt* parameter users can introduce randomization to the hash " "function. Randomized hashing is useful for protecting against collision " "attacks on the hash function used in digital signatures." msgstr "" #: ../Doc/library/hashlib-blake2.rst:270 msgid "" "Randomized hashing is designed for situations where one party, the message " "preparer, generates all or part of a message to be signed by a second party, " "the message signer. If the message preparer is able to find cryptographic " "hash function collisions (i.e., two messages producing the same hash value), " "then she might prepare meaningful versions of the message that would produce " "the same hash value and digital signature, but with different results (e.g., " "transferring $1,000,000 to an account, rather than $10). Cryptographic hash " "functions have been designed with collision resistance as a major goal, but " "the current concentration on attacking cryptographic hash functions may " "result in a given cryptographic hash function providing less collision " "resistance than expected. Randomized hashing offers the signer additional " "protection by reducing the likelihood that a preparer can generate two or " "more messages that ultimately yield the same hash value during the digital " "signature generation process – even if it is practical to find collisions " "for the hash function. However, the use of randomized hashing may reduce the " "amount of security provided by a digital signature when all portions of the " "message are prepared by the signer." msgstr "" #: ../Doc/library/hashlib-blake2.rst:289 msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:292 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." msgstr "" #: ../Doc/library/hashlib-blake2.rst:297 msgid "" "*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose " "cryptographic hash function, such as SHA-256, is not suitable for hashing " "passwords. See `BLAKE2 FAQ `_ for more information." msgstr "" #: ../Doc/library/hashlib-blake2.rst:320 msgid "Personalization" msgstr "" #: ../Doc/library/hashlib-blake2.rst:322 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " "hash function:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:326 msgid "" "We recommend that all application designers seriously consider doing this; " "we have seen many protocols where a hash that is computed in one part of the " "protocol can be used in an entirely different part because two hash " "computations were done on similar or related data, and the attacker can " "force the application to make the hash inputs the same. Personalizing each " "hash function used in the protocol summarily stops this type of attack." msgstr "" #: ../Doc/library/hashlib-blake2.rst:333 msgid "" "(`The Skein Hash Function Family `_, p. 21)" msgstr "" #: ../Doc/library/hashlib-blake2.rst:337 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:351 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." msgstr "" #: ../Doc/library/hashlib-blake2.rst:365 msgid "Tree mode" msgstr "" #: ../Doc/library/hashlib-blake2.rst:367 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:373 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" msgstr "" #: ../Doc/library/hashlib-blake2.rst:403 msgid "Credits" msgstr "" #: ../Doc/library/hashlib-blake2.rst:405 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " "created by *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, and " "*Raphael C.-W. Phan*." msgstr "" #: ../Doc/library/hashlib-blake2.rst:410 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." msgstr "" #: ../Doc/library/hashlib-blake2.rst:412 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " "documentation was copied from pyblake2_ and written by *Dmitry Chestnykh*." msgstr "" #: ../Doc/library/hashlib-blake2.rst:416 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" #: ../Doc/library/hashlib-blake2.rst:418 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:421 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " "worldwide. This software is distributed without any warranty." msgstr "" #: ../Doc/library/hashlib-blake2.rst:425 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see http://creativecommons.org/publicdomain/" "zero/1.0/." msgstr "" #: ../Doc/library/hashlib-blake2.rst:429 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " "Commons Public Domain Dedication 1.0 Universal:" msgstr "" #: ../Doc/library/hashlib-blake2.rst:433 msgid "*Alexandr Sokolovskiy*" msgstr "" #: ../Doc/library/hashlib-blake2.rst:435 msgid "Official BLAKE2 website: https://blake2.net" msgstr ""