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 hfal_skein1024.c
21 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
28 #include <avr/pgmspace.h>
30 #include "hashfunction_descriptor.h"
34 static const char skein1024_128_str[] PROGMEM = "Skein-1024-128";
35 static const char skein1024_160_str[] PROGMEM = "Skein-1024-160";
36 static const char skein1024_224_str[] PROGMEM = "Skein-1024-224";
37 static const char skein1024_256_str[] PROGMEM = "Skein-1024-256";
38 static const char skein1024_384_str[] PROGMEM = "Skein-1024-384";
39 static const char skein1024_512_str[] PROGMEM = "Skein-1024-512";
40 static const char skein1024_1024_str[] PROGMEM = "Skein-1024-1024";
42 void skein1024_128_init(skein1024_ctx_t* ctx){
43 skein1024_init(ctx, 128);
45 void skein1024_160_init(skein1024_ctx_t* ctx){
46 skein1024_init(ctx, 160);
48 void skein1024_224_init(skein1024_ctx_t* ctx){
49 skein1024_init(ctx, 224);
51 void skein1024_256_init(skein1024_ctx_t* ctx){
52 skein1024_init(ctx, 256);
54 void skein1024_384_init(skein1024_ctx_t* ctx){
55 skein1024_init(ctx, 384);
57 void skein1024_512_init(skein1024_ctx_t* ctx){
58 skein1024_init(ctx, 512);
60 void skein1024_1024_init(skein1024_ctx_t* ctx){
61 skein1024_init(ctx, 1024);
64 const hfdesc_t skein1024_128_desc PROGMEM = {
65 HFDESC_TYPE_HASHFUNCTION,
68 sizeof(skein1024_ctx_t),
71 (hf_init_fpt)skein1024_128_init,
72 (hf_nextBlock_fpt)skein1024_nextBlock,
73 (hf_lastBlock_fpt)skein1024_lastBlock,
74 (hf_ctx2hash_fpt)skein1024_ctx2hash,
78 const hfdesc_t skein1024_160_desc PROGMEM = {
79 HFDESC_TYPE_HASHFUNCTION,
82 sizeof(skein1024_ctx_t),
85 (hf_init_fpt)skein1024_160_init,
86 (hf_nextBlock_fpt)skein1024_nextBlock,
87 (hf_lastBlock_fpt)skein1024_lastBlock,
88 (hf_ctx2hash_fpt)skein1024_ctx2hash,
92 const hfdesc_t skein1024_224_desc PROGMEM = {
93 HFDESC_TYPE_HASHFUNCTION,
96 sizeof(skein1024_ctx_t),
99 (hf_init_fpt)skein1024_224_init,
100 (hf_nextBlock_fpt)skein1024_nextBlock,
101 (hf_lastBlock_fpt)skein1024_lastBlock,
102 (hf_ctx2hash_fpt)skein1024_ctx2hash,
106 const hfdesc_t skein1024_256_desc PROGMEM = {
107 HFDESC_TYPE_HASHFUNCTION,
110 sizeof(skein1024_ctx_t),
113 (hf_init_fpt)skein1024_256_init,
114 (hf_nextBlock_fpt)skein1024_nextBlock,
115 (hf_lastBlock_fpt)skein1024_lastBlock,
116 (hf_ctx2hash_fpt)skein1024_ctx2hash,
120 const hfdesc_t skein1024_384_desc PROGMEM = {
121 HFDESC_TYPE_HASHFUNCTION,
124 sizeof(skein1024_ctx_t),
127 (hf_init_fpt)skein1024_384_init,
128 (hf_nextBlock_fpt)skein1024_nextBlock,
129 (hf_lastBlock_fpt)skein1024_lastBlock,
130 (hf_ctx2hash_fpt)skein1024_ctx2hash,
134 const hfdesc_t skein1024_512_desc PROGMEM = {
135 HFDESC_TYPE_HASHFUNCTION,
138 sizeof(skein1024_ctx_t),
141 (hf_init_fpt)skein1024_512_init,
142 (hf_nextBlock_fpt)skein1024_nextBlock,
143 (hf_lastBlock_fpt)skein1024_lastBlock,
144 (hf_ctx2hash_fpt)skein1024_ctx2hash,
148 const hfdesc_t skein1024_1024_desc PROGMEM = {
149 HFDESC_TYPE_HASHFUNCTION,
152 sizeof(skein1024_ctx_t),
155 (hf_init_fpt)skein1024_1024_init,
156 (hf_nextBlock_fpt)skein1024_nextBlock,
157 (hf_lastBlock_fpt)skein1024_lastBlock,
158 (hf_ctx2hash_fpt)skein1024_ctx2hash,