comparison whirl.c @ 15:6362d3854bb4 libtomcrypt-orig

0.96 release of LibTomCrypt
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Jun 2004 14:07:21 +0000
parents 7faae8f46238
children 09ab3354aa21 5d99163f7e32
comparison
equal deleted inserted replaced
3:7faae8f46238 15:6362d3854bb4
19 { 19 {
20 "whirlpool", 20 "whirlpool",
21 11, 21 11,
22 64, 22 64,
23 64, 23 64,
24
25 /* DER encoding (not yet supported) */
26 { 0x00 },
27 0,
28
24 &whirlpool_init, 29 &whirlpool_init,
25 &whirlpool_process, 30 &whirlpool_process,
26 &whirlpool_done, 31 &whirlpool_done,
27 &whirlpool_test 32 &whirlpool_test
28 }; 33 };
32 37
33 /* get a_{i,j} */ 38 /* get a_{i,j} */
34 #define GB(a,i,j) ((a[(i) & 7] >> (8 * (j))) & 255) 39 #define GB(a,i,j) ((a[(i) & 7] >> (8 * (j))) & 255)
35 40
36 /* shortcut macro to perform three functions at once */ 41 /* shortcut macro to perform three functions at once */
37 #define theta_pi_gamma(a, i) \ 42 #define theta_pi_gamma(a, i) \
38 SB0(GB(a, i-0, 7)) ^ \ 43 SB0(GB(a, i-0, 7)) ^ \
39 SB1(GB(a, i-1, 6)) ^ \ 44 SB1(GB(a, i-1, 6)) ^ \
40 SB2(GB(a, i-2, 5)) ^ \ 45 SB2(GB(a, i-2, 5)) ^ \
41 SB3(GB(a, i-3, 4)) ^ \ 46 SB3(GB(a, i-3, 4)) ^ \
42 SB4(GB(a, i-4, 3)) ^ \ 47 SB4(GB(a, i-4, 3)) ^ \