xof_algorithms.h
Go to the documentation of this file.
1 /**
2  * @file xof_algorithms.h
3  * @brief Collection of XOF algorithms
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneCRYPTO Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.6.6
29  **/
30 
31 #ifndef _XOF_ALGORITHMS_H
32 #define _XOF_ALGORITHMS_H
33 
34 //Dependencies
35 #include "core/crypto.h"
36 
37 //Keccak support?
38 #if (KECCAK_SUPPORT == ENABLED)
39  #include "xof/keccak.h"
40 #endif
41 
42 //SHAKE support?
43 #if (SHAKE_SUPPORT == ENABLED)
44  #include "xof/shake.h"
45 #endif
46 
47 //cSHAKE support?
48 #if (CSHAKE_SUPPORT == ENABLED)
49  #include "xof/cshake.h"
50 #endif
51 
52 //KMACXOF support?
53 #if (KMAC_XOF_SUPPORT == ENABLED)
54  #include "xof/kmac_xof.h"
55 #endif
56 
57 //TupleHashXOF support?
58 #if (TUPLE_HASH_XOF_SUPPORT == ENABLED)
59  #include "xof/tuple_hash_xof.h"
60 #endif
61 
62 //ParallelHashXOF support?
63 #if (PARALLEL_HASH_XOF_SUPPORT == ENABLED)
64  #include "xof/parallel_hash_xof.h"
65 #endif
66 
67 //Ascon-XOF128 support?
68 #if (ASCON_XOF128_SUPPORT == ENABLED)
69  #include "lwc/ascon_xof128.h"
70 #endif
71 
72 //Ascon-CXOF128 support?
73 #if (ASCON_CXOF128_SUPPORT == ENABLED)
74  #include "lwc/ascon_cxof128.h"
75 #endif
76 
77 //C++ guard
78 #ifdef __cplusplus
79 extern "C" {
80 #endif
81 
82 
83 /**
84  * @brief Generic XOF algorithm context
85  **/
86 
87 typedef union
88 {
89 #if (KECCAK_SUPPORT == ENABLED)
91 #endif
92 #if (SHAKE_SUPPORT == ENABLED)
94 #endif
95 #if (CSHAKE_SUPPORT == ENABLED)
97 #endif
98 #if (KMAC_XOF_SUPPORT == ENABLED)
100 #endif
101 #if (TUPLE_HASH_XOF_SUPPORT == ENABLED)
103 #endif
104 #if (PARALLEL_HASH_XOF_SUPPORT == ENABLED)
106 #endif
107 #if (ASCON_XOF128_SUPPORT == ENABLED)
109 #endif
110 #if (ASCON_CXOF128_SUPPORT == ENABLED)
112 #endif
113 } XofContext;
114 
115 
116 //C++ guard
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif
AsconCxof128Context asconCxof128Context
AsconXof128Context asconXof128Context
SHAKE extendable-output function.
Ascon-XOF128 algorithm context.
Definition: ascon_xof128.h:52
Keccak context.
Definition: keccak.h:116
TupleHashXOF algorithm context.
Ascon-CXOF128 customizable extendable-output function.
KeccakContext keccakContext
TupleHashXofContext tupleHashXofContext
ParallelHashXofContext parallelHashXofContext
Ascon-CXOF128 algorithm context.
Definition: ascon_cxof128.h:52
General definitions for cryptographic algorithms.
ParallelHashXOF algorithm context.
CshakeContext cshakeContext
SHAKE algorithm context.
Definition: shake.h:53
ShakeContext shakeContext
Generic XOF algorithm context.
cSHAKE (customizable SHAKE function)
KMACXOF (KMAC with arbitrary-length output)
KmacXofContext kmacXofContext
TupleHashXOF (TupleHash with arbitrary-length output)
Keccak sponge function.
ParallelHashXOF (ParallelHash with arbitrary-length output)
KMACXOF algorithm context.
Definition: kmac_xof.h:49
Ascon-XOF128 extendable-output function.
cSHAKE algorithm context
Definition: cshake.h:49