feat: Support Linked Data Signatures for JWS #1524
Conversation
// EC | P-256 | ES256 | ||
// EC | P-384 | ES384 | ||
// EC | P-521 | ES512 | ||
package jsonwebsignature2020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this PR closes #1420 as well
) | ||
|
||
// New an instance of Linked Data Signatures for JWS suite. | ||
func New(opts ...suite.Opt) *Suite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are we enforcing the curves, sizes, and algorithms listed in the table above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a question. For now, we rely on flexible signers/verifiers solely. It could be a crypto-based signer/verifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should create issue.
closes hyperledger-archives#1415 Signed-off-by: Dmitriy Kinoshenko <dkinoshenko@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1524 +/- ##
==========================================
+ Coverage 91.42% 91.45% +0.02%
==========================================
Files 153 155 +2
Lines 10324 10474 +150
==========================================
+ Hits 9439 9579 +140
Misses 503 503
- Partials 382 392 +10
Continue to review full report at Codecov.
|
Follow-up PR to support |
@@ -66,7 +139,7 @@ func TestCredential_AddLinkedDataProof(t *testing.T) { | |||
err = vc.AddLinkedDataProof(&LinkedDataProofContext{ | |||
SignatureType: "Ed25519Signature2018", | |||
SignatureRepresentation: SignatureJWS, | |||
Suite: ed25519signature2018.New(ed25519signature2018.WithSigner(getEd25519TestSigner(privKey))), | |||
Suite: ed25519signature2018.New(suite.WithSigner(getEd25519TestSigner(privKey))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to add tests with ECDSAP256 keys as well
closes #1415
closes #1420
Signed-off-by: Dmitriy Kinoshenko dkinoshenko@gmail.com