1 /* blockcipher_descriptor.h */
3 This file is part of the ARM-Crypto-Lib.
4 Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * \file blockcipher_descriptor.h
24 * \license GPLv3 or later
28 #ifndef BLOCKCIPHER_DESCRIPTOR_H_
29 #define BLOCKCIPHER_DESCRIPTOR_H_
35 typedef void(*void_fpt)(void);
38 typedef void(*bc_init1_fpt)(void*, void*);
39 typedef void(*bc_init2_fpt)(void*, uint16_t,void*);
40 typedef void(*bc_enc1_fpt)(void*, void*);
41 typedef void(*bc_enc2_fpt)(void*, void*, void*);
42 typedef void(*bc_dec1_fpt)(void*, void*);
43 typedef void(*bc_dec2_fpt)(void*, void*, void*);
44 typedef void(*bc_free_fpt)(void*);
64 #define BC_INIT_TYPE 0x01
65 #define BC_INIT_TYPE_1 0x00
66 #define BC_INIT_TYPE_2 0x01
68 #define BC_ENC_TYPE 0x02
69 #define BC_ENC_TYPE_1 0x00
70 #define BC_ENC_TYPE_2 0x02
72 #define BC_DEC_TYPE 0x04
73 #define BC_DEC_TYPE_1 0x00
74 #define BC_DEC_TYPE_2 0x04
76 #define BCDESC_TYPE_BLOCKCIPHER 0x01
79 uint8_t type; /* 1==blockcipher */
88 const void* valid_keysize_desc;
89 } bcdesc_t; /* blockcipher descriptor type */
97 #endif /* BLOCKCIPHER_DESCRIPTOR_H_ */