{
  "$defs": {
    "byte_array": {
      "items": {
        "maximum": 255,
        "minimum": 0,
        "type": "integer"
      },
      "type": "array"
    }
  },
  "$id": "https://raw.githubusercontent.com/lowRISC/opentitan/master/sw/host/cryptotest/testvectors/data/schemas/aes_gcm_schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A list of testvectors for AES-GCM testing",
  "items": {
    "additionalProperties": false,
    "properties": {
      "aad": {
        "$ref": "#/$defs/byte_array",
        "description": "Additional Authenticated Data"
      },
      "ciphertext": {
        "$ref": "#/$defs/byte_array",
        "description": "Ciphertext"
      },
      "iv": {
        "$ref": "#/$defs/byte_array",
        "description": "AES intermediate value"
      },
      "key": {
        "$ref": "#/$defs/byte_array",
        "description": "AES key"
      },
      "key_len": {
        "description": "Length in bits of the key",
        "enum": [
          128,
          192,
          256
        ],
        "type": "integer"
      },
      "mode": {
        "description": "Should be GCM",
        "enum": [
          "gcm"
        ],
        "type": "string"
      },
      "operation": {
        "description": "AES-GCM operation type",
        "enum": [
          "encrypt",
          "decrypt"
        ],
        "type": "string"
      },
      "plaintext": {
        "$ref": "#/$defs/byte_array",
        "description": "Plaintext"
      },
      "result": {
        "description": "Derivation result",
        "type": "boolean"
      },
      "tag": {
        "$ref": "#/$defs/byte_array",
        "description": "Authentication Tag"
      },
      "test_case_id": {
        "description": "Incremental test case ID -- used for debugging",
        "type": "integer"
      },
      "vendor": {
        "description": "Test vector vendor name",
        "type": "string"
      }
    },
    "type": "object"
  },
  "title": "Cryptotest AES-GCM Testvector",
  "type": "array"
}