comparison libtomcrypt/src/encauth/eax/eax_done.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 9
12 /** 10 /**
13 @file eax_done.c 11 @file eax_done.c
14 EAX implementation, terminate session, by Tom St Denis 12 EAX implementation, terminate session, by Tom St Denis
49 } 47 }
50 48
51 /* finish ctomac */ 49 /* finish ctomac */
52 len = MAXBLOCKSIZE; 50 len = MAXBLOCKSIZE;
53 if ((err = omac_done(&eax->ctomac, ctmac, &len)) != CRYPT_OK) { 51 if ((err = omac_done(&eax->ctomac, ctmac, &len)) != CRYPT_OK) {
54 goto LBL_ERR; 52 goto LBL_ERR;
55 } 53 }
56 54
57 /* finish headeromac */ 55 /* finish headeromac */
58 56
59 /* note we specifically don't reset len so the two lens are minimal */ 57 /* note we specifically don't reset len so the two lens are minimal */
60 58
61 if ((err = omac_done(&eax->headeromac, headermac, &len)) != CRYPT_OK) { 59 if ((err = omac_done(&eax->headeromac, headermac, &len)) != CRYPT_OK) {
62 goto LBL_ERR; 60 goto LBL_ERR;
63 } 61 }
64 62
65 /* terminate the CTR chain */ 63 /* terminate the CTR chain */
66 if ((err = ctr_done(&eax->ctr)) != CRYPT_OK) { 64 if ((err = ctr_done(&eax->ctr)) != CRYPT_OK) {
67 goto LBL_ERR; 65 goto LBL_ERR;
87 return err; 85 return err;
88 } 86 }
89 87
90 #endif 88 #endif
91 89
92 /* $Source$ */ 90 /* ref: $Format:%D$ */
93 /* $Revision$ */ 91 /* git commit: $Format:%H$ */
94 /* $Date$ */ 92 /* commit time: $Format:%ai$ */