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

Go to the source code of this file.

Functions

void ocrypto_kmac128 (uint8_t *r, size_t r_len, const uint8_t *key, size_t key_len, const uint8_t *in, size_t in_len, const uint8_t *s, size_t s_len)
 
void ocrypto_kmac256 (uint8_t *r, size_t r_len, const uint8_t *key, size_t key_len, const uint8_t *in, size_t in_len, const uint8_t *s, size_t s_len)
 
Incremental KMAC generator.

This group of functions can be used to incrementally compute the KMAC authenticator for a given message.

void ocrypto_kmac128_init (ocrypto_kmac_ctx *ctx, const uint8_t *key, size_t key_len, const uint8_t *s, size_t s_len)
 
void ocrypto_kmac256_init (ocrypto_kmac_ctx *ctx, const uint8_t *key, size_t key_len, const uint8_t *s, size_t s_len)
 
void ocrypto_kmac128_update (ocrypto_kmac_ctx *ctx, const uint8_t *in, size_t in_len)
 
void ocrypto_kmac256_update (ocrypto_kmac_ctx *ctx, const uint8_t *in, size_t in_len)
 
void ocrypto_kmac128_final (ocrypto_kmac_ctx *ctx, uint8_t *r, size_t r_len)
 
void ocrypto_kmac256_final (ocrypto_kmac_ctx *ctx, uint8_t *r, size_t r_len)
 

Detailed Description

The KMAC family is a set of cryptographic MAC functions based on SHA-3 and CSHAKE.

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