|
My Project
|
Fixed-length and XOF variants of the customizable-SHAKE primitive, as defined in section 3 of SP 800-185. More...
Classes | |
| struct | cshake_params_t |
| cSHAKE parameters. More... | |
Functions | |
| void | cshake128 (const cshake_params_t params, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Initialize cSHAKE128, absorb data, then squeeze bytes out. More... | |
| void | cshake256 (const cshake_params_t params, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len) |
| Initialize cSHAKE256, absorb data, then squeeze bytes out. More... | |
| void | cshake128_xof_init (sha3_xof_t *xof, const cshake_params_t params) |
| Initialize cSHAKE128 XOF context. More... | |
| _Bool | cshake128_xof_absorb (sha3_xof_t *xof, const uint8_t *src, const size_t len) |
| Absorb data into cSHAKE128 XOF context. More... | |
| void | cshake128_xof_squeeze (sha3_xof_t *xof, uint8_t *dst, const size_t len) |
| Squeeze bytes from cSHAKE128 XOF context. More... | |
| void | cshake256_xof_init (sha3_xof_t *xof, const cshake_params_t params) |
| Initialize cSHAKE256 XOF context. More... | |
| _Bool | cshake256_xof_absorb (sha3_xof_t *xof, const uint8_t *src, const size_t len) |
| Absorb data into cSHAKE256 XOF context. More... | |
| void | cshake256_xof_squeeze (sha3_xof_t *xof, uint8_t *dst, const size_t len) |
| Squeeze bytes from cSHAKE256 XOF context. More... | |
Fixed-length and XOF variants of the customizable-SHAKE primitive, as defined in section 3 of SP 800-185.
| void cshake128 | ( | const cshake_params_t | params, |
| const uint8_t * | src, | ||
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Initialize cSHAKE128, absorb data, then squeeze bytes out.
Initialize internal cSHAKE128 (customizable SHAKE128, as defined in section 3 of NIST SP 800-185) context with customization parameters params, absorb data in buffer src of length src_len bytes into internal context, then squeeze dst_len bytes of output into destination buffer dst.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in] | params | cSHAKE customization parameters. |
| [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 cshake128_xof_absorb | ( | sha3_xof_t * | xof, |
| const uint8_t * | src, | ||
| const size_t | len | ||
| ) |
Absorb data into cSHAKE128 XOF context.
Absorb data in buffer src of length len bytes into cSHAKE128 XOF context xof. Can be called iteratively to absorb input data in chunks.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in,out] | xof | cSHAKE128 context. |
| [in] | src | Source buffer. |
| [in] | len | Source buffer length, in bytes. |
| void cshake128_xof_init | ( | sha3_xof_t * | xof, |
| const cshake_params_t | params | ||
| ) |
Initialize cSHAKE128 XOF context.
Initialize cSHAKE128 (customizable SHAKE128, as defined in section 3 of NIST SP 800-185) XOF context with customization parameters params.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [out] | xof | cSHAKE128 context. |
| [in] | params | cSHAKE128 customization parameters. |
| void cshake128_xof_squeeze | ( | sha3_xof_t * | xof, |
| uint8_t * | dst, | ||
| const size_t | len | ||
| ) |
Squeeze bytes from cSHAKE128 XOF context.
Squeeze dst_len bytes of output into destination buffer dst from cSHAKE128 XOF context xof. Can be called iteratively to squeeze output data in chunks.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in,out] | xof | cSHAKE128 context. |
| [out] | dst | Destination buffer. |
| [in] | len | Destination buffer length, in bytes. |
| void cshake256 | ( | const cshake_params_t | params, |
| const uint8_t * | src, | ||
| const size_t | src_len, | ||
| uint8_t * | dst, | ||
| const size_t | dst_len | ||
| ) |
Initialize cSHAKE256, absorb data, then squeeze bytes out.
Initialize internal cSHAKE256 (customizable SHAKE256, as defined in section 3 of NIST SP 800-185) context with customization parameters params, absorb data in buffer src of length src_len bytes into internal context, then squeeze dst_len bytes of output into destination buffer dst.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in] | params | cSHAKE customization parameters. |
| [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 cshake256_xof_absorb | ( | sha3_xof_t * | xof, |
| const uint8_t * | src, | ||
| const size_t | len | ||
| ) |
Absorb data into cSHAKE256 XOF context.
Absorb data in buffer src of length len bytes into cSHAKE256 XOF context xof. Can be called iteratively to absorb input data in chunks.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in,out] | xof | cSHAKE256 context. |
| [in] | src | Source buffer. |
| [in] | len | Source buffer length, in bytes. |
| void cshake256_xof_init | ( | sha3_xof_t * | xof, |
| const cshake_params_t | params | ||
| ) |
Initialize cSHAKE256 XOF context.
Initialize cSHAKE256 (customizable SHAKE256, as defined in section 3 of NIST SP 800-185) XOF context with customization parameters params.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [out] | xof | cSHAKE256 context. |
| [in] | params | cSHAKE256 customization parameters. |
| void cshake256_xof_squeeze | ( | sha3_xof_t * | xof, |
| uint8_t * | dst, | ||
| const size_t | len | ||
| ) |
Squeeze bytes from cSHAKE256 XOF context.
Squeeze dst_len bytes of output into destination buffer dst from cSHAKE256 XOF context xof. Can be called iteratively to squeeze output data in chunks.
Note: cSHAKE is used to implement the hash and extendable output functions (XOF) defined in NIST SP 800-185 and should generally not be used directly.
| [in,out] | xof | cSHAKE256 context. |
| [out] | dst | Destination buffer. |
| [in] | len | Destination buffer length, in bytes. |