Key Expansion
Requirements
Kalyna’s Key Scheduler is needed to be designed to satisfy the below requirements:
- Non-linear dependence of every round key bit on every encryption key bit
- Round key independence
- High computational complexity of encryption key recovery even having all round keys
- Strength to all known cryptanalytic attacks on key schedule
- Absence of weak key worsen cryptographic properties
- Implementation simplicity (application of round transformation only)
- Partial protection from side-channel attacks
Properties
- Key Agility - less than - Takes Times less amount of time when compared to Encryption of one block.
- Non Invertible - Non-Bijective Round key dependency on the encryption master key - unlike
- Key scheduling works as a secure with cryptographic properties like high uniqueness.
- Number of Round Keys - The number depends on the Key Size
Block Size | Key length | Rounds | Rows |
---|---|---|---|
| | | |
| | | |
| | | |
| | | |
| | | |
Algorithm
Intermediate Key Generation
- Intermediate key is one of the core components of Kalyna Key Expansion Algorithm as it helps in bridging the gap between the differences in Block and Key Sizes.
- It generated from the Master Key which is divided into two Blocks and the following way
- If Key Size is twice the Block Size
- First/Least Significant Half amount of Columns of the Master Key .
- Later/Most Significant Half amount of Columns of the Master Key
- If Key Size and the Block Size are same
- If Key Size is twice the Block Size
Intermediate Constant
- To generate the Intermediate Key we need to first generate the Intermediate Constant
- The intermediate constant is dependent on the following factors
Block Size - in bits
Key Size - in bits
- We make the first/Least significant byte of the Intermediate Key equal to this constant
Generation
- We then do the following operations (Done from Right to left)
- Addition Modulus between , Intermediate Constant
- Substitution Layer
- Shift Rows
- Mix Columns
- Addition with and the current state of Intermediate Key of Block Size
- Addition Modulus with and the current state of Intermediate Key of Block Size
Even Round Key Generation
Initial Round Key State
- The Initial Round Key state is used to generate the Final Even Round Key
- It is calculated using the following algorithm for round number .
- Block Size in Bits
- key Size in Bits
- Total Number of Rounds
- Master Key
- Least Significant bits
- Most Significant bits
Round Constant
- This constant changes w.r.t round number
- The constant is calculated the following way
- This constant is then inserted into every Even Byte of the Round Constant vector which is has the same dimensions as the Kalyna Block and then left rotated the following way
Generation
- We then do the following operations (Done from Right to left)
- Addition Modulus between Intermediate Key , Round Constant and Initial State with Block Size
- Substitution Layer
- Shift Rows
- Mix Columns
- Addition Modulus between Intermediate Key , Round Constant
- Addition with of and the current state of Round Key of Block Size
Odd Round Key Generation
- Odd Round Key is generated in a bijective manner from the previous even round key the following way
- Block Size in Bits
- Total Number of Rounds