Add methodology for signing using JWS #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Checklist
PR Type
Please delete options that are irrelevant.
Linked tickets
High level description
This PR expands on the description of using
did:key
to sign Veritable responses.Detailed description
The idea of signing responses was previously discussed for Veritable. Allowing nodes to sign responses allows them to lay claim to responses later (by signing new challenges using the same key) without compromising their privacy, provided their parent nodes do not strip off or replace signatures when passing responses upwards to the querier.
Note that these signatures do not provide non-repudiation since the signing keys are not authenticated.
The proposed data structures provide a route to enable JSON Web Encryption, which may be useful for future Veritable iterations to allow responses to be encrypted under a key provided by the 'top-level' querier.
Describe alternatives you've considered
Signing without using JWS means defining serialisation methods and appropriate data structures. This is likely to require more work to implement (with the potential for making mistakes), whereas using JWS is likely to allow third-party libraries to be used.
Operational impact
N/a. The current description is only a suggestion of how to implement signatures.
Additional context
This PR is submitted as a draft as there may be better choices for creating the signatures:
params
field is now either a JWS or a 'plain' response object. There may be better ways of defining these objects to distinguish between these cases.