pub struct GcmVt<C> { /* private fields */ }Expand description
Variable-time Galois/Counter Mode (GCM) reference path.
This keeps the historical GHASH implementation for comparison and legacy
profiling. Use Gcm for the default constant-time software GHASH path.
It enforces the same SP 800-38D payload bound as Gcm:
(2^32 - 2) counter blocks (68_719_476_704 bytes) per call.
Implementations§
Source§impl<C: BlockCipher> GcmVt<C>
impl<C: BlockCipher> GcmVt<C>
Sourcepub fn compute_tag(
&self,
nonce: &[u8],
aad: &[u8],
ciphertext: &[u8],
) -> [u8; 16]
pub fn compute_tag( &self, nonce: &[u8], aad: &[u8], ciphertext: &[u8], ) -> [u8; 16]
Compute the GCM authentication tag over aad and ciphertext.
Panics if ciphertext.len() exceeds the SP 800-38D per-call bound of
68_719_476_704 bytes.
Trait Implementations§
Source§impl<C: BlockCipher> Aead for GcmVt<C>
impl<C: BlockCipher> Aead for GcmVt<C>
Source§fn encrypt_in_place(
&self,
nonce: &[u8],
aad: &[u8],
data: &mut [u8],
) -> Self::Tag
fn encrypt_in_place( &self, nonce: &[u8], aad: &[u8], data: &mut [u8], ) -> Self::Tag
Encrypt
data in place and return its authentication tag.Source§fn decrypt_in_place(
&self,
nonce: &[u8],
aad: &[u8],
data: &mut [u8],
tag: &Self::Tag,
) -> bool
fn decrypt_in_place( &self, nonce: &[u8], aad: &[u8], data: &mut [u8], tag: &Self::Tag, ) -> bool
Decrypt
data in place after authenticating tag.Auto Trait Implementations§
impl<C> Freeze for GcmVt<C>where
C: Freeze,
impl<C> RefUnwindSafe for GcmVt<C>where
C: RefUnwindSafe,
impl<C> Send for GcmVt<C>where
C: Send,
impl<C> Sync for GcmVt<C>where
C: Sync,
impl<C> Unpin for GcmVt<C>where
C: Unpin,
impl<C> UnsafeUnpin for GcmVt<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for GcmVt<C>where
C: UnwindSafe,
Blanket Implementations§
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