@@ -50,21 +50,6 @@ extern "C"{
5050
5151#if SPH_64
5252
53- /**
54- * Output size (in bits) for Skein-224.
55- */
56- #define SPH_SIZE_skein224 224
57-
58- /**
59- * Output size (in bits) for Skein-256.
60- */
61- #define SPH_SIZE_skein256 256
62-
63- /**
64- * Output size (in bits) for Skein-384.
65- */
66- #define SPH_SIZE_skein384 384
67-
6853/**
6954 * Output size (in bits) for Skein-512.
7055 */
@@ -87,161 +72,11 @@ typedef struct {
8772 sph_u64 bcount ;
8873} sph_skein_big_context ;
8974
90- /**
91- * Type for a Skein-224 context (identical to the common "big" context).
92- */
93- typedef sph_skein_big_context sph_skein224_context ;
94-
95- /**
96- * Type for a Skein-256 context (identical to the common "big" context).
97- */
98- typedef sph_skein_big_context sph_skein256_context ;
99-
100- /**
101- * Type for a Skein-384 context (identical to the common "big" context).
102- */
103- typedef sph_skein_big_context sph_skein384_context ;
104-
10575/**
10676 * Type for a Skein-512 context (identical to the common "big" context).
10777 */
10878typedef sph_skein_big_context sph_skein512_context ;
10979
110- /**
111- * Initialize a Skein-224 context. This process performs no memory allocation.
112- *
113- * @param cc the Skein-224 context (pointer to a
114- * <code>sph_skein224_context</code>)
115- */
116- void sph_skein224_init (void * cc );
117-
118- /**
119- * Process some data bytes. It is acceptable that <code>len</code> is zero
120- * (in which case this function does nothing).
121- *
122- * @param cc the Skein-224 context
123- * @param data the input data
124- * @param len the input data length (in bytes)
125- */
126- void sph_skein224 (void * cc , const void * data , size_t len );
127-
128- /**
129- * Terminate the current Skein-224 computation and output the result into
130- * the provided buffer. The destination buffer must be wide enough to
131- * accomodate the result (28 bytes). The context is automatically
132- * reinitialized.
133- *
134- * @param cc the Skein-224 context
135- * @param dst the destination buffer
136- */
137- void sph_skein224_close (void * cc , void * dst );
138-
139- /**
140- * Add a few additional bits (0 to 7) to the current computation, then
141- * terminate it and output the result in the provided buffer, which must
142- * be wide enough to accomodate the result (28 bytes). If bit number i
143- * in <code>ub</code> has value 2^i, then the extra bits are those
144- * numbered 7 downto 8-n (this is the big-endian convention at the byte
145- * level). The context is automatically reinitialized.
146- *
147- * @param cc the Skein-224 context
148- * @param ub the extra bits
149- * @param n the number of extra bits (0 to 7)
150- * @param dst the destination buffer
151- */
152- void sph_skein224_addbits_and_close (
153- void * cc , unsigned ub , unsigned n , void * dst );
154-
155- /**
156- * Initialize a Skein-256 context. This process performs no memory allocation.
157- *
158- * @param cc the Skein-256 context (pointer to a
159- * <code>sph_skein256_context</code>)
160- */
161- void sph_skein256_init (void * cc );
162-
163- /**
164- * Process some data bytes. It is acceptable that <code>len</code> is zero
165- * (in which case this function does nothing).
166- *
167- * @param cc the Skein-256 context
168- * @param data the input data
169- * @param len the input data length (in bytes)
170- */
171- void sph_skein256 (void * cc , const void * data , size_t len );
172-
173- /**
174- * Terminate the current Skein-256 computation and output the result into
175- * the provided buffer. The destination buffer must be wide enough to
176- * accomodate the result (32 bytes). The context is automatically
177- * reinitialized.
178- *
179- * @param cc the Skein-256 context
180- * @param dst the destination buffer
181- */
182- void sph_skein256_close (void * cc , void * dst );
183-
184- /**
185- * Add a few additional bits (0 to 7) to the current computation, then
186- * terminate it and output the result in the provided buffer, which must
187- * be wide enough to accomodate the result (32 bytes). If bit number i
188- * in <code>ub</code> has value 2^i, then the extra bits are those
189- * numbered 7 downto 8-n (this is the big-endian convention at the byte
190- * level). The context is automatically reinitialized.
191- *
192- * @param cc the Skein-256 context
193- * @param ub the extra bits
194- * @param n the number of extra bits (0 to 7)
195- * @param dst the destination buffer
196- */
197- void sph_skein256_addbits_and_close (
198- void * cc , unsigned ub , unsigned n , void * dst );
199-
200- /**
201- * Initialize a Skein-384 context. This process performs no memory allocation.
202- *
203- * @param cc the Skein-384 context (pointer to a
204- * <code>sph_skein384_context</code>)
205- */
206- void sph_skein384_init (void * cc );
207-
208- /**
209- * Process some data bytes. It is acceptable that <code>len</code> is zero
210- * (in which case this function does nothing).
211- *
212- * @param cc the Skein-384 context
213- * @param data the input data
214- * @param len the input data length (in bytes)
215- */
216- void sph_skein384 (void * cc , const void * data , size_t len );
217-
218- /**
219- * Terminate the current Skein-384 computation and output the result into
220- * the provided buffer. The destination buffer must be wide enough to
221- * accomodate the result (48 bytes). The context is automatically
222- * reinitialized.
223- *
224- * @param cc the Skein-384 context
225- * @param dst the destination buffer
226- */
227- void sph_skein384_close (void * cc , void * dst );
228-
229- /**
230- * Add a few additional bits (0 to 7) to the current computation, then
231- * terminate it and output the result in the provided buffer, which must
232- * be wide enough to accomodate the result (48 bytes). If bit number i
233- * in <code>ub</code> has value 2^i, then the extra bits are those
234- * numbered 7 downto 8-n (this is the big-endian convention at the byte
235- * level). The context is automatically reinitialized.
236- *
237- * @param cc the Skein-384 context
238- * @param ub the extra bits
239- * @param n the number of extra bits (0 to 7)
240- * @param dst the destination buffer
241- */
242- void sph_skein384_addbits_and_close (
243- void * cc , unsigned ub , unsigned n , void * dst );
244-
24580/**
24681 * Initialize a Skein-512 context. This process performs no memory allocation.
24782 *
0 commit comments