{
  "version": 2,
  "comment": "Cross-implementation test vectors for the PRE-GEN crypto invariant. Generated by spec/generate_vectors.py from backend/app/core/crypto.py (the source of truth). The signing key is a fixed PUBLIC test key.",
  "operator_key": {
    "private_seed_b64": "wzaNiK++SmTXRPbwApZVZe9whAW6FqX9camXdDg9i+k=",
    "public_hex": "289ffc1bf0a80fd1d38e3b069fc3d457a010743264e1aade4a7cbeec662b12c9",
    "fingerprint": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
  },
  "canonical_json": [
    {
      "name": "empty_object",
      "input": {},
      "canonical_utf8": "{}",
      "sha256_hex": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
    },
    {
      "name": "key_sorting",
      "input": {
        "zebra": 1,
        "alpha": 2,
        "Mango": 3,
        "_under": 4
      },
      "canonical_utf8": "{\"Mango\":3,\"_under\":4,\"alpha\":2,\"zebra\":1}",
      "sha256_hex": "12e69f8dbcb1698475ec9063c5161170f4725bcbb967086657dbb075684daf6c"
    },
    {
      "name": "unicode_key_codepoint_order",
      "input": {
        "𐀀": "astral",
        "": "bmp"
      },
      "canonical_utf8": "{\"\":\"bmp\",\"𐀀\":\"astral\"}",
      "sha256_hex": "94065525f1ea09913315f5a3f2cb846d9dda91a016d4726a60b4d99a53e50788"
    },
    {
      "name": "safe_integer_boundaries",
      "input": {
        "min": -9007199254740991,
        "max": 9007199254740991
      },
      "canonical_utf8": "{\"max\":9007199254740991,\"min\":-9007199254740991}",
      "sha256_hex": "63546eb60913dcb1cdd5118f7bf4885beed344af930c8a9d5f38fad243fd4819"
    },
    {
      "name": "nested",
      "input": {
        "b": {
          "d": [
            1,
            2,
            {
              "y": null,
              "x": true
            }
          ],
          "c": false
        },
        "a": ""
      },
      "canonical_utf8": "{\"a\":\"\",\"b\":{\"c\":false,\"d\":[1,2,{\"x\":true,\"y\":null}]}}",
      "sha256_hex": "6907c95addcd5bb20c4159bd77683c680669b433f04a18605bab49d9f56dc34a"
    },
    {
      "name": "unicode_no_escape",
      "input": {
        "name": "Ада Лавлейс",
        "emoji": "🎬",
        "mixed": "café-ßtraße"
      },
      "canonical_utf8": "{\"emoji\":\"🎬\",\"mixed\":\"café-ßtraße\",\"name\":\"Ада Лавлейс\"}",
      "sha256_hex": "9c93360d622c13480982fd51a1dd16923ea80784315383ef7dfeba429aa1942d"
    },
    {
      "name": "string_escapes",
      "input": {
        "quote": "say \"hi\"",
        "backslash": "a\\b",
        "newline": "line1\nline2",
        "tab": "\tend"
      },
      "canonical_utf8": "{\"backslash\":\"a\\\\b\",\"newline\":\"line1\\nline2\",\"quote\":\"say \\\"hi\\\"\",\"tab\":\"\\tend\"}",
      "sha256_hex": "bfb8f4d2d6ba1f17fdda9670df28744563cd812809ee1bcae45afd57537ef37e"
    },
    {
      "name": "numbers_ints",
      "input": {
        "zero": 0,
        "neg": -42,
        "big": 1764735600,
        "bool_not_int": true
      },
      "canonical_utf8": "{\"big\":1764735600,\"bool_not_int\":true,\"neg\":-42,\"zero\":0}",
      "sha256_hex": "215f1dd5bb312659023256e47bf12e029b898a28a5f4f5deedb5fb2fb571a67e"
    },
    {
      "name": "empty_values",
      "input": {
        "s": "",
        "arr": [],
        "obj": {},
        "null": null
      },
      "canonical_utf8": "{\"arr\":[],\"null\":null,\"obj\":{},\"s\":\"\"}",
      "sha256_hex": "75b0bcb9e5aeef346b44241a551624f547da7ba2ef3fb037d802298322b20b01"
    },
    {
      "name": "unicode_nfc",
      "input": {
        "name": "Café"
      },
      "canonical_utf8": "{\"name\":\"Café\"}",
      "sha256_hex": "659906f125d844f7081786e4a1cba739414e49a9b9061d80ce09c691b5f56602"
    },
    {
      "name": "unicode_nfd",
      "input": {
        "name": "Café"
      },
      "canonical_utf8": "{\"name\":\"Café\"}",
      "sha256_hex": "634bd4d757f1cec35511f9b16e082deb5be95d1b24cad4298e3b7ae9e2198d47"
    },
    {
      "name": "arrays_preserve_order",
      "input": {
        "ids": [
          "z",
          "a",
          "m"
        ],
        "nums": [
          3,
          1,
          2
        ]
      },
      "canonical_utf8": "{\"ids\":[\"z\",\"a\",\"m\"],\"nums\":[3,1,2]}",
      "sha256_hex": "6e750ff709ebf7164a74f09d83ba668c909d483bf5af35d4a4423c4aa37ef225"
    }
  ],
  "signing": [
    {
      "name": "signed_decision_v1",
      "body": {
        "schema_version": "pg.decision.v1",
        "decision_id": "dec_5f2a9c1e7b8d4e6fa0c3b2d1e4f5a6b7",
        "nonce": "9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d",
        "allowed": true,
        "reason": null,
        "subject_id": "sub_ada_lovelace",
        "licensee_id": "lic_prampta_studio",
        "provider_id": "prov_prampta_ai",
        "license_id": "pgl_0123456789abcdef0123456789abcdef",
        "prompt_hash": "0d6cfe42e47920c2c7c3db6c4a1c8a4663ff20b9e6cc5fac5384c3fb78b5a4b8",
        "model": "video-gen-3",
        "modality": "video",
        "intended_use": {
          "channel": "streaming",
          "product_name": "Station",
          "categories": [
            "drama"
          ],
          "modality": "video",
          "territory": "EU"
        },
        "obligations": {
          "watermark": true
        },
        "rules_text": "",
        "rules_text_hash": "",
        "watermark_payload": null,
        "is_hard_refusal": false,
        "issued_at": 1764735600,
        "expires_at": 1764735900,
        "operator_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
      },
      "canonical_utf8": "{\"allowed\":true,\"decision_id\":\"dec_5f2a9c1e7b8d4e6fa0c3b2d1e4f5a6b7\",\"expires_at\":1764735900,\"intended_use\":{\"categories\":[\"drama\"],\"channel\":\"streaming\",\"modality\":\"video\",\"product_name\":\"Station\",\"territory\":\"EU\"},\"is_hard_refusal\":false,\"issued_at\":1764735600,\"license_id\":\"pgl_0123456789abcdef0123456789abcdef\",\"licensee_id\":\"lic_prampta_studio\",\"modality\":\"video\",\"model\":\"video-gen-3\",\"nonce\":\"9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d\",\"obligations\":{\"watermark\":true},\"operator_key_id\":\"pg-ed25519:225bee029538a6e5bc89f03d83cd45b1\",\"prompt_hash\":\"0d6cfe42e47920c2c7c3db6c4a1c8a4663ff20b9e6cc5fac5384c3fb78b5a4b8\",\"provider_id\":\"prov_prampta_ai\",\"reason\":null,\"rules_text\":\"\",\"rules_text_hash\":\"\",\"schema_version\":\"pg.decision.v1\",\"subject_id\":\"sub_ada_lovelace\",\"watermark_payload\":null}",
      "sha256_hex": "dfc26b0e1b0f4c63b5dfd9f5adc5cc7f47beec26e08c311fd43355a486149753",
      "signature_hex": "01f8ef892c6bf90151861c9612de30ac3f7eb19abe4b9cfd5d367db551721e246e1764e60ef69555ce5fa9eb81bab96dc6b9161ad93dc01c7d5b49687ddce803"
    },
    {
      "name": "license_body_v1",
      "body": {
        "subject_id": "sub_ada_lovelace",
        "licensee_id": "lic_prampta_studio",
        "license_class": "commercial",
        "scope": [
          "video",
          "image"
        ],
        "deny_categories": [
          "political"
        ],
        "immutable_denials": [
          "adult"
        ],
        "required_obligations": {
          "watermark": true,
          "disclosure": "ai-generated"
        },
        "expires_at": 1796271600,
        "contract_start": 1764735600,
        "product_name": "Station",
        "project_name": "station-2026",
        "purpose": "feature film promo",
        "extensions": {},
        "rules_text": "Использование только в трейлерах.",
        "allowed_channels": [
          "streaming",
          "cinema"
        ],
        "allowed_territories": [
          "EU",
          "UK"
        ]
      },
      "canonical_utf8": "{\"allowed_channels\":[\"streaming\",\"cinema\"],\"allowed_territories\":[\"EU\",\"UK\"],\"contract_start\":1764735600,\"deny_categories\":[\"political\"],\"expires_at\":1796271600,\"extensions\":{},\"immutable_denials\":[\"adult\"],\"license_class\":\"commercial\",\"licensee_id\":\"lic_prampta_studio\",\"product_name\":\"Station\",\"project_name\":\"station-2026\",\"purpose\":\"feature film promo\",\"required_obligations\":{\"disclosure\":\"ai-generated\",\"watermark\":true},\"rules_text\":\"Использование только в трейлерах.\",\"scope\":[\"video\",\"image\"],\"subject_id\":\"sub_ada_lovelace\"}",
      "sha256_hex": "4b1e533f495d75f43bd8647c4a525571c14edbf2db9a96031f61ef5369f26aab",
      "signature_hex": "5154d8b97aa8759bed98319bcd5661c444419620a10015c63f5be9daa14595f6e86da9773fe94635cb6b085c0910735f3756eb349cfa570c586123e37ac5ac04"
    },
    {
      "name": "audit_event_genesis",
      "body": {
        "event_id": "evt_00000000000000000000000000000001",
        "action": "subject_registered",
        "entity_type": "subject",
        "entity_id": "sub_ada_lovelace",
        "actor": "usr_owner",
        "timestamp": "2026-01-01T00:00:00+00:00",
        "metadata": {},
        "prev_hash": "genesis"
      },
      "canonical_utf8": "{\"action\":\"subject_registered\",\"actor\":\"usr_owner\",\"entity_id\":\"sub_ada_lovelace\",\"entity_type\":\"subject\",\"event_id\":\"evt_00000000000000000000000000000001\",\"metadata\":{},\"prev_hash\":\"genesis\",\"timestamp\":\"2026-01-01T00:00:00+00:00\"}",
      "sha256_hex": "f00465e297432db552507f00ad8b9ab312019d17e1ddbaa8139be044e7807256",
      "signature_hex": "f1fdb1904fb6ae585a3c31647cb5a80ce2feb0348a60e7102d8f51bf928ae31b790ae6e302215dfe1d6c5aefc11458f20a5eb904a3e46d8b3d7af1854032fa01"
    },
    {
      "name": "audit_event_chained",
      "body": {
        "event_id": "evt_00000000000000000000000000000002",
        "action": "license_issued",
        "entity_type": "license",
        "entity_id": "pgl_0123456789abcdef0123456789abcdef",
        "actor": "usr_owner",
        "timestamp": "2026-01-01T00:05:00+00:00",
        "metadata": {
          "licensee_id": "lic_prampta_studio"
        },
        "prev_hash": "f00465e297432db552507f00ad8b9ab312019d17e1ddbaa8139be044e7807256"
      },
      "canonical_utf8": "{\"action\":\"license_issued\",\"actor\":\"usr_owner\",\"entity_id\":\"pgl_0123456789abcdef0123456789abcdef\",\"entity_type\":\"license\",\"event_id\":\"evt_00000000000000000000000000000002\",\"metadata\":{\"licensee_id\":\"lic_prampta_studio\"},\"prev_hash\":\"f00465e297432db552507f00ad8b9ab312019d17e1ddbaa8139be044e7807256\",\"timestamp\":\"2026-01-01T00:05:00+00:00\"}",
      "sha256_hex": "cf7e5de393a24892f271da00335bc09fb121ba7adc4f4c41ab9e07fd4a939c78",
      "signature_hex": "afcc110520c7db40e90636447bcde388256a0a92915f6032a98701353c21ce9a35e1a9da8e368dbbaaf26de52a491034a058e893daa5ed720fc06f45abe77903"
    }
  ],
  "license_countersignature": {
    "license_id": "PG-PRM-000042-K7M2QXV",
    "body": {
      "v": "pg.license.v2",
      "subject_id": "sub_ada_lovelace",
      "licensee_id": "lic_prampta_studio",
      "license_class": "PRM",
      "scope": [
        "image"
      ],
      "deny_categories": [],
      "immutable_denials": [
        "adult"
      ],
      "required_obligations": {
        "watermark": true
      },
      "expires_at": 1796271600,
      "contract_start": 1764735600,
      "product_name": "",
      "project_name": "station-2026",
      "purpose": {
        "use_case": "commercial"
      },
      "extensions": [],
      "rules_text": ""
    },
    "canonical_utf8": "{\"contract_start\":1764735600,\"deny_categories\":[],\"expires_at\":1796271600,\"extensions\":[],\"immutable_denials\":[\"adult\"],\"license_class\":\"PRM\",\"licensee_id\":\"lic_prampta_studio\",\"product_name\":\"\",\"project_name\":\"station-2026\",\"purpose\":{\"use_case\":\"commercial\"},\"required_obligations\":{\"watermark\":true},\"rules_text\":\"\",\"scope\":[\"image\"],\"subject_id\":\"sub_ada_lovelace\",\"v\":\"pg.license.v2\"}",
    "subject_public_key_hex": "f74cc250ef1768ad35723b05134ed3b49cdd7dd7c93e13aff11b72e7345f5711",
    "subject_signature_hex": "4375a957f05caa8d17930dc6558557bff96aaddf9a1fd2c4252e02e3f8706e665c1e60ab087603849b2d4fa6fa9b2ade05e8d6f470110f88e2bca013b210db05",
    "countersign_message_hex": "7b22636f6e74726163745f7374617274223a313736343733353630302c2264656e795f63617465676f72696573223a5b5d2c22657870697265735f6174223a313739363237313630302c22657874656e73696f6e73223a5b5d2c22696d6d757461626c655f64656e69616c73223a5b226164756c74225d2c226c6963656e73655f636c617373223a2250524d222c226c6963656e7365655f6964223a226c69635f7072616d7074615f73747564696f222c2270726f647563745f6e616d65223a22222c2270726f6a6563745f6e616d65223a2273746174696f6e2d32303236222c22707572706f7365223a7b227573655f63617365223a22636f6d6d65726369616c227d2c2272657175697265645f6f626c69676174696f6e73223a7b2277617465726d61726b223a747275657d2c2272756c65735f74657874223a22222c2273636f7065223a5b22696d616765225d2c227375626a6563745f6964223a227375625f6164615f6c6f76656c616365222c2276223a2270672e6c6963656e73652e7632227d4375a957f05caa8d17930dc6558557bff96aaddf9a1fd2c4252e02e3f8706e665c1e60ab087603849b2d4fa6fa9b2ade05e8d6f470110f88e2bca013b210db0550472d50524d2d3030303034322d4b374d32515856",
    "operator_signature_hex": "0f17df0682c41368a6edbb0727032056101de158d153aa2488aeeac1dd15e8641bde7d4918456b98ba3fdb27d2c7a6e447d0aaeccbb681a92e5bcf595da6b908"
  },
  "namespace": {
    "comment": "Directory signed by the test steward; check_namespace assumes the directory was accepted.",
    "steward_public_key_hex": "f64cf5814ec7126951909fe7999ed35919badbecba1679a051919ccc1cbe64d1",
    "directory": {
      "schema": "pregen.registries.v2",
      "sequence": 3,
      "issued_at": "2026-10-01T00:00:00Z",
      "registries": [
        {
          "name": "Origin",
          "prefix": "",
          "api": "https://origin.example",
          "keys": "https://origin.example/keys",
          "key_fingerprints": [
            "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
          ]
        },
        {
          "name": "Newreg",
          "prefix": "NWRD",
          "api": "https://nwrd.example",
          "keys": "https://nwrd.example/keys",
          "key_fingerprints": [
            "pg-ed25519:77183061652862e2a4a41269711125f2"
          ]
        }
      ],
      "providers": [],
      "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
      "signature": "c259ae9b510f9c1a160c11d2ef354d174de109c76a367697002f1024123209302dda63bf1dd004e0ef6f8b92543ada3916867f3af930e127acfd209223ada600"
    },
    "directory_cases": [
      {
        "name": "valid",
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "c259ae9b510f9c1a160c11d2ef354d174de109c76a367697002f1024123209302dda63bf1dd004e0ef6f8b92543ada3916867f3af930e127acfd209223ada600"
        },
        "min_sequence": 0,
        "valid": true
      },
      {
        "name": "older_than_seen",
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "c259ae9b510f9c1a160c11d2ef354d174de109c76a367697002f1024123209302dda63bf1dd004e0ef6f8b92543ada3916867f3af930e127acfd209223ada600"
        },
        "min_sequence": 4,
        "valid": false
      },
      {
        "name": "tampered_keys",
        "valid": false,
        "min_sequence": 0,
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2",
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "c259ae9b510f9c1a160c11d2ef354d174de109c76a367697002f1024123209302dda63bf1dd004e0ef6f8b92543ada3916867f3af930e127acfd209223ada600"
        }
      },
      {
        "name": "two_bare_entries",
        "valid": false,
        "min_sequence": 0,
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "d676d0756f74dc4246caee0a0ab9bb0a0b7d6b82ab8fe52057352235c9f577d4540af875fc472bc4b4ecd00abadb97773c93726662ad1d7de04c64e34572bb0a"
        }
      },
      {
        "name": "prefix_twice",
        "valid": false,
        "min_sequence": 0,
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            },
            {
              "name": "Copy",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "ea176a800f588a4ed8cc9b21b77c0b51d72a7d5799566b5f45351ce909748e64580de0eda449dad053feb52830937fe51a011eee8f3accd269625d3169155f05"
        }
      }
    ],
    "namespace_cases": [
      {
        "name": "bare_by_origin",
        "code": "PG-PRM-000042-K7M2QXV",
        "signer_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
        "result": "valid"
      },
      {
        "name": "bare_by_other_registry",
        "code": "PG-PRM-000042-K7M2QXV",
        "signer_key_id": "pg-ed25519:77183061652862e2a4a41269711125f2",
        "result": "issuer_mismatch"
      },
      {
        "name": "legacy_bare_by_other_registry",
        "code": "PG-STD-000123",
        "signer_key_id": "pg-ed25519:77183061652862e2a4a41269711125f2",
        "result": "issuer_mismatch"
      },
      {
        "name": "retired_class_bare_by_origin",
        "code": "PG-EDT-000012",
        "signer_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
        "result": "valid"
      },
      {
        "name": "prefixed_by_owner",
        "code": "PG-NWRD-RND-000042-ZZZZZZJ",
        "signer_key_id": "pg-ed25519:77183061652862e2a4a41269711125f2",
        "result": "valid"
      },
      {
        "name": "prefixed_by_origin",
        "code": "PG-NWRD-RND-000042-ZZZZZZJ",
        "signer_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
        "result": "issuer_mismatch"
      },
      {
        "name": "unlisted_prefix",
        "code": "PG-ZZZZ-000042~",
        "signer_key_id": "pg-ed25519:77183061652862e2a4a41269711125f2",
        "result": "unknown_issuer"
      }
    ],
    "revocation_cases": [
      {
        "name": "revoked_registry",
        "code": "PG-NWRD-RND-000042-ZZZZZZJ",
        "signer_key_id": "pg-ed25519:77183061652862e2a4a41269711125f2",
        "result": "revoked",
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ],
              "revoked": {
                "at": "2026-10-04T00:00:00Z",
                "reason": "test"
              }
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "f981796300a7d66cd6b4ada9002f83ea57b234da0b2f4504aa669caab0f24abee9aba995944e9a1ee854e98933e48adbaed4506860b69cee1f78d5c3e2a05409"
        }
      },
      {
        "name": "other_registry_unaffected",
        "code": "PG-PRM-000042-K7M2QXV",
        "signer_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
        "result": "valid",
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ],
              "revoked": {
                "at": "2026-10-04T00:00:00Z",
                "reason": "test"
              }
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "signature": "f981796300a7d66cd6b4ada9002f83ea57b234da0b2f4504aa669caab0f24abee9aba995944e9a1ee854e98933e48adbaed4506860b69cee1f78d5c3e2a05409"
        }
      },
      {
        "name": "revoked_key",
        "code": "PG-PRM-000042-K7M2QXV",
        "signer_key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
        "result": "revoked",
        "directory": {
          "schema": "pregen.registries.v2",
          "sequence": 3,
          "issued_at": "2026-10-01T00:00:00Z",
          "registries": [
            {
              "name": "Origin",
              "prefix": "",
              "api": "https://origin.example",
              "keys": "https://origin.example/keys",
              "key_fingerprints": [
                "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1"
              ]
            },
            {
              "name": "Newreg",
              "prefix": "NWRD",
              "api": "https://nwrd.example",
              "keys": "https://nwrd.example/keys",
              "key_fingerprints": [
                "pg-ed25519:77183061652862e2a4a41269711125f2"
              ]
            }
          ],
          "providers": [],
          "steward_key_id": "pg-ed25519:29088032de37bbef4318392dd94be78d",
          "revoked_keys": [
            {
              "key_id": "pg-ed25519:225bee029538a6e5bc89f03d83cd45b1",
              "at": "2026-10-04T00:00:00Z"
            }
          ],
          "signature": "251063f2286d056c20cc1dd19616d49b695a0b02f1c44e75ace939c91a7f53dabb25771fce5e99a95447a45dca2fdfb688c69fcd6e3c0ca999ef1ac96a0b5804"
        }
      }
    ]
  },
  "pg_code": {
    "comment": "PG code format (2026-08-19). Weighted sum mod 37: each body character's alphabet VALUE times its 1-based position, summed, mod 37, indexed into alphabet+check_extra. See spec/PG-CODE.md.",
    "alphabet": "0123456789ABCDEFGHJKMNPQRSTVWXYZ",
    "check_extra": "*~$=!",
    "modulus": 37,
    "check_char": [
      {
        "body": "000000",
        "check_char": "0"
      },
      {
        "body": "000043",
        "check_char": "1"
      },
      {
        "body": "000034",
        "check_char": "2"
      },
      {
        "body": "000025",
        "check_char": "3"
      },
      {
        "body": "000016",
        "check_char": "4"
      },
      {
        "body": "000007",
        "check_char": "5"
      },
      {
        "body": "000001",
        "check_char": "6"
      },
      {
        "body": "000044",
        "check_char": "7"
      },
      {
        "body": "000035",
        "check_char": "8"
      },
      {
        "body": "000026",
        "check_char": "9"
      },
      {
        "body": "000017",
        "check_char": "A"
      },
      {
        "body": "000008",
        "check_char": "B"
      },
      {
        "body": "000002",
        "check_char": "C"
      },
      {
        "body": "000045",
        "check_char": "D"
      },
      {
        "body": "000036",
        "check_char": "E"
      },
      {
        "body": "000027",
        "check_char": "F"
      },
      {
        "body": "000018",
        "check_char": "G"
      },
      {
        "body": "000009",
        "check_char": "H"
      },
      {
        "body": "000003",
        "check_char": "J"
      },
      {
        "body": "000046",
        "check_char": "K"
      },
      {
        "body": "000037",
        "check_char": "M"
      },
      {
        "body": "000028",
        "check_char": "N"
      },
      {
        "body": "000019",
        "check_char": "P"
      },
      {
        "body": "000013",
        "check_char": "Q"
      },
      {
        "body": "000004",
        "check_char": "R"
      },
      {
        "body": "000047",
        "check_char": "S"
      },
      {
        "body": "000038",
        "check_char": "T"
      },
      {
        "body": "000029",
        "check_char": "V"
      },
      {
        "body": "000023",
        "check_char": "W"
      },
      {
        "body": "000014",
        "check_char": "X"
      },
      {
        "body": "000005",
        "check_char": "Y"
      },
      {
        "body": "000048",
        "check_char": "Z"
      },
      {
        "body": "000039",
        "check_char": "*"
      },
      {
        "body": "000033",
        "check_char": "~"
      },
      {
        "body": "000024",
        "check_char": "$"
      },
      {
        "body": "000015",
        "check_char": "="
      },
      {
        "body": "000006",
        "check_char": "!"
      }
    ],
    "subject_code": [
      {
        "serial": 1,
        "code": "PG-0000016"
      },
      {
        "serial": 2,
        "code": "PG-000002C"
      },
      {
        "serial": 42,
        "code": "PG-000042*"
      },
      {
        "serial": 99999,
        "code": "PG-099999*"
      },
      {
        "serial": 100000,
        "code": "PG-1000001"
      },
      {
        "serial": 999999,
        "code": "PG-9999994"
      },
      {
        "serial": 1000000,
        "code": "PG-10000001"
      },
      {
        "serial": 12345678,
        "code": "PG-12345678K"
      }
    ],
    "license_id": [
      {
        "license_class": "STD",
        "subject_serial": 1,
        "tail": "K7M2QX",
        "license_id": "PG-STD-000001-K7M2QX9"
      },
      {
        "license_class": "RND",
        "subject_serial": 42,
        "tail": "ZZZZZZ",
        "license_id": "PG-RND-000042-ZZZZZZ1"
      },
      {
        "license_class": "PRM",
        "subject_serial": 999999,
        "tail": "000000",
        "license_id": "PG-PRM-999999-0000000"
      },
      {
        "license_class": "PRM",
        "subject_serial": 1234567,
        "tail": "A1B2C3",
        "license_id": "PG-PRM-1234567-A1B2C3R"
      }
    ],
    "rejects": [
      {
        "kind": "single_digit_substitution",
        "body": "000043",
        "check_char": "*"
      },
      {
        "kind": "adjacent_transposition",
        "body": "000420",
        "check_char": "*"
      },
      {
        "kind": "wrong_check_char",
        "body": "000042",
        "check_char": "0"
      }
    ],
    "issuer_subject_code": [
      {
        "issuer": "NWRD",
        "serial": 1,
        "code": "PG-NWRD-000001T"
      },
      {
        "issuer": "NWRD",
        "serial": 42,
        "code": "PG-NWRD-000042="
      },
      {
        "issuer": "ZYXW",
        "serial": 1234567,
        "code": "PG-ZYXW-1234567R"
      },
      {
        "issuer": "ABCD",
        "serial": 999999,
        "code": "PG-ABCD-9999997"
      }
    ],
    "issuer_license_id": [
      {
        "issuer": "NWRD",
        "license_class": "RND",
        "subject_serial": 42,
        "tail": "ZZZZZZ",
        "license_id": "PG-NWRD-RND-000042-ZZZZZZJ"
      },
      {
        "issuer": "ABCD",
        "license_class": "PRM",
        "subject_serial": 1234567,
        "tail": "A1B2C3",
        "license_id": "PG-ABCD-PRM-1234567-A1B2C3A"
      }
    ],
    "max_body_length": 36,
    "length_accepts": [
      {
        "kind": "body_of_36",
        "body": "100000000000000000000000000000000000",
        "check_char": "1"
      }
    ],
    "length_rejects": [
      {
        "kind": "body_of_37",
        "body": "1000000000000000000000000000000000000",
        "check_char": "1"
      },
      {
        "kind": "body_of_37_last_digit_changed",
        "body": "1000000000000000000000000000000000001",
        "check_char": "1"
      }
    ],
    "issuer_rejects": [
      {
        "kind": "issuer_letter_substitution",
        "body": "NWRE000042",
        "check_char": "="
      },
      {
        "kind": "issuer_transposition",
        "body": "WNRD000042",
        "check_char": "="
      }
    ]
  }
}
