3 This file is part of the AVR-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
27 #ifndef BLAKE_LARGE_H_
28 #define BLAKE_LARGE_H_
32 #define BLAKE_LARGE_BLOCKSIZE 1024
33 #define BLAKE_LARGE_BLOCKSIZE_B ((BLAKE_LARGE_BLOCKSIZE+7)/8)
34 #define BLAKE48_BLOCKSIZE BLAKE_LARGE_BLOCKSIZE
35 #define BLAKE48_BLOCKSIZE_B BLAKE_LARGE_BLOCKSIZE_B
36 #define BLAKE64_BLOCKSIZE BLAKE_LARGE_BLOCKSIZE
37 #define BLAKE64_BLOCKSIZE_B BLAKE_LARGE_BLOCKSIZE_B
46 typedef blake_large_ctx_t blake48_ctx_t;
47 typedef blake_large_ctx_t blake64_ctx_t;
49 void blake48_init(blake48_ctx_t* ctx);
50 void blake64_init(blake64_ctx_t* ctx);
52 void blake_large_nextBlock(blake_large_ctx_t* ctx, const void* block);
53 void blake_large_lastBlock(blake_large_ctx_t* ctx, const void* block, uint16_t length_b);
55 void blake48_nextBlock(blake48_ctx_t* ctx, const void* block);
56 void blake48_lastBlock(blake48_ctx_t* ctx, const void* block, uint16_t length_b);
58 void blake64_nextBlock(blake64_ctx_t* ctx, const void* block);
59 void blake64_lastBlock(blake64_ctx_t* ctx, const void* block, uint16_t length_b);
61 void blake48_ctx2hash(void* dest, const blake48_ctx_t* ctx);
62 void blake64_ctx2hash(void* dest, const blake64_ctx_t* ctx);
64 void blake48(void* dest, const void* msg, uint32_t length_b);
65 void blake64(void* dest, const void* msg, uint32_t length_b);
67 #endif /* BLAKE_LARGE_H_ */