Skip to content

Commit c67fdda

Browse files
committed
sync standalone CDDL with protocol and appraisal schema changes
1 parent 1e091ec commit c67fdda

File tree

1 file changed

+65
-26
lines changed

1 file changed

+65
-26
lines changed

cddl/witnessd-pop.cddl

Lines changed: 65 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
; CBOR tag 1129791826 ("CWAR").
88
;
99
; All map keys use integer encoding per IETF CBOR conventions.
10-
; All floating-point fields MUST use 32-bit IEEE 754 binary32.
11-
; pop-timestamp values MUST use floating-point encoding with
12-
; at least millisecond precision.
10+
; All temporal and entropy measurements use unsigned integers (uint).
11+
; Timestamps and durations are in milliseconds. Entropy estimates
12+
; are in centibits (1/100th of a bit).
1313

1414
; ============================================================
1515
; CBOR Tag Wrappers
@@ -34,8 +34,10 @@ evidence-packet = {
3434
? 9 => profile-declaration, ; profile
3535
? 10 => [+ presence-challenge], ; QR/OOB proofs
3636
? 11 => channel-binding, ; TLS EKM binding
37-
; keys 14-17 reserved for future use
3837
? 13 => content-tier, ; Evidence Content Tier
38+
? 14 => hash-value, ; previous-packet-ref
39+
? 15 => uint, ; packet-sequence (1-based)
40+
; keys 16-17 reserved for future use
3941
? 18 => physical-liveness, ; physical-liveness markers
4042
* int => any, ; extension fields
4143
}
@@ -52,8 +54,9 @@ checkpoint = {
5254
9 => process-proof, ; SWF proof
5355
? 10 => jitter-binding, ; behavioral-entropy (ENHANCED+)
5456
? 11 => physical-state, ; physical-state binding (ENHANCED+)
55-
? 12 => bstr .size 32, ; entangled-mac (ENHANCED+)
57+
? 12 => hash-digest, ; entangled-mac (ENHANCED+)
5658
? 13 => [+ self-receipt], ; cross-tool composition receipts
59+
? 14 => [+ active-probe], ; active liveness probes
5760
* int => any, ; extension fields
5861
}
5962

@@ -63,7 +66,7 @@ document-ref = {
6366
3 => uint, ; byte-length
6467
4 => uint, ; char-count
6568
? 5 => hash-salt-mode, ; salting mode
66-
? 6 => bstr .size 32, ; salt-commitment
69+
? 6 => hash-digest, ; salt-commitment
6770
}
6871

