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-2025 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.5.0
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 //Ascon-XOF128 support?
53 #if (ASCON_XOF128_SUPPORT == ENABLED)
54  #include "lwc/ascon_xof128.h"
55 #endif
56 
57 //Ascon-CXOF128 support?
58 #if (ASCON_CXOF128_SUPPORT == ENABLED)
59  #include "lwc/ascon_cxof128.h"
60 #endif
61 
62 //C++ guard
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
67 
68 /**
69  * @brief Generic XOF algorithm context
70  **/
71 
72 typedef union
73 {
74 #if (KECCAK_SUPPORT == ENABLED)
76 #endif
77 #if (SHAKE_SUPPORT == ENABLED)
79 #endif
80 #if (CSHAKE_SUPPORT == ENABLED)
82 #endif
83 #if (ASCON_XOF128_SUPPORT == ENABLED)
85 #endif
86 #if (ASCON_CXOF128_SUPPORT == ENABLED)
88 #endif
89 } XofContext;
90 
91 
92 //C++ guard
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
AsconCxof128Context asconCxof128Context
AsconXof128Context asconXof128Context
SHAKE128 and SHAKE256 extendable-output functions.
Ascon-XOF128 algorithm context.
Definition: ascon_xof128.h:49
Keccak context.
Definition: keccak.h:116
Ascon-CXOF128 customizable extendable-output function.
KeccakContext keccakContext
Ascon-CXOF128 algorithm context.
Definition: ascon_cxof128.h:49
General definitions for cryptographic algorithms.
CshakeContext cshakeContext
SHAKE algorithm context.
Definition: shake.h:49
ShakeContext shakeContext
Generic XOF algorithm context.
cSHAKE128 and cSHAKE256 (customizable SHAKE function)
Keccak sponge function.
Ascon-XOF128 extendable-output function.
cSHAKE algorithm context
Definition: cshake.h:49