GcmBlockMulEnhancement

Enum GcmBlockMulEnhancement 

Source
pub enum GcmBlockMulEnhancement {
    None,
    M0TableAndRTable,
    M4BitTables,
    MTables,
}
Expand description

Block multiplication enhancement variants used for GHASH calculation. Which in turn used for calculation of authentication tag. https://luca-giuzzi.unibs.it/corsi/Support/papers-cryptography/gcm-spec.pdf None - regular multiplication. Requires just 16B (aes cipher key) per session, i.e. cca 67M sessions per 1GB of memory worst throughput M0TableAndRTable - cca 3.7 times faster then regular multiplication. Needs 4096Bytes per key, i.e. cca 262K key per 1GB of memory. M4BitTables - cca 6.9 times faster then regular multiplication. Needs 8192Bytes per key, i.e. cca 131K keys per 1GB of memory. MTables - cca 9 times faster then regular multiplication. Needs 65535Bytes per key, i.e. cca 16,4K keys per 1GB of memory.

Variants§

§

None

§

M0TableAndRTable

§

M4BitTables

§

MTables

Implementations§

Source§

impl GcmBlockMulEnhancement

Source

pub fn to_mul_fn(&self, cipher_key: &[u8]) -> Box<GcmBlockMulFn>

Converts BlockMulEnhancement to a Box<BlockMulFn> function which represents block multiplication and needs to be passed to encrypt and decrypt functions within a session.

  • block_mul_enhancement BlockMulEnhancement base on time-memory tradeoffs
  • cipher_key cipher key of underlying block cipher protocol i.e. AES

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.