diff --git a/core/java/src/net/i2p/crypto/ElGamalAESEngine.java b/core/java/src/net/i2p/crypto/ElGamalAESEngine.java index 735a0d120..52254c281 100644 --- a/core/java/src/net/i2p/crypto/ElGamalAESEngine.java +++ b/core/java/src/net/i2p/crypto/ElGamalAESEngine.java @@ -461,6 +461,8 @@ public class ElGamalAESEngine { * No new session key * No current tag (encrypt as new session) * + * @param tagsForDelivery session tags to be associated with the key or null; + * 200 max enforced at receiver * @deprecated unused */ public byte[] encrypt(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery, long paddedSize) { @@ -498,6 +500,8 @@ public class ElGamalAESEngine { * - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0 * * + * @param tagsForDelivery session tags to be associated with the key or null; + * 200 max enforced at receiver */ private byte[] encryptNewSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery, SessionKey newKey, long paddedSize) { @@ -564,6 +568,8 @@ public class ElGamalAESEngine { * - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0 * * + * @param tagsForDelivery session tags to be associated with the key or null; + * 200 max enforced at receiver */ private byte[] encryptExistingSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery, SessionTag currentTag, SessionKey newKey, long paddedSize) { @@ -619,12 +625,20 @@ public class ElGamalAESEngine { * * * Note: package private for ElGamalTest.testAES() + * + * @param tagsForDelivery session tags to be associated with the key or null; + * 200 max enforced at receiver */ final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey, long paddedSize) { return encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize, 0); } + /** + * + * @param tagsForDelivery session tags to be associated with the key or null; + * 200 max enforced at receiver + */ private final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey, long paddedSize, int prefixBytes) { //_log.debug("iv for encryption: " + DataHelper.toString(iv, 16)); diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index 408affb0f..f408489e2 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -393,7 +393,8 @@ public class DataHelper { * A more efficient Properties.load * * Some of the other differences: - * - This does not process or drop backslashes + * - UTF-8 encoding, not ISO-8859-1 + * - No escaping! This does not process or drop backslashes * - '#' or ';' starts a comment line, but '!' does not * - Leading whitespace is not trimmed * - '=' is the only key-termination character (not ':' or whitespace) diff --git a/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java b/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java index ec34b005a..cdbbd543f 100644 --- a/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java +++ b/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java @@ -172,17 +172,17 @@ public class GarlicMessageBuilder { /** * used by TestJob and directly above + * and for encrypting DatabaseLookupMessages * * @param ctx scope * @param config how/what to wrap * @param wrappedKey unused - why?? - * @param wrappedTags Output parameter that will be filled with the sessionTags used. - If non-empty on return you must call skm.tagsDelivered() when sent - and then call skm.tagsAcked() or skm.failTags() later. + * @param wrappedTags New tags to be sent along with the message. + * 200 max enforced at receiver; null OK * @param target public key of the location being garlic routed to (may be null if we * know the encryptKey and encryptTag) - * @param encryptKey sessionKey used to encrypt the current message - * @param encryptTag sessionTag used to encrypt the current message + * @param encryptKey sessionKey used to encrypt the current message, non-null + * @param encryptTag sessionTag used to encrypt the current message, null to force ElG * @throws IllegalArgumentException on error */ public static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set wrappedTags,