EdhocSession
The output of a completed EDHOC session (RFC 9528 §4.1.3, §4.2): PRK_out, the EDHOC_Exporter for application keys, EDHOC_KeyUpdate, and what was negotiated and authenticated.
The Initiator gets its session after creating message_3, the Responder after verifying it. RFC 9528 §5.4.2 advises the Initiator not to persist the keys until message_4 or a protected message from the Responder has been verified.
Not thread-safe: keyUpdate replaces the keys in place, so callers serialize access. toString() never shows key material.
After destroy, every call that reads or derives key material throws IllegalStateException: the wiped keys would otherwise derive predictable OSCORE secrets.
Properties
The selected cipher suite; its application algorithms are what OSCORE uses.
C_I, chosen by the Initiator.
The authentication method of the session.
The connection identifier this endpoint chose, which with OSCORE is its Recipient ID (RFC 9528 §3.3.3).
The connection identifier the peer chose, which with OSCORE is this endpoint's Sender ID.
The peer's credential, which the session authenticated.
The peer's ID_CRED_x as received.
C_R, chosen by the Responder.
Functions
EDHOC_KeyUpdate (RFC 9528 Appendix H): PRK_out becomes EDHOC_KDF( PRK_out, 11, context, hash_length ) and PRK_exporter is derived anew. The old keys are wiped, which is what gives forward secrecy; keys already exported from them are the caller's to delete. Both parties must use the same context.
The OSCORE Master Salt, EDHOC_Exporter( 1, h'', oscore_salt_length ), 8 bytes by default (RFC 9528 Appendix A.1).
The OSCORE Master Secret, EDHOC_Exporter( 0, h'', oscore_key_length ) (RFC 9528 Appendix A.1). The default length is the key length of the application AEAD.
A copy of PRK_exporter = EDHOC_KDF( PRK_out, 10, h'', hash_length ) (RFC 9528 §4.1.3). Secret.