Mercurial > dropbear
comparison src/encauth/eax/eax_init.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05
Import of libtomcrypt 1.05
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 06 Jul 2005 03:53:40 +0000 |
parents | 1c15b283127b |
children |
comparison
equal
deleted
inserted
replaced
191:1c15b283127b | 209:39d5d58461d6 |
---|---|
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 $ */ |