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>main
parent
5ee8813981
commit
0118890fa1
@ -0,0 +1,103 @@
|
||||
// Tests of padding.ts. The vectors of the reference (testdata/vectors/
|
||||
// padding.json) run in vectors.test.ts; here the arithmetic is checked
|
||||
// against a restatement of spec §29.1 in BigInt over the whole range, and at
|
||||
// the lengths where 32-bit operations or a floating-point logarithm fail.
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
bitLength,
|
||||
BLOQUE256,
|
||||
isPadding,
|
||||
MAX_PAYLOAD_LENGTH,
|
||||
paddedLength,
|
||||
type Padding,
|
||||
paddingName,
|
||||
padmeParameters,
|
||||
payloadAgeLength,
|
||||
REFORZADO,
|
||||
} from './padding.ts';
|
||||
|
||||
// Spec §29.1 in BigInt: bloque256 = 256·ceil(L/256), at least 256; reforzado
|
||||
// = max(bloque256, Padmé), Padmé keeping the S + 1 most significant bits of
|
||||
// L, E = bitlen(L) - 1 and S = bitlen(E).
|
||||
function reference(l: bigint, p: Padding): bigint {
|
||||
if (l <= 256n) return 256n;
|
||||
const block = ((l + 255n) / 256n) * 256n;
|
||||
if (p === BLOQUE256) return block;
|
||||
const e = BigInt(l.toString(2).length - 1);
|
||||
const s = BigInt(e.toString(2).length);
|
||||
const unit = 1n << (e - s);
|
||||
const padme = ((l + unit - 1n) / unit) * unit;
|
||||
return padme > block ? padme : block;
|
||||
}
|
||||
|
||||
// A deterministic generator of lengths spread over every bit length.
|
||||
function* lengths(count: number): Generator<number> {
|
||||
let x = 0x9e3779b97f4a7c15n;
|
||||
for (let i = 0; i < count; i++) {
|
||||
x ^= x << 13n;
|
||||
x ^= x >> 7n;
|
||||
x ^= x << 17n;
|
||||
x &= 2n ** 64n - 1n;
|
||||
const bits = BigInt(1 + (i % 53));
|
||||
const l = (x & ((1n << bits) - 1n)) % BigInt(MAX_PAYLOAD_LENGTH + 1);
|
||||
yield Number(l);
|
||||
}
|
||||
}
|
||||
|
||||
describe('padding', () => {
|
||||
it('names the codes of spec §29.1, and no code for no padding', () => {
|
||||
expect([BLOQUE256, REFORZADO]).toEqual([1, 2]);
|
||||
expect([isPadding(0), isPadding(1), isPadding(2), isPadding(3)]).toEqual([false, true, true, false]);
|
||||
expect([paddingName(BLOQUE256), paddingName(REFORZADO)]).toEqual(['bloque256', 'reforzado']);
|
||||
expect(MAX_PAYLOAD_LENGTH).toBe(8936830510563328);
|
||||
});
|
||||
|
||||
it('counts bits exactly, where a floating-point logarithm does not', () => {
|
||||
expect([0, 1, 2, 255, 256, 2 ** 32 - 1, 2 ** 32, 2 ** 53 - 1].map(bitLength)).toEqual([0, 1, 2, 8, 9, 32, 33, 53]);
|
||||
// Spec §29.1: Math.log2(2^49 - 1) is 49 in IEEE 754; E is 48.
|
||||
expect(Math.floor(Math.log2(2 ** 49 - 1))).toBe(49);
|
||||
expect(padmeParameters(2 ** 49 - 1)).toEqual({ e: 48, s: 6, lastBits: 42 });
|
||||
expect(padmeParameters(78000)).toEqual({ e: 16, s: 5, lastBits: 11 });
|
||||
});
|
||||
|
||||
it('gives P of both rules at the boundaries of spec §29.1', () => {
|
||||
const rows: [number, number, number][] = [
|
||||
[0, 256, 256],
|
||||
[256, 256, 256],
|
||||
[257, 512, 512],
|
||||
[8193, 8448, 8704],
|
||||
[78000, 78080, 79872],
|
||||
// The first L where signed 32-bit operators, then >>> 0, give a wrong P.
|
||||
[2113929217, 2113929472, 2147483648],
|
||||
[4227858433, 4227858688, 4294967296],
|
||||
[4294967297, 4294967552, 4362076160],
|
||||
[MAX_PAYLOAD_LENGTH, MAX_PAYLOAD_LENGTH, MAX_PAYLOAD_LENGTH],
|
||||
];
|
||||
for (const [l, b, r] of rows) expect([paddedLength(l, BLOQUE256), paddedLength(l, REFORZADO)], String(l)).toEqual([b, r]);
|
||||
});
|
||||
|
||||
it('agrees with the BigInt statement of spec §29.1 over the whole range', () => {
|
||||
let n = 0;
|
||||
for (const l of lengths(20000)) {
|
||||
for (const p of [BLOQUE256, REFORZADO] as const) {
|
||||
const want = reference(BigInt(l), p);
|
||||
expect(BigInt(paddedLength(l, p)), `L = ${l}, code ${p}`).toBe(want);
|
||||
expect(want <= BigInt(Number.MAX_SAFE_INTEGER)).toBe(true);
|
||||
}
|
||||
n++;
|
||||
}
|
||||
expect(n).toBe(20000);
|
||||
});
|
||||
|
||||
it('rejects an L outside 0..L_MAX and an undefined code', () => {
|
||||
for (const l of [-1, 1.5, Number.NaN, Number.POSITIVE_INFINITY, MAX_PAYLOAD_LENGTH + 1, 2 ** 53]) {
|
||||
expect(() => paddedLength(l, REFORZADO), String(l)).toThrow(RangeError);
|
||||
}
|
||||
for (const p of [0, 3, 257]) expect(() => paddedLength(1, p as Padding), String(p)).toThrow(/code \d+ is not defined/);
|
||||
});
|
||||
|
||||
it('gives the length of PAYLOAD_AGE: the header of one X25519 stanza, the nonce, and a tag per 64 KiB chunk', () => {
|
||||
expect([0, 256, 65536, 65537, 79872].map(payloadAgeLength)).toEqual([200, 456, 65736, 65753, 80088]);
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,82 @@
|
||||
// The padding of the payload of a format 2 capsule (spec §29.1), as
|
||||
// capsule/padding.go of the Go reference at spec-v0.9: the plaintext of
|
||||
// PAYLOAD_AGE is the content, L bytes, followed by zeros up to P = rule(L).
|
||||
//
|
||||
// The arithmetic is exact over the whole range, up to L_MAX = 2^53 - 2^46:
|
||||
// bitlen with BigInt, and the roundings in the form with ceil, which is exact
|
||||
// in doubles because it divides and multiplies by powers of two. Never a
|
||||
// floating-point logarithm, nor the 32-bit operators of JavaScript or
|
||||
// Math.clz32, which spec §29.1 forbids: they give a wrong P from L =
|
||||
// 2 113 929 217 on.
|
||||
|
||||
/** Pads the content to the next multiple of 256 bytes, and to at least 256. */
|
||||
export const BLOQUE256 = 1;
|
||||
/**
|
||||
* Pads to the larger of bloque256 and Padmé. It is the rule a writer uses by
|
||||
* default, as spec §29.1 asks of the official SDK.
|
||||
*/
|
||||
export const REFORZADO = 2;
|
||||
|
||||
/**
|
||||
* The padding rule of a format 2 capsule, sealed in key 7 of CONTROL_CBOR
|
||||
* (spec §29.1, §31). No code stands for no padding.
|
||||
*/
|
||||
export type Padding = typeof BLOQUE256 | typeof REFORZADO;
|
||||
|
||||
/**
|
||||
* L_MAX = 2^53 - 2^46, the largest content length a format 2 capsule can
|
||||
* seal: the largest L for which both rules give a P of at most 2^53 - 1
|
||||
* (spec §29.1).
|
||||
*/
|
||||
export const MAX_PAYLOAD_LENGTH = 2 ** 53 - 2 ** 46;
|
||||
|
||||
/** Whether `v` is a padding code of spec §29.1. */
|
||||
export function isPadding(v: number): v is Padding {
|
||||
return v === BLOQUE256 || v === REFORZADO;
|
||||
}
|
||||
|
||||
/** The name of a padding code, as the Go reference writes it: bloque256 or reforzado. */
|
||||
export function paddingName(p: Padding): string {
|
||||
return p === BLOQUE256 ? 'bloque256' : 'reforzado';
|
||||
}
|
||||
|
||||
/** The number of bits of a non-negative safe integer: bitlen(0) = 0. */
|
||||
export function bitLength(n: number): number {
|
||||
return n === 0 ? 0 : BigInt(n).toString(2).length;
|
||||
}
|
||||
|
||||
/** The intermediate values of Padmé for L > 256 (spec §29.1): E, S and lastBits = E - S. */
|
||||
export function padmeParameters(l: number): { e: number; s: number; lastBits: number } {
|
||||
const e = bitLength(l) - 1;
|
||||
const s = bitLength(e);
|
||||
return { e, s, lastBits: e - s };
|
||||
}
|
||||
|
||||
/**
|
||||
* P = rule(L), the exact length of the plaintext of PAYLOAD_AGE in a format 2
|
||||
* capsule whose content is `l` bytes long (spec §29.1). `l` is a safe integer
|
||||
* from 0 to L_MAX; anything else throws, as an unknown rule does.
|
||||
*/
|
||||
export function paddedLength(l: number, p: Padding): number {
|
||||
if (!isPadding(p)) throw new RangeError(`padding: code ${String(p)} is not defined`);
|
||||
if (!Number.isSafeInteger(l) || l < 0 || l > MAX_PAYLOAD_LENGTH) {
|
||||
throw new RangeError(`padding: content of ${l} bytes, outside 0..L_MAX = ${MAX_PAYLOAD_LENGTH}`);
|
||||
}
|
||||
if (l <= 256) return 256;
|
||||
const block = Math.ceil(l / 256) * 256;
|
||||
if (p === BLOQUE256) return block;
|
||||
// Padmé keeps the S + 1 most significant bits of L and rounds up the
|
||||
// others, the lastBits = E - S lowest ones.
|
||||
const unit = 2 ** padmeParameters(l).lastBits;
|
||||
return Math.max(block, Math.ceil(l / unit) * unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* The length of a PAYLOAD_AGE whose plaintext is `n` bytes long: the 184
|
||||
* bytes of an age header with one X25519 stanza and the nonce, the
|
||||
* plaintext, and the 16-byte tag of each 64 KiB STREAM chunk, at least one
|
||||
* (spec §62.1, informative note).
|
||||
*/
|
||||
export function payloadAgeLength(n: number): number {
|
||||
return 184 + n + 16 * Math.max(1, Math.ceil(n / 65536));
|
||||
}
|
||||
@ -1,40 +1,73 @@
|
||||
{
|
||||
"module": "g.activething.com/go/DateKeys",
|
||||
"commit": "9ac9cd952f048a8c034d59a52b3c7baeffea6ade",
|
||||
"commit": "7e2d83c0d119c4a8934e609abb3f5818431cc4ad",
|
||||
"files": {
|
||||
"README.md": "23d7cd2914c2f2d30aad49ce09119a7dd65383bc0011d494dbad8cfe724f68c5",
|
||||
"README.md": "73da918772b5bbad1931c541edf44d852c09c13a98925bfc4766d9f663cce27b",
|
||||
"fixtures/empty_payload.dkc": "871e9bf05b52bbae17f3adfbbf97b46e7f0e53aa8f57bcaa506e43f36f53a9d4",
|
||||
"fixtures/empty_payload.inspect.json": "dd2b21faefdfe3aa59b5eeef9130a6896070ae30a2b16933f3aefd146828207e",
|
||||
"fixtures/empty_payload.json": "490a6e7f7acc882bcb956b297ad8c817d7b21da29e8d4c4a2cd31c852707eee0",
|
||||
"fixtures/empty_payload.inspect.json": "373e5d012b023ad58bbb54cbdffe0bed9e50c637438a4083ddb74d5414c59f59",
|
||||
"fixtures/empty_payload.json": "c60edf441302c4aa92389fe4cc8c1c220eacedad7df8d7a0092192b551a0a7e3",
|
||||
"fixtures/empty_payload.plaintext": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"fixtures/format2_empty_payload.dkc": "7aea2b5aa48b1a46053716f733d50fab9cd0b80b1be67631bcc06c5bb765dc21",
|
||||
"fixtures/format2_empty_payload.inspect.json": "d0bb7356d3970986e6b197640f0b3b38abe9fabf1740b745171b358aa28903ff",
|
||||
"fixtures/format2_empty_payload.json": "06d956558f3cbd76163ba3e5222409de313911385a6892390ea51fc391412849",
|
||||
"fixtures/format2_empty_payload.plaintext": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"fixtures/format2_time_and_key_portable.dkc": "600892659fe4890223e895876275f656995d170fda42b07fb2bec0ca51ce4b43",
|
||||
"fixtures/format2_time_and_key_portable.dkk": "095b7bc516a22bf0c2366f0af3cd48bfe857a2354d6e2a9b285278b95e450fe0",
|
||||
"fixtures/format2_time_and_key_portable.dkk.json": "49cab26b567a5b4dfc92c7e1e521c1d0da9435b67129886ece1a6cd39aa3bbff",
|
||||
"fixtures/format2_time_and_key_portable.inspect.json": "522c9a98e5911c86f5f24f278971cf7c7588f6c88aaede3dd1129ee4e042868a",
|
||||
"fixtures/format2_time_and_key_portable.json": "2c662bcb923fd3d4c6dc2b4a99e01ed9fa29d0089c80f71de994a76452f55046",
|
||||
"fixtures/format2_time_and_key_portable.plaintext": "937492203d207d6fe36161b8696bf1f05b8b4cc56d855c44853f4b76aad3a05b",
|
||||
"fixtures/format2_time_and_key_recipients.dkc": "1a44fd8708c92e2e0a10cfcb1d864a71331ea9af25d97e1a42e969dc898959e3",
|
||||
"fixtures/format2_time_and_key_recipients.dkk": "2ad99b1556086ec311d7f0b3bd3aaba05e75f45c4fa22490b0d5e8bb0b1a222e",
|
||||
"fixtures/format2_time_and_key_recipients.dkk.json": "94dc5662bc517994326c7d7c6f2599be53bf9705ce6de12c0c3354797be8b544",
|
||||
"fixtures/format2_time_and_key_recipients.inspect.json": "d975a9eddd45f5d59618ea2455d574d807e57daf08585e840d07986f261bf099",
|
||||
"fixtures/format2_time_and_key_recipients.json": "b2c995a19cd0c7e76baccfe8abdffda1ae7da0235845818266914d71976a7b8f",
|
||||
"fixtures/format2_time_and_key_recipients.plaintext": "0e9fd50e98a85953aa9cf07a11ee3c62bb3d7622f344f1c6ce744d1ed111659f",
|
||||
"fixtures/format2_time_and_key_sixteen.dkc": "7aaac5c18f216bf53df326ecc817179640a53408cf25dfd50488910a762dc381",
|
||||
"fixtures/format2_time_and_key_sixteen.inspect.json": "492cd0b0dca0030df9332b098d22b4f6aa4adfb57d5540de5325e3e6d5aa3667",
|
||||
"fixtures/format2_time_and_key_sixteen.json": "d7cec9027f5a7485234a332e739a10b4243074ddc55b5350d76735d7b1e4732a",
|
||||
"fixtures/format2_time_and_key_sixteen.plaintext": "e5abfb7b5fdbf297277b6cc4729c15d85435e890b653c2e2342b7031ecd9eab9",
|
||||
"fixtures/format2_time_only.dkc": "f5a40ac6b8a08a0c12db6114c2bca23522d6a77b512b509a217fb15f367813c4",
|
||||
"fixtures/format2_time_only.inspect.json": "40a8683f5204c7b6369558e4775ae6bb6fed978097e9e660de64c06c167b043e",
|
||||
"fixtures/format2_time_only.json": "ad7560d87cb200460fa3ca25b4b6b875e9a019841b5c2ef9e9639fcff2e93fcd",
|
||||
"fixtures/format2_time_only.plaintext": "53b8ee821fb7b678e89d4f93da1812339f6cc1ab83aac6ed1432db99df784be5",
|
||||
"fixtures/format2_time_only_bloque256.dkc": "aae769c30d04920801d8b293d30864fbe223c9c9353ec2b4907a1ee1996e39f9",
|
||||
"fixtures/format2_time_only_bloque256.inspect.json": "767766414ad547f0ba95b40059e14b62c81b5489a2afcbc683bf227334d61be7",
|
||||
"fixtures/format2_time_only_bloque256.json": "1dd19a7d471d9a1a8124c05b6356d5eba3d97fb3f3848721468670ce07df2b8e",
|
||||
"fixtures/format2_time_only_bloque256.plaintext": "53b8ee821fb7b678e89d4f93da1812339f6cc1ab83aac6ed1432db99df784be5",
|
||||
"fixtures/format2_time_only_extensions.dkc": "fb406100d5703a2e888983b3175ed34a09a34469cc722256e5cf535dd728fbe9",
|
||||
"fixtures/format2_time_only_extensions.inspect.json": "1595d793c1d35bfdaa36576b75f53d734a9e07c2a8a12036295dbaee7f5a7f5a",
|
||||
"fixtures/format2_time_only_extensions.json": "c39009b4a45700145a6402941651bed430374009e9779f4f274d81e8357032bc",
|
||||
"fixtures/format2_time_only_extensions.plaintext": "1129768e195e2f1e50b7a6f926b6eebef120212c29b5642c8a662c503b2a9131",
|
||||
"fixtures/time_and_key_portable.dkc": "2e97878078bae6358037a9c264f379a3cbe839f767d69836b0343f35657b2972",
|
||||
"fixtures/time_and_key_portable.dkk": "e528fa2c832c91119f0684bb9d6fb3c4c2d0d55183482890e7c4fe92f668426a",
|
||||
"fixtures/time_and_key_portable.dkk.json": "24eab4758e4abdb09e2316e0330ac16872dd021612eb32c40fac607f80f10a18",
|
||||
"fixtures/time_and_key_portable.inspect.json": "a80724f68facb94be3d64ec2587dd547be38b9e492e9c30149b1c6cf2753ba01",
|
||||
"fixtures/time_and_key_portable.json": "258fb17f95a0dbf074d017bffac6415b2982dffc7895a3b31a1ccd9132d6a5fc",
|
||||
"fixtures/time_and_key_portable.dkk.json": "f6bcec4ba51dac7cfee8b4056ded18b215f2d71745f5baca63988e2d76759cea",
|
||||
"fixtures/time_and_key_portable.inspect.json": "238c1f8ca6a6bf69f20bf26f5676e89a0b07e83b4362628560fc2f7522a202c9",
|
||||
"fixtures/time_and_key_portable.json": "03a3aca45511907939b52abbf7565385a5351eac6e5185f518b6413e6459b765",
|
||||
"fixtures/time_and_key_portable.plaintext": "937492203d207d6fe36161b8696bf1f05b8b4cc56d855c44853f4b76aad3a05b",
|
||||
"fixtures/time_and_key_portable_extension.dkk": "0bf463a7c65627b7dda2234d728df89ec5b835816a2a37b91497d8fecc5ea548",
|
||||
"fixtures/time_and_key_portable_extension.dkk.json": "2d5d61beb89e3de76fae3400f38eff74f251e6c569c2f11daf2950a74bea8fb3",
|
||||
"fixtures/time_and_key_portable_extension.dkk.json": "8bc9cc6abf4e03f74bcf90f0065a77fd2ec1885aa73366a7b21ac9b8b7accc15",
|
||||
"fixtures/time_and_key_recipients.dkc": "69ac110380f5d768b5b6afaa157a50ed17d8ceccfbd4604ffa5b6da38539b635",
|
||||
"fixtures/time_and_key_recipients.dkk": "19f6c47150c3194712d454f43c7392b7344e6b4e7b074d83e9ca5f563a8e072f",
|
||||
"fixtures/time_and_key_recipients.dkk.json": "d5a0c241a1fbef52bcb848b2531bda4020d9a7882bfc4f49755c61ae97a4d6bc",
|
||||
"fixtures/time_and_key_recipients.inspect.json": "12c7f2200474c383ad93de7b2835dc60b4d7486926ce02955ac3ae97fc23952d",
|
||||
"fixtures/time_and_key_recipients.json": "ebc77cd00ff52e08743976558605159cc0cc3747399c3ce05dc46f7cafb35b2d",
|
||||
"fixtures/time_and_key_recipients.dkk.json": "b6093c44cf7a696f24d9681c9a3cde7f4f65f9fb558a7ab3ac70c001fb671b5c",
|
||||
"fixtures/time_and_key_recipients.inspect.json": "4b32c63d18febe0772837fbcd75a0c971e31378bf799201b720a9d32bdcd8c2b",
|
||||
"fixtures/time_and_key_recipients.json": "ed6e8f4ffce5b2e56f5118275f2dc2c9ad00b05d6af779863f3503f295fffbf8",
|
||||
"fixtures/time_and_key_recipients.plaintext": "0e9fd50e98a85953aa9cf07a11ee3c62bb3d7622f344f1c6ce744d1ed111659f",
|
||||
"fixtures/time_only.dkc": "99e915810d595f1092700b728f5e5081d78efe83f5343e76325b1bcc2c33ccf2",
|
||||
"fixtures/time_only.inspect.json": "67a95a7ff711ec830fcd53b9328d5cd7c70bb34a205bc72ae99610c22ed8a6f4",
|
||||
"fixtures/time_only.json": "9ea5576bfa237066b92ad07e5f1c26d6d782e975edd071a8728b21bc7998afaa",
|
||||
"fixtures/time_only.inspect.json": "a4d45f945d6ba6616c01e120ac1133785e5279fea7dcab706b5feee287be8884",
|
||||
"fixtures/time_only.json": "9ec7341c52a297b92b95198f3c64930fbab26b9867da40b50d0ebba9a824d8b4",
|
||||
"fixtures/time_only.plaintext": "53b8ee821fb7b678e89d4f93da1812339f6cc1ab83aac6ed1432db99df784be5",
|
||||
"fixtures/time_only_extensions.dkc": "0446c9b73e267adcb24e5cc89afba2544a386ec9a050016e06517a4a57aa2085",
|
||||
"fixtures/time_only_extensions.inspect.json": "168d61d22e41e55a94d5f057afd2c4dd2ceef2a5bd4c5abaedea76c6faa29ab9",
|
||||
"fixtures/time_only_extensions.json": "117636691ab04d0a6274d09de7c7763fe99595a46dae9c42d066f118f816e85b",
|
||||
"fixtures/time_only_extensions.inspect.json": "6f957b028da8a4a495b5e951ced0b91e0678128dac4e962b02d024b9439a0ba1",
|
||||
"fixtures/time_only_extensions.json": "5fcd7c5363c4dd0b0f6e5dc79d35ba65acb8d0993f1c5ee4a66a83e6ef8eb8df",
|
||||
"fixtures/time_only_extensions.plaintext": "1129768e195e2f1e50b7a6f926b6eebef120212c29b5642c8a662c503b2a9131",
|
||||
"vectors/cbor.json": "444fe6104476fbcda91e1873c12752186dbf7e55ad0769e1eb0678ed9673c9d6",
|
||||
"vectors/dk1.json": "3a345330fed244662b0a335f0a6d5581c200ceeb09bfb74c4d1c342daea72864",
|
||||
"vectors/inspect_differential.json": "fe207b67d307e3ae7a78295b7a882d98669adbf498b725443ab4757eb9da03f7",
|
||||
"vectors/mutations.json": "c4599d1ecc4ea5dcc64e3d963db0714b28661db8daf8277346dc8238218e7c33",
|
||||
"vectors/profile_quicknet.json": "4f9de60475d0807aa580f59cf3e6df38cba2a55a62f590aefa2a55753ddb0055",
|
||||
"vectors/quicknet_rounds.json": "22c764aac454ce320daf7e65b9494ff2d207cac974c68d07e84f4ec18c3ed920",
|
||||
"vectors/tlock_ibe.json": "fc9ef1a5817928ffa2b4e81592077d9385b19d7622e4cf7ed9100f3f6727f7d3"
|
||||
"vectors/cbor.json": "1a31607ec896d9a6f91b6e1e1a526c806c208b475d77dfd99264fd7bdb1e6274",
|
||||
"vectors/dk1.json": "6d0daf69a68f8d8a2cf84ba117865099d9b9a875ebb400de1b7ae00d42fea1e3",
|
||||
"vectors/inspect_differential.json": "4afa024b35b9fa0b50b6fa015767092ddb47a70427b920c94a0d3ea82fc35483",
|
||||
"vectors/mutations.json": "f6de056348648209ed548774fdae6aee67d57c615850bc6178db7b0e9e380d1a",
|
||||
"vectors/padding.json": "15a12a93938d914b44f0d48a4db51f639b70a690a3032352532eea56129aba2f",
|
||||
"vectors/profile_quicknet.json": "94b0bcf2ed158bc0d1bea254b124d55c57347773a97a2a506fe980c36a5b44c5",
|
||||
"vectors/quicknet_rounds.json": "8822a40283d0cc081d5f10834655e554be92f85cf618bd392b36eeba245000a6",
|
||||
"vectors/tlock_ibe.json": "fe091d8ff68a720976005891073354dc0ec045257f6a782cdc06e58340c69fd3"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_empty_payload.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "1a6c88f0fa7408f649cf64b929cb9289",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 1001,
|
||||
"unlock_at": "2023-08-23T15:59:27Z",
|
||||
"access_policy": "time_only",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=458"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=1a6c88f0fa7408f649cf64b929cb9289 datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0 policy=time_only profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 1001, unlock at 2023-08-23T15:59:27Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 1001, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
{
|
||||
"description": "format 2 time_only capsule with an empty content: L = 0, P = 256",
|
||||
"spec": "0.9",
|
||||
"format": 2,
|
||||
"file": "format2_empty_payload.dkc",
|
||||
"sha256": "7aea2b5aa48b1a46053716f733d50fab9cd0b80b1be67631bcc06c5bb765dc21",
|
||||
"release": {
|
||||
"round": 1001,
|
||||
"signature": "b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41"
|
||||
},
|
||||
"prelude": "444b43310200000000000079000001ca",
|
||||
"public_header": "a5006a646174656b6579636170010102501a6c88f0fa7408f649cf64b929cb9289037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d5441774d58300400",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0",
|
||||
"capsule_id": "1a6c88f0fa7408f649cf64b929cb9289",
|
||||
"access_policy": "time_only",
|
||||
"structure": "time_only",
|
||||
"unlock_at": "2023-08-23T15:59:27Z",
|
||||
"header_binding": "ed6829f4e14eb6fd5545e0dfda3157d990b0834d389e4f24c1cf4ccf8d92770a",
|
||||
"outer_stanzas": [
|
||||
{
|
||||
"type": "tlock",
|
||||
"args": [
|
||||
"1001",
|
||||
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
]
|
||||
}
|
||||
],
|
||||
"payload_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"r+hN8l7f+wQNS3mitbKOLzfTUb9bOwPt1jtq1jTWURU"
|
||||
]
|
||||
}
|
||||
],
|
||||
"control_cbor": "a60070646174656b6579732d636f6e74726f6c0102025820ed6829f4e14eb6fd5545e0dfda3157d990b0834d389e4f24c1cf4ccf8d92770a035820f912fef00856ede6bfe4931376ae8108ebfcb3fd7c9b0e0c2cd15d8be3b2dfaf064800000000000000000702",
|
||||
"payload_identity": "f912fef00856ede6bfe4931376ae8108ebfcb3fd7c9b0e0c2cd15d8be3b2dfaf",
|
||||
"payload_length": 0,
|
||||
"padding": 2,
|
||||
"padded_length": 256,
|
||||
"plaintext_file": "format2_empty_payload.plaintext",
|
||||
"plaintext_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
||||
{
|
||||
"description": "portable X25519 .dkk of format2_time_and_key_portable.dkc",
|
||||
"spec": "0.9",
|
||||
"file": "format2_time_and_key_portable.dkk",
|
||||
"sha256": "095b7bc516a22bf0c2366f0af3cd48bfe857a2354d6e2a9b285278b95e450fe0",
|
||||
"credential_id": "e3c7be83cbf1fbd6b115c96411b3bd01",
|
||||
"capsule_id": "fe68d3b3bb59db0c14b7ef57d8d6cb5e",
|
||||
"access_type": "x25519",
|
||||
"access_material": "9c09aeda759a8664a98120435fe0f6bf850000ac5ef0f9853ff46144c3657801",
|
||||
"capsule_digest": "600892659fe4890223e895876275f656995d170fda42b07fb2bec0ca51ce4b43",
|
||||
"capsule": "format2_time_and_key_portable.dkc",
|
||||
"expected_result": "opens INNER_ACCESS_AGE of format2_time_and_key_portable.dkc and yields its CONTROL_CBOR"
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_and_key_portable.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "fe68d3b3bb59db0c14b7ef57d8d6cb5e",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 1000,
|
||||
"unlock_at": "2023-08-23T15:59:24Z",
|
||||
"access_policy": "time_and_key",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=2128"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=fe68d3b3bb59db0c14b7ef57d8d6cb5e datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0 policy=time_and_key profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 1000, unlock at 2023-08-23T15:59:24Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 1000, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,240 @@
|
||||
{
|
||||
"description": "format 2 time_and_key capsule with one credential, a portable .dkk, and 15 dummies",
|
||||
"spec": "0.9",
|
||||
"format": 2,
|
||||
"file": "format2_time_and_key_portable.dkc",
|
||||
"sha256": "600892659fe4890223e895876275f656995d170fda42b07fb2bec0ca51ce4b43",
|
||||
"release": {
|
||||
"round": 1000,
|
||||
"signature": "b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39"
|
||||
},
|
||||
"prelude": "444b4331020000000000007900000850",
|
||||
"public_header": "a5006a646174656b657963617001010250fe68d3b3bb59db0c14b7ef57d8d6cb5e037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d5441774d48300401",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
||||
"capsule_id": "fe68d3b3bb59db0c14b7ef57d8d6cb5e",
|
||||
"access_policy": "time_and_key",
|
||||
"structure": "time_and_key",
|
||||
"unlock_at": "2023-08-23T15:59:24Z",
|
||||
"header_binding": "3e26d39a327a9d7b7f504d6e4fb71489174cffb6360361bdf3349887eba25904",
|
||||
"outer_stanzas": [
|
||||
{
|
||||
"type": "tlock",
|
||||
"args": [
|
||||
"1000",
|
||||
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
]
|
||||
}
|
||||
],
|
||||
"payload_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"2NH8a3B/E8/cPxEYgn+CRPBiH+z6m1HKB0jkRWSJ1Qc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"inner_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"wRmoMP+CJd5BvvnN4a2lt7/2gmBKuP0zTr7iqgvKrgU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"fC08W8XHFkY8sALRSwrtNKTZgoyu/Ihd5qvMqigN0zQ"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"0m6ifXeeqvE/1K1uPOB9/AUEPNIa34XflP31Xqka2xU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"g9vklWW8U/9qDzqjAQkCD+V0I9/720qNY9yK5D5WxWs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"/tIQhVe8anax7JHuagh62Wfawg+BsLZnxqmtGkheBwE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"xj7y430oYgx7OnsvXHWy0rJu4oP6vfD54kkR3lIrHlU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"FoqdLPxJTGAf9mOT+HdL8gfBEg6Ee8xz1dLpkUbkbVk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"koX3OlqeI0uFN0u1j51BHvAN2I5CEUybrGYMNWgrnRs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"tNw8p1B63MFB/1B6n6ZHZNJ4CdiL0ika9v2if6pKK14"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"qvmW6xqVKj6Gy5e/QZ4RaenODdEMbbzHSSdaP89SUh8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"wWNLyBB+2MClKPSzoFYU/NZiSvdB9A3wXzsLDzZNKx0"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"7573XbZ5NBZwQLsW3pLSRcQvGfKdDRBHvd72/M2/EFw"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"22fFGDrjPc/setFqsKRhV85dVH7IE4LAgsCLpjfX2n8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"FS2E7/ln2nH6ziTfLpqNRa2gcNqvW+EeJVsYj7Xce3I"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"PxMGnaQLVqaSOG5f5OJNNusxdzV1i0yiJjj/sibmZk8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"iMjJeP2N3aR2sZxLXH5x1nNGxDaSMVsnraQrf6rgW1o"
|
||||
]
|
||||
}
|
||||
],
|
||||
"access_key_stanza": 3,
|
||||
"access_key_file": "format2_time_and_key_portable.dkk",
|
||||
"control_cbor": "a60070646174656b6579732d636f6e74726f6c01020258203e26d39a327a9d7b7f504d6e4fb71489174cffb6360361bdf3349887eba259040358207c14feee8d88bb9c7c3fa7d22e1e8ba13887a6111718d2ca13da7c5e944421bf0648000000000000002e0702",
|
||||
"payload_identity": "7c14feee8d88bb9c7c3fa7d22e1e8ba13887a6111718d2ca13da7c5e944421bf",
|
||||
"payload_length": 46,
|
||||
"padding": 2,
|
||||
"padded_length": 256,
|
||||
"plaintext_file": "format2_time_and_key_portable.plaintext",
|
||||
"plaintext_sha256": "937492203d207d6fe36161b8696bf1f05b8b4cc56d855c44853f4b76aad3a05b",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
DateKeys fixture opened with a portable .dkk.
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
||||
{
|
||||
"description": "portable X25519 .dkk of format2_time_and_key_recipients.dkc",
|
||||
"spec": "0.9",
|
||||
"file": "format2_time_and_key_recipients.dkk",
|
||||
"sha256": "2ad99b1556086ec311d7f0b3bd3aaba05e75f45c4fa22490b0d5e8bb0b1a222e",
|
||||
"credential_id": "93cedf68421710e83908ec683b104436",
|
||||
"capsule_id": "ca3e8bfcae3ee19717fe3129ec9830b6",
|
||||
"access_type": "x25519",
|
||||
"access_material": "272884826b037b4bc98cfe4d57838807b6da906ff8704e810f975111dd3cbfda",
|
||||
"capsule_digest": "1a44fd8708c92e2e0a10cfcb1d864a71331ea9af25d97e1a42e969dc898959e3",
|
||||
"capsule": "format2_time_and_key_recipients.dkc",
|
||||
"expected_result": "opens INNER_ACCESS_AGE of format2_time_and_key_recipients.dkc and yields its CONTROL_CBOR"
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_and_key_recipients.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "ca3e8bfcae3ee19717fe3129ec9830b6",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 1001,
|
||||
"unlock_at": "2023-08-23T15:59:27Z",
|
||||
"access_policy": "time_and_key",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=2128"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=ca3e8bfcae3ee19717fe3129ec9830b6 datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0 policy=time_and_key profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 1001, unlock at 2023-08-23T15:59:27Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 1001, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,250 @@
|
||||
{
|
||||
"description": "format 2 time_and_key capsule for three known X25519 recipients and a portable .dkk, and 12 dummies",
|
||||
"spec": "0.9",
|
||||
"format": 2,
|
||||
"file": "format2_time_and_key_recipients.dkc",
|
||||
"sha256": "1a44fd8708c92e2e0a10cfcb1d864a71331ea9af25d97e1a42e969dc898959e3",
|
||||
"release": {
|
||||
"round": 1001,
|
||||
"signature": "b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41"
|
||||
},
|
||||
"prelude": "444b4331020000000000007900000850",
|
||||
"public_header": "a5006a646174656b657963617001010250ca3e8bfcae3ee19717fe3129ec9830b6037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d5441774d58300401",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMX0",
|
||||
"capsule_id": "ca3e8bfcae3ee19717fe3129ec9830b6",
|
||||
"access_policy": "time_and_key",
|
||||
"structure": "time_and_key",
|
||||
"unlock_at": "2023-08-23T15:59:27Z",
|
||||
"header_binding": "d58f5020ab127df352927bba6186ec6708edb3e26234803ac76f082c2d10751f",
|
||||
"outer_stanzas": [
|
||||
{
|
||||
"type": "tlock",
|
||||
"args": [
|
||||
"1001",
|
||||
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
]
|
||||
}
|
||||
],
|
||||
"payload_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"zwimuIAtSKu5jEPDc8Ze3RU9ekOQ2BXoQhBYnfs+hgc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"inner_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"rTpC8mQa3vIxdOHxJLfKIAFg+doIrbpwKT4s/2xoJ14"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"Y5VKnOKgh+/3eHCKX0mzTMMAkiM0jy6BQuOkZV3MwXA"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"UuqI7BCvGSBTc1jcOC9+cyuAD1dS+kIZfOMtiTK6UyM"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"EdcAEuz4sXrj2PgkVmYMhUeJA4ug4lj5FZ3h5kpwjk8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"HtdphHaSk8HVcc5+eQHL1FtCgRZawHWJSBcKI4LSTRc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"ptIvd9fZTT+7i2CtqZyGVpnX8JT/WfrTutG/HwQzHSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"6n1HeyrMMoMlcv7CmRJ+3tTi0snVz2eKGgAej9epLD8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"7Z6bPBYl7Vp77EyDvcGtKenS2E4oYxMym3UzrVx1XEI"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"79VpVzXH3cG90UXPBTRgdEFgBF2vr66Oirm1GhmncwQ"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"gnUtu2RlmZCJDiBXybyUAdRR279VaRJ2KOw3qurphF8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"FZfOfhUP4mAurdR80ZIbHzLsFvA4yf1oRfC/uGBXyGQ"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"O6nde4hw5/KEd/7YvpLQIHS50q/aaipCF6UgH3mtWjA"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"9NNLG5SyyVBqw6Xx0LVlnJwYB3xff8iwhMAqY0g8YGE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"AWV9QKUm9eV9XbDc+mESUu38STDBGKo4D0extcQweik"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"nmr1ixKyrZnu0RS2BG+LrBCEsrnTra1ORrMVnK/ooV8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"7674vCSB9Xm9FZzQAK0YndMuEaq/dIrWFMalCLMQ6hw"
|
||||
]
|
||||
}
|
||||
],
|
||||
"access_key_stanza": 4,
|
||||
"identity_stanzas": [
|
||||
11,
|
||||
12,
|
||||
9
|
||||
],
|
||||
"access_key_file": "format2_time_and_key_recipients.dkk",
|
||||
"identities": [
|
||||
"AGE-SECRET-KEY-1DRV36ZLYW0GCZCJTMK0S025K3PLEQR7QAY574K4PGH5VFTZKKZMS3J3LNL",
|
||||
"AGE-SECRET-KEY-1E92XVRNNUHQ9GD7D34P2XAD97MZGNE4DR990GJFGDYEX8WDE8E4ST8HHK2",
|
||||
"AGE-SECRET-KEY-1C2K7R20E0GKLGJM60JFL63ZUL4G9HNSA7CYU3WLPZMKLYEKFFJRSSP7UTJ"
|
||||
],
|
||||
"control_cbor": "a60070646174656b6579732d636f6e74726f6c0102025820d58f5020ab127df352927bba6186ec6708edb3e26234803ac76f082c2d10751f0358206cff50465e2f76ee0452d5f4ba9f942d54edbf8a6c42fb70f85cc75bc52d8e54064800000000000000290702",
|
||||
"payload_identity": "6cff50465e2f76ee0452d5f4ba9f942d54edbf8a6c42fb70f85cc75bc52d8e54",
|
||||
"payload_length": 41,
|
||||
"padding": 2,
|
||||
"padded_length": 256,
|
||||
"plaintext_file": "format2_time_and_key_recipients.plaintext",
|
||||
"plaintext_sha256": "0e9fd50e98a85953aa9cf07a11ee3c62bb3d7622f344f1c6ce744d1ed111659f",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
DateKeys fixture for several recipients.
|
||||
Binary file not shown.
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_and_key_sixteen.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "0e53b85a2f9201e2b3368ae122540da7",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 2000,
|
||||
"unlock_at": "2023-08-23T16:49:24Z",
|
||||
"access_policy": "time_and_key",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=2128"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=0e53b85a2f9201e2b3368ae122540da7 datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0 policy=time_and_key profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 2000, unlock at 2023-08-23T16:49:24Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 2000, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,274 @@
|
||||
{
|
||||
"description": "format 2 time_and_key capsule for sixteen known X25519 recipients, without dummies",
|
||||
"spec": "0.9",
|
||||
"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": [
|
||||
"X3qbXXTYgnIfydQXV9hQvDA2qecpTpH2ujwVEzmVpEY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"DlRE4NA+zt/dlJtkCUdPC58+wGynSkqOVUPbXKEYYQ4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"TIibCVrxyEfR8dzQmN4AnpG7NgBqAj/FtitSZ865yHo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"VR0fW67398y8LUcHw2O5l3xu0s90e4SEKdd4rBUBmEU"
|
||||
]
|
||||
}
|
||||
],
|
||||
"identity_stanzas": [
|
||||
11,
|
||||
3,
|
||||
13,
|
||||
9,
|
||||
6,
|
||||
5,
|
||||
2,
|
||||
1,
|
||||
14,
|
||||
7,
|
||||
12,
|
||||
10,
|
||||
0,
|
||||
8,
|
||||
15,
|
||||
4
|
||||
],
|
||||
"identities": [
|
||||
"AGE-SECRET-KEY-1PXL3AC9TN7LJJCLQ53TGU6VYU02AY709VFYYZCEYFGNXMHT7SUMQP0M2DT",
|
||||
"AGE-SECRET-KEY-1ATGRTUEY80VSHV6YR6P3U3D4Z4VHC8K7UCTPEY9TRALTW3RJ6VHQQPKQYN",
|
||||
"AGE-SECRET-KEY-13WEPF99TP58KQAD3PJVMTKAW2H7L5TK2C0200QGK0ESH5GZD7ZKQFE3ER5",
|
||||
"AGE-SECRET-KEY-19TSHS4VD8VJ29ETFNJYKCHGQYU2K0NC9HAT6Z4ZWZ7NNJAUHXLDSQG6CZF",
|
||||
"AGE-SECRET-KEY-1M0AXFJZZRLWNQ32M7WXE7Q4PCT2XX9LZPTKPS7UGMC2M2QFAVNCSPQWVN4",
|
||||
"AGE-SECRET-KEY-1DX3M9XMVLD8YW77F8HP57985HCSLCS4TZ4ZER8P560NNJADKM5FQ58PGEM",
|
||||
"AGE-SECRET-KEY-1MUR3WWVK2SE0DDTU45PEEM2C0GMRQNE4KY28DVHF40ZNLWVTW6AQ99C5A9",
|
||||
"AGE-SECRET-KEY-1NNMJK68RC2TTXXMWN38CTZV53PUT6WCPKW8SAQYFL3H827S7DPTQW7WGSU",
|
||||
"AGE-SECRET-KEY-1AM8FLQKNRVKMY57GN7X0NVUUC3XUQ6HJ46WGMTWYMEAKDP8545QSM6MXZ4",
|
||||
"AGE-SECRET-KEY-1E36KU0LDG3ZPDWT2RTUUUXX6WW4A3EQJSTTXYAPPCR5KM7030GASR7LGLP",
|
||||
"AGE-SECRET-KEY-1N6DRGLY8C6RVK38VUAFX42X0URCWDHDPK4N88LC62GURP80QRLVQ0LU4ZA",
|
||||
"AGE-SECRET-KEY-1ESAC0TZKVMNCKW4XVRRUMN757NNKSW2W5CPLA5FEAQZUEPCZGLZS7ZT8G9",
|
||||
"AGE-SECRET-KEY-129ZJMZTRDZVFSTYLPECMCDS5QR6Q2C7FKW2A2S2L96NJ6G4WVSVSFAQ2NY",
|
||||
"AGE-SECRET-KEY-1Z9TQWH8VG4QSLM8PUU0KDQHAWKDMDVF0X35LXKRYXGWZAF5ZYL3SZX9CML",
|
||||
"AGE-SECRET-KEY-10AEA26HQPN53KHFGXGJCHAAZDTJU6PF4HJUGZ58P07MZTM3TTN5SMD27MM",
|
||||
"AGE-SECRET-KEY-153U4SENXWJEY7WMXR75HUUSV6HU0CJPAXPU7S8X8S20G5KT86FWQHVG43Q"
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
DateKeys fixture for sixteen recipients.
|
||||
Binary file not shown.
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_only.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "c8cfc53d45c879da916edddf71f3bddd",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 1000,
|
||||
"unlock_at": "2023-08-23T15:59:24Z",
|
||||
"access_policy": "time_only",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=458"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=c8cfc53d45c879da916edddf71f3bddd datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0 policy=time_only profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 1000, unlock at 2023-08-23T15:59:24Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 1000, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
{
|
||||
"description": "format 2 time_only capsule, padding code 2 (reforzado): L = 78000, P = 79872, two STREAM chunks",
|
||||
"spec": "0.9",
|
||||
"format": 2,
|
||||
"file": "format2_time_only.dkc",
|
||||
"sha256": "f5a40ac6b8a08a0c12db6114c2bca23522d6a77b512b509a217fb15f367813c4",
|
||||
"release": {
|
||||
"round": 1000,
|
||||
"signature": "b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39"
|
||||
},
|
||||
"prelude": "444b43310200000000000079000001ca",
|
||||
"public_header": "a5006a646174656b657963617001010250c8cfc53d45c879da916edddf71f3bddd037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d5441774d48300400",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
||||
"capsule_id": "c8cfc53d45c879da916edddf71f3bddd",
|
||||
"access_policy": "time_only",
|
||||
"structure": "time_only",
|
||||
"unlock_at": "2023-08-23T15:59:24Z",
|
||||
"header_binding": "f916dc2cadb85b0426cc7caafdd01ebab7b27911ba1b4ed13fa48e74cdd452a1",
|
||||
"outer_stanzas": [
|
||||
{
|
||||
"type": "tlock",
|
||||
"args": [
|
||||
"1000",
|
||||
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
]
|
||||
}
|
||||
],
|
||||
"payload_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"Sk/EUvzR0FX1g4rLX4zLC00L9S9eCdz8nZ2IaHEaOWE"
|
||||
]
|
||||
}
|
||||
],
|
||||
"control_cbor": "a60070646174656b6579732d636f6e74726f6c0102025820f916dc2cadb85b0426cc7caafdd01ebab7b27911ba1b4ed13fa48e74cdd452a103582069dab305617ad46e0f518af78153efddeaf61bc59336f209068c8e692119b94d064800000000000130b00702",
|
||||
"payload_identity": "69dab305617ad46e0f518af78153efddeaf61bc59336f209068c8e692119b94d",
|
||||
"payload_length": 78000,
|
||||
"padding": 2,
|
||||
"padded_length": 79872,
|
||||
"plaintext_file": "format2_time_only.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
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_only_bloque256.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "10157a2ba032f78e23d8035e368345c8",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 1000,
|
||||
"unlock_at": "2023-08-23T15:59:24Z",
|
||||
"access_policy": "time_only",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=121, SEALED_CONTROL_LEN=458"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "121 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=10157a2ba032f78e23d8035e368345c8 datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MTAwMH0 policy=time_only profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 1000, unlock at 2023-08-23T15:59:24Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 1000, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
{
|
||||
"description": "format 2 time_only capsule with the content of format2_time_only and padding code 1 (bloque256): L = 78000, P = 78080",
|
||||
"spec": "0.9",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,61 @@
|
||||
{
|
||||
"file": "format2_time_only_extensions.dkc",
|
||||
"format": 2,
|
||||
"capsule_id": "3ab2c06d482609a9c7ae92f672599883",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0",
|
||||
"profile": "datekeys:quicknet:v1",
|
||||
"round": 2000,
|
||||
"unlock_at": "2023-08-23T16:49:24Z",
|
||||
"access_policy": "time_only",
|
||||
"valid": true,
|
||||
"checks": [
|
||||
{
|
||||
"step": 1,
|
||||
"name": "parse DKC1",
|
||||
"ok": true,
|
||||
"detail": "magic DKC1"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "prelude",
|
||||
"ok": true,
|
||||
"detail": "DKC1 v2, PUBLIC_HEADER_LEN=159, SEALED_CONTROL_LEN=494"
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "public header",
|
||||
"ok": true,
|
||||
"detail": "159 bytes"
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "header validation",
|
||||
"ok": true,
|
||||
"detail": "capsule_id=3ab2c06d482609a9c7ae92f672599883 datekey=dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0 policy=time_only profile=datekeys:quicknet:v1"
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "sealed control structure",
|
||||
"ok": true,
|
||||
"detail": "one tlock stanza"
|
||||
},
|
||||
{
|
||||
"step": 6,
|
||||
"name": "payload structure",
|
||||
"ok": true,
|
||||
"detail": "one X25519 stanza"
|
||||
},
|
||||
{
|
||||
"step": 7,
|
||||
"name": "condition",
|
||||
"ok": true,
|
||||
"detail": "round 2000, unlock at 2023-08-23T16:49:24Z"
|
||||
},
|
||||
{
|
||||
"step": 8,
|
||||
"name": "tlock stanza",
|
||||
"ok": true,
|
||||
"detail": "round 2000, chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,146 @@
|
||||
{
|
||||
"description": "format 2 time_only capsule with a noncritical PUBLIC_HEADER extension and a noncritical CONTROL_CBOR extension",
|
||||
"spec": "0.9",
|
||||
"format": 2,
|
||||
"file": "format2_time_only_extensions.dkc",
|
||||
"sha256": "fb406100d5703a2e888983b3175ed34a09a34469cc722256e5cf535dd728fbe9",
|
||||
"release": {
|
||||
"round": 2000,
|
||||
"signature": "b6cb8f482a0b15d45936a4c4ea08e98a087e71787caee3f4d07a8a9843b1bc5423c6b3c22f446488b3137eaca799c77e"
|
||||
},
|
||||
"prelude": "444b4331020000000000009f000001ee",
|
||||
"public_header": "a6006a646174656b6579636170010102503ab2c06d482609a9c7ae92f672599883037853646b315f65794a325a584a7a61573975496a6f784c434a755a58523362334a72496a6f695a4746305a57746c65584d3663585670593274755a585136646a45694c434a79623356755a4349364d6a41774d483004000681a300716f72672e6578616d706c652e6c6162656c0101024c7075626c6963206c6162656c",
|
||||
"datekey": "dk1_eyJ2ZXJzaW9uIjoxLCJuZXR3b3JrIjoiZGF0ZWtleXM6cXVpY2tuZXQ6djEiLCJyb3VuZCI6MjAwMH0",
|
||||
"capsule_id": "3ab2c06d482609a9c7ae92f672599883",
|
||||
"access_policy": "time_only",
|
||||
"structure": "time_only",
|
||||
"unlock_at": "2023-08-23T16:49:24Z",
|
||||
"header_binding": "92c5e87f3a1012e617bd28e4962ad159b9bf85d1a1937a59cb6d8e79e459bd64",
|
||||
"outer_stanzas": [
|
||||
{
|
||||
"type": "tlock",
|
||||
"args": [
|
||||
"2000",
|
||||
"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
|
||||
]
|
||||
}
|
||||
],
|
||||
"payload_stanzas": [
|
||||
{
|
||||
"type": "X25519",
|
||||
"args": [
|
||||
"e/RmpYH4zJrsLekrD6m4qihOuh+V8MvSq32jfykT1T8"
|
||||
]
|
||||
}
|
||||
],
|
||||
"control_cbor": "a70070646174656b6579732d636f6e74726f6c010202582092c5e87f3a1012e617bd28e4962ad159b9bf85d1a1937a59cb6d8e79e459bd64035820d9e066526400e9f580b79411524c5f3ac77ce1d9ba13e0ae4ec7e7fbed6619ff0581a300706f72672e6578616d706c652e6e6f74650102024ba2000701667365616c6564064800000000000000220702",
|
||||
"payload_identity": "d9e066526400e9f580b79411524c5f3ac77ce1d9ba13e0ae4ec7e7fbed6619ff",
|
||||
"payload_length": 34,
|
||||
"padding": 2,
|
||||
"padded_length": 256,
|
||||
"plaintext_file": "format2_time_only_extensions.plaintext",
|
||||
"plaintext_sha256": "1129768e195e2f1e50b7a6f926b6eebef120212c29b5642c8a662c503b2a9131",
|
||||
"header_extensions": [
|
||||
{
|
||||
"critical": false,
|
||||
"id": "org.example.label",
|
||||
"version": 1,
|
||||
"data": "7075626c6963206c6162656c"
|
||||
}
|
||||
],
|
||||
"control_extensions": [
|
||||
{
|
||||
"critical": false,
|
||||
"id": "org.example.note",
|
||||
"version": 2,
|
||||
"data": "a2000701667365616c6564"
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
DateKeys fixture with extensions.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,286 @@
|
||||
{
|
||||
"spec": "0.9",
|
||||
"description": "Padding rules of the payload of a format 2 capsule (spec §29.1): for each content length L, P with code 1 (bloque256) and code 2 (reforzado), and the length of PAYLOAD_AGE for each. e, s and last_bits are informative. Generated by the reference implementation. See testdata/README.md.",
|
||||
"l_max": 8936830510563328,
|
||||
"vectors": [
|
||||
{
|
||||
"l": 0,
|
||||
"bloque256": 256,
|
||||
"reforzado": 256,
|
||||
"payload_age_bloque256": 456,
|
||||
"payload_age_reforzado": 456
|
||||
},
|
||||
{
|
||||
"l": 1,
|
||||
"bloque256": 256,
|
||||
"reforzado": 256,
|
||||
"payload_age_bloque256": 456,
|
||||
"payload_age_reforzado": 456
|
||||
},
|
||||
{
|
||||
"l": 40,
|
||||
"bloque256": 256,
|
||||
"reforzado": 256,
|
||||
"payload_age_bloque256": 456,
|
||||
"payload_age_reforzado": 456
|
||||
},
|
||||
{
|
||||
"l": 255,
|
||||
"bloque256": 256,
|
||||
"reforzado": 256,
|
||||
"payload_age_bloque256": 456,
|
||||
"payload_age_reforzado": 456
|
||||
},
|
||||
{
|
||||
"l": 256,
|
||||
"bloque256": 256,
|
||||
"reforzado": 256,
|
||||
"payload_age_bloque256": 456,
|
||||
"payload_age_reforzado": 456
|
||||
},
|
||||
{
|
||||
"l": 257,
|
||||
"bloque256": 512,
|
||||
"reforzado": 512,
|
||||
"payload_age_bloque256": 712,
|
||||
"payload_age_reforzado": 712,
|
||||
"e": 8,
|
||||
"s": 4,
|
||||
"last_bits": 4
|
||||
},
|
||||
{
|
||||
"l": 1000,
|
||||
"bloque256": 1024,
|
||||
"reforzado": 1024,
|
||||
"payload_age_bloque256": 1224,
|
||||
"payload_age_reforzado": 1224,
|
||||
"e": 9,
|
||||
"s": 4,
|
||||
"last_bits": 5
|
||||
},
|
||||
{
|
||||
"l": 4096,
|
||||
"bloque256": 4096,
|
||||
"reforzado": 4096,
|
||||
"payload_age_bloque256": 4296,
|
||||
"payload_age_reforzado": 4296,
|
||||
"e": 12,
|
||||
"s": 4,
|
||||
"last_bits": 8
|
||||
},
|
||||
{
|
||||
"l": 8192,
|
||||
"bloque256": 8192,
|
||||
"reforzado": 8192,
|
||||
"payload_age_bloque256": 8392,
|
||||
"payload_age_reforzado": 8392,
|
||||
"e": 13,
|
||||
"s": 4,
|
||||
"last_bits": 9
|
||||
},
|
||||
{
|
||||
"l": 8193,
|
||||
"bloque256": 8448,
|
||||
"reforzado": 8704,
|
||||
"payload_age_bloque256": 8648,
|
||||
"payload_age_reforzado": 8904,
|
||||
"e": 13,
|
||||
"s": 4,
|
||||
"last_bits": 9
|
||||
},
|
||||
{
|
||||
"l": 10000,
|
||||
"bloque256": 10240,
|
||||
"reforzado": 10240,
|
||||
"payload_age_bloque256": 10440,
|
||||
"payload_age_reforzado": 10440,
|
||||
"e": 13,
|
||||
"s": 4,
|
||||
"last_bits": 9
|
||||
},
|
||||
{
|
||||
"l": 65536,
|
||||
"bloque256": 65536,
|
||||
"reforzado": 65536,
|
||||
"payload_age_bloque256": 65736,
|
||||
"payload_age_reforzado": 65736,
|
||||
"e": 16,
|
||||
"s": 5,
|
||||
"last_bits": 11
|
||||
},
|
||||
{
|
||||
"l": 65537,
|
||||
"bloque256": 65792,
|
||||
"reforzado": 67584,
|
||||
"payload_age_bloque256": 66008,
|
||||
"payload_age_reforzado": 67800,
|
||||
"e": 16,
|
||||
"s": 5,
|
||||
"last_bits": 11
|
||||
},
|
||||
{
|
||||
"l": 78000,
|
||||
"bloque256": 78080,
|
||||
"reforzado": 79872,
|
||||
"payload_age_bloque256": 78296,
|
||||
"payload_age_reforzado": 80088,
|
||||
"e": 16,
|
||||
"s": 5,
|
||||
"last_bits": 11
|
||||
},
|
||||
{
|
||||
"l": 1000000,
|
||||
"bloque256": 1000192,
|
||||
"reforzado": 1015808,
|
||||
"payload_age_bloque256": 1000632,
|
||||
"payload_age_reforzado": 1016248,
|
||||
"e": 19,
|
||||
"s": 5,
|
||||
"last_bits": 14
|
||||
},
|
||||
{
|
||||
"l": 3000000,
|
||||
"bloque256": 3000064,
|
||||
"reforzado": 3014656,
|
||||
"payload_age_bloque256": 3000984,
|
||||
"payload_age_reforzado": 3015576,
|
||||
"e": 21,
|
||||
"s": 5,
|
||||
"last_bits": 16
|
||||
},
|
||||
{
|
||||
"l": 600000000,
|
||||
"bloque256": 600000000,
|
||||
"reforzado": 603979776,
|
||||
"payload_age_bloque256": 600146680,
|
||||
"payload_age_reforzado": 604127416,
|
||||
"e": 29,
|
||||
"s": 5,
|
||||
"last_bits": 24
|
||||
},
|
||||
{
|
||||
"l": 1000000000,
|
||||
"bloque256": 1000000000,
|
||||
"reforzado": 1006632960,
|
||||
"payload_age_bloque256": 1000244328,
|
||||
"payload_age_reforzado": 1006878904,
|
||||
"e": 29,
|
||||
"s": 5,
|
||||
"last_bits": 24
|
||||
},
|
||||
{
|
||||
"l": 2113929216,
|
||||
"bloque256": 2113929216,
|
||||
"reforzado": 2113929216,
|
||||
"payload_age_bloque256": 2114445496,
|
||||
"payload_age_reforzado": 2114445496,
|
||||
"e": 30,
|
||||
"s": 5,
|
||||
"last_bits": 25
|
||||
},
|
||||
{
|
||||
"l": 2113929217,
|
||||
"bloque256": 2113929472,
|
||||
"reforzado": 2147483648,
|
||||
"payload_age_bloque256": 2114445768,
|
||||
"payload_age_reforzado": 2148008120,
|
||||
"e": 30,
|
||||
"s": 5,
|
||||
"last_bits": 25
|
||||
},
|
||||
{
|
||||
"l": 4227858432,
|
||||
"bloque256": 4227858432,
|
||||
"reforzado": 4227858432,
|
||||
"payload_age_bloque256": 4228890808,
|
||||
"payload_age_reforzado": 4228890808,
|
||||
"e": 31,
|
||||
"s": 5,
|
||||
"last_bits": 26
|
||||
},
|
||||
{
|
||||
"l": 4227858433,
|
||||
"bloque256": 4227858688,
|
||||
"reforzado": 4294967296,
|
||||
"payload_age_bloque256": 4228891080,
|
||||
"payload_age_reforzado": 4296016056,
|
||||
"e": 31,
|
||||
"s": 5,
|
||||
"last_bits": 26
|
||||
},
|
||||
{
|
||||
"l": 4294967295,
|
||||
"bloque256": 4294967296,
|
||||
"reforzado": 4294967296,
|
||||
"payload_age_bloque256": 4296016056,
|
||||
"payload_age_reforzado": 4296016056,
|
||||
"e": 31,
|
||||
"s": 5,
|
||||
"last_bits": 26
|
||||
},
|
||||
{
|
||||
"l": 4294967297,
|
||||
"bloque256": 4294967552,
|
||||
"reforzado": 4362076160,
|
||||
"payload_age_bloque256": 4296016328,
|
||||
"payload_age_reforzado": 4363141304,
|
||||
"e": 32,
|
||||
"s": 6,
|
||||
"last_bits": 26
|
||||
},
|
||||
{
|
||||
"l": 5000000000,
|
||||
"bloque256": 5000000000,
|
||||
"reforzado": 5033164800,
|
||||
"payload_age_bloque256": 5001220888,
|
||||
"payload_age_reforzado": 5034393784,
|
||||
"e": 32,
|
||||
"s": 6,
|
||||
"last_bits": 26
|
||||
},
|
||||
{
|
||||
"l": 1000000000000,
|
||||
"bloque256": 1000000000000,
|
||||
"reforzado": 1005022347264,
|
||||
"payload_age_bloque256": 1000244140824,
|
||||
"payload_age_reforzado": 1005267714232,
|
||||
"e": 39,
|
||||
"s": 6,
|
||||
"last_bits": 33
|
||||
},
|
||||
{
|
||||
"l": 562949953421311,
|
||||
"bloque256": 562949953421312,
|
||||
"reforzado": 562949953421312,
|
||||
"payload_age_bloque256": 563087392374968,
|
||||
"payload_age_reforzado": 563087392374968,
|
||||
"e": 48,
|
||||
"s": 6,
|
||||
"last_bits": 42
|
||||
},
|
||||
{
|
||||
"l": 4503599627370497,
|
||||
"bloque256": 4503599627370752,
|
||||
"reforzado": 4573968371548160,
|
||||
"payload_age_bloque256": 4504699138998728,
|
||||
"payload_age_reforzado": 4575085063045304,
|
||||
"e": 52,
|
||||
"s": 6,
|
||||
"last_bits": 46
|
||||
},
|
||||
{
|
||||
"l": 8936830510563328,
|
||||
"bloque256": 8936830510563328,
|
||||
"reforzado": 8936830510563328,
|
||||
"payload_age_bloque256": 8939012353949880,
|
||||
"payload_age_reforzado": 8939012353949880,
|
||||
"e": 52,
|
||||
"s": 6,
|
||||
"last_bits": 46
|
||||
}
|
||||
],
|
||||
"rejected": [
|
||||
8936830510563329,
|
||||
9007199254740992
|
||||
]
|
||||
}
|
||||
Loading…
Reference in new issue