Skip to content

Key binding sd_hash computation is incorrect #31

@c2bo

Description

@c2bo

SD-JWT defines the sd_hash claim in the KB-JWT as:

  The hash value in the sd_hash claim binds the KB-JWT to the specific
   SD-JWT.  The sd_hash value MUST be taken over the US-ASCII bytes of
   the encoded SD-JWT, i.e., the Issuer-signed JWT, a tilde character,
   and zero or more Disclosures selected for presentation to the
   Verifier, each followed by a tilde character:

   <Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~

https://drafts.oauth.net/oauth-selective-disclosure-jwt/draft-ietf-oauth-selective-disclosure-jwt.html#section-5.3.1

The last tilde is missing in the implementation in this repository (e.g., here https://github.com/openwallet-foundation-labs/sd-jwt-rust/blob/main/src/verifier.rs#L200-L218) resulting in invalid sd_hash values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions