You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DateKeys/testdata/vectors/security.json

133 lines
5.5 KiB

Format 3, step 6c: the vectors of paths, keys, heads and security The vector files of spec 67 for format 3, generated with the result each case is written for, so that the generator fails when the implementation or the tables change: - paths.json: 83 paths with the result of the rules of one entry, the violation worded as every implementation must word it, and 16 trees, the paths of a head and the result of decoding it: U+00A0, accepted, and U+3000, R6c, at both ends of a segment; best-fit, full-width forms, U+00B4 of cp1253; 8.3 aliases with ~1; Cn; U+206A to U+206F, tags and other ignorables; a dot and ZWJ, and ZWJ alone; 127 and 85 times U+0390; U+F03A; .datekeys-x at two levels; U+FF5E and U+1F600 in both orders; ab with and without ZWNJ; U+00BF, U+00A7 and U+2665, accepted; VS16 after U+2764 and after a; ZWJ at the start, at the end and twice; the rainbow flag and the flag of Scotland; b/.. and a. - path_fold.json: 22 segments with their NFD and their key of R7, among them the entries F of CaseFolding, the dotless i, the Kelvin and Angstrom signs, Cherokee, Hangul and the whitelist dropped before NFD. - head_schema.json: 63 heads through layers 2, 3 and 4, in key order, with the violation of each ERR_HEAD_INVALID; they add comments with tags and with loose variation selectors. - security.json: 21 areas with their verdicts, X, F0, F1, S0, S1 and S2, among them key 2 that is not a byte string, a key 4, a byte more, alg 0, an empty key with the seal intact, and a seal that breaks its schema with an unknown seal_type. - cbor.json gains the control of schema version 3. A test replays every committed vector through the implementation, and another checks that the files are current. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 week ago
{
"spec": "0.10",
"description": "SECURITY_CBOR of format 3, exactly its SECURITY_LEN bytes, and the verdicts of the signature and of the seal (spec §29.3, §29.7), generated by the reference implementation, which implements no alg and no seal_type. See testdata/README.md.",
"vectors": [
{
"name": "empty, as writers of this version write it",
"hex": "a20071646174656b6579732d73656375726974790101",
"signature": "F0",
"seal": "S0"
},
{
"name": "a signature of alg 1",
"hex": "a30071646174656b6579732d73656375726974790101025869a30001015820111111111111111111111111111111111111111111111111111111111111111102584022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222",
"signature": "F1",
"seal": "S0"
},
{
"name": "a seal of seal_type 1",
"hex": "a30071646174656b6579732d73656375726974790101035826a200010158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F0",
"seal": "S1"
},
{
"name": "a seal of seal_type 2, RFC 3161",
"hex": "a30071646174656b6579732d73656375726974790101035826a200020158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F0",
"seal": "S1"
},
{
"name": "a seal of seal_type 3, OpenTimestamps",
"hex": "a30071646174656b6579732d73656375726974790101035826a200030158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F0",
"seal": "S1"
},
{
"name": "a signature and a seal",
"hex": "a40071646174656b6579732d73656375726974790101025869a30001015820111111111111111111111111111111111111111111111111111111111111111102584022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222035826a200010158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F1",
"seal": "S1"
},
{
"name": "a signature of alg 0, and the seal intact",
"hex": "a40071646174656b6579732d73656375726974790101025849a3000001582011111111111111111111111111111111111111111111111111111111111111110258202222222222222222222222222222222222222222222222222222222222222222035826a200010158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F1",
"seal": "S1"
},
{
"name": "a signature with an empty key, and the seal intact",
"hex": "a40071646174656b6579732d73656375726974790101025828a3000101400258202222222222222222222222222222222222222222222222222222222222222222035826a200010158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F1",
"seal": "S1"
},
{
"name": "a signature that is not CBOR",
"hex": "a30071646174656b6579732d736563757269747901010241ff",
"signature": "F1",
"seal": "S0"
},
{
"name": "a signature with a byte more",
"hex": "a30071646174656b6579732d7365637572697479010102586aa3000101582011111111111111111111111111111111111111111111111111111111111111110258402222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222200",
"signature": "F1",
"seal": "S0"
},
{
"name": "a seal of seal_type 0",
"hex": "a30071646174656b6579732d73656375726974790101035826a200000158203333333333333333333333333333333333333333333333333333333333333333",
"signature": "F0",
"seal": "S2"
},
{
"name": "a seal that breaks its schema, with an unknown seal_type",
"hex": "a30071646174656b6579732d73656375726974790101035829a300186301582033333333333333333333333333333333333333333333333333333333333333330200",
"signature": "F0",
"seal": "S2"
},
{
"name": "a seal that is not CBOR",
"hex": "a30071646174656b6579732d736563757269747901010341ff",
"signature": "F0",
"seal": "S2"
},
{
"name": "key 2 that is not a byte string",
"hex": "a30071646174656b6579732d7365637572697479010102a10001",
"signature": "X",
"seal": "X"
},
{
"name": "key 2 that is an empty byte string",
"hex": "a30071646174656b6579732d736563757269747901010240",
"signature": "X",
"seal": "X"
},
{
"name": "an unknown key 4",
"hex": "a30071646174656b6579732d73656375726974790101044101",
"signature": "X",
"seal": "X"
},
{
"name": "a byte more after the map",
"hex": "a20071646174656b6579732d7365637572697479010100",
"signature": "X",
"seal": "X"
},
{
"name": "version 2",
"hex": "a20071646174656b6579732d73656375726974790102",
"signature": "X",
"seal": "X"
},
{
"name": "the type tag of the head",
"hex": "a2006d646174656b6579732d686561640101",
"signature": "X",
"seal": "X"
},
{
"name": "keys 2 and 3 out of order",
"hex": "a40071646174656b6579732d73656375726974790101035826a200010158203333333333333333333333333333333333333333333333333333333333333333025869a30001015820111111111111111111111111111111111111111111111111111111111111111102584022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222",
"signature": "X",
"seal": "X"
},
{
"name": "an array",
"hex": "8271646174656b6579732d736563757269747901",
"signature": "X",
"seal": "X"
}
]
}

Powered by TurnKey Linux.