Upgrade libtomcrypt
This commit is contained in:
@@ -24,12 +24,6 @@ int ocb_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned char *ct)
|
||||
LTC_ARGCHK(ocb != NULL);
|
||||
LTC_ARGCHK(pt != NULL);
|
||||
LTC_ARGCHK(ct != 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;
|
||||
}
|
||||
|
||||
/* compute checksum */
|
||||
for (x = 0; x < ocb->block_len; x++) {
|
||||
@@ -43,7 +37,7 @@ int ocb_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned char *ct)
|
||||
for (x = 0; x < ocb->block_len; x++) {
|
||||
tmp[x] = pt[x] ^ Z[x];
|
||||
}
|
||||
if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(tmp, ct, &ocb->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_encrypt_block(tmp, ct, &ocb->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
for (x = 0; x < ocb->block_len; x++) {
|
||||
|
||||
Reference in New Issue
Block a user