3 This file is part of the AVR-Crypto-Lib.
4 Copyright (C) 2010 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/>.
25 #define KECCAK224_BLOCKSIZE 1152
26 #define KECCAK224_BLOCKSIZE_B (KECCAK224_BLOCKSIZE/8)
27 #define KECCAK256_BLOCKSIZE 1088
28 #define KECCAK256_BLOCKSIZE_B (KECCAK256_BLOCKSIZE/8)
29 #define KECCAK384_BLOCKSIZE 832
30 #define KECCAK384_BLOCKSIZE_B (KECCAK384_BLOCKSIZE/8)
31 #define KECCAK512_BLOCKSIZE 576
32 #define KECCAK512_BLOCKSIZE_B (KECCAK512_BLOCKSIZE/8)
41 void keccak_init(uint16_t r, uint16_t c, uint8_t d, keccak_ctx_t* ctx);
42 void keccak224_init(keccak_ctx_t* ctx);
43 void keccak256_init(keccak_ctx_t* ctx);
44 void keccak384_init(keccak_ctx_t* ctx);
45 void keccak512_init(keccak_ctx_t* ctx);
47 void keccak_nextBlock(keccak_ctx_t* ctx, const void* block);
48 void keccak_lastBlock(keccak_ctx_t* ctx, const void* block, uint16_t length_b);
50 void keccak_ctx2hash(void* dest, uint16_t length_b, keccak_ctx_t* ctx);
51 void keccak224_ctx2hash(void* dest, keccak_ctx_t* ctx);
52 void keccak256_ctx2hash(void* dest, keccak_ctx_t* ctx);
53 void keccak384_ctx2hash(void* dest, keccak_ctx_t* ctx);
54 void keccak512_ctx2hash(void* dest, keccak_ctx_t* ctx);
56 #endif /* KECCAK_H_ */