mesur-io / ietf-misc

miscellaneous drafts and notes
1 stars 2 forks source link

Add Better CDDL for Disclosures #5

Open OR13 opened 2 months ago

OR13 commented 2 months ago
SD-Capable-Claim-Value = Array-Value / Map-Value / Scalar-Value
Array-Value = [
  *(Redacted-Element / any)
]
Map-Value = {
  ? blinded-hash-claim, ; only one blinded-hash-claim allowed per Map-Value
  * CWT-Claim ; (may be freely interleaved with other CWT-Claims)
}
blinded-hash-claim = "_sd": [ * blinded-hash ]
Redacted-Element = { "..." : blinded-hash }
blinded-hash = bstr
Scalar-Value = #0 / #1 / #2 / #3 / #6 / #7

From https://github.com/mesur-io/ietf-misc/pull/3#discussion_r1615322766

OR13 commented 2 months ago

And

salted = salted-claim / salted-element
salted-claim = [
  bstr .size 16, ; 128-bit salt
  (int / text),   ; claim name
  any         ; claim value
]
salted-element = [
  bstr .size 16, ; 128-bit salt
  any         ; claim value
]

From: https://github.com/mesur-io/ietf-misc/pull/3#discussion_r1615323456