nrfxlib API 0.1.0
Loading...
Searching...
No Matches
ocrypto_cshake.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "ocrypto_sha3.h"

Go to the source code of this file.

Functions

void ocrypto_cshake128 (uint8_t *r, size_t r_len, const uint8_t *in, size_t in_len, const uint8_t *n, size_t n_len, const uint8_t *s, size_t s_len)
 
void ocrypto_cshake256 (uint8_t *r, size_t r_len, const uint8_t *in, size_t in_len, const uint8_t *n, size_t n_len, const uint8_t *s, size_t s_len)
 
Incremental cSHAKE generator.

This group of functions can be used to incrementally compute the cSHAKE hash for a given input.

void ocrypto_cshake128_init (ocrypto_cshake_ctx *ctx, const uint8_t *n, size_t n_len, const uint8_t *s, size_t s_len)
 
void ocrypto_cshake256_init (ocrypto_cshake_ctx *ctx, const uint8_t *n, size_t n_len, const uint8_t *s, size_t s_len)
 
void ocrypto_cshake128_update (ocrypto_cshake_ctx *ctx, const uint8_t *in, size_t in_len)
 
void ocrypto_cshake256_update (ocrypto_cshake_ctx *ctx, const uint8_t *in, size_t in_len)
 
void ocrypto_cshake128_final (ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
 
void ocrypto_cshake256_final (ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
 
void ocrypto_cshake128_ext (ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
 
void ocrypto_cshake256_ext (ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
 

Detailed Description

The cSHAKE family is a variable output variant of the SHA-3 hash functions with additional inputs.

A fixed-sized message digest is computed from variable length input data, a function name, and a customization string. The function is practically impossible to revert, and small changes in the input message lead to major changes in the message digest.