]> Cypherpunks repositories - keks.git/commitdiff
Many strings must be >0
authorSergey Matveev <stargrave@stargrave.org>
Thu, 3 Apr 2025 06:18:13 +0000 (09:18 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 3 Apr 2025 09:07:48 +0000 (12:07 +0300)
spec/cm/hashed.cddl
spec/cm/prv.cddl
spec/cm/pub-load.cddl
spec/cm/signed.cddl

index ac3a22082cda8e408c561d7e3ace2bdc8f6efafcd5fc44ea8071254e3b0ae0b4..eb906ca683eb19c2e91df5e4a975f2de117b098e2995669e198e05af99298951 100644 (file)
@@ -1,8 +1,8 @@
-ai = text ; algorithm identifier
+ai = text .ge 0 ; algorithm identifier
 
 cm-hashed = {
     a: [+ ai],
-    t: text, ; type of the content
+    t: text .gt 0, ; type of the content
     ? v: bytes / blob, ; content itself
     hash: [+ bytes], ; hash values
 }
index 22b97e504befe57f8de0453aa17792dc34e12bf3a574684f17f4c4167f9e67a7..b0b1e6895528fba870214cf39bd0df9550104e0a1bcb480c16c9bb31372633a0 100644 (file)
@@ -1,4 +1,4 @@
-ai = text ; algorithm identifier
+ai = text .ge 0 ; algorithm identifier
 av = {a: ai, v: bytes}
 
 cm-prv = av
index a2cc41817d3160268f018b1bdbc1b40e6e35514fd1a00eb5f4e11cd0cc1f8746..d3d98e261cbbf18c5366c921cc8dff50b62885130c54effbda60ed0a00c3df2c 100644 (file)
@@ -1,4 +1,4 @@
-ai = text ; algorithm identifier
+ai = text .ge 0 ; algorithm identifier
 av = {a: ai, v: bytes}
 fpr = bytes .size 32
 ku = "sig" / "kem" / "app-name" / text
index 2a223e563762f9108215fcae439cf798774fb051eaa23ac27436cf03d69a975c..dc6a35894c7c3e832371a2300a7f8f7a80f6298c259f56172330b6d4f4a5b919 100644 (file)
@@ -1,15 +1,15 @@
-ai = text ; algorithm identifier
+ai = text .ge 0 ; algorithm identifier
 
 cm-signed = {
     load: {
-        t: text,
+        t: text .ge 0,
         ? v: bytes / text / map / list,
     },
     ? sigs: [+ sig],
     ? pubs: [+ cm-pub],
 }
 
-url = text
+url = text .ge 0
 
 sig = {
     tbs: sig-tbs,
@@ -23,7 +23,7 @@ fpr = bytes .size 32
 sig-tbs = {
     sid: fpr, ; signer's public key fingerprint
     ? when: tai64 / tai64n,
-    ? nonce: bytes, ; some optional random bytes
+    ? nonce: bytes .gt 0, ; some optional random bytes
     ? encrypted-to: [+ fpr], ; recipient's public key fingerprints
     * text => any
 }