Class SessionKeyAndNonce

java.lang.Object
net.i2p.data.SimpleDataStructure
net.i2p.data.SessionKey
net.i2p.router.crypto.ratchet.SessionKeyAndNonce
All Implemented Interfaces:
DataStructure

class SessionKeyAndNonce extends SessionKey
A session key is 32 bytes of data. Nonce should be 65535 or less. This is what is returned from RatchetTagSet.consume(). RatchetSKM puts it in a RatchetEntry and returns it to ECIESAEADEngine.
Since:
0.9.44
  • Constructor Details

    • SessionKeyAndNonce

      public SessionKeyAndNonce(byte[] data, int nonce)
      For outbound Existing Session
    • SessionKeyAndNonce

      public SessionKeyAndNonce(byte[] data, int id, int nonce, PublicKey remoteKey)
      For inbound Existing Session
      Since:
      0.9.46
    • SessionKeyAndNonce

      public SessionKeyAndNonce(HandshakeState state)
      For New Session Replies
  • Method Details

    • getNonce

      public int getNonce()
      For ES, else 0
    • getID

      public int getID()
      For inbound ES, else 0
      Since:
      0.9.46
    • getRemoteKey

      public PublicKey getRemoteKey()
      For inbound ES, else null. For NSR, use getHansdhakeState().getRemotePublicKey().getPublicKey().
      Since:
      0.9.46
    • getHandshakeState

      public HandshakeState getHandshakeState()
      For inbound NSR only, else null. MUST be cloned before processing NSR.
    • toString

      public String toString()
      Overrides:
      toString in class SimpleDataStructure