pub struct ProtectedAckSession { /* private fields */ }Implementations§
Source§impl ProtectedAckSession
impl ProtectedAckSession
Sourcepub fn from_keys(
send_key: [u8; 32],
recv_key: [u8; 32],
generation: Generation,
) -> Result<Self, QdnfError>
pub fn from_keys( send_key: [u8; 32], recv_key: [u8; 32], generation: Generation, ) -> Result<Self, QdnfError>
Builds ProtectedAckSession from keys.
Sourcepub fn seal_tracked(
&mut self,
aad: &[u8],
plaintext: &mut [u8],
out: &mut [u8],
) -> Result<usize, QdnfError>
pub fn seal_tracked( &mut self, aad: &[u8], plaintext: &mut [u8], out: &mut [u8], ) -> Result<usize, QdnfError>
Seal application bytes and record the allocated packet number.
Sourcepub fn open_tracked(
&mut self,
aad: &[u8],
sealed: &[u8],
out: &mut [u8],
) -> Result<(ProtectedRecv, usize), QdnfError>
pub fn open_tracked( &mut self, aad: &[u8], sealed: &[u8], out: &mut [u8], ) -> Result<(ProtectedRecv, usize), QdnfError>
Open a sealed packet. Replay/duplicates are dropped without closing.
Sourcepub fn apply_ack(&mut self, ack: &AckFrame) -> Result<usize, QdnfError>
pub fn apply_ack(&mut self, ack: &AckFrame) -> Result<usize, QdnfError>
Apply authenticated ACK ranges to in-flight ownership. Unknown PNs that are not in the sent table are ignored per range member that was never sent; a range that matches nothing is Malformed.
Sourcepub fn retransmit(
&mut self,
aad: &[u8],
plaintext: &mut [u8],
out: &mut [u8],
) -> Result<usize, QdnfError>
pub fn retransmit( &mut self, aad: &[u8], plaintext: &mut [u8], out: &mut [u8], ) -> Result<usize, QdnfError>
Retransmit the same application bytes under a fresh packet number.
Sourcepub fn install_update(
&mut self,
send_key: [u8; 32],
recv_key: [u8; 32],
generation: Generation,
) -> Result<(), QdnfError>
pub fn install_update( &mut self, send_key: [u8; 32], recv_key: [u8; 32], generation: Generation, ) -> Result<(), QdnfError>
Install new traffic keys via PacketProtection::install_update.
The immediately previous generation remains openable during overlap.
Sent-table ownership starts a new packet-number space.
Auto Trait Implementations§
impl Freeze for ProtectedAckSession
impl RefUnwindSafe for ProtectedAckSession
impl Send for ProtectedAckSession
impl Sync for ProtectedAckSession
impl Unpin for ProtectedAckSession
impl UnsafeUnpin for ProtectedAckSession
impl UnwindSafe for ProtectedAckSession
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more