mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-22 19:43:11 +00:00
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:
1 parent
97b05b1dbf
commit
1671e3b126
1 file changed
-1
@@ -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