Zenroom icon indicating copy to clipboard operation
Zenroom copied to clipboard

Encoding for JWT during import

Open albertolerda opened this issue 2 years ago • 1 comments

Currently, a JWT is represented as a dictionary

{
    header: { ... },
    payload: { ... },
    signature:  ... 
}

To sign a JSON we have to encode it, which is generally not deterministic (for an import from the outside). Inside zencode it is fine keeping it as a dictionary (because the encoding is deterministic), the problem is with the sd jwt.

From the outside, the user can decide whether to use sd jwt (which is encoded) or signed selective disclosure

For the inside the jwt is an or, either the previous or

{
    header: "base64",
    payload: "base64,
    signature: ...
}

albertolerda avatar Dec 07 '23 10:12 albertolerda

Point of intervention:

image

jaromil avatar Dec 07 '23 10:12 jaromil