java.lang.Object
net.i2p.router.crypto.ratchet.SplitKeys

class SplitKeysextends Object
Container for Noise protocol split keys that prevents duplicate HKDF calculations by sharing derived keys between engine and session key manager components.
  • Field Details

    • ZEROLEN

      private static final byte[] ZEROLEN
      A shared empty array, so no allocation is needed for an empty value
    • ck

      public final SessionKey ck
      The chain key.
    • k_ab

      public final SessionKey k_ab
      The session key for direction {A to B}.
    • k_ba

      public final SessionKey k_ba
      The session key for direction {B to A}.
  • Constructor Details

    • SplitKeys

      public SplitKeys(HandshakeState state, HKDF hkdf)
      Derives ck, k_ab, k_ba from Noise handshake split stage.
      Parameters:
      state - the handshake state supplying the chaining key to be expanded
      hkdf - the HKDF expanding that key into the two directional session keys