nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_ascon_hash.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
28#ifndef OCRYPTO_ASCON_HASH_H
29#define OCRYPTO_ASCON_HASH_H
30
31#include <stddef.h>
32#include <stdint.h>
33
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39
43#define ocrypto_ascon_hash256_BYTES (32)
44
45
47typedef struct {
48 uint64_t s[5];
49 uint8_t data[8];
50 uint8_t length;
51} ocrypto_ascon_hash_ctx;
71 ocrypto_ascon_hash_ctx *ctx);
72
81 ocrypto_ascon_hash_ctx *ctx);
82
94 ocrypto_ascon_hash_ctx *ctx,
95 const uint8_t *z, size_t z_len);
96
112 ocrypto_ascon_hash_ctx *ctx,
113 const uint8_t *in, size_t in_len);
114
132 ocrypto_ascon_hash_ctx *ctx,
133 uint8_t h[ocrypto_ascon_hash256_BYTES]);
134
153 ocrypto_ascon_hash_ctx *ctx,
154 uint8_t *h, size_t h_len);
155
171 ocrypto_ascon_hash_ctx *ctx,
172 uint8_t *h, size_t h_len);
186 const uint8_t *in, size_t in_len);
187
199 uint8_t *h, size_t h_len,
200 const uint8_t *in, size_t in_len);
201
216 uint8_t *h, size_t h_len,
217 const uint8_t *z, size_t z_len,
218 const uint8_t *in, size_t in_len);
219
220#ifdef __cplusplus
221}
222#endif
223
224#endif
225
void ocrypto_ascon_xof128_final(ocrypto_ascon_hash_ctx *ctx, uint8_t *h, size_t h_len)
#define ocrypto_ascon_hash256_BYTES
Definition ocrypto_ascon_hash.h:43
void ocrypto_ascon_hash256(uint8_t h[(32)], const uint8_t *in, size_t in_len)
void ocrypto_ascon_cxof128_init(ocrypto_ascon_hash_ctx *ctx, const uint8_t *z, size_t z_len)
void ocrypto_ascon_xof128_ext(ocrypto_ascon_hash_ctx *ctx, uint8_t *h, size_t h_len)
void ocrypto_ascon_xof128_init(ocrypto_ascon_hash_ctx *ctx)
void ocrypto_ascon_xof128(uint8_t *h, size_t h_len, const uint8_t *in, size_t in_len)
void ocrypto_ascon_hash256_init(ocrypto_ascon_hash_ctx *ctx)
void ocrypto_ascon_hash256_update(ocrypto_ascon_hash_ctx *ctx, const uint8_t *in, size_t in_len)
void ocrypto_ascon_cxof128(uint8_t *h, size_t h_len, const uint8_t *z, size_t z_len, const uint8_t *in, size_t in_len)
void ocrypto_ascon_hash256_final(ocrypto_ascon_hash_ctx *ctx, uint8_t h[(32)])