comparison aes.c @ 143:5d99163f7e32 libtomcrypt-orig

import of libtomcrypt 0.99
author Matt Johnston <matt@ucc.asn.au>
date Sun, 19 Dec 2004 11:34:45 +0000
parents 6362d3854bb4
children 8fc624ea2521
comparison
equal deleted inserted replaced
15:6362d3854bb4 143:5d99163f7e32
87 (Te4_1[byte(temp, 0)]) ^ 87 (Te4_1[byte(temp, 0)]) ^
88 (Te4_0[byte(temp, 3)]); 88 (Te4_0[byte(temp, 3)]);
89 } 89 }
90 90
91 #ifndef ENCRYPT_ONLY 91 #ifndef ENCRYPT_ONLY
92 92 #ifdef SMALL_CODE
93 static ulong32 setup_mix2(ulong32 temp) 93 static ulong32 setup_mix2(ulong32 temp)
94 { 94 {
95 return Td0(255 & Te4[byte(temp, 3)]) ^ 95 return Td0(255 & Te4[byte(temp, 3)]) ^
96 Td1(255 & Te4[byte(temp, 2)]) ^ 96 Td1(255 & Te4[byte(temp, 2)]) ^
97 Td2(255 & Te4[byte(temp, 1)]) ^ 97 Td2(255 & Te4[byte(temp, 1)]) ^
98 Td3(255 & Te4[byte(temp, 0)]); 98 Td3(255 & Te4[byte(temp, 0)]);
99 } 99 }
100 100 #endif
101 #endif 101 #endif
102 102
103 int SETUP(const unsigned char *key, int keylen, int rounds, symmetric_key *skey) 103 int SETUP(const unsigned char *key, int keylen, int rounds, symmetric_key *skey)
104 { 104 {
105 int i, j; 105 int i, j;