Decrypts single block of data using Magma cipher.
Block to be decrypted
Decrypt single block of data using old Magma (GOST 28147-89) algorithm
Encrypts single block of data using Magma cipher.
Block to be encrypted
Encrypt single block of data using old Magma (GOST 28147-89) algorithm
Returns round keys
Regenerate round keys for sequence
Applies the G-transformation (Feistel round function) to input value. Performs addition with round key, applies T-transformation, and performs cyclic left shift.
Input 32-bit value to be transformed
Round key used in the transformation
Transformed 32-bit value after G-transformation
Applies substitution transformation (T-transformation) using S-box. Breaks input value into 4-bit parts, substitutes each part using corresponding S-box row, and reconstructs transformed value.
Value to be transformed
Transformed 32-bit value after substitution
Static
bytesConvert bytes to uint32 number
Static
reverseBackward compatibility block preparation for 28147-89
Static
reverseBackward compatibility key preparation for 28147-89 key schedule
Static
u32Convert uint32 number to bytes
Magma core class