Skip to Content
oxcrypto
Block ciphersLegacy ciphers

IDEA

IDEA block cipher selector.

from oxcrypto.cipher.idea import IDEA
from oxcrypto.cipher.hazmat import decrypt_block, encrypt_block

cipher = IDEA.IDEA
key = cipher.generate_key()
block = bytes(cipher.block_size)
assert decrypt_block(key, encrypt_block(key, block, cipher=cipher), cipher=cipher) == block

Warning

Legacy: IDEA has 64-bit blocks. Use it only to read or produce data for existing formats.

Variants: IDEA.IDEA.

Standard: ISO/IEC 18033-3.

Pass the selector as cipher= to any mode. Raw single-block functions live in oxcrypto.cipher.hazmat.