6972
; ============================================================
@@ -73,10 +76,10 @@ document-ref = {
7376
process-proof = {
7477
1 => proof-algorithm, ; algorithm id
7578
2 => proof-params, ; SWF params
76-
3 => bstr .size 32, ; input (seed)
77-
4 => bstr .size 32, ; merkle-root
79+
3 => hash-digest, ; input (seed)
80+
4 => hash-digest, ; merkle-root
7881
5 => [+ merkle-proof], ; sampled proofs
79-
6 => float32, ; claimed-duration (seconds)
82+
6 => uint, ; claimed-duration (milliseconds)
8083
}
8184

8285
proof-params = {
@@ -88,18 +91,18 @@ proof-params = {
8891

8992
merkle-proof = {
9093
1 => uint, ; leaf-index
91-
2 => [+ bstr .size 32], ; sibling-path
92-
3 => bstr .size 32, ; leaf-value
94+
2 => [+ hash-digest], ; sibling-path
95+
3 => hash-digest, ; leaf-value
9396
}
9497

9598
; ============================================================
9699
; Behavioral Entropy and Physical State
97100
; ============================================================
98101

99102
jitter-binding = {
100-
1 => [+ float32], ; intervals (ms)
101-
2 => float32, ; entropy-estimate (bits)
102-
3 => bstr .size 32, ; jitter-seal (HMAC)
103+
1 => [+ uint], ; intervals (milliseconds)
104+
2 => uint, ; entropy-estimate (centibits)
105+
3 => hash-digest, ; jitter-seal (HMAC)
103106
}
104107

105108
edit-delta = {
@@ -115,7 +118,7 @@ edit-position = [
115118
]
116119

117120
physical-state = {
118-
1 => [+ float32], ; thermal (relative)
121+
1 => [+ int], ; thermal (relative, millidegrees)
119122
2 => int, ; entropy-delta (signed)
120123
? 3 => bstr .size 32, ; kernel-commitment
121124
}
@@ -127,7 +130,7 @@ physical-liveness = {
127130

128131
thermal-sample = [
129132
pop-timestamp, ; sample time
130-
float32, ; temperature delta
133+
int, ; temperature delta (millidegrees)
131134
]
132135

133136
; ============================================================
@@ -158,20 +161,31 @@ channel-binding = {
158161
; Self-Receipt (Cross-Tool Composition)
159162
; ============================================================
160163

161-
; Self-receipts bind a paste event to an Evidence Packet
162-
; produced by the author's prior authoring environment.
163-
; General Tool Receipts (requiring external tool signatures)
164-
; will use the same checkpoint field (key 13) when defined.
165-
166164
self-receipt = {
167165
1 => tstr, ; tool-id (source environment)
168-
2 => hash-value, ; output-commit (content hash at transfer)
169-
3 => hash-value, ; evidence-ref (hash of source packet)
166+
2 => hash-value / compact-ref, ; output-commit
167+
3 => hash-value / compact-ref, ; evidence-ref (source packet)
170168
4 => pop-timestamp, ; transfer-time
171169
}
172170

173-
; NOTE: Cross-session linking (continuation tokens) is deferred
174-
; to a future revision. See draft-condrey-rats-pop-protocol.
171+
; ============================================================
172+
; Active Probes (Liveness Challenges)
173+
; ============================================================
174+
175+
active-probe = {
176+
1 => probe-type, ; challenge category
177+
2 => pop-timestamp, ; stimulus-time
178+
3 => pop-timestamp, ; response-time
179+
4 => bstr, ; stimulus-data (challenge payload)
180+
5 => bstr, ; response-data (captured response)
181+
? 6 => uint, ; response-latency (milliseconds)
182+
}
183+
184+
probe-type = &(
185+
galton-board: 1, ; Galton invariant challenge
186+
reflex-gate: 2, ; motor reflex timing gate
187+
spatial-target: 3, ; spatial accuracy challenge
188+
)
175189

176190
; ============================================================
177191
; Attestation Result / WAR (Appraisal)
@@ -191,6 +205,7 @@ attestation-result = {
191205
? 10 => [* tstr], ; warnings
192206
11 => bstr, ; verifier-signature (COSE_Sign1)
193207
12 => pop-timestamp, ; created (appraisal timestamp)
208+
? 13 => forensic-summary, ; forensic assessment summary
194209
* int => any, ; extension fields
195210
}
196211

@@ -201,6 +216,21 @@ verdict = &(
201216
invalid: 4, ; chain broken or forged
202217
)
203218

219+
forensic-summary = {
220+
1 => uint, ; flags-triggered
221+
2 => uint, ; flags-evaluated
222+
3 => uint, ; affected-checkpoints
223+
4 => uint, ; total-checkpoints
224+
? 5 => [+ forensic-flag], ; per-flag detail
225+
}
226+
227+
forensic-flag = {
228+
1 => tstr, ; mechanism (e.g., "SNR", "CLC")
229+
2 => bool, ; triggered
230+
3 => uint, ; affected-windows
231+
4 => uint, ; total-windows
232+
}
233+
204234
entropy-report = {
205235
1 => float32, ; timing-entropy (bits/sample)
206236
2 => float32, ; revision-entropy (bits)
@@ -268,6 +298,7 @@ content-tier = &(
268298
proof-algorithm = &(
269299
; 1 is reserved for future use
270300
swf-argon2id: 20,
301+
swf-argon2id-entangled: 21, ; Entangled VDF Mode
271302
)
272303

273304
hash-salt-mode = &(
@@ -286,8 +317,16 @@ hash-algorithm = &(
286317
; ============================================================
287318

288319
uuid = bstr .size 16
289-
pop-timestamp = #6.1(float32) ; CBOR tag 1 (epoch-based, float32)
320+
pop-timestamp = #6.1(uint) ; CBOR tag 1 (epoch milliseconds)
321+
hash-digest = bstr .size 32 / ; SHA-256
322+
bstr .size 48 / ; SHA-384
323+
bstr .size 64 ; SHA-512
290324
hash-value = {
291325
1 => hash-algorithm,
292326
2 => bstr,
293327
}
328+
compact-ref = {
329+
1 => hash-algorithm, ; algorithm used for full hash
330+
2 => bstr .size (8..32), ; truncated-digest (8-32 bytes)
331+
3 => uint, ; prefix-length (bytes in digest)
332+
}

0 commit comments

Comments
 (0)