diff --git a/router/java/src/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java b/router/java/src/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java index 6d50e1de42a0c1d2043d1ac831d69a001d6db7e6..20a239d15785e97c9952f320a245da92a575a864 100644 --- a/router/java/src/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java +++ b/router/java/src/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java @@ -41,8 +41,6 @@ public class ChaChaPolyCipherState implements CipherState { private final byte[] polyKey; private long n; private boolean haskey; - // I2P debug to be removed - private byte[] initialKey; /** * Constructs a new cipher state for the "ChaChaPoly" algorithm. @@ -82,9 +80,6 @@ public class ChaChaPolyCipherState implements CipherState { @Override public void initializeKey(byte[] key, int offset) { - // I2P debug to be removed - initialKey = new byte[32]; - System.arraycopy(key, 0, initialKey, 0, 32); ChaChaCore.initKey256(input, key, offset); n = 0; haskey = true; @@ -293,16 +288,6 @@ public class ChaChaPolyCipherState implements CipherState { n = nonce; } - /** - * I2P debug to be removed - * @return null if none yet - */ - public byte[] getKey() { - if (!haskey) - return null; - return initialKey; - } - /** * I2P debug */ @@ -312,13 +297,6 @@ public class ChaChaPolyCipherState implements CipherState { buf.append(" Cipher State:\n" + " nonce: "); buf.append(n); - buf.append("\n" + - " init key: "); - // I2P debug to be removed - if (haskey) - buf.append(net.i2p.data.Base64.encode(initialKey)); - else - buf.append("null"); buf.append("\n poly key: "); if (haskey) buf.append(net.i2p.data.Base64.encode(polyKey)); diff --git a/router/java/src/com/southernstorm/noise/protocol/CipherState.java b/router/java/src/com/southernstorm/noise/protocol/CipherState.java index 66fd8bda57c97ffc5422bc93d8cc938fda3290b6..3168139f4b32873deb88e66943323cb7c3777d2e 100644 --- a/router/java/src/com/southernstorm/noise/protocol/CipherState.java +++ b/router/java/src/com/southernstorm/noise/protocol/CipherState.java @@ -155,9 +155,4 @@ public interface CipherState extends Destroyable { * value goes backwards then security may be compromised. */ void setNonce(long nonce); - - /** - * I2P debug to be removed - */ - public byte[] getKey(); } diff --git a/router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java b/router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java index 53221104df05d2d68e8e744fe487f3004edf1120..daf339d07cdcecc38e71bbc13b63fb8afdd2582e 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java +++ b/router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java @@ -901,9 +901,6 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa CipherStatePair ckp = _handshakeState.split(); CipherState rcvr = ckp.getReceiver(); CipherState sender = ckp.getSender(); - // debug, to be removed - byte[] k_ab = rcvr.getKey(); - byte[] k_ba = sender.getKey(); // Data phase SipHash keys byte[][] sipkeys = generateSipHashKeys(_context, _handshakeState); @@ -918,8 +915,6 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa } else { if (_log.shouldDebug()) { _log.debug("Finished establishment for " + this + - "\nGenerated ChaCha key for A->B: " + Base64.encode(k_ab) + - "\nGenerated ChaCha key for B->A: " + Base64.encode(k_ba) + "\nGenerated SipHash key for A->B: " + Base64.encode(sip_ab) + "\nGenerated SipHash key for B->A: " + Base64.encode(sip_ba)); } diff --git a/router/java/src/net/i2p/router/transport/ntcp/OutboundNTCP2State.java b/router/java/src/net/i2p/router/transport/ntcp/OutboundNTCP2State.java index 56d50f74f2441476b3adf91a931b09a765ed53f1..64beb3a24ec697d03c7e477da25513221a2fa6e7 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/OutboundNTCP2State.java +++ b/router/java/src/net/i2p/router/transport/ntcp/OutboundNTCP2State.java @@ -404,9 +404,6 @@ class OutboundNTCP2State implements EstablishState { CipherStatePair ckp = _handshakeState.split(); CipherState rcvr = ckp.getReceiver(); CipherState sender = ckp.getSender(); - // debug, to be removed - byte[] k_ab = sender.getKey(); - byte[] k_ba = rcvr.getKey(); // Data phase SipHash keys byte[][] sipkeys = generateSipHashKeys(_context, _handshakeState); @@ -415,8 +412,6 @@ class OutboundNTCP2State implements EstablishState { if (_log.shouldDebug()) { _log.debug("Finished establishment for " + this + - "\nGenerated ChaCha key for A->B: " + Base64.encode(k_ab) + - "\nGenerated ChaCha key for B->A: " + Base64.encode(k_ba) + "\nGenerated SipHash key for A->B: " + Base64.encode(sip_ab) + "\nGenerated SipHash key for B->A: " + Base64.encode(sip_ba)); }