|
|
|
|
; DateKeys Protocol Specification v0.8.2 - CBOR schemas (RFC 8610 CDDL).
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
;
|
|
|
|
|
; Normative companion of spec/DateKeys_Protocol_Specification_v0.8.2.md, as
|
|
|
|
|
; implemented by the reference implementation g.activething.com/go/DateKeys.
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
;
|
|
|
|
|
; Encoding rules that CDDL cannot express (spec section 58, 58.1):
|
|
|
|
|
; - Every structure uses the CBOR profile of the protocol (spec section 58):
|
|
|
|
|
; Deterministic CBOR (RFC 8949 section 4.2.1) restricted to major types 0,
|
|
|
|
|
; 2, 3, 4 and 5, with unsigned integer map keys in strictly ascending
|
|
|
|
|
; order, shortest-form integers and lengths, definite lengths only and
|
|
|
|
|
; valid UTF-8 text. Negative integers, tags, floats, simple values
|
|
|
|
|
; (including null) and indefinite lengths are rejected.
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
; - A decoder re-encodes what it decoded and rejects any byte difference
|
|
|
|
|
; (ERR_NON_CANONICAL_CBOR).
|
|
|
|
|
; - A semantically absent optional field is omitted. Empty arrays, empty
|
|
|
|
|
; maps, null, "" and h'' never stand for absence; the .size and non-empty
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
; constraints below make those forms invalid.
|
|
|
|
|
; - Maps are closed: keys not listed here are rejected. New semantics go in
|
|
|
|
|
; extensions (spec section 54).
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; - The elements of each extension array are in strictly ascending order of
|
|
|
|
|
; the UTF-8 bytes of extension_id (spec section 54): bytes compared as
|
|
|
|
|
; unsigned integers, the first differing byte decides and a proper prefix
|
|
|
|
|
; sorts first; never UTF-16 code units, case folding, Unicode
|
|
|
|
|
; normalization or a locale collation. U+FF61 (ef bd a1) sorts before
|
|
|
|
|
; U+10000 (f0 90 80 80). The strict order also forbids a repeated
|
|
|
|
|
; extension_id within an array, and no extension_id appears in both
|
|
|
|
|
; arrays of one object, so an extension_id appears at most once per
|
|
|
|
|
; object.
|
|
|
|
|
; - A violation of a normative rule of this schema, including .size,
|
|
|
|
|
; integer ranges and the 64-extension maximum, is ERR_NON_CANONICAL_CBOR
|
|
|
|
|
; unless spec section 57 names a more specific error (schema version,
|
|
|
|
|
; compact_datekey, access_type and access_material, Provider Profile
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; names and public key). Those rules are checked with the fields, after
|
|
|
|
|
; the rest of this schema; here a field needs only the CBOR type of its
|
|
|
|
|
; rule, and another type is ERR_NON_CANONICAL_CBOR. The implementation
|
|
|
|
|
; limits marked below are not normative; spec section 74 lists them,
|
|
|
|
|
; with the limits of the reference outside this schema, and an
|
|
|
|
|
; implementation that applies them uses the same mapping.
|
|
|
|
|
; - When bytes break several rules, the code is the one of the first
|
|
|
|
|
; failing layer (spec section 69.1): frame, then type tag and schema
|
|
|
|
|
; version (keys 0 and 1), then this schema, then the fields with codes of
|
|
|
|
|
; their own in ascending key order.
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; Spec section 11 and 12. Spec section 12.1 adds the rules a profile must
|
|
|
|
|
; follow to be pinned (ERR_UNKNOWN_PROFILE), among them period at most 2^32-1
|
Spec v0.8.2 amendment: canonical point encoding; no library error text
Amendment of the unreleased v0.8.2, recorded in §76 with its case: the
second implementation's phase-2 research found that tlock-js over
@noble/curves 1.9.7 accepts U re-encoded as c0 + p and a signature
x + p and returns the same file key, while the reference rejects both
(noble 1.9.7 differed from kilic on 5,615 of 41,686 encodings), and the
spec did not say which encodings are valid.
- §12.2 defines the canonical encoding of a BLS12-381 point (drand's
compressed ZCash form) and requires decoders to reject every other
byte string; §12.1 applies it to public_key.
- §63 step 10 applies it to the release signature (ERR_RELEASE_INVALID)
and step 11 defines the tlock stanza body U || V || W (96 + 16 + 16
bytes for Quicknet) with a canonical, non-infinity U (ERR_INTEGRITY).
- §64 gains ten mutations, exported to mutations.json (65 cases). The
signature x + p case uses published Quicknet round 1004, the first
after 1000 whose x allows x + p < 2^381. The reference already gave
every stated code and step.
Errors no longer copy text from tlock, kyber, age, drand or
kyber-bls12381. kyber's IBE error carried the candidate plaintext and r,
and with one bit of W flipped the message disclosed the real tlock file
key with that bit flipped. Every such place now uses a fixed reason with
its normative sentinel; TestTlockFailureDiagnosticsCarryNoSecrets fails
with the old wrapping.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; and a public key that is the canonical encoding (spec section 12.2) of a
|
|
|
|
|
; point of the key group of the scheme, 48 or 96 bytes, other than the point
|
|
|
|
|
; at infinity, and the chain-hash self-check, SHA-256(uint32_be(period) ||
|
|
|
|
|
; int64_be(genesis_time) || public_key || genesis_seed || network), network
|
|
|
|
|
; left out when it is "default" (ERR_PROFILE_MISMATCH).
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
provider-profile = {
|
|
|
|
|
0 => "datekeys-provider-profile",
|
|
|
|
|
1 => 1,
|
|
|
|
|
2 => profile-id,
|
|
|
|
|
3 => name, ; provider, "drand"
|
|
|
|
|
4 => name, ; provider network identifier, "quicknet"
|
|
|
|
|
5 => bstr .size 32, ; chain_hash
|
|
|
|
|
6 => public-key, ; group public key
|
|
|
|
|
7 => period, ; seconds; spec section 11: 1..max-safe-uint
|
|
|
|
|
8 => 0..max-safe-uint, ; genesis_time, Unix seconds
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
9 => name, ; scheme, "bls-unchained-g1-rfc9380"
|
|
|
|
|
10 => bstr .size 32, ; genesis_seed
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Spec section 24. Stored as exact bytes after the 16-byte PRELUDE and covered
|
|
|
|
|
; by header_binding = SHA-256(PRELUDE || PUBLIC_HEADER).
|
|
|
|
|
public-header = {
|
|
|
|
|
0 => "datekeycap",
|
|
|
|
|
1 => 1,
|
|
|
|
|
2 => capsule-id,
|
|
|
|
|
3 => compact-datekey, ; the only source of the profile
|
|
|
|
|
4 => access-policy,
|
|
|
|
|
? 5 => extensions, ; critical_extensions
|
|
|
|
|
? 6 => extensions, ; noncritical_extensions
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Spec section 31. Sealed inside OUTER_TIME_AGE (time_only) or inside
|
|
|
|
|
; INNER_ACCESS_AGE inside OUTER_TIME_AGE (time_and_key).
|
|
|
|
|
control = {
|
|
|
|
|
0 => "datekeys-control",
|
|
|
|
|
1 => 1,
|
|
|
|
|
2 => bstr .size 32, ; header_binding
|
|
|
|
|
3 => bstr .size 32, ; payload_identity, raw X25519 identity I_PAYLOAD
|
|
|
|
|
? 4 => extensions, ; critical_extensions
|
|
|
|
|
? 5 => extensions, ; noncritical_extensions
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Spec section 41. BODY_CBOR of a .dkk, after the 12-byte DKK1 prelude.
|
|
|
|
|
access-key-body = {
|
|
|
|
|
0 => "datekeys-access-key",
|
|
|
|
|
1 => 1,
|
|
|
|
|
2 => bstr .size 16, ; credential_id
|
|
|
|
|
3 => capsule-id,
|
|
|
|
|
4 => access-type,
|
|
|
|
|
5 => access-material,
|
|
|
|
|
? 6 => verification-metadata,
|
|
|
|
|
? 7 => extensions, ; critical_extensions
|
|
|
|
|
? 8 => extensions, ; noncritical_extensions
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Spec section 43. Present only when it holds a digest: never an empty map.
|
|
|
|
|
verification-metadata = {
|
|
|
|
|
0 => bstr .size 32, ; capsule_digest = SHA-256(exact .dkc bytes)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Spec section 31 and 54.
|
|
|
|
|
extensions = [1*64 extension]
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
extension = {
|
|
|
|
|
0 => extension-id,
|
|
|
|
|
1 => extension-version,
|
|
|
|
|
? 2 => extension-data,
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
}
|
|
|
|
|
extension-version = uint .le 4294967295
|
|
|
|
|
; Opaque bytes: the base protocol never decodes or validates the content, and
|
|
|
|
|
; an extension without data omits key 2. The effective bound is the frame of
|
|
|
|
|
; the containing object (spec section 57); 67108864 bytes (64 MiB) is the
|
|
|
|
|
; largest frame, SEALED_CONTROL. Each registered extension declares its own
|
|
|
|
|
; maximum (spec section 72).
|
|
|
|
|
extension-data = bstr .size (1..67108864)
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
|
|
|
|
|
capsule-id = bstr .size 16
|
|
|
|
|
access-policy = &(time_only: 0, time_and_key: 1)
|
|
|
|
|
access-type = "x25519"
|
|
|
|
|
access-material = bstr .size 32 ; for access-type "x25519"
|
|
|
|
|
|
|
|
|
|
; 2^53-1: every unsigned integer of the protocol is exact as an IEEE 754
|
|
|
|
|
; double (spec section 58).
|
|
|
|
|
max-safe-uint = 9007199254740991
|
|
|
|
|
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; Names of the Provider Profile (spec section 12.1): the alphabets are
|
|
|
|
|
; normative, the maximum lengths of 128 and 64 bytes are implementation
|
|
|
|
|
; limits of the reference (spec section 74). A violation is
|
|
|
|
|
; ERR_UNKNOWN_PROFILE (spec section 57). profile-id also bounds the network
|
|
|
|
|
; of a dk1_ DateKey (ERR_DATEKEY_INVALID there), whose canonical JSON has no
|
|
|
|
|
; escapes (spec section 18).
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
profile-id = tstr .regexp "[a-z0-9][a-z0-9:._-]{0,127}"
|
|
|
|
|
name = tstr .regexp "[a-z0-9][a-z0-9._-]{0,63}"
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
|
|
|
|
|
; Spec section 31: at least 1 byte of valid UTF-8, normative; at most 256
|
|
|
|
|
; bytes, an implementation limit of the reference (spec section 74).
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
extension-id = tstr .size (1..256)
|
|
|
|
|
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; Implementation limits of the reference implementation, listed in spec
|
|
|
|
|
; section 74, which leaves definitive field limits open.
|
|
|
|
|
public-key = bstr .size (1..1024) ; spec section 12.1: 48 or 96 bytes by scheme
|
|
|
|
|
period = 1..86400 ; at most one day; spec section 11: 1..max-safe-uint
|
|
|
|
|
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
; Spec section 18 and 19: "dk1_" + unpadded Base64URL of the canonical JSON
|
|
|
|
|
; {"version":1,"network":<profile-id>,"round":<round>}, round in 1..2^53-1.
|
Spec v0.8.2 refinements: error precedence, trust model, strict order
Approved refinements, each recorded with its reproducible case in the
§76 v0.8.2 subsection:
- §69.1: layered error model with normative precedence (frame, type tag
and version, CBOR profile and CDDL, then fields with their own code in
ascending key order; across steps the §63 order decides), with a scope
paragraph for the optional steps 5, 6 and 8.
- §55.1: normative trust table per section (who can write it, from which
step it is bound, what it never proves); §72: security-relevant claims
go in CONTROL_CBOR or under a signature, .dkk data is advisory.
- §31/§54: extension arrays in strictly ascending unsigned byte order of
extension_id (one rule for order and uniqueness).
- Gaps a second implementation needed: §28.1 malformed age headers,
§15/§19 latest unlock time and dk1_ reading rules, §22/§23/§57 length
lower bounds, §63 step 8 tlock argument comparison and step 9 order,
§12.1 profile validation with the drand chain-hash formula, §74 table
of implementation limits.
Reference alignment: .dkk errors only at step 9.a (new
OpenOptions.AccessKeyFile, used by the CLI), CR/LF in dk1_ is
ERR_DATEKEY_INVALID, BODY_LEN 0 is ERR_INTEGRITY, nil identities are not
credentials, and AccessIdentity tries every identity on every stanza so
its verdict does not depend on their order. dk1.json gains three
vectors; every other testdata file is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
|
|
|
; Spec section 15 further bounds the round time of the round to
|
|
|
|
|
; 9999-12-31T23:59:59Z under the pinned profile (step 7 of section 63). A
|
|
|
|
|
; violation is ERR_DATEKEY_INVALID or ERR_DATEKEY_NON_CANONICAL (spec section
|
|
|
|
|
; 19), checked with the fields, not ERR_NON_CANONICAL_CBOR.
|
Initial implementation of the DateKeys Protocol v0.8.1
Reference implementation in Go, built from the implementation plan
(milestones M0 to M5): datekey, profile, provider, codec, agewrap,
extension, capsule, accesskey, the datekeys CLI, official vectors and
fixtures, the mutation corpus, fuzz targets, interop and live tests,
CI workflows, traceability and policy documents.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 weeks ago
|
|
|
compact-datekey = tstr .regexp "dk1_[A-Za-z0-9_-]+"
|