nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_cshake.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2025 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
32#ifndef OCRYPTO_CSHAKE_H
33#define OCRYPTO_CSHAKE_H
34
35#include <stddef.h>
36#include <stdint.h>
37
38#include "ocrypto_sha3.h"
39
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45
47typedef ocrypto_sha3_ctx ocrypto_cshake_ctx;
72 ocrypto_cshake_ctx *ctx,
73 const uint8_t *n, size_t n_len,
74 const uint8_t *s, size_t s_len);
75
88 ocrypto_cshake_ctx *ctx,
89 const uint8_t *n, size_t n_len,
90 const uint8_t *s, size_t s_len);
91
107 ocrypto_cshake_ctx *ctx,
108 const uint8_t *in, size_t in_len);
109
125 ocrypto_cshake_ctx *ctx,
126 const uint8_t *in, size_t in_len);
127
146 ocrypto_cshake_ctx *ctx,
147 uint8_t *r, size_t r_len);
148
167 ocrypto_cshake_ctx *ctx,
168 uint8_t *r, size_t r_len);
169
185 ocrypto_cshake_ctx *ctx,
186 uint8_t *r, size_t r_len);
187
203 ocrypto_cshake_ctx *ctx,
204 uint8_t *r, size_t r_len);
224 uint8_t *r, size_t r_len,
225 const uint8_t *in, size_t in_len,
226 const uint8_t *n, size_t n_len,
227 const uint8_t *s, size_t s_len);
228
246 uint8_t *r, size_t r_len,
247 const uint8_t *in, size_t in_len,
248 const uint8_t *n, size_t n_len,
249 const uint8_t *s, size_t s_len);
250
251#ifdef __cplusplus
252}
253#endif
254
255#endif
256
void ocrypto_cshake256_final(ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
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_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_cshake256_init(ocrypto_cshake_ctx *ctx, 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)
void ocrypto_cshake256_ext(ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
void ocrypto_cshake128_final(ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
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_cshake128_ext(ocrypto_cshake_ctx *ctx, uint8_t *r, size_t r_len)
SHA3 algorithms, with 224, 256, 384 and 512 bit outputs.