3 This file is part of the ARM-Crypto-Lib.
4 Copyright (C) 2009 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 groestl_small.h
22 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
27 #ifndef GROESTL_SMALL_H_
28 #define GROESTL_SMALL_H_
32 #define GROESTL_SMALL_BLOCKSIZE 512
33 #define GROESTL_SMALL_BLOCKSIZE_B ((GROESTL_SMALL_BLOCKSIZE+7)/8)
34 #define GROESTL224_BLOCKSIZE GROESTL_SMALL_BLOCKSIZE
35 #define GROESTL224_BLOCKSIZE_B GROESTL_SMALL_BLOCKSIZE_B
36 #define GROESTL256_BLOCKSIZE GROESTL_SMALL_BLOCKSIZE
37 #define GROESTL256_BLOCKSIZE_B GROESTL_SMALL_BLOCKSIZE_B
42 } groestl_small_ctx_t;
44 typedef groestl_small_ctx_t groestl224_ctx_t;
45 typedef groestl_small_ctx_t groestl256_ctx_t;
47 void groestl224_init(groestl224_ctx_t* ctx);
48 void groestl256_init(groestl256_ctx_t* ctx);
50 void groestl_small_nextBlock(groestl_small_ctx_t* ctx, const void* block);
51 void groestl_small_lastBlock(groestl_small_ctx_t* ctx, const void* block, uint16_t length_b);
53 void groestl224_nextBlock(groestl224_ctx_t* ctx, const void* block);
54 void groestl224_lastBlock(groestl224_ctx_t* ctx, const void* block, uint16_t length_b);
56 void groestl256_nextBlock(groestl256_ctx_t* ctx, const void* block);
57 void groestl256_lastBlock(groestl256_ctx_t* ctx, const void* block, uint16_t length_b);
59 void groestl224_ctx2hash(void* dest, const groestl224_ctx_t* ctx);
60 void groestl256_ctx2hash(void* dest, const groestl256_ctx_t* ctx);
62 void groestl224(void* dest, const void* msg, uint32_t length_b);
63 void groestl256(void* dest, const void* msg, uint32_t length_b);
65 #endif /* GROESTL_GROESTL_H_ */