- All Implemented Interfaces:
Serializable
- Enclosing class:
CryptixAESKeyCache
This class holds all the pre-computed round keys required for AES encryption and decryption operations. The round keys are derived from the original AES key through the key schedule algorithm and stored in optimized integer arrays for fast access during cryptographic operations.
The entry contains:
- Encryption round keys (Ke) - expanded keys for each encryption round
- Decryption round keys (Kd) - inverse expanded keys for each decryption round
KeyCacheEntry objects are memory-intensive structures that benefit from caching to avoid repeated key schedule computations. Each entry contains (rounds + 1) × 4 integers for both encryption and decryption, where the number of rounds depends on the AES key size (10 rounds for 128-bit, 12 rounds for 192-bit, 14 rounds for 256-bit keys).
Thread Safety: This class is immutable after construction and safe for concurrent use by multiple threads.
Memory Usage: Each entry consumes approximately: 2 × (rounds + 1) × 4 × 4 bytes of heap memory. For AES-256 (14 rounds), this is about 448 bytes per entry.
Obsolete — Keys are now cached in SessionKey objects. Retained for legacy AES engine support.
- See Also:
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionAllocates the round-key schedules for standard AES.KeyCacheEntry(int rounds, int bc) Allocates round-key arrays for a non-default AES variant, sizing both the encryption and the decryption schedule to the supplied round count and block size instead of the AES standard values used byCryptixAESKeyCache.createNew().Method Summary
Field Details
Ke
final int[][] KeEncryption round keys.Kd
final int[][] KdDecryption round keys.
Constructor Details
KeyCacheEntry
public KeyCacheEntry()Allocates the round-key schedules for standard AES.KeyCacheEntry
public KeyCacheEntry(int rounds, int bc) Allocates round-key arrays for a non-default AES variant, sizing both the encryption and the decryption schedule to the supplied round count and block size instead of the AES standard values used byCryptixAESKeyCache.createNew().- Parameters:
rounds- AES round count, 10 for a 128-bit key up to 14 for a 256-bit keybc- block size in 32-bit words, 4 for the 16-byte AES block