|
My Project
|
Faster, reduced-round XOFs, as defined in the draft KangarooTwelve and TurboSHAKE specification. More...
Classes | |
| struct | turboshake_t |
| TurboShake XOF context. More... | |
Functions | |
| void | turboshake128 (const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Absorb bytes into TurboSHAKE128, then squeeze bytes out. More... | |
| void | turboshake128_custom (const uint8_t pad, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Absorb bytes into TurboSHAKE128 with custom padding byte, then squeeze bytes out. More... | |
| void | turboshake256 (const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Absorb bytes into TurboSHAKE256, then squeeze bytes out. More... | |
| void | turboshake256_custom (const uint8_t pad, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Absorb bytes into TurboSHAKE256 with custom padding byte, then squeeze bytes out. More... | |
| void | turboshake128_init (turboshake_t *ts) |
| Initialize TurboSHAKE128 context. More... | |
| _Bool | turboshake128_init_custom (turboshake_t *ts, const uint8_t pad) |
| Initialize TurboSHAKE128 context with custom padding byte. More... | |
| _Bool | turboshake128_absorb (turboshake_t *ts, const uint8_t *src, const size_t len) |
| Absorb data into TurboSHAKE128 context. More... | |
| void | turboshake128_squeeze (turboshake_t *ts, uint8_t *dst, const size_t len) |
| Squeeze bytes from TurboSHAKE128 context. More... | |
| void | turboshake256_init (turboshake_t *ts) |
| Initialize TurboSHAKE256 context. More... | |
| _Bool | turboshake256_init_custom (turboshake_t *ts, const uint8_t pad) |
| Initialize TurboSHAKE256 context with custom padding byte. More... | |
| _Bool | turboshake256_absorb (turboshake_t *ts, const uint8_t *src, const size_t len) |
| Absorb data into TurboSHAKE256 context. More... | |
| void | turboshake256_squeeze (turboshake_t *ts, uint8_t *dst, const size_t len) |
| Squeeze bytes from TurboSHAKE256 context. More... | |
Faster, reduced-round XOFs, as defined in the draft KangarooTwelve and TurboSHAKE specification.
| void turboshake128 | ( | const uint8_t * | src, |
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb bytes into TurboSHAKE128, then squeeze bytes out.
Initialize internal TurboSHAKE128 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. |
| _Bool turboshake128_absorb | ( | turboshake_t * | ts, |
| const uint8_t * | src, | ||
| const size_t | len | ||
| ) |
Absorb data into TurboSHAKE128 context.
Absorb src_len bytes of input from source buffer src into TurboSHAKE128 context ts. Can be called iteratively to absorb input data in chunks.
| [in,out] | ts | TurboSHAKE128 context. |
| [in] | src | Source buffer. |
| [in] | len | Source buffer length, in bytes. |
| void turboshake128_custom | ( | const uint8_t | pad, |
| const uint8_t * | src, | ||
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb bytes into TurboSHAKE128 with custom padding byte, then squeeze bytes out.
Initialize internal TurboSHAKE128 context with custom padding byte pad, absorb src_len bytes of input from source buffer src, then squeeze dst_len bytes of output into destination buffer dst.
Note: The padding byte value must be in the range [0x01, 0x7F] and can be used for domain separation.
| [in] | pad | Padding byte. |
| [in] | src | Source buffer. |
| [in] | src_len | Source buffer length, in bytes. |
| [out] | dst | Destination buffer. |
| [in] | dst_len | Destination buffer length, in bytes. |
| void turboshake128_init | ( | turboshake_t * | ts | ) |
Initialize TurboSHAKE128 context.
| [out] | ts | TurboSHAKE128 context. |
| _Bool turboshake128_init_custom | ( | turboshake_t * | ts, |
| const uint8_t | pad | ||
| ) |
Initialize TurboSHAKE128 context with custom padding byte.
Initialize TurboSHAKE128 context with custom padding byte. The custom padding byte can be used as a domain separator and must be in the range [0x01, 0x7f].
| [out] | ts | TurboSHAKE128 context. |
| [in] | pad | Padding byte (used for domain separation). |
| void turboshake128_squeeze | ( | turboshake_t * | ts, |
| uint8_t * | dst, | ||
| const size_t | len | ||
| ) |
Squeeze bytes from TurboSHAKE128 context.
Squeeze dst_len bytes of output into destination buffer dst from TurboSHAKE128 context ts. Can be called iteratively to squeeze output data in chunks.
| [in,out] | ts | TurboSHAKE128 context. |
| [out] | dst | Destination buffer. |
| [in] | len | Destination buffer length, in bytes. |
| void turboshake256 | ( | const uint8_t * | src, |
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb bytes into TurboSHAKE256, then squeeze bytes out.
Initialize internal TurboSHAKE256 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. |
| _Bool turboshake256_absorb | ( | turboshake_t * | ts, |
| const uint8_t * | src, | ||
| const size_t | len | ||
| ) |
Absorb data into TurboSHAKE256 context.
Absorb src_len bytes of input from source buffer src into TurboSHAKE256 context ts. Can be called iteratively to absorb input data in chunks.
| [in,out] | ts | TurboSHAKE256 context. |
| [in] | src | Source buffer. |
| [in] | len | Source buffer length, in bytes. |
| void turboshake256_custom | ( | const uint8_t | pad, |
| const uint8_t * | src, | ||
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Absorb bytes into TurboSHAKE256 with custom padding byte, then squeeze bytes out.
Initialize internal TurboSHAKE256 context with custom padding byte pad, absorb src_len bytes of input from source buffer src, then squeeze dst_len bytes of output into destination buffer dst.
Note: The padding byte value must be in the range [0x01, 0x7F] and can be used for domain separation.
| [in] | pad | Padding byte. |
| [in] | src | Source buffer. |
| [in] | src_len | Source buffer length, in bytes. |
| [out] | dst | Destination buffer. |
| [in] | dst_len | Destination buffer length, in bytes. |
| void turboshake256_init | ( | turboshake_t * | ts | ) |
Initialize TurboSHAKE256 context.
| [out] | ts | TurboSHAKE256 context. |
| _Bool turboshake256_init_custom | ( | turboshake_t * | ts, |
| const uint8_t | pad | ||
| ) |
Initialize TurboSHAKE256 context with custom padding byte.
Initialize TurboSHAKE256 context with custom padding byte. The custom padding byte can be used as a domain separator and must be in the range [0x01, 0x7f].
| [out] | ts | TurboSHAKE256 context. |
| [in] | pad | Padding byte (used for domain separation). |
| void turboshake256_squeeze | ( | turboshake_t * | ts, |
| uint8_t * | dst, | ||
| const size_t | len | ||
| ) |
Squeeze bytes from TurboSHAKE256 context.
Squeeze dst_len bytes of output into destination buffer dst from TurboSHAKE256 context ts. Can be called iteratively to squeeze output data in chunks.
| [in,out] | ts | TurboSHAKE256 context. |
| [out] | dst | Destination buffer. |
| [in] | len | Destination buffer length, in bytes. |