nuts-foundation / nuts-foundation/nuts-node
Sort out JWT VC/VP signing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
signing key derivation
JWTs should have a kid header, but apparently this is out of scope for the VC data model spec. The Verifier.Validate, Verifier.VerifyVP, and resolver.go#PresentationSigner apply different approaches to deriving the kid that signed a document.
#2683 already makes an attempt at isolating signature verification. This should be extended to include consistent signing key identification for verification for JWT VC/VP
validAt
signature verification currently uses a validAt timestamp that is used to check if the JWT is valid at the given time. This should not be part of a signature check. (should move up to the Verifier.Verify(VP) methods) The only relevant timestamp is that when the JWT is signed, which should be in the nbf/iat field (default to time.Now if missing). This timestamp should be used to check that the signing key was valid at the time of signing.
The same logic should be applied (if not already) to jsonld proof signature verification. So imo signature verification methods do not need a validAt parameter since the relevant timestamps are in the data being verified.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Verifier.Validate, Verifier.VerifyVP, Verifier.Verify(VP), resolver.go#PresentationSigner, and the signature-verification work in #2683. Compare how each derives the signing key identifier and handles validAt, then trace the corresponding JSON-LD proof verification. Done means signing-key identification and timestamp handling are consistent across JWT VC/VP and JSON-LD verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cryptography, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100