]> git.cryptolib.org Git - arm-crypto-lib.git/blob - hfal_skein1024.c
AES makestub added
[arm-crypto-lib.git] / hfal_skein1024.c
1 /* hfal_skein1024.c */
2 /*
3     This file is part of the AVR-Crypto-Lib.
4     Copyright (C) 2008  Daniel Otte (daniel.otte@rub.de)
5
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.
10
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.
15
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/>.
18 */
19 /**
20  * \file     hfal_skein1024.c
21  * \email    daniel.otte@rub.de
22  * \author   Daniel Otte 
23  * \date     2009-03-13
24  * \license  GPLv3 or later
25  * 
26  */
27
28
29 #include <stdlib.h>
30 #include "hashfunction_descriptor.h"
31 #include "skein.h"
32
33
34 static const char skein1024_128_str[] = "Skein-1024-128";
35 static const char skein1024_160_str[] = "Skein-1024-160";
36 static const char skein1024_224_str[] = "Skein-1024-224";
37 static const char skein1024_256_str[] = "Skein-1024-256";
38 static const char skein1024_384_str[] = "Skein-1024-384";
39 static const char skein1024_512_str[] = "Skein-1024-512";
40 static const char skein1024_1024_str[] = "Skein-1024-1024";
41
42 void skein1024_128_init(skein1024_ctx_t* ctx){
43         skein1024_init(ctx, 128);
44 }
45 void skein1024_160_init(skein1024_ctx_t* ctx){
46         skein1024_init(ctx, 160);
47 }
48 void skein1024_224_init(skein1024_ctx_t* ctx){
49         skein1024_init(ctx, 224);
50 }
51 void skein1024_256_init(skein1024_ctx_t* ctx){
52         skein1024_init(ctx, 256);
53 }
54 void skein1024_384_init(skein1024_ctx_t* ctx){
55         skein1024_init(ctx, 384);
56 }
57 void skein1024_512_init(skein1024_ctx_t* ctx){
58         skein1024_init(ctx, 512);
59 }
60 void skein1024_1024_init(skein1024_ctx_t* ctx){
61         skein1024_init(ctx, 1024);
62 }
63
64 const hfdesc_t skein1024_128_desc = {
65         HFDESC_TYPE_HASHFUNCTION,
66         0,
67         skein1024_128_str,
68         sizeof(skein1024_ctx_t),
69         SKEIN1024_BLOCKSIZE,
70         128,
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,
75         (hf_free_fpt)NULL,
76         (hf_mem_fpt)NULL
77 };
78 const hfdesc_t skein1024_160_desc = {
79         HFDESC_TYPE_HASHFUNCTION,
80         0,
81         skein1024_160_str,
82         sizeof(skein1024_ctx_t),
83         SKEIN1024_BLOCKSIZE,
84         160,
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,
89         (hf_free_fpt)NULL,
90         (hf_mem_fpt)NULL
91 };
92 const hfdesc_t skein1024_224_desc = {
93         HFDESC_TYPE_HASHFUNCTION,
94         0,
95         skein1024_224_str,
96         sizeof(skein1024_ctx_t),
97         SKEIN1024_BLOCKSIZE,
98         224,
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,
103         (hf_free_fpt)NULL,
104         (hf_mem_fpt)NULL
105 };
106 const hfdesc_t skein1024_256_desc = {
107         HFDESC_TYPE_HASHFUNCTION,
108         0,
109         skein1024_256_str,
110         sizeof(skein1024_ctx_t),
111         SKEIN1024_BLOCKSIZE,
112         256,
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,
117         (hf_free_fpt)NULL,
118         (hf_mem_fpt)NULL
119 };
120 const hfdesc_t skein1024_384_desc = {
121         HFDESC_TYPE_HASHFUNCTION,
122         0,
123         skein1024_384_str,
124         sizeof(skein1024_ctx_t),
125         SKEIN1024_BLOCKSIZE,
126         384,
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,
131         (hf_free_fpt)NULL,
132         (hf_mem_fpt)NULL
133 };
134 const hfdesc_t skein1024_512_desc = {
135         HFDESC_TYPE_HASHFUNCTION,
136         0,
137         skein1024_512_str,
138         sizeof(skein1024_ctx_t),
139         SKEIN1024_BLOCKSIZE,
140         512,
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,
145         (hf_free_fpt)NULL,
146         (hf_mem_fpt)NULL
147 };
148 const hfdesc_t skein1024_1024_desc = {
149         HFDESC_TYPE_HASHFUNCTION,
150         0,
151         skein1024_1024_str,
152         sizeof(skein1024_ctx_t),
153         SKEIN1024_BLOCKSIZE,
154         1024,
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,
159         (hf_free_fpt)NULL,
160         (hf_mem_fpt)NULL
161 };
162