Upgrade libtomcrypt
This commit is contained in:
@@ -29,9 +29,6 @@ int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen)
|
||||
|
||||
LTC_ARGCHK(pmac != NULL);
|
||||
LTC_ARGCHK(in != NULL);
|
||||
if ((err = cipher_is_valid(pmac->cipher_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if ((pmac->buflen > (int)sizeof(pmac->block)) || (pmac->buflen < 0) ||
|
||||
(pmac->block_len > (int)sizeof(pmac->block)) || (pmac->buflen > pmac->block_len)) {
|
||||
@@ -46,7 +43,7 @@ int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen)
|
||||
for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) {
|
||||
*(LTC_FAST_TYPE_PTR_CAST(&Z[y])) = *(LTC_FAST_TYPE_PTR_CAST(&in[y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&pmac->Li[y]));
|
||||
}
|
||||
if ((err = cipher_descriptor[pmac->cipher_idx].ecb_encrypt(Z, Z, &pmac->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_encrypt_block(Z, Z, &pmac->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) {
|
||||
@@ -65,7 +62,7 @@ int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen)
|
||||
for (x = 0; x < (unsigned long)pmac->block_len; x++) {
|
||||
Z[x] = pmac->Li[x] ^ pmac->block[x];
|
||||
}
|
||||
if ((err = cipher_descriptor[pmac->cipher_idx].ecb_encrypt(Z, Z, &pmac->key)) != CRYPT_OK) {
|
||||
if ((err = ecb_encrypt_block(Z, Z, &pmac->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
for (x = 0; x < (unsigned long)pmac->block_len; x++) {
|
||||
|
||||
Reference in New Issue
Block a user