LOKI97 Online Encryption/Decryption
Australian Block Cipher - 128-bit block, variable key length AES candidate algorithm
Security Notice
LOKI97 was an AES candidate algorithm but was not selected as the standard. For new applications requiring high security, AES (Rijndael) is recommended.
Key Features
128-bit block size, meeting modern security standards
16-round Feistel structure ensures thorough data confusion
About LOKI97 Encryption
LOKI97 is a symmetric key block cipher designed by Lawrie Brown and Josef Pieprzyk in 1997. It was submitted as a candidate algorithm for the Advanced Encryption Standard (AES) competition, representing an evolution of the earlier LOKI89 and LOKI91 ciphers developed in Australia.
The cipher operates on 128-bit data blocks and supports key sizes of 128, 192, or 256 bits. It employs a 16-round Feistel network structure with a complex round function based on S-boxes and permutations, designed to provide strong resistance to differential and linear cryptanalysis.
Key Features
LOKI Family History
- LOKI89: The original cipher designed in 1989, using 64-bit blocks and 64-bit keys.
- LOKI91: An improved version that addressed weaknesses in LOKI89.
- LOKI97: The final evolution with 128-bit blocks, submitted to the AES competition.
Encryption Mode Description
Algorithm Structure
LOKI97 employs a 16-round Feistel network structure. Each round processes a 128-bit block, dividing it into two 64-bit halves (L and R).
Key Schedule
The 256-bit master key is expanded into 48 subkeys (SK[0] to SK[47]) through the f function and constant DELTA (derived from the golden ratio). For 128-bit or 192-bit keys, key material is replicated to fill the 256-bit key register before expansion.
Round Function
Each round applies: L' = R + SK[3i], R' = L XOR f(R + SK[3i], SK[3i+1], SK[3i+2]). Addition is modulo 2^64.
f Function
The core f function f(A, B) consists of four layers:
- KP (Keyed Permutation): Selects bits from A based on control bits in B
- Sa (S-box layer a): Eight parallel S-box lookups using two types (S1: 13→8 bits, S2: 11→8 bits)
- P (Permutation): 64-bit permutation using 8×8 bit interleaving pattern
- Sb (S-box layer b): Second round of eight S-box lookups using additional key material from B
S-boxes
S1 has 8192 entries (13-bit input→8-bit output), S2 has 2048 entries (11-bit input→8-bit output). Both are computed using cubic operations in GF(2^13) and GF(2^11) respectively, with specific generator polynomials to ensure strong nonlinearity.
Decryption Process
Decryption uses the same structure but applies subkeys in reverse order (from SK[47] to SK[0]) and uses subtraction instead of addition.
Algorithm Comparison
| Algorithm | Key Length | Block Size | Security | Speed |
|---|---|---|---|---|
| LOKI97 | 128/192/256 bits | 128 bits | Good | Medium |
| AES | 128/192/256 bits | 128 bits | Excellent | Fast |
| Serpent | 128/192/256 bits | 128 bits | Excellent | Medium |
| DES | 56 bits | 64 bits | Weak | Fast |