Companion

Properties

Link copied to clipboard

RFC 8613 §7.2.1: Sender Sequence Numbers stay below 2^40, the 5-byte Partial IV range.

Functions

Link copied to clipboard
suspend fun derive(parameters: SecurityContextParameters, crypto: CryptoBackend, sequenceStore: SequenceNumberStore, persistInterval: Long = 64, freshness: FreshnessPolicy = FreshnessPolicy.AUTO, identity: SecurityIdentity? = null): SecurityContext

Derives Sender Key, Recipient Key and Common IV with HKDF (RFC 8613 §3.2.1) and restores the Sender Sequence Number from sequenceStore (Appendix B.1.1).