nuts-foundation / nuts-foundation/nuts-node

Sort out JWT VC/VP signing

Open
#2,684 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.