|
sha3
Embeddable C11 SHA-3 implementation.
|
Faster, reduced-round XOF with a customzation string, as defined in the draft KangarooTwelve and TurboSHAKE specification. More...
Data Structures | |
| struct | k12_t |
| KangarooTwelve XOF context (all members are private). More... | |
Functions | |
| void | k12_once (const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Absorb data into KangarooTwelve, then squeeze bytes out. More... | |
| void | k12_custom_once (const uint8_t *src, const size_t src_len, const uint8_t *custom, const size_t custom_len, uint8_t *dst, const size_t dst_len) |
| Absorb data into KangarooTwelve with customization string, then squeeze bytes out. More... | |
| void | k12_init (k12_t *k12, const uint8_t *src, const size_t src_len, const uint8_t *custom, const size_t custom_len) |
| Initialize KangarooTwelve context. More... | |
| void | k12_squeeze (k12_t *k12, uint8_t *dst, const size_t len) |
| Squeeze bytes from KangarooTwelve context. More... | |
Faster, reduced-round XOF with a customzation string, as defined in the draft KangarooTwelve and TurboSHAKE specification.
| void k12_custom_once | ( | const uint8_t * | src, |
| const size_t | src_len, | ||
| const uint8_t * | custom, | ||
| const size_t | custom_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb data into KangarooTwelve with customization string, then squeeze bytes out.
Initialize internal KangarooTwelve context with custom string custom of length custom_len, absorb src_len bytes of input from source buffer src, then squeeze dst_len bytes of output into destination buffer dst.
| [in] | src | Source buffer. |
| [in] | src_len | Source buffer length, in bytes. |
| [in] | custom | Custom string buffer. |
| [in] | custom_len | Custom string length, in bytes. |
| [out] | dst | Destination buffer. |
| [in] | dst_len | Destination buffer length, in bytes. |
Example:
| void k12_init | ( | k12_t * | k12, |
| const uint8_t * | src, | ||
| const size_t | src_len, | ||
| const uint8_t * | custom, | ||
| const size_t | custom_len | ||
| ) |
Initialize KangarooTwelve context.
Initialize KangarooTwelve context with message src of length src_len bytes and custom string custom of length custom_len bytes.
| [out] | k12 | KangarooTwelve context. |
| [in] | src | Source buffer. |
| [in] | src_len | Source buffer length, in bytes. |
| [in] | custom | Custom string buffer. |
| [in] | custom_len | Custom string length, in bytes. |
Example:
| void k12_once | ( | const uint8_t * | src, |
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb data into KangarooTwelve, then squeeze bytes out.
Initialize internal KangarooTwelve context, absorb src_len bytes of input from source buffer src, then squeeze dst_len bytes of output into destination buffer dst.
| [in] | src | Source buffer. |
| [in] | src_len | Source buffer length, in bytes. |
| [out] | dst | Destination buffer. |
| [in] | dst_len | Destination buffer length, in bytes. |
Example:
| void k12_squeeze | ( | k12_t * | k12, |
| uint8_t * | dst, | ||
| const size_t | len | ||
| ) |
Squeeze bytes from KangarooTwelve context.
Squeeze dst_len bytes of output into destination buffer dst from KangarooTwelve context k12. Can be called iteratively to squeeze output data in chunks.
| [in,out] | k12 | KangarooTwelve context. |
| [out] | dst | Destination buffer. |
| [in] | len | Destination buffer length, in bytes. |
Example: