{
  "slug": "rsa-encrypt",
  "name": "gizza-ai/rsa-encrypt",
  "version": "0.1.0",
  "title": "RSA Encrypt — Encrypt a message to an RSA public key (OAEP / PKCS#1) — gizza.ai",
  "description": "Encrypt a short message to an RSA public key (OAEP or PKCS#1 v1.5, SHA-256/384/512) and get base64 ciphertext, in your browser. Nothing is uploaded.",
  "tags": [
    "rsa encrypt",
    "rsa oaep",
    "pkcs1",
    "public key encryption",
    "rsa cipher",
    "crypto"
  ],
  "category": "security",
  "urls": {
    "page": "https://gizza.ai/tools/rsa-encrypt/",
    "markdown": "https://gizza.ai/tools/rsa-encrypt/index.md",
    "descriptor": "https://gizza.ai/tools/rsa-encrypt/tool.json",
    "deep_link_example": "https://gizza.ai/tools/rsa-encrypt/?message=The%20short%20message%20to%20encrypt&public_key=-----BEGIN%20PUBLIC%20KEY-----%0A...%0A-----END%20PUBLIC%20KEY-----&padding=oaep&hash=sha256"
  },
  "cli": "gizza tool rsa-encrypt \"The short message to encrypt\" 'public_key=-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----'",
  "tool": {
    "description": "Encrypt a small payload to an RSA public key and return base64 ciphertext. padding=oaep (default, RSAES-OAEP, recommended) or pkcs1v15 (legacy RSAES-PKCS1-v1_5); hash=sha256 (default), sha384, or sha512 selects the OAEP digest (ignored for pkcs1v15). The public key is PEM-encoded (SPKI or PKCS#1). Only the holder of the matching private key can decrypt. The message must fit in one RSA block (≈190 bytes for a 2048-bit key with OAEP-SHA256) — for larger data, encrypt a symmetric key instead. Runs locally — nothing leaves the device.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "hash": {
          "default": "sha256",
          "description": "OAEP digest (MGF1 + label hash); used only when padding=oaep (default sha256). Ignored for pkcs1v15.",
          "enum": [
            "sha256",
            "sha384",
            "sha512"
          ],
          "type": "string"
        },
        "message": {
          "description": "The plaintext message to encrypt. Must fit in one RSA block (e.g. up to ~190 bytes for a 2048-bit key with OAEP-SHA256).",
          "type": "string"
        },
        "padding": {
          "default": "oaep",
          "description": "Padding scheme: oaep (default, RSAES-OAEP, recommended) or pkcs1v15 (legacy RSAES-PKCS1-v1_5).",
          "enum": [
            "oaep",
            "pkcs1v15"
          ],
          "type": "string"
        },
        "public_key": {
          "description": "The recipient's RSA public key, PEM-encoded (SPKI '-----BEGIN PUBLIC KEY-----' or PKCS#1 '-----BEGIN RSA PUBLIC KEY-----').",
          "type": "string"
        }
      },
      "required": [
        "message",
        "public_key"
      ],
      "type": "object"
    }
  }
}