Closed vdods closed 2 years ago
The fact that the VCDM does not define timestamps for VPs does not mean that they cannot have them, as VPs are as infinitely extensible as VCs. Our implementation has taken the pragmatic approach of using the same start and end time properties for VPs as for VCs. It might not be standardised yet, but it has a fair chance of being so I would suggest.
There's currently no specification for timestamps in VPs, meaning that presenters can't mitigate the risk of replay attack by limiting their presentation validity to a short window during which the verifier verifies the VP.
There are two mechanisms that can be used to mitigate replay attacks at the digital signature layer. For Data Integrity (was: Linked Data Signatures), all proofs are required to contain a created
timestamp:
https://w3c-ccg.github.io/data-integrity-spec/#signatures
How much time is allowed to pass before a signature is seen as invalid by a verifier is up to the verifier to determine. Our implementations tend to use 5 minutes (to account for clock skew between systems).
The other mechanisms that the Data Integrity spec uses to prevent replays are the domain
and nonce
properties:
https://w3c-ccg.github.io/data-integrity-spec/#signatures
The presentation request protocols typically request that presentations contain at least a domain (set by verifier) and challenge (set by verifier) values:
https://w3c-ccg.github.io/vp-request-spec/#did-authentication-request
I expect most/all of these things to be buttoned down when the new VC2WG starts up (in a few months).
Given that JWTs and Data Integrity have such mechanisms, I don't think we need to do this in VPs themselves.
The issue was discussed in a meeting on 2022-08-24
No objections after marked pending close
, closing
There's currently no specification for timestamps in VPs, meaning that presenters can't mitigate the risk of replay attack by limiting their presentation validity to a short window during which the verifier verifies the VP.
What's the intended workflow regarding timestamp verification here? For example, is validFrom and validUntil only for the credential, and the presentation doesn't have any timestamp? Or are presentations meant to carry timestamps also? It looks like some signatures have a "created" field, but AFAIK (and I'm not an expert on signature formats) that's not required, so (1) retrieving the signature creation timestamp would be ad-hoc at best, and unreliable at worst, and (2) it doesn't give a way for the signer to limit validity duration to mitigate replay attack risk.
Relevant, useful convo: https://github.com/spruceid/ssi/issues/387