{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cipherhub-cloud/json-schema/cipherhub-cloud-encrypted-api-response-schema.json",
  "title": "EncryptedApiResponse",
  "description": "Encrypted REST response. Decrypt `encrypted_data` with the same derived symmetric key and verify HMAC-SHA512 over the plaintext response JSON.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cipherhub-cloud-openapi.yaml#/components/schemas/EncryptedApiResponse",
  "type": "object",
  "required": [
    "encrypted_data",
    "nonce",
    "signature"
  ],
  "properties": {
    "encrypted_data": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]+$",
      "description": "ChaCha20-Poly1305 response ciphertext as hex."
    },
    "nonce": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "12-byte response nonce as hex."
    },
    "signature": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{128}$",
      "description": "HMAC-SHA512 over the plaintext response JSON, encoded as hex."
    }
  }
}