Skinny-C
 All Data Structures Files Functions Variables Groups Pages
skinny128-parallel.h
1 /*
2  * Copyright (C) 2017 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 SKINNY128_PARALLEL_h
24 #define SKINNY128_PARALLEL_h
25 
26 #include "skinny128-cipher.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
40 typedef struct
41 {
43  const void *vtable;
44 
46  void *ctx;
47 
51  size_t parallel_size;
52 
54 
66 
73 
89  (Skinny128ParallelECB_t *ecb, const void *key, unsigned size);
90 
109  (void *output, const void *input, size_t size,
110  const Skinny128ParallelECB_t *ecb);
111 
130  (void *output, const void *input, size_t size,
131  const Skinny128ParallelECB_t *ecb);
132 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif
State information for Skinny-128 in parallel ECB mode.
int skinny128_parallel_ecb_encrypt(void *output, const void *input, size_t size, const Skinny128ParallelECB_t *ecb)
Encrypt a block of data using Skinny-128 in parallel ECB mode.
int skinny128_parallel_ecb_decrypt(void *output, const void *input, size_t size, const Skinny128ParallelECB_t *ecb)
Decrypt a block of data using Skinny-128 in parallel ECB mode.
void skinny128_parallel_ecb_cleanup(Skinny128ParallelECB_t *ecb)
Cleans up a parallel ECB control block for Skinny-128.
int skinny128_parallel_ecb_init(Skinny128ParallelECB_t *ecb)
Initializes Skinny-128 in parallel ECB mode.
int skinny128_parallel_ecb_set_key(Skinny128ParallelECB_t *ecb, const void *key, unsigned size)
Sets the key schedule for a Skinny128 block cipher in parallel ECB mode.