This module implements Keccak-f1600 sponge permutation and high-level APIs for various modes of it, including SHA-3 hashes.
This implementation is up-to-date with final version of FIPS-202 (5-Aug-2015).
Features:
Hashing (SHA3), PRNG, Stream cipher, AEAD cipher (SpongeWrap).
Optimized-C implementation from Keccak reference code, with separate paths for 64- and 32-bit CPUs.
Works with both Python 2.x and 3.x.
Todo:
Optimized ASM implementations.
Other Keccak permutation sizes.
Other sponge algorithms.
Other sponge modes.
Example:
from spongheshaker.sha3 import sha3_256, shake128
# fixed-length output
md = sha3_256('Hello ')
md.update('world!')
hash = md.digest()
# variable-length output
md = shake128('Hello ')
md.update('world!')
res1 = md.extract(64)
res2 = md.extract(64)
Links:
Git repo
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spongeshaker-1.3.tar.gz
(27.7 kB
view details)
File details
Details for the file spongeshaker-1.3.tar.gz.
File metadata
- Download URL: spongeshaker-1.3.tar.gz
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03a2faf645fc0f000a0d785a31704d2905ee4eb45200107e931512173271c224
|
|
| MD5 |
b549da5c06886a1e926dfce95018033c
|
|
| BLAKE2b-256 |
58a9e42ee338acb4f5fe8eb8e7d94ae98a9935a1e97e20812300d0f852cd1f99
|