pub struct KeyMaterialRefresh {
pub period: PacketCount,
pub pre_announcement_period: PacketCount,
}
Fields
period: PacketCount
SRTO_KMREFRESHRATE KM Refresh Period specifies the number of packets to be sent before switching to the new SEK
The recommended KM Refresh Period is after 2^25 packets encrypted with the same SEK are sent.
The number of packets to be transmitted after which the Stream Encryption Key (SEK), used to encrypt packets, will be switched to the new one. Note that the old and new keys live in parallel for a certain period of time (see SRTO_KMPREANNOUNCE) before and after the switchover.
Having a preannounce period before switchover ensures the new SEK is installed at the receiver before the first packet encrypted with the new SEK is received. The old key remains active after switchover in order to decrypt packets that might still be in flight, or packets that have to be retransmitted.
Default value: 0 - corresponds to 16777216 packets (2^24 or 0x1000000).
pre_announcement_period: PacketCount
SRTO_KMPREANNOUNCE KM Pre-Announcement Period specifies when a new key is announced in a number of packets before key switchover. The same value is used to determine when to decommission the old key after switchover.
The recommended KM Pre-Announcement Period is 4000 packets (i.e. a new key is generated, wrapped, and sent at 2^25 minus 4000 packets; the old key is decommissioned at 2^25 plus 4000 packets).
The interval (defined in packets) between when a new Stream Encrypting Key (SEK) is sent and when switchover occurs. This value also applies to the subsequent interval between when switchover occurs and when the old SEK is decommissioned.
At SRTO_KMPREANNOUNCE packets before switchover the new key is sent (repeatedly, if necessary, until it is confirmed by the receiver).
At the switchover point (see SRTO_KMREFRESHRATE), the sender starts encrypting and sending packets using the new key. The old key persists in case it is needed to decrypt packets that were in the flight window, or retransmitted packets.
The old key is decommissioned at SRTO_KMPREANNOUNCE packets after switchover.
The allowed range for this value is between 1 and half of the current value of SRTO_KMREFRESHRATE. The minimum value should never be less than the flight window SRTO_FC (i.e. the number of packets that have already left the sender but have not yet arrived at the receiver).
The value of SRTO_KMPREANNOUNCE must not exceed (SRTO_KMREFRESHRATE - 1) / 2`.
Default value: 2^12
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for KeyMaterialRefresh
impl Send for KeyMaterialRefresh
impl Sync for KeyMaterialRefresh
impl Unpin for KeyMaterialRefresh
impl UnwindSafe for KeyMaterialRefresh
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.