3 This file is part of the ARM-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_skein512.c
21 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
30 #include "hashfunction_descriptor.h"
34 static const char skein512_128_str[] = "Skein-512-128";
35 static const char skein512_160_str[] = "Skein-512-160";
36 static const char skein512_224_str[] = "Skein-512-224";
37 static const char skein512_256_str[] = "Skein-512-256";
38 static const char skein512_384_str[] = "Skein-512-384";
39 static const char skein512_512_str[] = "Skein-512-512";
40 static const char skein512_1024_str[] = "Skein-512-1024";
42 void skein512_128_init(skein512_ctx_t* ctx){
43 skein512_init(ctx, 128);
45 void skein512_160_init(skein512_ctx_t* ctx){
46 skein512_init(ctx, 160);
48 void skein512_224_init(skein512_ctx_t* ctx){
49 skein512_init(ctx, 224);
51 void skein512_256_init(skein512_ctx_t* ctx){
52 skein512_init(ctx, 256);
54 void skein512_384_init(skein512_ctx_t* ctx){
55 skein512_init(ctx, 384);
57 void skein512_512_init(skein512_ctx_t* ctx){
58 skein512_init(ctx, 512);
60 void skein512_1024_init(skein512_ctx_t* ctx){
61 skein512_init(ctx, 1024);
64 const hfdesc_t skein512_128_desc = {
65 HFDESC_TYPE_HASHFUNCTION,
68 sizeof(skein512_ctx_t),
71 (hf_init_fpt)skein512_128_init,
72 (hf_nextBlock_fpt)skein512_nextBlock,
73 (hf_lastBlock_fpt)skein512_lastBlock,
74 (hf_ctx2hash_fpt)skein512_ctx2hash,
78 const hfdesc_t skein512_160_desc = {
79 HFDESC_TYPE_HASHFUNCTION,
82 sizeof(skein512_ctx_t),
85 (hf_init_fpt)skein512_160_init,
86 (hf_nextBlock_fpt)skein512_nextBlock,
87 (hf_lastBlock_fpt)skein512_lastBlock,
88 (hf_ctx2hash_fpt)skein512_ctx2hash,
92 const hfdesc_t skein512_224_desc = {
93 HFDESC_TYPE_HASHFUNCTION,
96 sizeof(skein512_ctx_t),
99 (hf_init_fpt)skein512_224_init,
100 (hf_nextBlock_fpt)skein512_nextBlock,
101 (hf_lastBlock_fpt)skein512_lastBlock,
102 (hf_ctx2hash_fpt)skein512_ctx2hash,
106 const hfdesc_t skein512_256_desc = {
107 HFDESC_TYPE_HASHFUNCTION,
110 sizeof(skein512_ctx_t),
113 (hf_init_fpt)skein512_256_init,
114 (hf_nextBlock_fpt)skein512_nextBlock,
115 (hf_lastBlock_fpt)skein512_lastBlock,
116 (hf_ctx2hash_fpt)skein512_ctx2hash,
120 const hfdesc_t skein512_384_desc = {
121 HFDESC_TYPE_HASHFUNCTION,
124 sizeof(skein512_ctx_t),
127 (hf_init_fpt)skein512_384_init,
128 (hf_nextBlock_fpt)skein512_nextBlock,
129 (hf_lastBlock_fpt)skein512_lastBlock,
130 (hf_ctx2hash_fpt)skein512_ctx2hash,
134 const hfdesc_t skein512_512_desc = {
135 HFDESC_TYPE_HASHFUNCTION,
138 sizeof(skein512_ctx_t),
141 (hf_init_fpt)skein512_512_init,
142 (hf_nextBlock_fpt)skein512_nextBlock,
143 (hf_lastBlock_fpt)skein512_lastBlock,
144 (hf_ctx2hash_fpt)skein512_ctx2hash,
148 const hfdesc_t skein512_1024_desc = {
149 HFDESC_TYPE_HASHFUNCTION,
152 sizeof(skein512_ctx_t),
155 (hf_init_fpt)skein512_1024_init,
156 (hf_nextBlock_fpt)skein512_nextBlock,
157 (hf_lastBlock_fpt)skein512_lastBlock,
158 (hf_ctx2hash_fpt)skein512_ctx2hash,