Skip to main content

Crate tc_aria

Crate tc_aria 

Source
Expand description

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 and 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.

Structs§

AriaEngine
ARIA with RustCrypto when the rustcrypto feature is enabled, otherwise the portable table engine.
AriaRustCryptoEngine
ARIA backed by RustCrypto’s aria crate, enabled with rustcrypto.
AriaTableEngine
Portable ARIA-128, ARIA-192, and ARIA-256 block cipher.

Constants§

ALGO_NAME
Algorithm name returned by the engine’s Display implementation.
BLOCK_BYTES
ARIA block length in bytes (128 bits), independent of key size.
KEY_BYTES
Accepted key lengths in bytes (128, 192 and 256 bits).