Read capsule format 2 of spec v0.9
Syncs testdata with datekeys-go at spec-v0.9 (7e2d83c) and moves the
reader to the DateKeys Protocol Specification v0.9. Both capsule formats
are read; a format 1 capsule keeps the verdict v0.8.2 gave it.
- framing: the VERSION of the prelude is the capsule format, 1 or 2
(Prelude.format, FORMAT_1, FORMAT_2, isFormat).
- control: decodeControl and encodeControl take the format; schema
version 2 adds payload_length (8 bytes, at most L_MAX) and padding
(1 or 2).
- padding.ts: the rules bloque256 and reforzado of spec §29.1, exact up
to L_MAX with BigInt bit lengths and ceil roundings, and the length of
PAYLOAD_AGE.
- open: exactly 16 stanzas in INNER_ACCESS_AGE of format 2 (step 12), P
at step 16, and at step 17 a plaintext of exactly P bytes whose
padding is zero; only the first L bytes are delivered, never the
padding. Step 17 is recorded when it passes, and step 18 gives the
bytes of content, as the reference does. Opened reports the format, L
and, in format 2, the rule and P.
- inspect: the JSON view carries format, as datekeys inspect -json.
- The page shows the format, warns about format 1, and gives the
padding rule and P once a format 2 capsule opens.
Tests: the twelve fixtures, the 125 mutation cases through open from
memory and from a Blob, the 4380 differential cases, padding.json, the
format 2 CBOR vectors, and padding.test.ts against a BigInt statement of
§29.1. The error texts of the 125 corpus cases were compared with
capsule.Open at spec-v0.9. ibe-vectors.json gains the seven format 2
fixtures from scripts/ibe-go-vectors.go; its frozen values are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 week ago
|
|
|
{
|
|
|
|
|
"description": "format 2 time_and_key capsule for sixteen known X25519 recipients, without dummies",
|
|
|
|
|
"spec": "0.11",
|
Read capsule format 2 of spec v0.9
Syncs testdata with datekeys-go at spec-v0.9 (7e2d83c) and moves the
reader to the DateKeys Protocol Specification v0.9. Both capsule formats
are read; a format 1 capsule keeps the verdict v0.8.2 gave it.
- framing: the VERSION of the prelude is the capsule format, 1 or 2
(Prelude.format, FORMAT_1, FORMAT_2, isFormat).
- control: decodeControl and encodeControl take the format; schema
version 2 adds payload_length (8 bytes, at most L_MAX) and padding
(1 or 2).
- padding.ts: the rules bloque256 and reforzado of spec §29.1, exact up
to L_MAX with BigInt bit lengths and ceil roundings, and the length of
PAYLOAD_AGE.
- open: exactly 16 stanzas in INNER_ACCESS_AGE of format 2 (step 12), P
at step 16, and at step 17 a plaintext of exactly P bytes whose
padding is zero; only the first L bytes are delivered, never the
padding. Step 17 is recorded when it passes, and step 18 gives the
bytes of content, as the reference does. Opened reports the format, L
and, in format 2, the rule and P.
- inspect: the JSON view carries format, as datekeys inspect -json.
- The page shows the format, warns about format 1, and gives the
padding rule and P once a format 2 capsule opens.
Tests: the twelve fixtures, the 125 mutation cases through open from
memory and from a Blob, the 4380 differential cases, padding.json, the
format 2 CBOR vectors, and padding.test.ts against a BigInt statement of
§29.1. The error texts of the 125 corpus cases were compared with
capsule.Open at spec-v0.9. ibe-vectors.json gains the seven format 2
fixtures from scripts/ibe-go-vectors.go; its frozen values are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 week ago
|
|
|
"format": 2,
|
|
|
|
|
"file": "format2_time_and_key_sixteen.dkc",
|
|
|
|
|
"sha256": "7aaac5c18f216bf53df326ecc817179640a53408cf25dfd50488910a762dc381",
|
|
|
|
|
"release": {
|
|
|
|
|
"round": 2000,
|
|
|
|
|
"signature": "b6cb8f482a0b15d45936a4c4ea08e98a087e71787caee3f4d07a8a9843b1bc5423c6b3c22f446488b3137eaca799c77e"
|
|
|
|
|
},
|
|
|
|
|
"prelude": "444b4331020000000000007900000850",
|
|
|
|
|
"public_header": "a5006a646174656b6579636170010102500e53b85a2f9201e2b3368ae122540da7037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d6a41774d48300401",
|
|
|
|
|
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0",
|
|
|
|
|
"capsule_id": "0e53b85a2f9201e2b3368ae122540da7",
|
|
|
|
|
"access_policy": "time_and_key",
|
|
|
|
|
"structure": "time_and_key",
|
|
|
|
|
"unlock_at": "2023-08-23T16:49:24Z",
|
|
|
|
|
"header_binding": "2af8b1b2850f2085448fe79c48394a78a70e8f9bbab6ff1a100d127dce42569d",
|
|
|
|
|
"outer_stanzas": [
|
|
|
|
|
{
|
|
|
|
|
"type": "tlock",
|
|
|
|
|
"args": [
|
|
|
|
|
"2000",
|
|
|
|
|
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"payload_stanzas": [
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"GYC0vEroQ0SEpuw1YD7s7CZ/VUVjJM7/eYHUiVrriDA"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"inner_stanzas": [
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"AsTmuIXIaAtsVBtx9dHgNw3vvnOp17XOCXiEqhVWpkc"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"heEJQmVJrOF8PXY2YqDKYMeHWT984qU0Cp7zUgWXn2Q"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"Th/8wAreGUduIowTX1peuW742OOnMYJN7CPfhE7JRWM"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"WqgsEJt1Xp+917C0lxIk7RqQ15hKqRcdJIzPJYe+VD0"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"cVfrUH86CtMX5bE5W0MC4O+Hll2izf3xbW9uAEz6kyA"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"wYq7RavJd5OurTRmJo4WFc0PWFSJzYUL5IuOkvGvcgg"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"AGgRH5Wt1TUa56i2kZPnC8BWjqUwF2AUGVQLjGoP8UI"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"6QH4BvZMr2Yj4YkltJPDK98pVruudRPTjwIvJsjXemI"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"xhwZ/Q0oCUDeOzw0qavGa2Lizc+ddBaDl82kjz0BBU8"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"aroWsrX4In35rmixu/AoeLv/7+1LpBYata/55hCkyCE"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"IYP047ouVYUwYLsS9VoB7i1pezD9yVU9nxlVct2wVQ0"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"TFy3J6NMXoi83o+28OkagQaqnGTkJsTtTryaZZRHiGk"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
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|
|
|
"control_cbor": "a60070646174656b6579732d636f6e74726f6c01020258202af8b1b2850f2085448fe79c48394a78a70e8f9bbab6ff1a100d127dce42569d035820f8d40151d6d05c4ad0afed2e4a0df44c4b93eadcefdaa4ae7e85b493b0a569cc064800000000000000290702",
|
|
|
|
|
"payload_identity": "f8d40151d6d05c4ad0afed2e4a0df44c4b93eadcefdaa4ae7e85b493b0a569cc",
|
|
|
|
|
"payload_length": 41,
|
|
|
|
|
"padding": 2,
|
|
|
|
|
"padded_length": 256,
|
|
|
|
|
"plaintext_file": "format2_time_and_key_sixteen.plaintext",
|
|
|
|
|
"plaintext_sha256": "e5abfb7b5fdbf297277b6cc4729c15d85435e890b653c2e2342b7031ecd9eab9",
|
|
|
|
|
"stages": [
|
|
|
|
|
{
|
|
|
|
|
"step": 1,
|
|
|
|
|
"name": "parse DKC1",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 2,
|
|
|
|
|
"name": "prelude",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 3,
|
|
|
|
|
"name": "public header",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 4,
|
|
|
|
|
"name": "header validation",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 5,
|
|
|
|
|
"name": "sealed control structure",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 6,
|
|
|
|
|
"name": "payload structure",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 7,
|
|
|
|
|
"name": "condition",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 8,
|
|
|
|
|
"name": "tlock stanza",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 9,
|
|
|
|
|
"name": "access credential",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 9,
|
|
|
|
|
"name": "release",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 10,
|
|
|
|
|
"name": "release verification",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 11,
|
|
|
|
|
"name": "open sealed control",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 12,
|
|
|
|
|
"name": "policy structure",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 13,
|
|
|
|
|
"name": "open access layer",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 14,
|
|
|
|
|
"name": "control",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 15,
|
|
|
|
|
"name": "header binding",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 16,
|
|
|
|
|
"name": "payload identity",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 17,
|
|
|
|
|
"name": "open payload",
|
|
|
|
|
"ok": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"step": 18,
|
|
|
|
|
"name": "commit",
|
|
|
|
|
"ok": true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|