{
  "slug": "pem-public-key-extract",
  "name": "gizza-ai/pem-public-key-extract",
  "version": "0.1.0",
  "title": "Extract Public Key from Private Key (PEM) — gizza.ai",
  "description": "Derive the public key from an RSA, EC (P-256/P-384) or Ed25519 private key as a PEM public-key block. Free, in your browser — nothing is uploaded.",
  "tags": [
    "extract public key",
    "private key to public key",
    "pem public key",
    "openssl pkey pubout",
    "rsa public key",
    "ec public key",
    "ed25519 public key"
  ],
  "category": "security",
  "urls": {
    "page": "https://gizza.ai/tools/pem-public-key-extract/",
    "markdown": "https://gizza.ai/tools/pem-public-key-extract/index.md",
    "descriptor": "https://gizza.ai/tools/pem-public-key-extract/tool.json",
    "deep_link_example": "https://gizza.ai/tools/pem-public-key-extract/?input=-----BEGIN%20PRIVATE%20KEY-----...&key_type=auto&der_format=hex"
  },
  "cli": "gizza tool pem-public-key-extract \"-----BEGIN PRIVATE KEY-----...\"",
  "tool": {
    "description": "Compute the PUBLIC key from a PRIVATE key and output it as a PEM SubjectPublicKeyInfo block (-----BEGIN PUBLIC KEY-----). Supports RSA, EC (NIST P-256/P-384) and Ed25519 private keys, supplied as PEM text (PKCS#8 'PRIVATE KEY', PKCS#1 'RSA PRIVATE KEY', or SEC1 'EC PRIVATE KEY') or as raw DER bytes given via der_format as hex or base64. key_type defaults to auto (detect from the PEM label, otherwise try each algorithm) and only needs setting to disambiguate raw DER. This is the offline equivalent of 'openssl pkey -pubout'; the private key never leaves the machine.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "der_format": {
          "default": "hex",
          "description": "How to interpret raw (non-PEM) DER input bytes: hex (default) or base64. Ignored when the input is PEM.",
          "enum": [
            "hex",
            "base64"
          ],
          "type": "string"
        },
        "input": {
          "description": "The PRIVATE key to derive the public key from: a PEM block (-----BEGIN PRIVATE KEY-----, RSA PRIVATE KEY, or EC PRIVATE KEY), or the raw DER bytes as hex/base64.",
          "type": "string"
        },
        "key_type": {
          "default": "auto",
          "description": "Key algorithm: auto (default) detects it from the PEM label and otherwise tries each; rsa, ec (NIST P-256/P-384), or ed25519. Required only to disambiguate raw DER input.",
          "enum": [
            "auto",
            "rsa",
            "ec",
            "ed25519"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}