nrfxlib API 2.7.99
Loading...
Searching...
No Matches
ocrypto_kmac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2024 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
17#ifndef OCRYPTO_KMAC_H
18#define OCRYPTO_KMAC_H
19
20#include <stddef.h>
21#include <stdint.h>
22
23#include "ocrypto_sha3.h"
24
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30
32typedef ocrypto_sha3_ctx ocrypto_kmac_ctx;
54 ocrypto_kmac_ctx *ctx,
55 const uint8_t *key, size_t key_len,
56 const uint8_t *s, size_t s_len);
57
70 ocrypto_kmac_ctx *ctx,
71 const uint8_t *key, size_t key_len,
72 const uint8_t *s, size_t s_len);
73
89 ocrypto_kmac_ctx *ctx,
90 const uint8_t *in, size_t in_len);
91
107 ocrypto_kmac_ctx *ctx,
108 const uint8_t *in, size_t in_len);
109
128 ocrypto_kmac_ctx *ctx,
129 uint8_t *r, size_t r_len);
130
149 ocrypto_kmac_ctx *ctx,
150 uint8_t *r, size_t r_len);
168 uint8_t *r, size_t r_len,
169 const uint8_t *key, size_t key_len,
170 const uint8_t *in, size_t in_len,
171 const uint8_t *s, size_t s_len);
172
188 uint8_t *r, size_t r_len,
189 const uint8_t *key, size_t key_len,
190 const uint8_t *in, size_t in_len,
191 const uint8_t *s, size_t s_len);
192
193#ifdef __cplusplus
194}
195#endif
196
197#endif
void ocrypto_kmac128_update(ocrypto_kmac_ctx *ctx, const uint8_t *in, size_t in_len)
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_update(ocrypto_kmac_ctx *ctx, const uint8_t *in, size_t in_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)
void ocrypto_kmac256_final(ocrypto_kmac_ctx *ctx, uint8_t *r, size_t r_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_init(ocrypto_kmac_ctx *ctx, const uint8_t *key, size_t key_len, const uint8_t *s, size_t s_len)
void ocrypto_kmac128_final(ocrypto_kmac_ctx *ctx, uint8_t *r, size_t r_len)