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_only capsule with the content of format2_time_only and padding code 1 (bloque256): L = 78000, P = 78080",
|
|
|
|
|
"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_only_bloque256.dkc",
|
|
|
|
|
"sha256": "aae769c30d04920801d8b293d30864fbe223c9c9353ec2b4907a1ee1996e39f9",
|
|
|
|
|
"release": {
|
|
|
|
|
"round": 1000,
|
|
|
|
|
"signature": "b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39"
|
|
|
|
|
},
|
|
|
|
|
"prelude": "444b43310200000000000079000001ca",
|
|
|
|
|
"public_header": "a5006a646174656b65796361700101025010157a2ba032f78e23d8035e368345c8037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d5441774d48300400",
|
|
|
|
|
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
|
|
|
|
"capsule_id": "10157a2ba032f78e23d8035e368345c8",
|
|
|
|
|
"access_policy": "time_only",
|
|
|
|
|
"structure": "time_only",
|
|
|
|
|
"unlock_at": "2023-08-23T15:59:24Z",
|
|
|
|
|
"header_binding": "85b1f94357df0448246f91ec0d8c1026eb1bab870236b1069e9592c16aecd5ff",
|
|
|
|
|
"outer_stanzas": [
|
|
|
|
|
{
|
|
|
|
|
"type": "tlock",
|
|
|
|
|
"args": [
|
|
|
|
|
"1000",
|
|
|
|
|
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"payload_stanzas": [
|
|
|
|
|
{
|
|
|
|
|
"type": "X25519",
|
|
|
|
|
"args": [
|
|
|
|
|
"UeiA4/yMJ8MOxH1VN59GTQUjYD+X8X4ppoODsu/0fi0"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"control_cbor": "a60070646174656b6579732d636f6e74726f6c010202582085b1f94357df0448246f91ec0d8c1026eb1bab870236b1069e9592c16aecd5ff035820aa6d542f56c5026c229f3742ea84a9a5fbc5641951c61bf4383b9b25ce6b368a064800000000000130b00701",
|
|
|
|
|
"payload_identity": "aa6d542f56c5026c229f3742ea84a9a5fbc5641951c61bf4383b9b25ce6b368a",
|
|
|
|
|
"payload_length": 78000,
|
|
|
|
|
"padding": 1,
|
|
|
|
|
"padded_length": 78080,
|
|
|
|
|
"plaintext_file": "format2_time_only_bloque256.plaintext",
|
|
|
|
|
"plaintext_sha256": "53b8ee821fb7b678e89d4f93da1812339f6cc1ab83aac6ed1432db99df784be5",
|
|
|
|
|
"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": "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": 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
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|