[][src]Crate tea_soft

TEA (Tiny Encryption Algorithm) Block Cipher

The tea-soft crate implements the TEA algorithm completely in software with 16 rounds, 32 rounds, or 64 rounds.

Usage example

use tea_soft::block_cipher::generic_array::GenericArray;
use tea_soft::block_cipher::{BlockCipher, NewBlockCipher};
use tea_soft::Tea32;

let key = GenericArray::from_slice(&[0u8; 16]);
let mut block = GenericArray::clone_from_slice(&[0u8; 8]);
// Initialize cipher
let cipher = tea_soft::Tea32::new(&key);

let block_copy = block.clone();
// Encrypt block in-place
cipher.encrypt_block(&mut block);
// And decrypt it back
cipher.decrypt_block(&mut block);
assert_eq!(block, block_copy);

Modules

block_cipher

Traits used to define functionality of block ciphers.

Macros

bench

Define benchmarks. Add parallel benchmark on top of benchmarks provided by block-cipher

Structs

Tea16

TEA block cipher instance of 16 rounds

Tea32

TEA block cipher instance of 32 rounds

Tea64

TEA block cipher instance of 64 rounds