1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! ARIA-128, ARIA-192, and ARIA-256 block cipher as specified by RFC 5794.
//!
//! [`AriaEngine`] accepts 16-, 24- or 32-byte keys and processes 16-byte blocks.
//! Import [`BlockCipherInit`](tc_block_cipher::BlockCipherInit) and
//! [`BlockCipher`](tc_block_cipher::BlockCipher) to initialize and use it.
//! See the engine's example for encryption and decryption.
//!
//! # Backend selection
//!
//! With the `rustcrypto` feature, `AriaEngine` delegates to
//! `AriaRustCryptoEngine`, backed by the RustCrypto `aria` crate.
//! Without it, the engine delegates to [`AriaTableEngine`].
//! Both implementations are also available for direct use when enabled.
//!
//! # Security
//!
//! Neither backend is **constant time**: both key setup and
//! block processing use secret-dependent table lookups. It is unsuitable where
//! cache-timing attacks are in scope. Stored schedules are wiped on drop, but
//! callers remain responsible for their input keys and other copies.
//!
//! This is a block-cipher primitive, not message encryption. It provides no
//! padding, nonce handling, mode or authentication. Use an appropriate
//! authenticated-encryption construction for messages.
//!
//! The crate is `no_std` and requires no allocator.
pub use AriaEngine;
pub use AriaRustCryptoEngine;
pub use AriaTableEngine;
/// Algorithm name returned by the engine's `Display` implementation.
pub const ALGO_NAME: &str = "ARIA";
/// ARIA block length in bytes (128 bits), independent of key size.
pub const BLOCK_BYTES: usize = 16;
/// Accepted key lengths in bytes (128, 192 and 256 bits).
pub const KEY_BYTES: = ;