{
  "algorithms": [
    "wheel-v1",
    "shuffle-v1"
  ],
  "generated_by": "spec/reference.py",
  "commitment_vectors": [
    {
      "labels": [
        "Alice",
        "Bob",
        "Carol"
      ],
      "weights": [
        1,
        1,
        1
      ],
      "salt": "0f1e2d3c4b5a69788796a5b4c3d2e1f000112233445566778899aabbccddeeff",
      "canonical_json": "{\"algorithm\":\"wheel-v1\",\"entries\":[{\"label\":\"Alice\",\"slot\":1,\"weight\":1},{\"label\":\"Bob\",\"slot\":2,\"weight\":1},{\"label\":\"Carol\",\"slot\":3,\"weight\":1}],\"salt\":\"0f1e2d3c4b5a69788796a5b4c3d2e1f000112233445566778899aabbccddeeff\"}",
      "commitment": "f025da1ccbaf89f5b8cae754464a5d61cfc009eca2cdc4b2ee9d35fd9f3055a4"
    },
    {
      "labels": [
        "Zoë",
        "quote \" and \\ backslash",
        "日本語",
        "😀 emoji",
        "tab nbsp / slash"
      ],
      "weights": [
        1,
        2,
        3,
        4,
        1000
      ],
      "salt": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "canonical_json": "{\"algorithm\":\"wheel-v1\",\"entries\":[{\"label\":\"Zo\\u00eb\",\"slot\":1,\"weight\":1},{\"label\":\"quote \\\" and \\\\ backslash\",\"slot\":2,\"weight\":2},{\"label\":\"\\u65e5\\u672c\\u8a9e\",\"slot\":3,\"weight\":3},{\"label\":\"\\ud83d\\ude00 emoji\",\"slot\":4,\"weight\":4},{\"label\":\"tab\\u00a0nbsp / slash\",\"slot\":5,\"weight\":1000}],\"salt\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}",
      "commitment": "fc2483ab4f963bd4526b34c3501ea237f830fb487528ab72beef7d03c52cbeab"
    },
    {
      "labels": [
        "Alice",
        "Bob"
      ],
      "weights": [
        1,
        1
      ],
      "salt": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "algorithm": "shuffle-v1",
      "canonical_json": "{\"algorithm\":\"shuffle-v1\",\"entries\":[{\"label\":\"Alice\",\"slot\":1,\"weight\":1},{\"label\":\"Bob\",\"slot\":2,\"weight\":1}],\"salt\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"}",
      "commitment": "e9cfb0c5b4fa85ac38c32bf0752a1961656485dc3935aa05c431ef15ab2f0ab8"
    }
  ],
  "draw_vectors": [
    {
      "name": "uniform, first sample accepted",
      "weights": [
        1,
        1,
        1
      ],
      "value": "00000005000000000000000000000000",
      "expected": {
        "winning_slot": 3,
        "accepted_sample_index": 0
      }
    },
    {
      "name": "uniform, first sample rejected at the limit",
      "weights": [
        1,
        1,
        1
      ],
      "value": "ffffffff000000050000000000000000",
      "expected": {
        "winning_slot": 3,
        "accepted_sample_index": 1
      }
    },
    {
      "name": "weighted, low value lands in slot 1",
      "weights": [
        1,
        1000
      ],
      "value": "00000000000000000000000000000000",
      "expected": {
        "winning_slot": 1,
        "accepted_sample_index": 0
      }
    },
    {
      "name": "weighted, next value lands in slot 2",
      "weights": [
        1,
        1000
      ],
      "value": "00000001000000000000000000000000",
      "expected": {
        "winning_slot": 2,
        "accepted_sample_index": 0
      }
    },
    {
      "name": "500 x 1000, largest accepted value",
      "weights": {
        "repeat": 1000,
        "count": 500
      },
      "value": "fff8de9f000000000000000000000000",
      "expected": {
        "winning_slot": 500,
        "accepted_sample_index": 0
      }
    },
    {
      "name": "500 x 1000, smallest rejected value",
      "weights": {
        "repeat": 1000,
        "count": 500
      },
      "value": "fff8dea0000030390000000000000000",
      "expected": {
        "winning_slot": 13,
        "accepted_sample_index": 1
      }
    },
    {
      "name": "all four samples rejected",
      "weights": [
        1,
        1,
        1
      ],
      "value": "ffffffffffffffffffffffffffffffff",
      "expected": null
    },
    {
      "name": "two api2 draws concatenated",
      "weights": [
        1,
        1,
        1
      ],
      "value": "ffffffffffffffffffffffffffffffff00000007000000000000000000000000",
      "expected": {
        "winning_slot": 2,
        "accepted_sample_index": 4
      }
    }
  ],
  "shuffle_vectors": [
    {
      "name": "3 entries, samples 7 and 5",
      "n": 3,
      "value": "0000000000000000000000000000011100000000000000000000000000000101",
      "expected_order": [
        1,
        3,
        2
      ]
    },
    {
      "name": "3 entries, first sample rejected at the limit",
      "n": 3,
      "value": "111111111111111111111111111111110000000000000000000000000000011100000000000000000000000000000101",
      "expected_order": [
        1,
        3,
        2
      ]
    },
    {
      "name": "4 entries, bits run out",
      "n": 4,
      "value": "0000000000000000000000000000000100000000000000000000000000000010",
      "expected_order": null
    },
    {
      "name": "500 entries, samples counting up",
      "n": 500,
      "value": "00000000000000000000001111101000000000000000000000000011111010010000000000000000000000111110101000000000000000000000001111101011000000000000000000000011111011000000000000000000000000111110110100000000000000000000001111101110000000000000000000000011111011110000000000000000000000111111000000000000000000000000001111110001000000000000000000000011111100100000000000000000000000111111001100000000000000000000001111110100000000000000000000000011111101010000000000000000000000111111011000000000000000000000001111110111000000000000000000000011111110000000000000000000000000111111100100000000000000000000001111111010000000000000000000000011111110110000000000000000000000111111110000000000000000000000001111111101000000000000000000000011111111100000000000000000000000111111111100000000000000000000010000000000000000000000000000000100000000010000000000000000000001000000001000000000000000000000010000000011000000000000000000000100000001000000000000000000000001000000010100000000000000000000010000000110000000000000000000000100000001110000000000000000000001000000100000000000000000000000010000001001000000000000000000000100000010100000000000000000000001000000101100000000000000000000010000001100000000000000000000000100000011010000000000000000000001000000111000000000000000000000010000001111000000000000000000000100000100000000000000000000000001000001000100000000000000000000010000010010000000000000000000000100000100110000000000000000000001000001010000000000000000000000010000010101000000000000000000000100000101100000000000000000000001000001011100000000000000000000010000011000000000000000000000000100000110010000000000000000000001000001101000000000000000000000010000011011000000000000000000000100000111000000000000000000000001000001110100000000000000000000010000011110000000000000000000000100000111110000000000000000000001000010000000000000000000000000010000100001000000000000000000000100001000100000000000000000000001000010001100000000000000000000010000100100000000000000000000000100001001010000000000000000000001000010011000000000000000000000010000100111000000000000000000000100001010000000000000000000000001000010100100000000000000000000010000101010000000000000000000000100001010110000000000000000000001000010110000000000000000000000010000101101000000000000000000000100001011100000000000000000000001000010111100000000000000000000010000110000000000000000000000000100001100010000000000000000000001000011001000000000000000000000010000110011000000000000000000000100001101000000000000000000000001000011010100000000000000000000010000110110000000000000000000000100001101110000000000000000000001000011100000000000000000000000010000111001000000000000000000000100001110100000000000000000000001000011101100000000000000000000010000111100000000000000000000000100001111010000000000000000000001000011111000000000000000000000010000111111000000000000000000000100010000000000000000000000000001000100000100000000000000000000010001000010000000000000000000000100010000110000000000000000000001000100010000000000000000000000010001000101000000000000000000000100010001100000000000000000000001000100011100000000000000000000010001001000000000000000000000000100010010010000000000000000000001000100101000000000000000000000010001001011000000000000000000000100010011000000000000000000000001000100110100000000000000000000010001001110000000000000000000000100010011110000000000000000000001000101000000000000000000000000010001010001000000000000000000000100010100100000000000000000000001000101001100000000000000000000010001010100000000000000000000000100010101010000000000000000000001000101011000000000000000000000010001010111000000000000000000000100010110000000000000000000000001000101100100000000000000000000010001011010000000000000000000000100010110110000000000000000000001000101110000000000000000000000010001011101000000000000000000000100010111100000000000000000000001000101111100000000000000000000010001100000000000000000000000000100011000010000000000000000000001000110001000000000000000000000010001100011000000000000000000000100011001000000000000000000000001000110010100000000000000000000010001100110000000000000000000000100011001110000000000000000000001000110100000000000000000000000010001101001000000000000000000000100011010100000000000000000000001000110101100000000000000000000010001101100000000000000000000000100011011010000000000000000000001000110111000000000000000000000010001101111000000000000000000000100011100000000000000000000000001000111000100000000000000000000010001110010000000000000000000000100011100110000000000000000000001000111010000000000000000000000010001110101000000000000000000000100011101100000000000000000000001000111011100000000000000000000010001111000000000000000000000000100011110010000000000000000000001000111101000000000000000000000010001111011000000000000000000000100011111000000000000000000000001000111110100000000000000000000010001111110000000000000000000000100011111110000000000000000000001001000000000000000000000000000010010000001000000000000000000000100100000100000000000000000000001001000001100000000000000000000010010000100000000000000000000000100100001010000000000000000000001001000011000000000000000000000010010000111000000000000000000000100100010000000000000000000000001001000100100000000000000000000010010001010000000000000000000000100100010110000000000000000000001001000110000000000000000000000010010001101000000000000000000000100100011100000000000000000000001001000111100000000000000000000010010010000000000000000000000000100100100010000000000000000000001001001001000000000000000000000010010010011000000000000000000000100100101000000000000000000000001001001010100000000000000000000010010010110000000000000000000000100100101110000000000000000000001001001100000000000000000000000010010011001000000000000000000000100100110100000000000000000000001001001101100000000000000000000010010011100000000000000000000000100100111010000000000000000000001001001111000000000000000000000010010011111000000000000000000000100101000000000000000000000000001001010000100000000000000000000010010100010000000000000000000000100101000110000000000000000000001001010010000000000000000000000010010100101000000000000000000000100101001100000000000000000000001001010011100000000000000000000010010101000000000000000000000000100101010010000000000000000000001001010101000000000000000000000010010101011000000000000000000000100101011000000000000000000000001001010110100000000000000000000010010101110000000000000000000000100101011110000000000000000000001001011000000000000000000000000010010110001000000000000000000000100101100100000000000000000000001001011001100000000000000000000010010110100000000000000000000000100101101010000000000000000000001001011011000000000000000000000010010110111000000000000000000000100101110000000000000000000000001001011100100000000000000000000010010111010000000000000000000000100101110110000000000000000000001001011110000000000000000000000010010111101000000000000000000000100101111100000000000000000000001001011111100000000000000000000010011000000000000000000000000000100110000010000000000000000000001001100001000000000000000000000010011000011000000000000000000000100110001000000000000000000000001001100010100000000000000000000010011000110000000000000000000000100110001110000000000000000000001001100100000000000000000000000010011001001000000000000000000000100110010100000000000000000000001001100101100000000000000000000010011001100000000000000000000000100110011010000000000000000000001001100111000000000000000000000010011001111000000000000000000000100110100000000000000000000000001001101000100000000000000000000010011010010000000000000000000000100110100110000000000000000000001001101010000000000000000000000010011010101000000000000000000000100110101100000000000000000000001001101011100000000000000000000010011011000000000000000000000000100110110010000000000000000000001001101101000000000000000000000010011011011000000000000000000000100110111000000000000000000000001001101110100000000000000000000010011011110000000000000000000000100110111110000000000000000000001001110000000000000000000000000010011100001000000000000000000000100111000100000000000000000000001001110001100000000000000000000010011100100000000000000000000000100111001010000000000000000000001001110011000000000000000000000010011100111000000000000000000000100111010000000000000000000000001001110100100000000000000000000010011101010000000000000000000000100111010110000000000000000000001001110110000000000000000000000010011101101000000000000000000000100111011100000000000000000000001001110111100000000000000000000010011110000000000000000000000000100111100010000000000000000000001001111001000000000000000000000010011110011000000000000000000000100111101000000000000000000000001001111010100000000000000000000010011110110000000000000000000000100111101110000000000000000000001001111100000000000000000000000010011111001000000000000000000000100111110100000000000000000000001001111101100000000000000000000010011111100000000000000000000000100111111010000000000000000000001001111111000000000000000000000010011111111000000000000000000000101000000000000000000000000000001010000000100000000000000000000010100000010000000000000000000000101000000110000000000000000000001010000010000000000000000000000010100000101000000000000000000000101000001100000000000000000000001010000011100000000000000000000010100001000000000000000000000000101000010010000000000000000000001010000101000000000000000000000010100001011000000000000000000000101000011000000000000000000000001010000110100000000000000000000010100001110000000000000000000000101000011110000000000000000000001010001000000000000000000000000010100010001000000000000000000000101000100100000000000000000000001010001001100000000000000000000010100010100000000000000000000000101000101010000000000000000000001010001011000000000000000000000010100010111000000000000000000000101000110000000000000000000000001010001100100000000000000000000010100011010000000000000000000000101000110110000000000000000000001010001110000000000000000000000010100011101000000000000000000000101000111100000000000000000000001010001111100000000000000000000010100100000000000000000000000000101001000010000000000000000000001010010001000000000000000000000010100100011000000000000000000000101001001000000000000000000000001010010010100000000000000000000010100100110000000000000000000000101001001110000000000000000000001010010100000000000000000000000010100101001000000000000000000000101001010100000000000000000000001010010101100000000000000000000010100101100000000000000000000000101001011010000000000000000000001010010111000000000000000000000010100101111000000000000000000000101001100000000000000000000000001010011000100000000000000000000010100110010000000000000000000000101001100110000000000000000000001010011010000000000000000000000010100110101000000000000000000000101001101100000000000000000000001010011011100000000000000000000010100111000000000000000000000000101001110010000000000000000000001010011101000000000000000000000010100111011000000000000000000000101001111000000000000000000000001010011110100000000000000000000010100111110000000000000000000000101001111110000000000000000000001010100000000000000000000000000010101000001000000000000000000000101010000100000000000000000000001010100001100000000000000000000010101000100000000000000000000000101010001010000000000000000000001010100011000000000000000000000010101000111000000000000000000000101010010000000000000000000000001010100100100000000000000000000010101001010000000000000000000000101010010110000000000000000000001010100110000000000000000000000010101001101000000000000000000000101010011100000000000000000000001010100111100000000000000000000010101010000000000000000000000000101010100010000000000000000000001010101001000000000000000000000010101010011000000000000000000000101010101000000000000000000000001010101010100000000000000000000010101010110000000000000000000000101010101110000000000000000000001010101100000000000000000000000010101011001000000000000000000000101010110100000000000000000000001010101101100000000000000000000010101011100000000000000000000000101010111010000000000000000000001010101111000000000000000000000010101011111000000000000000000000101011000000000000000000000000001010110000100000000000000000000010101100010000000000000000000000101011000110000000000000000000001010110010000000000000000000000010101100101000000000000000000000101011001100000000000000000000001010110011100000000000000000000010101101000000000000000000000000101011010010000000000000000000001010110101000000000000000000000010101101011000000000000000000000101011011000000000000000000000001010110110100000000000000000000010101101110000000000000000000000101011011110000000000000000000001010111000000000000000000000000010101110001000000000000000000000101011100100000000000000000000001010111001100000000000000000000010101110100000000000000000000000101011101010000000000000000000001010111011000000000000000000000010101110111000000000000000000000101011110000000000000000000000001010111100100000000000000000000010101111010000000000000000000000101011110110000000000000000000001010111110000000000000000000000010101111101000000000000000000000101011111100000000000000000000001010111111100000000000000000000010110000000000000000000000000000101100000010000000000000000000001011000001000000000000000000000010110000011000000000000000000000101100001000000000000000000000001011000010100000000000000000000010110000110000000000000000000000101100001110000000000000000000001011000100000000000000000000000010110001001000000000000000000000101100010100000000000000000000001011000101100000000000000000000010110001100000000000000000000000101100011010000000000000000000001011000111000000000000000000000010110001111000000000000000000000101100100000000000000000000000001011001000100000000000000000000010110010010000000000000000000000101100100110000000000000000000001011001010000000000000000000000010110010101000000000000000000000101100101100000000000000000000001011001011100000000000000000000010110011000000000000000000000000101100110010000000000000000000001011001101000000000000000000000010110011011000000000000000000000101100111000000000000000000000001011001110100000000000000000000010110011110000000000000000000000101100111110000000000000000000001011010000000000000000000000000010110100001000000000000000000000101101000100000000000000000000001011010001100000000000000000000010110100100000000000000000000000101101001010000000000000000000001011010011000000000000000000000010110100111000000000000000000000101101010000000000000000000000001011010100100000000000000000000010110101010000000000000000000000101101010110000000000000000000001011010110000000000000000000000010110101101000000000000000000000101101011100000000000000000000001011010111100000000000000000000010110110000000000000000000000000101101100010000000000000000000001011011001000000000000000000000010110110011000000000000000000000101101101000000000000000000000001011011010100000000000000000000010110110110000000000000000000000101101101110000000000000000000001011011100000000000000000000000010110111001000000000000000000000101101110100000000000000000000001011011101100000000000000000000010110111100000000000000000000000101101111010000000000000000000001011011111000000000000000000000010110111111000000000000000000000101110000000000000000000000000001011100000100000000000000000000010111000010000000000000000000000101110000110000000000000000000001011100010000000000000000000000010111000101000000000000000000000101110001100000000000000000000001011100011100000000000000000000010111001000000000000000000000000101110010010000000000000000000001011100101000000000000000000000010111001011000000000000000000000101110011000000000000000000000001011100110100000000000000000000010111001110000000000000000000000101110011110000000000000000000001011101000000000000000000000000010111010001000000000000000000000101110100100000000000000000000001011101001100000000000000000000010111010100000000000000000000000101110101010000000000000000000001011101011000000000000000000000010111010111000000000000000000000101110110000000000000000000000001011101100100000000000000000000010111011010",
      "expected_order": [
        2,
        376,
        499,
        8,
        239,
        72,
        14,
        222,
        18,
        12,
        491,
        15,
        23,
        107,
        20,
        215,
        347,
        83,
        317,
        302,
        110,
        426,
        359,
        35,
        30,
        353,
        378,
        427,
        227,
        50,
        48,
        321,
        63,
        47,
        42,
        306,
        487,
        54,
        95,
        74,
        397,
        311,
        406,
        68,
        252,
        479,
        44,
        62,
        159,
        341,
        140,
        461,
        155,
        394,
        99,
        260,
        78,
        255,
        402,
        75,
        326,
        128,
        179,
        92,
        275,
        138,
        134,
        168,
        411,
        98,
        393,
        203,
        410,
        451,
        467,
        380,
        152,
        114,
        158,
        90,
        162,
        123,
        267,
        102,
        303,
        39,
        493,
        195,
        391,
        305,
        318,
        439,
        388,
        170,
        399,
        120,
        291,
        384,
        135,
        443,
        433,
        119,
        414,
        463,
        147,
        212,
        429,
        332,
        84,
        457,
        481,
        182,
        32,
        418,
        299,
        174,
        308,
        390,
        204,
        144,
        132,
        183,
        413,
        263,
        218,
        449,
        104,
        309,
        473,
        194,
        60,
        242,
        323,
        27,
        167,
        219,
        409,
        230,
        278,
        415,
        422,
        284,
        405,
        447,
        290,
        403,
        210,
        188,
        401,
        417,
        453,
        437,
        459,
        198,
        279,
        234,
        471,
        395,
        477,
        180,
        207,
        243,
        489,
        251,
        400,
        396,
        389,
        192,
        338,
        272,
        228,
        344,
        385,
        423,
        200,
        383,
        312,
        356,
        381,
        240,
        362,
        431,
        419,
        368,
        296,
        248,
        374,
        329,
        441,
        266,
        164,
        224,
        150,
        143,
        398,
        386,
        122,
        254,
        108,
        407,
        469,
        87,
        80,
        421,
        287,
        59,
        483,
        379,
        38,
        314,
        24,
        371,
        497,
        3,
        258,
        324,
        434,
        327,
        438,
        264,
        442,
        333,
        446,
        336,
        270,
        339,
        454,
        342,
        458,
        276,
        462,
        348,
        466,
        351,
        282,
        354,
        474,
        357,
        478,
        288,
        482,
        363,
        486,
        366,
        294,
        369,
        494,
        372,
        498,
        300,
        246,
        315,
        236,
        231,
        425,
        320,
        216,
        430,
        206,
        392,
        435,
        191,
        186,
        330,
        176,
        171,
        445,
        335,
        156,
        450,
        146,
        387,
        455,
        131,
        126,
        345,
        116,
        111,
        465,
        350,
        96,
        470,
        86,
        382,
        475,
        71,
        66,
        360,
        56,
        51,
        485,
        365,
        36,
        490,
        26,
        377,
        495,
        11,
        6,
        375,
        297,
        293,
        404,
        285,
        281,
        408,
        273,
        269,
        412,
        261,
        257,
        416,
        249,
        245,
        420,
        237,
        233,
        424,
        225,
        221,
        428,
        213,
        209,
        432,
        201,
        197,
        436,
        189,
        185,
        440,
        177,
        173,
        444,
        165,
        161,
        448,
        153,
        149,
        452,
        141,
        137,
        456,
        129,
        125,
        460,
        117,
        113,
        464,
        105,
        101,
        468,
        93,
        89,
        472,
        81,
        77,
        476,
        69,
        65,
        480,
        57,
        53,
        484,
        45,
        41,
        488,
        33,
        29,
        492,
        21,
        17,
        496,
        9,
        5,
        500,
        373,
        370,
        367,
        364,
        361,
        358,
        355,
        352,
        349,
        346,
        343,
        340,
        337,
        334,
        331,
        328,
        325,
        322,
        319,
        316,
        313,
        310,
        307,
        304,
        301,
        298,
        295,
        292,
        289,
        286,
        283,
        280,
        277,
        274,
        271,
        268,
        265,
        262,
        259,
        256,
        253,
        250,
        247,
        244,
        241,
        238,
        235,
        232,
        229,
        226,
        223,
        220,
        217,
        214,
        211,
        208,
        205,
        202,
        199,
        196,
        193,
        190,
        187,
        184,
        181,
        178,
        175,
        172,
        169,
        166,
        163,
        160,
        157,
        154,
        151,
        148,
        145,
        142,
        139,
        136,
        133,
        130,
        127,
        124,
        121,
        118,
        115,
        112,
        109,
        106,
        103,
        100,
        97,
        94,
        91,
        88,
        85,
        82,
        79,
        76,
        73,
        70,
        67,
        64,
        61,
        58,
        55,
        52,
        49,
        46,
        43,
        40,
        37,
        34,
        31,
        28,
        25,
        22,
        19,
        16,
        13,
        10,
        7,
        4,
        1
      ]
    }
  ]
}
