Remove the software-specific Decrypt16BytesBlock and Encrypt16BytesBlock traits

They assume blocks are encrypted/decrypted one at a time. To avoid one syscall
per block, it is preferable to encrypt/decrypt the data at once.

Change-Id: I795c8f5b7901a1b55fa3b06fa45fe57ab19d06ea
This commit is contained in:
Julien Cretin
2022-01-20 15:10:30 +01:00
committed by Julien Cretin
parent 98c9191679
commit b59df7001f
6 changed files with 65 additions and 109 deletions

View File

@@ -47,15 +47,6 @@ pub trait Hash256: Sized {
}
}
// Traits for block ciphers that operate on 16-byte blocks.
pub trait Encrypt16BytesBlock {
fn encrypt_block(&self, block: &mut [u8; 16]);
}
pub trait Decrypt16BytesBlock {
fn decrypt_block(&self, block: &mut [u8; 16]);
}
// Trait for hash functions that operate on 64-byte input blocks.
pub trait HashBlockSize64Bytes {
type State;