Upgrade libtomcrypt
This commit is contained in:
@@ -32,14 +32,7 @@ int ocb3_decrypt(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen,
|
||||
LTC_ARGCHK(ct != NULL);
|
||||
LTC_ARGCHK(pt != NULL);
|
||||
|
||||
if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (ctlen % ocb->block_len) { /* ctlen has to bu multiple of block_len */
|
||||
if (ctlen % ocb->block_len) { /* ctlen has to be multiple of block_len */
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
@@ -55,7 +48,7 @@ int ocb3_decrypt(ocb3_state *ocb, const unsigned char *ct, unsigned long ctlen,
|
||||
ocb3_int_xor_blocks(tmp, ct_b, ocb->Offset_current, ocb->block_len);
|
||||
|
||||
/* decrypt */
|
||||
if ((err = cipher_descriptor[ocb->cipher].ecb_decrypt(tmp, tmp, &ocb->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_decrypt_block(tmp, tmp, &ocb->key)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user