{
  "$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/hmac_schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A list of testvectors for HMAC testing",
  "items": {
    "additionalProperties": false,
    "properties": {
      "algorithm": {
        "description": "Should be hmac",
        "enum": [
          "hmac"
        ],
        "type": "string"
      },
      "hash_alg": {
        "description": "Hash algorithm",
        "enum": [
          "sha-1",
          "sha-224",
          "sha-256",
          "sha-384",
          "sha-512",
          "sha3-256",
          "sha3-384",
          "sha3-512"
        ],
        "type": "string"
      },
      "key": {
        "$ref": "#/$defs/byte_array",
        "description": "Key to use for tag generation"
      },
      "message": {
        "$ref": "#/$defs/byte_array",
        "description": "Message to generate tag for"
      },
      "result": {
        "description": "Whether the output tag should match `tag`",
        "type": "boolean"
      },
      "tag": {
        "$ref": "#/$defs/byte_array",
        "description": "Message tag output by HMAC"
      },
      "test_case_id": {
        "description": "test_case_id",
        "type": "integer"
      },
      "vendor": {
        "description": "test vector vendor name",
        "type": "string"
      }
    },
    "type": "object"
  },
  "minItems": 1,
  "title": "Cryptotest HMAC Test Vector",
  "type": "array"
}