{
  "name": "crypto.verify",
  "group": "crypto",
  "summary": "Verify an Ed25519, ECDSA, RSA or HMAC signature against a message and public key.",
  "description": "Checks a detached signature and returns a single boolean you can act on. Signature verification is not something to reason about — a signature is either valid under the key or it is not, and an agent that accepts an identity claim without checking has accepted anything. Supports Ed25519 (raw 32-byte or SPKI keys), ECDSA P-256/P-384, RSA PKCS#1 v1.5 and PSS, and HMAC-SHA256/512.",
  "keywords": [
    "verify signature",
    "ed25519",
    "signature verification",
    "public key",
    "ecdsa",
    "rsa",
    "webhook signature",
    "identity",
    "attestation",
    "detached signature"
  ],
  "endpoint": "https://fluentedi.com/v1/crypto/verify",
  "mcp_name": "crypto_verify",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "message": {
        "description": "The signed message.",
        "type": "string",
        "maxLength": 200000
      },
      "signature": {
        "description": "The detached signature.",
        "type": "string",
        "maxLength": 8000
      },
      "public_key": {
        "description": "Public key: raw bytes, SPKI DER, or PEM. For HMAC, the shared secret.",
        "type": "string",
        "maxLength": 8000
      },
      "algorithm": {
        "description": "Signature algorithm.",
        "type": "string",
        "enum": [
          "ed25519",
          "ecdsa-p256",
          "ecdsa-p384",
          "rsa-pkcs1",
          "rsa-pss",
          "hmac-sha256",
          "hmac-sha512"
        ],
        "default": "ed25519"
      },
      "message_encoding": {
        "description": "How to read `message` into bytes.",
        "type": "string",
        "enum": [
          "utf8",
          "hex",
          "base64"
        ],
        "default": "utf8"
      },
      "signature_encoding": {
        "description": "How to read `signature` into bytes.",
        "type": "string",
        "enum": [
          "hex",
          "base64",
          "utf8"
        ],
        "default": "hex"
      },
      "key_encoding": {
        "description": "How to read `public_key` when it is not PEM.",
        "type": "string",
        "enum": [
          "hex",
          "base64",
          "utf8"
        ],
        "default": "hex"
      }
    },
    "required": [
      "message",
      "signature",
      "public_key"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "Verify an Ed25519 signature (RFC 8032 test vector 2)",
      "url": "https://fluentedi.com/v1/crypto/verify?message=r&signature=92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00&public_key=3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c&algorithm=ed25519",
      "args": {
        "message": "r",
        "signature": "92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00",
        "public_key": "3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c",
        "algorithm": "ed25519"
      }
    }
  ],
  "suggestion": null
}