comparison src/encauth/eax/eax_init.c @ 210:4768b55c5240 libtomcrypt

propagate from branch 'au.asn.ucc.matt.ltc-orig' (head 33c416b902f1a44913d825bae7ad9a160f703ed3) to branch 'au.asn.ucc.matt.dropbear.ltc' (head 4d6aec6e6121e13f68c11c149b6579c41cb63e74)
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 12:10:23 +0000
parents 39d5d58461d6
children
comparison
equal deleted inserted replaced
199:8be64e2c86f4 210:4768b55c5240
106 } 106 }
107 107
108 /* note we don't finish the headeromac, this allows us to add more header later */ 108 /* note we don't finish the headeromac, this allows us to add more header later */
109 109
110 /* setup the CTR mode */ 110 /* setup the CTR mode */
111 if ((err = ctr_start(cipher, eax->N, key, keylen, 0, &eax->ctr)) != CRYPT_OK) { 111 if ((err = ctr_start(cipher, eax->N, key, keylen, 0, CTR_COUNTER_BIG_ENDIAN, &eax->ctr)) != CRYPT_OK) {
112 goto LBL_ERR; 112 goto LBL_ERR;
113 } 113 }
114 /* use big-endian counter */
115 eax->ctr.mode = 1;
116 114
117 /* setup the OMAC for the ciphertext */ 115 /* setup the OMAC for the ciphertext */
118 if ((err = omac_init(&eax->ctomac, cipher, key, keylen)) != CRYPT_OK) { 116 if ((err = omac_init(&eax->ctomac, cipher, key, keylen)) != CRYPT_OK) {
119 goto LBL_ERR; 117 goto LBL_ERR;
120 } 118 }
138 136
139 return err; 137 return err;
140 } 138 }
141 139
142 #endif 140 #endif
141
142 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/eax/eax_init.c,v $ */
143 /* $Revision: 1.4 $ */
144 /* $Date: 2005/05/05 14:35:58 $ */