[−][src]Struct arx_kw::e::E
The ARX-8-2-4-E variant. Has a key length of 48 bytes and a maximum input length of 64 bytes.
See the ArxKW
trait for usage.
Implementations
impl E
[src]
#[must_use]pub const fn key_length() -> usize
[src]
The length in bytes of the secret key used by this variant of ARX-KW
#[must_use]pub const fn max_input_length() -> usize
[src]
Returns the maximum length in bytes for the input to G::encrypt
and G::decrypt
This is the same for the plaintext input when encrypting and ciphertext input when decrypting, but is not the same for all variants of ARX-KW. Specifically, the E and G variants are defined only for plaintext/ciphertext inputs of no more than 512 bits, the length of a ChaCha Block, whereas EX and GX do not have this limitation.
Trait Implementations
impl ArxKW for E
[src]
type Key = [u8; 48]
The type of data which is used as a key for the type that impl
s this trait.
Note that this is not the same for all variants of ARX-KW. all of the currently-defined variants use the same-sized keys Read more
pub fn encrypt(
key: &Self::Key,
plaintext: &[u8]
) -> Result<(Vec<u8>, AuthTag), ArxKwError>
[src]
key: &Self::Key,
plaintext: &[u8]
) -> Result<(Vec<u8>, AuthTag), ArxKwError>
pub fn decrypt(
key: &Self::Key,
ciphertext: &[u8],
authentication_tag: &AuthTag
) -> Result<Vec<u8>, ArxKwError>
[src]
key: &Self::Key,
ciphertext: &[u8],
authentication_tag: &AuthTag
) -> Result<Vec<u8>, ArxKwError>
pub fn encrypt_blob(
key: &Self::Key,
plaintext: &[u8]
) -> Result<Vec<u8>, ArxKwError>
[src]
key: &Self::Key,
plaintext: &[u8]
) -> Result<Vec<u8>, ArxKwError>
pub fn decrypt_blob(key: &Self::Key, blob: &[u8]) -> Result<Vec<u8>, ArxKwError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for E
[src]
impl Send for E
[src]
impl Sync for E
[src]
impl Unpin for E
[src]
impl UnwindSafe for E
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,