verify

Finalized

Introduction

The verify method is a general-purpose cryptographic utility that validates a digital signature. It is the direct counterpart to the sign method and is used to confirm that a given piece of data was indeed signed by the owner of a specific public key.

This endpoint performs a purely mathematical check and does not rely on any wallet or blockchain state. It is essential for any application that needs to authenticate messages or verify data integrity using the Ixian cryptographic scheme.


Request

Requests can be made using either HTTP POST with a JSON body or HTTP GET with URL query parameters.

Parameters

NameTypeRequiredDescription
publicKeystringYesThe hex-encoded public key against which the signature will be verified.
signaturestringYesThe hex-encoded signature that needs to be validated.
messagestringYes (if hash is not present)The original UTF-8 encoded string that was signed. The node will re-hash this message to perform the verification.
hashstringYes (if message is not present)The original hex-encoded, pre-computed hash that was signed.

Example POST Request (Verifying a Message)

POST /verify
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "method": "verify",
  "params": {
    "publicKey": "04a3f8c...3371cef7",
    "signature": "6b26dd...c7acec20e565f985e9ef153371cef7",
    "message": "I hereby authorize the action dated 2025-11-13."
  },
  "id": 1
}

Example GET Request (Verifying a Hash)

GET /verify?publicKey=...&signature=...&hash=932a72...48b82

Response

The response result is a simple string indicating the outcome of the verification.

Result Fields

NameTypeDescription
resultstringA status message: "OK" if the signature is valid, "FAIL" if it is not.

Example Success Response (Valid Signature)

{
  "jsonrpc": "2.0",
  "result": "OK",
  "id": 1,
  "error": null
}

Example Failure Response (Invalid Signature)

{
  "jsonrpc": "2.0",
  "result": "FAIL",
  "id": 1,
  "error": null
}

Example Error Response

An error is returned if a required parameter is missing.

{
    "jsonrpc": "2.0",
    "result": null,
    "id": 1,
    "error": {
        "code": -32602,
        "message": "Missing parameter 'publicKey'."
    }
}

Behavioral Notes

  • Hashing Algorithm is Critical: When verifying a signature for a message, the node first recalculates the hash of the message using the sha3_512sqTrunc algorithm. For the verification to succeed, the signature must have been created over a hash generated by this exact same algorithm. Any client or service wishing to verify an Ixian signature must follow this hashing procedure precisely.
  • Stateless Operation: This is a pure cryptographic function. It does not require any wallets to be loaded and does not interact with the blockchain. It simply performs a mathematical verification based on the inputs provided.
  • Use Cases: This method is fundamental for building trust in off-chain systems. It can be used to verify login challenges, confirm the authenticity of API requests signed by a user, or validate attestations from external services. attestations from external services.