Skip to content

Comments

Support for SD-JWT+KB#691

Merged
timothee-haudebourg merged 3 commits intomainfrom
sd-jwk+kb
Jan 29, 2026
Merged

Support for SD-JWT+KB#691
timothee-haudebourg merged 3 commits intomainfrom
sd-jwk+kb

Conversation

@timothee-haudebourg
Copy link
Contributor

Description

Brings support for an optional key binding JWT in the SdJwt type. I decided to go with an optional KB instead of a brand new SdJwtKb type because it seemed more flexible in the case a KB is not required by the audience.

Other changes

I added a few convenience functions/methods to JWT claims, so they can be verified more easily.

Tested

You will find two new tests in the kb module. One builds, signs and verify an SD-JWT+KB, while the other tries to verify an external SD-JWT+KB (found in the spec).

@timothee-haudebourg timothee-haudebourg changed the base branch from main to more-jws-impls January 29, 2026 12:53
Copy link
Member

@Juliano1612 Juliano1612 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Question: sd_hash should be validated automatically during .decode_kb().verify() or should we let it for the caller?

@timothee-haudebourg
Copy link
Contributor Author

The verify method is on the Jws type, so it doesn't really have any way of knowning it's verifying an KB-JWT. There are ways of working around it, like defining a newtype, or playing with ssi's verification traits... but tbh calling sd_hash.verify manually is fine I think. Maybe I'll regret it, but let's try it for a while see if it's really a bother.

Base automatically changed from more-jws-impls to main January 29, 2026 17:04
@timothee-haudebourg timothee-haudebourg merged commit 559f30e into main Jan 29, 2026
2 checks passed
@timothee-haudebourg timothee-haudebourg deleted the sd-jwk+kb branch January 29, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants