Packages that use CipherState
Package
Description
Provides classes for communicating via the Noise protocol.
NTCP2, the TCP transport: framed, ratchet-encrypted and mutually authenticated connections between routers.
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Uses of CipherState in com.southernstorm.noise.protocol
Classes in com.southernstorm.noise.protocol that implement CipherStateModifier and TypeClassDescriptionclassImplements the ChaChaPoly cipher for Noise.Fields in com.southernstorm.noise.protocol declared as CipherStateModifier and TypeFieldDescriptionprivate final CipherStateSymmetricState.cipherThe cipher state, unused until the handshake ends.private CipherStateCipherStatePair.recvCipher protecting incoming messages.private CipherStateCipherStatePair.sendCipher protecting outgoing messages.Methods in com.southernstorm.noise.protocol that return CipherStateModifier and TypeMethodDescriptionCipherState.clone()Creates a clone of this cipher state.static CipherStateNoise.createCipher(String name) Creates a cipher object from its Noise protocol name.ChaChaPolyCipherState.fork(byte[] key, int offset) CipherState.fork(byte[] key, int offset) Creates a new instance of this cipher and initializes it with a key.CipherStatePair.getReceiver()Gets the CipherState to use to receive packets from the remote party.CipherStatePair.getSender()Gets the CipherState to use to send packets to the remote party.Constructors in com.southernstorm.noise.protocol with parameters of type CipherStateModifierConstructorDescriptionCipherStatePair(CipherState sender, CipherState receiver) Constructs a pair of CipherState objects.Uses of CipherState in net.i2p.router.transport.ntcp
Fields in net.i2p.router.transport.ntcp declared as CipherStateModifier and TypeFieldDescriptionprivate final CipherStateNTCPConnection.NTCP2ReadState._rcvrCipher state for inbound data.private CipherStateNTCPConnection._senderCipher state for outbound data.Methods in net.i2p.router.transport.ntcp with parameters of type CipherStateModifier and TypeMethodDescription(package private) voidNTCPConnection.failInboundEstablishment(CipherState sender, byte[] sip_ba, int reason) We are Bob.private voidNTCPConnection.finishEstablishment(CipherState sender, CipherState receiver, byte[] sip_send, byte[] sip_recv, long clockSkew) We are Alice or Bob.(package private) voidNTCPConnection.finishInboundEstablishment(CipherState sender, CipherState receiver, byte[] sip_ba, byte[] sip_ab, long clockSkew, NTCP2Options hisPadding) We are Bob.(package private) voidNTCPConnection.finishOutboundEstablishment(CipherState sender, CipherState receiver, byte[] sip_ab, byte[] sip_ba, long clockSkew) We are Alice.Constructors in net.i2p.router.transport.ntcp with parameters of type CipherStateModifierConstructorDescriptionNTCP2ReadState(CipherState rcvr, byte[] keyData) NTCP2 read state initialized from the given key data.Uses of CipherState in net.i2p.router.transport.udp
Fields in net.i2p.router.transport.udp declared as CipherStateModifier and TypeFieldDescriptionprivate final CipherStatePeerState2._rcvChaChaCha20 state for decrypting received packets.private final CipherStatePeerStateDestroyed._rcvChaChaCha20 state for decrypting received packets.private final CipherStatePeerState2._sendChaChaCha20 state for encrypting sent packets.private final CipherStatePeerStateDestroyed._sendChaChaCha20 state for encrypting sent packets.Methods in net.i2p.router.transport.udp that return CipherStateModifier and TypeMethodDescription(package private) CipherStatePeerState2.getRcvCipher()The inbound cipher state, paired with the peer's first header key.PeerState2.getSendCipher()Caller must sync on returned object when encrypting.PeerStateDestroyed.getSendCipher()The send cipher.SSU2Sender.getSendCipher()Cipher to use when sending.Methods in net.i2p.router.transport.udp with parameters of type CipherStateModifier and TypeMethodDescriptionprivate voidPacketBuilder2.encryptDataPacket(UDPPacket packet, CipherState chacha, long n, byte[] hdrKey1, byte[] hdrKey2) Encrypts the payload of one data packet and appends the MAC.Constructors in net.i2p.router.transport.udp with parameters of type CipherStateModifierConstructorDescriptionPeerState2(RouterContext ctx, UDPTransport transport, InetSocketAddress remoteAddress, Hash remotePeer, boolean isInbound, int rtt, CipherState sendCha, CipherState rcvCha, long sendID, long rcvID, byte[] sendHdrKey1, byte[] sendHdrKey2, byte[] rcvHdrKey2) A session with a remote peer over SSU2: the connection ids, the four cipher states and the header encryption keys are all fixed here, so the transport can build one without a separate handshake step.PeerStateDestroyed(RouterContext ctx, UDPTransport transport, RemoteHostId id, long sendID, long rcvID, CipherState sendCha, CipherState rcvCha, byte[] sendKey1, byte[] sendKey2, byte[] rcvKey2, int reason) Direct from IES2, there was never a PS2.