{
  "slug": "gost-magma-cipher",
  "name": "gizza-ai/gost-magma-cipher",
  "version": "0.1.0",
  "title": "GOST Magma Cipher — Encrypt/decrypt (GOST 28147-89) — gizza.ai",
  "description": "Encrypt or decrypt text with the GOST 28147-89 Magma 64-bit block cipher — ECB or CBC, 256-bit key, hex or base64 — free and entirely in your browser.",
  "tags": [
    "magma",
    "gost",
    "gost 28147-89",
    "gost r 34.12-2015",
    "gost encrypt",
    "gost decrypt",
    "cbc",
    "ecb",
    "block cipher",
    "cipher"
  ],
  "category": "security",
  "urls": {
    "page": "https://gizza.ai/tools/gost-magma-cipher/",
    "markdown": "https://gizza.ai/tools/gost-magma-cipher/index.md",
    "descriptor": "https://gizza.ai/tools/gost-magma-cipher/tool.json",
    "deep_link_example": "https://gizza.ai/tools/gost-magma-cipher/?data=Text%20to%20encrypt%E2%80%A6&operation=encrypt&cipher=cbc&key=base64%20or%20hex%20key&iv=base64%20or%20hex%20iv&format=base64"
  },
  "cli": "gizza tool gost-magma-cipher \"Text to encrypt…\" 'key=base64 or hex key'",
  "tool": {
    "description": "Encrypt or decrypt text with the GOST 28147-89 / GOST R 34.12-2015 'Magma' 64-bit block cipher (RFC 8891) using a raw key you provide. cipher = cbc (default) or ecb. The key is a fixed 256-bit (32-byte) value; cbc needs an 8-byte iv, ecb none. key, iv and ciphertext are hex or base64 (set format; default base64); the plaintext is UTF-8. Both modes use PKCS7 padding. This is a low-level tool — for passphrase encryption with a safe random salt+nonce use text-encrypt instead.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "cipher": {
          "default": "cbc",
          "description": "Mode of operation: cbc (default) or ecb (insecure — reveals patterns; avoid).",
          "enum": [
            "cbc",
            "ecb"
          ],
          "type": "string"
        },
        "data": {
          "description": "For encrypt: the plaintext. For decrypt: the ciphertext, encoded with `format`.",
          "type": "string"
        },
        "format": {
          "default": "base64",
          "description": "Encoding for the key, iv, and ciphertext (base64 default, or hex). The plaintext is always UTF-8 text.",
          "enum": [
            "base64",
            "hex"
          ],
          "type": "string"
        },
        "iv": {
          "description": "The 8-byte IV, encoded with `format`. Required for cbc; omit for ecb.",
          "type": "string"
        },
        "key": {
          "description": "The 32-byte (256-bit) Magma key, encoded with `format`.",
          "type": "string"
        },
        "operation": {
          "default": "encrypt",
          "description": "encrypt (default) or decrypt.",
          "enum": [
            "encrypt",
            "decrypt"
          ],
          "type": "string"
        }
      },
      "required": [
        "data",
        "key"
      ],
      "type": "object"
    }
  }
}