diff options
Diffstat (limited to 'src/ltc/encauth/ocb3/ocb3_decrypt_last.c')
-rw-r--r-- | src/ltc/encauth/ocb3/ocb3_decrypt_last.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ltc/encauth/ocb3/ocb3_decrypt_last.c b/src/ltc/encauth/ocb3/ocb3_decrypt_last.c index cb0b6ead..2b5158c3 100644 --- a/src/ltc/encauth/ocb3/ocb3_decrypt_last.c +++ b/src/ltc/encauth/ocb3/ocb3_decrypt_last.c @@ -66,10 +66,11 @@ int ocb3_decrypt_last(ocb3_state *ocb, const unsigned char *ct, unsigned long ct /* Checksum_* = Checksum_m xor (P_* || 1 || zeros(127-bitlen(P_*))) */ ocb3_int_xor_blocks(ocb->checksum, ocb->checksum, pt+full_blocks_len, last_block_len); for(x=last_block_len; x<ocb->block_len; x++) { - if (x == last_block_len) + if (x == last_block_len) { ocb->checksum[x] ^= 0x80; - else + } else { ocb->checksum[x] ^= 0x00; + } } /* Tag = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) xor HASH(K,A) */ |