Upgrade libtomcrypt
This commit is contained in:
@@ -33,7 +33,7 @@ int f9_done(f9_state *f9, unsigned char *out, unsigned long *outlen)
|
||||
|
||||
if (f9->buflen != 0) {
|
||||
/* encrypt */
|
||||
cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key);
|
||||
ecb_encrypt_block(f9->IV, f9->IV, &f9->key);
|
||||
f9->buflen = 0;
|
||||
for (x = 0; x < f9->blocksize; x++) {
|
||||
f9->ACC[x] ^= f9->IV[x];
|
||||
@@ -41,13 +41,13 @@ int f9_done(f9_state *f9, unsigned char *out, unsigned long *outlen)
|
||||
}
|
||||
|
||||
/* schedule modified key */
|
||||
if ((err = cipher_descriptor[f9->cipher].setup(f9->akey, f9->keylen, 0, &f9->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_start(f9->cipher, f9->akey, f9->keylen, 0, &f9->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
/* encrypt the ACC */
|
||||
cipher_descriptor[f9->cipher].ecb_encrypt(f9->ACC, f9->ACC, &f9->key);
|
||||
cipher_descriptor[f9->cipher].done(&f9->key);
|
||||
ecb_encrypt_block(f9->ACC, f9->ACC, &f9->key);
|
||||
ecb_done(&f9->key);
|
||||
|
||||
/* extract tag */
|
||||
for (x = 0; x < f9->blocksize && (unsigned long)x < *outlen; x++) {
|
||||
|
||||
Reference in New Issue
Block a user