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_skein256.c
21 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
30 #include "hashfunction_descriptor.h"
34 static const char skein256_128_str[] = "Skein-256-128";
35 static const char skein256_160_str[] = "Skein-256-160";
36 static const char skein256_224_str[] = "Skein-256-224";
37 static const char skein256_256_str[] = "Skein-256-256";
38 static const char skein256_384_str[] = "Skein-256-384";
39 static const char skein256_512_str[] = "Skein-256-512";
41 void skein256_128_init(skein256_ctx_t* ctx){
42 skein256_init(ctx, 128);
44 void skein256_160_init(skein256_ctx_t* ctx){
45 skein256_init(ctx, 160);
47 void skein256_224_init(skein256_ctx_t* ctx){
48 skein256_init(ctx, 224);
50 void skein256_256_init(skein256_ctx_t* ctx){
51 skein256_init(ctx, 256);
53 void skein256_384_init(skein256_ctx_t* ctx){
54 skein256_init(ctx, 384);
56 void skein256_512_init(skein256_ctx_t* ctx){
57 skein256_init(ctx, 512);
60 const hfdesc_t skein256_128_desc = {
61 HFDESC_TYPE_HASHFUNCTION,
64 sizeof(skein256_ctx_t),
67 (hf_init_fpt)skein256_128_init,
68 (hf_nextBlock_fpt)skein256_nextBlock,
69 (hf_lastBlock_fpt)skein256_lastBlock,
70 (hf_ctx2hash_fpt)skein256_ctx2hash,
74 const hfdesc_t skein256_160_desc = {
75 HFDESC_TYPE_HASHFUNCTION,
78 sizeof(skein256_ctx_t),
81 (hf_init_fpt)skein256_160_init,
82 (hf_nextBlock_fpt)skein256_nextBlock,
83 (hf_lastBlock_fpt)skein256_lastBlock,
84 (hf_ctx2hash_fpt)skein256_ctx2hash,
88 const hfdesc_t skein256_224_desc = {
89 HFDESC_TYPE_HASHFUNCTION,
92 sizeof(skein256_ctx_t),
95 (hf_init_fpt)skein256_224_init,
96 (hf_nextBlock_fpt)skein256_nextBlock,
97 (hf_lastBlock_fpt)skein256_lastBlock,
98 (hf_ctx2hash_fpt)skein256_ctx2hash,
102 const hfdesc_t skein256_256_desc = {
103 HFDESC_TYPE_HASHFUNCTION,
106 sizeof(skein256_ctx_t),
109 (hf_init_fpt)skein256_256_init,
110 (hf_nextBlock_fpt)skein256_nextBlock,
111 (hf_lastBlock_fpt)skein256_lastBlock,
112 (hf_ctx2hash_fpt)skein256_ctx2hash,
116 const hfdesc_t skein256_384_desc = {
117 HFDESC_TYPE_HASHFUNCTION,
120 sizeof(skein256_ctx_t),
123 (hf_init_fpt)skein256_384_init,
124 (hf_nextBlock_fpt)skein256_nextBlock,
125 (hf_lastBlock_fpt)skein256_lastBlock,
126 (hf_ctx2hash_fpt)skein256_ctx2hash,
130 const hfdesc_t skein256_512_desc = {
131 HFDESC_TYPE_HASHFUNCTION,
134 sizeof(skein256_ctx_t),
137 (hf_init_fpt)skein256_512_init,
138 (hf_nextBlock_fpt)skein256_nextBlock,
139 (hf_lastBlock_fpt)skein256_lastBlock,
140 (hf_ctx2hash_fpt)skein256_ctx2hash,