forked from I2P_Developers/i2p.i2p
Fix bad size estimate when tags are included in the AES block,
resulting in trailing zeros after the random padding in the unencrypted AES data block. The number of zeros equaled the number of tags included (typ. 6 or 40). As the data size is rounded up to the next multiple of 16, this increased the size of the data by 0, 16, 32, or 48 bytes when tags were included. Bug introduced 2004-10-30.
This commit is contained in:
@@ -599,7 +599,6 @@ public class ElGamalAESEngine {
|
||||
//_log.debug("Encrypting AES");
|
||||
if (tagsForDelivery == null) tagsForDelivery = Collections.EMPTY_SET;
|
||||
int size = 2 // sizeof(tags)
|
||||
+ tagsForDelivery.size()
|
||||
+ SessionTag.BYTE_LENGTH*tagsForDelivery.size()
|
||||
+ 4 // payload length
|
||||
+ Hash.HASH_LENGTH
|
||||
|
Reference in New Issue
Block a user