Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
internal-sliscp-light.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Southern Storm Software, Pty Ltd.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef LW_INTERNAL_SLISCP_LIGHT_H
24 #define LW_INTERNAL_SLISCP_LIGHT_H
25 
41 #include "internal-util.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
50 #define SLISCP_LIGHT256_STATE_SIZE 32
51 
55 #define SLISCP_LIGHT192_STATE_SIZE 24
56 
60 #define SLISCP_LIGHT320_STATE_SIZE 40
61 
80 void sliscp_light256_permute_spix(unsigned char block[32], unsigned rounds);
81 
89 void sliscp_light256_swap_spix(unsigned char block[32]);
90 
114 void sliscp_light256_permute_spoc(unsigned char block[32]);
115 
123 void sliscp_light256_swap_spoc(unsigned char block[32]);
124 
130 void sliscp_light192_permute(unsigned char block[24]);
131 
153 void sliscp_light320_permute(unsigned char block[40]);
154 
162 void sliscp_light320_swap(unsigned char block[40]);
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif
void sliscp_light256_permute_spix(unsigned char block[32], unsigned rounds)
Performs the sLiSCP-light permutation on a 256-bit block.
Definition: internal-sliscp-light.c:117
void sliscp_light320_permute(unsigned char block[40])
Performs the sLiSCP-light permutation on a 320-bit block.
Definition: internal-sliscp-light.c:321
void sliscp_light320_swap(unsigned char block[40])
Swaps rate bytes in a sLiSCP-light 320-bit block.
Definition: internal-sliscp-light.c:404
void sliscp_light256_swap_spoc(unsigned char block[32])
Swaps rate bytes in a sLiSCP-light 256-bit block for SpoC-128.
Definition: internal-sliscp-light.c:231
void sliscp_light256_permute_spoc(unsigned char block[32])
Performs the sLiSCP-light permutation on a 256-bit block.
Definition: internal-sliscp-light.c:178
void sliscp_light192_permute(unsigned char block[24])
Performs the sLiSCP-light permutation on a 192-bit block.
Definition: internal-sliscp-light.c:255
void sliscp_light256_swap_spix(unsigned char block[32])
Swaps rate bytes in a sLiSCP-light 256-bit block for SPIX.
Definition: internal-sliscp-light.c:169