pub struct SecurityAssociation {
pub spi: u16,
pub service_type: ServiceType,
pub iv_len: u8,
pub sn_len: u8,
pub pl_len: u8,
pub mac_len: u8,
pub sequence_number: u64,
pub sequence_window: u64,
pub auth_mask: Vec<u8, 2048>,
}Expand description
Configuration for a Security Association (SA).
An SA defines the security context for a virtual channel or MAP. Both sender and receiver must share identical SA parameters.
Fields§
§spi: u16Security Parameter Index (1-65534; 0 and 65535 reserved).
service_type: ServiceTypeThe cryptographic service type.
iv_len: u8Length of the IV field in the Security Header (0-32 bytes).
sn_len: u8Length of the Sequence Number field (0-8 bytes).
pl_len: u8Length of the Pad Length field (0-2 bytes).
mac_len: u8Length of the MAC field in the Security Trailer (0-64 bytes).
sequence_number: u64Current anti-replay sequence number (sender: next to send).
sequence_window: u64Sequence number window for the receiver.
auth_mask: Vec<u8, 2048>Authentication bit mask (applied before MAC computation). Sized to cover the largest expected frame.
Implementations§
Source§impl SecurityAssociation
impl SecurityAssociation
Sourcepub fn header_size(&self) -> usize
pub fn header_size(&self) -> usize
Total size of the Security Header for this SA.
Sourcepub fn trailer_size(&self) -> usize
pub fn trailer_size(&self) -> usize
Total size of the Security Trailer for this SA.
Trait Implementations§
Source§impl Clone for SecurityAssociation
impl Clone for SecurityAssociation
Source§fn clone(&self) -> SecurityAssociation
fn clone(&self) -> SecurityAssociation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more