TupleHashXOF (TupleHash with arbitrary-length output) More...
Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
| error_t | tupleHashXofCompute (uint_t strength, const DataFrag *inputFrags, uint_t inputNumFrags, const char_t *custom, size_t customLen, uint8_t *output, size_t outputLen) |
| Digest a message using TupleHashXOF. More... | |
| error_t | tupleHashXofInit (TupleHashXofContext *context, uint_t strength, const char_t *custom, size_t customLen) |
| Initialize TupleHashXOF context. More... | |
| void | tupleHashXofAbsorb (TupleHashXofContext *context, const void *input, size_t length) |
| Absorb data. More... | |
| void | tupleHashXofFinal (TupleHashXofContext *context) |
| Finish absorbing phase. More... | |
| void | tupleHashXofSqueeze (TupleHashXofContext *context, uint8_t *output, size_t length) |
| Extract data from the squeezing phase. More... | |
Detailed Description
TupleHashXOF (TupleHash with arbitrary-length output)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- Version
- 2.6.6
Definition in file tuple_hash_xof.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 28 of file tuple_hash_xof.c.
Function Documentation
◆ tupleHashXofAbsorb()
| void tupleHashXofAbsorb | ( | TupleHashXofContext * | context, |
| const void * | input, | ||
| size_t | length | ||
| ) |
Absorb data.
- Parameters
-
[in] context Pointer to the TupleHashXOF context [in] input Pointer to the input string [in] length Length of the string
Definition at line 141 of file tuple_hash_xof.c.
◆ tupleHashXofCompute()
| error_t tupleHashXofCompute | ( | uint_t | strength, |
| const DataFrag * | inputFrags, | ||
| uint_t | inputNumFrags, | ||
| const char_t * | custom, | ||
| size_t | customLen, | ||
| uint8_t * | output, | ||
| size_t | outputLen | ||
| ) |
Digest a message using TupleHashXOF.
- Parameters
-
[in] strength Number of bits of security (128 for TupleHashXOF128 and 256 for TupleHashXOF256) [in] key Pointer to the secret key (K) [in] keyLen Length of the secret key [in] inputFrags Tuple of input strings (X) [in] inputNumFrags Number of input strings in the tuple (n) [in] custom Customization string (S) [in] customLen Length of the customization string [out] output Pointer to the output data [in] outputLen Expected length of the output data (L)
- Returns
- Error code
Definition at line 53 of file tuple_hash_xof.c.
◆ tupleHashXofFinal()
| void tupleHashXofFinal | ( | TupleHashXofContext * | context | ) |
Finish absorbing phase.
- Parameters
-
[in] context Pointer to the TupleHashXOF context
Definition at line 159 of file tuple_hash_xof.c.
◆ tupleHashXofInit()
| error_t tupleHashXofInit | ( | TupleHashXofContext * | context, |
| uint_t | strength, | ||
| const char_t * | custom, | ||
| size_t | customLen | ||
| ) |
Initialize TupleHashXOF context.
- Parameters
-
[in] context Pointer to the TupleHashXOF context to initialize [in] strength Number of bits of security (128 for TupleHashXOF128 and 256 for TupleHashXOF256) [in] custom Customization string (S) [in] customLen Length of the customization string
- Returns
- Error code
Definition at line 119 of file tuple_hash_xof.c.
◆ tupleHashXofSqueeze()
| void tupleHashXofSqueeze | ( | TupleHashXofContext * | context, |
| uint8_t * | output, | ||
| size_t | length | ||
| ) |
Extract data from the squeezing phase.
- Parameters
-
[in] context Pointer to the TupleHashXOF context [out] output Output string [in] length Desired output length, in bytes
Definition at line 181 of file tuple_hash_xof.c.
