Packages that use HandshakeState
Package
Description
Provides classes for communicating via the Noise protocol.
The Double Ratchet with X25519 key agreement and ECIES hybrid encryption, used by the NTCP2 and SSU transports for session encryption.
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 HandshakeState in com.southernstorm.noise.protocol
Methods in com.southernstorm.noise.protocol that return HandshakeStateConstructors in com.southernstorm.noise.protocol with parameters of type HandshakeStateModifierConstructorDescriptionprotectedCopy constructor for cloningUses of HandshakeState in net.i2p.router.crypto.ratchet
Fields in net.i2p.router.crypto.ratchet declared as HandshakeStateModifier and TypeFieldDescriptionprivate final HandshakeStateRatchetSKM.OutboundSession._stateCurrent state of the handshake.private final HandshakeStateRatchetTagSet._stateHandshake state, set for NSR only.private final HandshakeStateSessionKeyAndNonce._stateThe handshake state the keys came from.Methods in net.i2p.router.crypto.ratchet that return HandshakeStateModifier and TypeMethodDescriptionRatchetSKM.OutboundSession.getHandshakeState()Original outbound state, null for inbound.RatchetTagSet.getHandshakeState()For inbound/outbound NSR only, else null.SessionKeyAndNonce.getHandshakeState()For inbound NSR only, else null.Methods in net.i2p.router.crypto.ratchet with parameters of type HandshakeStateModifier and TypeMethodDescription(package private) booleanRatchetSKM.createSession(PublicKey target, Destination d, HandshakeState state, ReplyCallback callback) Inbound or outbound.private CloveSetECIESAEADEngine.decryptNewSessionReply(byte[] tag, byte[] data, HandshakeState oldState, RatchetSKM keyManager) Scenario 2: New Session Reply Messageprivate byte[]ECIESAEADEngine.encryptNewSessionReply(CloveSet cloves, PublicKey target, HandshakeState state, RatchetSessionTag currentTag, RatchetSKM keyManager, ReplyCallback callback) Scenario 2: New Session Reply Message(package private) static RatchetSKM.OutboundSessionRatchetSKM.takePendingFor(List<RatchetSKM.OutboundSession> pending, HandshakeState oldState) Detach the pending session this New Session Reply belongs to, so the caller can promote it outside the map monitor.(package private) voidRatchetSKM.OutboundSession.updateSession(HandshakeState state, ReplyCallback callback, SplitKeys split) Inbound or outbound.(package private) booleanRatchetSKM.updateSession(PublicKey target, HandshakeState oldState, HandshakeState state, ReplyCallback callback, SplitKeys split) Inbound or outbound.Constructors in net.i2p.router.crypto.ratchet with parameters of type HandshakeStateModifierConstructorDescriptionOutboundSession(PublicKey target, Destination d, SessionKey key, HandshakeState state, ReplyCallback callback) Outbound session for the given target.RatchetTagSet(HKDF hkdf, HandshakeState state, SessionKey rootKey, SessionKey data, long date) Outbound NSR Tagset.privateRatchetTagSet(HKDF hkdf, SessionTagListener lsnr, HandshakeState state, PublicKey remoteKey, SessionKey rootKey, SessionKey data, long date, long timeout, int tagsetid, int keyid, boolean isInbound, int minSize, int maxSize) Tag set for a ratchet session with the given keys and sizes.RatchetTagSet(HKDF hkdf, SessionTagListener lsnr, HandshakeState state, SessionKey rootKey, SessionKey data, long date, int minSize, int maxSize) Inbound NSR Tagset.SessionKeyAndNonce(HandshakeState state) For New Session Replies.SplitKeys(HandshakeState state, HKDF hkdf) Derives ck, k_ab, k_ba from Noise handshake split stage.Uses of HandshakeState in net.i2p.router.transport.ntcp
Fields in net.i2p.router.transport.ntcp declared as HandshakeStateModifier and TypeFieldDescriptionprivate HandshakeStateInboundEstablishState._handshakeStateNoise protocol handshake state for XK pattern.private final HandshakeStateOutboundNTCP2State._handshakeStateHandshake state for the ratchet keys.Methods in net.i2p.router.transport.ntcp with parameters of type HandshakeStateModifier and TypeMethodDescription(package private) static byte[][]OutboundNTCP2State.generateSipHashKeys(RouterContext ctx, HandshakeState state) KDF for SipHash.Uses of HandshakeState in net.i2p.router.transport.udp
Fields in net.i2p.router.transport.udp declared as HandshakeStateModifier and TypeFieldDescriptionprivate final HandshakeStateInboundEstablishState2._handshakeStateHandshake state for the ratchet keys.private HandshakeStateOutboundEstablishState2._handshakeStateHandshake state for the ratchet keys.Methods in net.i2p.router.transport.udp that return HandshakeStateModifier and TypeMethodDescriptionInboundEstablishState2.getHandshakeState()Read the handshake progress for this session.OutboundEstablishState2.getHandshakeState()Current handshake state.Methods in net.i2p.router.transport.udp with parameters of type HandshakeStateModifier and TypeMethodDescriptionprivate voidPacketBuilder2.encryptSessionConfirmed(UDPPacket packet, HandshakeState state, int mtu, int numFragments, int addPadding, boolean isIPv6, byte[] hdrKey1, byte[] hdrKey2, SSU2Payload.RIBlock riblock, EstablishmentManager.Token token) If numFragments larger than 1, we do NOT encrypt the header here, that's caller's responsibility.private voidPacketBuilder2.encryptSessionCreated(UDPPacket packet, HandshakeState state, int mtu, byte[] hdrKey1, byte[] hdrKey2, long relayTag, EstablishmentManager.Token token, byte[] ip, int port, int version) Encrypt and write out message 2 of the handshake, the SessionCreated.private voidPacketBuilder2.encryptSessionRequest(UDPPacket packet, HandshakeState state, boolean isIPv6, int mtu, byte[] hdrKey1, byte[] hdrKey2, boolean needIntro, int version, Hash bob) Encrypt and write out message 1 of the handshake, the SessionRequest.