{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.2/review/host-keys.schema.json",
  "$comment": "OpenEik 0.2: folded by tools/fold-schemas.mjs from the proposal review, which 0.2 makes a rule (decision D5). Written by hand from the text, not generated.",
  "title": "A host's keys",
  "description": "The keys a host signs its receipts and its attestations of terms accepted with (Part XVIII, 5.6, which a verifier takes as trust anchors (XVIII.5.3, rule 7): the host as people know it, the host.name of its receipts; and its keys, each in the shape of a key of the registry (Part XIV, 5.1) with no rpId, the window it signs in from validFrom and before validUntil. A retired key keeps its validUntil and stays listed, a key id is never used again, and a key is never removed once the host has signed with it; a validator checks in code that each key id is listed once, that a public key is of its algorithm and that no window ends before it begins.",
  "type": "object",
  "properties": {
    "format": {
      "const": "openeik-host-keys/0.1"
    },
    "host": {
      "description": "The host, as people know it: never its URL. It is the host.name of every receipt and attestation the host signs with a key of the file (XVIII.5.6, rule 2).",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        }
      },
      "required": [
        "name"
      ],
      "x-eik-closed": true
    },
    "keys": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "description": "A key, as a key of the registry is (Part XIV, 5.1): its id, unique in the file and never used again; its algorithm, ed25519 or ecdsa-p256; the public key, base64 of its DER SubjectPublicKeyInfo; and the window it signs in. A host signs as no passkey, so a host's key has no rpId.",
        "$ref": "../project/person.schema.json#/$defs/key",
        "not": {
          "required": [
            "rpId"
          ]
        }
      }
    }
  },
  "required": [
    "format",
    "host",
    "keys"
  ],
  "x-eik-closed": true
}
