java.lang.Object
net.i2p.router.crypto.ratchet.SplitKeys
Container for Noise protocol split keys that prevents duplicate HKDF calculations by sharing derived keys between engine and session key manager components.
Field Summary
Modifier and TypeFieldDescriptionfinal SessionKeyThe chain key.final SessionKeyThe session key for direction {A to B}.final SessionKeyThe session key for direction {B to A}.private static final byte[]A shared empty array, so no allocation is needed for an empty valueConstructor Summary
ConstructorsConstructorDescriptionSplitKeys(HandshakeState state, HKDF hkdf) Derives ck, k_ab, k_ba from Noise handshake split stage.Method Summary
Field Details
ZEROLEN
private static final byte[] ZEROLENA shared empty array, so no allocation is needed for an empty valueck
The chain key.k_ab
The session key for direction {A to B}.k_ba
The session key for direction {B to A}.
Constructor Details
SplitKeys
Derives ck, k_ab, k_ba from Noise handshake split stage.- Parameters:
state- the handshake state supplying the chaining key to be expandedhkdf- the HKDF expanding that key into the two directional session keys