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/>.
22 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
33 #define SHABAL_BLOCKSIZE 512
34 #define SHABAL_BLOCKSIZE_B ((SHABAL_BLOCKSIZE+7)/8)
43 } w; /* the counter */
47 uint32_t b_buffer[16];
48 uint32_t c_buffer[16];
52 void shabal192_init(shabal_ctx_t* ctx);
53 void shabal224_init(shabal_ctx_t* ctx);
54 void shabal256_init(shabal_ctx_t* ctx);
55 void shabal384_init(shabal_ctx_t* ctx);
56 void shabal512_init(shabal_ctx_t* ctx);
58 void shabal_nextBlock(shabal_ctx_t* ctx, const void* block);
59 void shabal_lastBlock(shabal_ctx_t* ctx, const void* block, uint16_t length_b);
61 void shabal192_ctx2hash(void* dest, const shabal_ctx_t* ctx);
62 void shabal224_ctx2hash(void* dest, const shabal_ctx_t* ctx);
63 void shabal256_ctx2hash(void* dest, const shabal_ctx_t* ctx);
64 void shabal384_ctx2hash(void* dest, const shabal_ctx_t* ctx);
65 void shabal512_ctx2hash(void* dest, const shabal_ctx_t* ctx);
67 void shabal192(void* dest, void* msg, uint32_t length_b);
68 void shabal224(void* dest, void* msg, uint32_t length_b);
69 void shabal256(void* dest, void* msg, uint32_t length_b);
70 void shabal384(void* dest, void* msg, uint32_t length_b);
71 void shabal512(void* dest, void* msg, uint32_t length_b);
73 void shabal_ctx2hash(void* dest, const shabal_ctx_t* ctx, uint16_t outlength_b);
75 #endif /* SHABAL_H_ */