CoderTools

GOST Cipher Suite

GOST 28147-89 / Magma Russian symmetric encryption with multiple modes and S-Box options

⚠️ Educational Use Only

GOST 28147-89 is cryptographically outdated. For new projects, use AES instead. This tool is for testing, learning, and legacy system maintenance only.

GOST 28147-89 requires exactly 32 bytes (256 bits) of key material
Format Options

About GOST 28147-89 & Magma

GOST 28147-89 is a Russian cryptographic standard (GOST) for symmetric encryption developed in 1989 and published in 1994. It has been the primary encryption standard used by the Russian Federal Government, military, banks, and government organizations in Russia, Belarus, Kazakhstan, and other CIS countries for over three decades.

GOST 28147-89 is a 64-bit block cipher with a 256-bit (32-byte) fixed key length, using 32 rounds of encryption. The algorithm uses eight 4×8-bit S-boxes which were initially classified. The algorithm is considered weakened in modern cryptanalysis but remains in use for legacy system compatibility and specific regulatory requirements in CIS nations.

About Magma (GOST R 34.12-2015)

Magma is a 64-bit block cipher defined in the GOST R 34.12-2015 standard, serving as the modernized successor to GOST 28147-89. Magma retains the core Feistel structure and 32 rounds of encryption from GOST 28147-89, but uses a fixed TC26-Z S-Box and big-endian byte processing order.

RFC 8891 formally defines Magma's technical specification. Key differences from GOST 28147-89 include: big-endian byte order (GOST 28147-89 uses little-endian), fixed S-Box (GOST 28147-89 supports multiple S-Boxes), and π[0]→π[7] S-Box application order. Magma is one of Russia's current lightweight encryption standards.

GOST 28147-89 History

GOST (Russian State Standard) was developed in 1989 during the Soviet era and became the official Russian encryption standard. After the Soviet Union's collapse, it continued to be used and was formally published as an open standard in 1994. The algorithm's design is based on Feistel network structure, similar to DES, and incorporates Russian cryptographic research traditions.

Algorithm Comparison

Algorithm Type Key Length Block Size Security Rounds
GOST 28147-89 Block Cipher 256-bit (32 bytes) 64-bit (8 bytes) Moderate 32
Magma (GOST R 34.12-2015) Block Cipher 256-bit (32 bytes) 64-bit (8 bytes) Moderate 32
AES Block Cipher 128, 192, 256-bit 128-bit (16 bytes) Excellent 10-14

Key Features

  • 64-bit block size - Suitable for smaller data blocks
  • 256-bit key length - Larger key space than DES
  • 32 rounds - Strong diffusion and confusion properties
  • Multiple modes - ECB, CBC, CFB, OFB, CTR support

Security Considerations

  • Block size limitation - 64-bit blocks can leak pattern information for large files. Use smaller messages or ensure other security layers.
  • Cryptanalytic attacks - GOST has been subject to academic cryptanalysis showing reduced security margin compared to modern ciphers.
  • Recommendation - Use AES for new projects. GOST 28147-89 is maintained for legacy system compatibility only.

Use Cases

  • 🇷🇺 Legacy Russian systems - Maintaining compatibility with existing GOST-based infrastructure
  • 📚 Educational purposes - Learning classical cipher design and Russian cryptography standards
  • 🔄 System integration - Interfacing with government or banking systems requiring GOST compliance
  • 📦 Data migration - Decrypting data from legacy GOST-encrypted archives and systems

References & Documentation

Related Tools