|
cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
|
Keccak-256 (SHA3 variant) hash implementation for Ethereum. More...
Go to the source code of this file.
Macros | |
| #define | KECCAK_ROUNDS 24 |
Functions | |
| static uint64_t | rol (uint64_t x, int s) |
| Rotate a 64-bit integer left by s bits. | |
| static void | keccakf (uint64_t st[25]) |
| void | keccak256 (const uint8_t *in, size_t inlen, uint8_t out[32]) |
| Compute Keccak-256 hash of input data. | |
Variables | |
| static const uint64_t | keccakf_rndc [24] |
| static const int8_t | keccakf_rotc [24] |
| Keccak-f[1600] permutation on the state array. | |
| static const int8_t | keccakf_piln [24] |
Keccak-256 (SHA3 variant) hash implementation for Ethereum.
Implements Keccak-256 hashing suitable for Ethereum-style hashing, producing a 32-byte digest. This file contains the internal permutation function and the main keccak256 API.
Definition in file keccak256.cpp.
| #define KECCAK_ROUNDS 24 |
Definition at line 19 of file keccak256.cpp.
Referenced by keccakf().
| void keccak256 | ( | const uint8_t * | in, |
| size_t | inlen, | ||
| uint8_t | out[32] ) |
Compute Keccak-256 hash of input data.
Compute the Keccak-256 hash of a given input buffer.
| [in] | in | Pointer to input buffer. |
| [in] | inlen | Length of input buffer in bytes. |
| [out] | out | Pointer to a 32-byte buffer to store the hash. |
Definition at line 111 of file keccak256.cpp.
References keccakf().
Referenced by setup().
|
static |
Definition at line 63 of file keccak256.cpp.
References KECCAK_ROUNDS, keccakf_piln, keccakf_rndc, keccakf_rotc, and rol().
Referenced by keccak256().
|
inlinestatic |
Rotate a 64-bit integer left by s bits.
| x | Value to rotate. |
| s | Number of bits to rotate. |
Definition at line 44 of file keccak256.cpp.
Referenced by keccakf().
|
static |
Definition at line 58 of file keccak256.cpp.
Referenced by keccakf().
|
static |
Definition at line 22 of file keccak256.cpp.
Referenced by keccakf().
|
static |
Keccak-f[1600] permutation on the state array.
| st | 25-word state array (1600 bits). |
This function applies the 24-round Keccak-f permutation on the input state array in-place.
Definition at line 54 of file keccak256.cpp.
Referenced by keccakf().