From 2ad99b56b81bc1856a3992686f0ab6ce7ee78539 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 7 Feb 2023 12:44:47 +0100 Subject: [PATCH 1/3] Be more precise about HMAC-BLAKE2s-256 and the key length --- schemas/sturdy.prs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/schemas/sturdy.prs b/schemas/sturdy.prs index 6d36735..0481cda 100644 --- a/schemas/sturdy.prs +++ b/schemas/sturdy.prs @@ -4,8 +4,9 @@ embeddedType EntityRef.Cap . ; The sequence of Caveats is run RIGHT-TO-LEFT. ; That is, the newest Caveats are at the right. ; -; Let f = HMAC-BLAKE2s, e = canonical machine-oriented serialization of some preserves value, -; and k = the original secret key for the ref. +; Let f(k,d) = HMAC-BLAKE2s-256(k,d)[0..16), +; e = canonical machine-oriented serialization of some preserves value, and +; k = the original secret key for the ref. ; ; The `sig` is then f(f(f(f(k, e(oid)), ...), Caveat), ...). ; From bc4118253356dca52912543fc5af81a94cc0cfd3 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 7 Feb 2023 13:11:14 +0100 Subject: [PATCH 2/3] Another small repair --- schemas/sturdy.prs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/sturdy.prs b/schemas/sturdy.prs index 0481cda..0a8da44 100644 --- a/schemas/sturdy.prs +++ b/schemas/sturdy.prs @@ -8,7 +8,7 @@ embeddedType EntityRef.Cap . ; e = canonical machine-oriented serialization of some preserves value, and ; k = the original secret key for the ref. ; -; The `sig` is then f(f(f(f(k, e(oid)), ...), Caveat), ...). +; The `sig` is then f(f(f(f(k, e(oid)), ...), e(Caveat)), ...). ; SturdyRef = . From a086c1d72110a13a0b795f4f5891d8d604a78e6d Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 7 Feb 2023 13:18:18 +0100 Subject: [PATCH 3/3] Repair typo --- schemas/sturdy.prs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/sturdy.prs b/schemas/sturdy.prs index 0a8da44..36c2295 100644 --- a/schemas/sturdy.prs +++ b/schemas/sturdy.prs @@ -14,7 +14,7 @@ SturdyRef = . ; embodies 1st-party caveats over assertion structure, but nothing else ; can add 3rd-party caveats and richer predicates later -Caveat = Rewrite / Alts / Reject /@unknown any . +Caveat = Rewrite / Alts / Reject / @unknown any . Rewrite = . Reject = . Alts = .