| 1 |
Keccak |
| 2 |
====== |
| 3 |
|
| 4 |
`Keccak`_ is a family of cryptographic hash algorithms that won |
| 5 |
the SHA-3 competition organized by NIST. |
| 6 |
What eventually became SHA-3 (`FIPS 202`_) is a slight variant: though incompatible |
| 7 |
to Keccak, the security principles and margins remain the same. |
| 8 |
|
| 9 |
If you are interested in writing SHA-3 compliant code, you must use |
| 10 |
the modules :mod:`Crypto.Hash.SHA3_224`, |
| 11 |
:mod:`Crypto.Hash.SHA3_256`, :mod:`Crypto.Hash.SHA3_384` or :mod:`Crypto.Hash.SHA3_512`. |
| 12 |
|
| 13 |
This module implements the Keccak hash functions for the 64 bit word |
| 14 |
length (``b=1600``) and the fixed digest sizes of 224, 256, 384 and 512 bits. |
| 15 |
|
| 16 |
This is an example:: |
| 17 |
|
| 18 |
>>> from Crypto.Hash import keccak |
| 19 |
>>> |
| 20 |
>>> keccak_hash = keccak.new(digest_bits=512) |
| 21 |
>>> keccak_hash.update(b'Some data') |
| 22 |
>>> print keccak_hash.hexdigest() |
| 23 |
|
| 24 |
.. _Keccak: http://www.keccak.noekeon.org/Keccak-specifications.pdf |
| 25 |
.. _FIPS 202: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf |
| 26 |
|
| 27 |
.. automodule:: Crypto.Hash.keccak |
| 28 |
:members: |