> SD-JWT = JWT "~" *[DISCLOSURE "~"]

made me smile...
I.e., Zero or more of [DISCLOSURE “~”], each of which is optional (can be 
empty) due to the []

(Simple-minded ABNF validators tend to loop on something like this.)

Anyway, I’m writing this to point out that languages such as ABNF should never 
be used without tool support.

Here, abnfgen [1][2] would be my tool of choice.

Or, if that is too difficult to install, you can embed the ABNF in CDDL and use 
a CDDL tool [3]:

foo = text .abnf 'SD-JWT-KB
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
BASE64URL = 1*(ALPHA / DIGIT / "-" / "_")
JWT = BASE64URL "." BASE64URL "." BASE64URL
DISCLOSURE = BASE64URL
SD-JWT = JWT "~" *(DISCLOSURE "~")
KB-JWT = JWT
SD-JWT-KB = SD-JWT KB-JWT
'

(Fixed the [] in the above.)

$ cddl sd-jwt.cddl generate 10

…yields a bunch of EDN (JSON) text strings:

"_0_.-._J~P.O._J_"
"z_-_._i58.5a5_~_7.L.9-8_"
"-_2n.-d0.42~__._ueM.z3"
"yTw.--89.0l--~-_2.Y._8Y"
"9.-.-~__.7-_._"
"-.-5h1.-0R~B~K-7~-4.i5-_.42-"
"-__.-4.6_~bO~y~--9.0d-8.-U"
"-.4i-.3~_~5.--.3_"
"0.-k4.1H~-se6~-~_1.H-4_.q"
"3.-V.68-~-p5_.1U6_.Dl"
"-q2.-4AY.XY29~e-c8.-.-C"
"__.2--.--1~Y_c~_7V~9~-.Hxo.w"

… with tilde characters clearly in view (even more clearly in [4]).

Grüße, Carsten

[1]: https://www.quut.com/abnfgen/
[2]: https://www.quut.com/abnfgen/abnfgen.1.html
(`brew install abnfgen` for those who have homebrew)
[3]: https://www.rfc-editor.org/rfc/rfc8610#appendix-F

[4]: 
_______________________________________________
OAuth mailing list -- oauth@ietf.org
To unsubscribe send an email to oauth-le...@ietf.org

Reply via email to