1 /* blockcipher_descriptor.h */
3 This file is part of the AVR-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_
31 #include <avr/pgmspace.h>
36 typedef void(*void_fpt)(void);
39 typedef void(*bc_init1_fpt)(void*, void*);
40 typedef void(*bc_init2_fpt)(void*, uint16_t,void*);
41 typedef void(*bc_enc1_fpt)(void*, void*);
42 typedef void(*bc_enc2_fpt)(void*, void*, void*);
43 typedef void(*bc_dec1_fpt)(void*, void*);
44 typedef void(*bc_dec2_fpt)(void*, void*, void*);
45 typedef void(*bc_free_fpt)(void*);
65 #define BC_INIT_TYPE 0x01
66 #define BC_INIT_TYPE_1 0x00
67 #define BC_INIT_TYPE_2 0x01
69 #define BC_ENC_TYPE 0x02
70 #define BC_ENC_TYPE_1 0x00
71 #define BC_ENC_TYPE_2 0x02
73 #define BC_DEC_TYPE 0x04
74 #define BC_DEC_TYPE_1 0x00
75 #define BC_DEC_TYPE_2 0x04
77 #define BCDESC_TYPE_BLOCKCIPHER 0x01
80 uint8_t type; /* 1==blockcipher */
89 PGM_VOID_P valid_keysize_desc;
90 } bcdesc_t; /* blockcipher descriptor type */
98 #endif /* BLOCKCIPHER_DESCRIPTOR_H_ */