Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

feat: Support Linked Data Signatures for JWS #1524

Merged
merged 1 commit into from Mar 27, 2020

Conversation

kdimak
Copy link
Contributor

@kdimak kdimak commented Mar 26, 2020

closes #1415
closes #1420

Signed-off-by: Dmitriy Kinoshenko dkinoshenko@gmail.com

@kdimak kdimak requested review from sandrask, baha-ai, a team and troyronda and removed request for a team March 26, 2020 16:23
// EC | P-256 | ES256
// EC | P-384 | ES384
// EC | P-521 | ES512
package jsonwebsignature2020
Copy link
Contributor

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #1524 into master will increase coverage by 0.02%.
The diff coverage is 93.84%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
.../suite/ed25519signature2018/public_key_verifier.go 100.00% <ø> (ø)
pkg/doc/signature/suite/suite_crypto.go 100.00% <ø> (ø)
.../doc/signature/suite/ed25519signature2018/suite.go 89.47% <89.47%> (ø)
.../doc/signature/suite/jsonwebsignature2020/suite.go 90.00% <90.00%> (ø)
pkg/didcomm/protocol/didexchange/states.go 92.58% <100.00%> (-2.53%) ⬇️
pkg/doc/signature/suite/suite.go 100.00% <100.00%> (ø)
pkg/doc/verifiable/embedded_proof.go 100.00% <100.00%> (ø)
pkg/kms/legacykms/kms.go 86.77% <100.00%> (ø)
pkg/didcomm/protocol/outofband/service.go 86.87% <0.00%> (-1.03%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55fe9fa...47479be. Read the comment docs.

@kdimak
Copy link
Contributor Author

kdimak commented Mar 26, 2020

Follow-up PR to support JwsVerificationKey2020 (it's also defined at Json Web Signature 2020 spec : #1527

@troyronda troyronda merged commit b9604a2 into hyperledger-archives:master Mar 27, 2020
@kdimak kdimak deleted the issue-1415 branch March 27, 2020 06:37
@@ -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))),
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support for JsonWebSignature2020 Support Linked Data Signatures for JWS
4 participants