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

feat: Add main crypto interfaces and proto buffs for a new ECDH-ES kw + AEAD crypto #1540

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

baha-ai
Copy link
Contributor

@baha-ai baha-ai commented Mar 31, 2020

This is a first change for Anoncrypt crypto primitives mainly called Composite primitives.

Following changes will build on top of this change, namely the crypto primitives, Tink templates
and helpers to complete full ECDH-ES key wrapping + AEAD content encryption logic needed
for building and parsing JWE messages.

part of #1469

Signed-off-by: Baha Shaaban [email protected]

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #1540 into master will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1540      +/-   ##
==========================================
+ Coverage   91.43%   91.45%   +0.01%     
==========================================
  Files         164      164              
  Lines       11728    11728              
==========================================
+ Hits        10724    10726       +2     
+ Misses        569      567       -2     
  Partials      435      435              
Impacted Files Coverage Δ
pkg/kms/localkms/pubkey_writer.go 75.43% <0.00%> (+3.50%) ⬆️

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 9decd33...def2ec5. Read the comment docs.

proto/ecdhes_aead.proto Outdated Show resolved Hide resolved
proto/readme.md Outdated Show resolved Hide resolved
ecdhespb "github.com/hyperledger/aries-framework-go/pkg/crypto/tinkcrypto/primitive/proto/ecdhes_aead_go_proto"
)

// AES256GCMECDHESKeyTemplate is a KeyTemplate that generates an ECDH-ES P-256 key wrapping and AES256-GCM CEK with
Copy link
Contributor

@troyronda troyronda Apr 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need a todo for an additional chacha key wrapping template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO added... chacha key wrapping is tbd

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created #1637 and added it as a comment in the key templates

We will need to discuss how chacha key wrapping will be done if it must be supported. But for now we can add Chacha content encryption with ECDE-ES key wrapping using a key with P-256 curve.

@baha-ai baha-ai changed the title feat: Add Default implementation for JWE Anoncrypt WIP - feat: Add Default implementation for JWE Anoncrypt Apr 3, 2020
@baha-ai baha-ai force-pushed the jwe branch 3 times, most recently from 789e5f1 to 0ac804c Compare April 13, 2020 19:52
@baha-ai baha-ai changed the title WIP - feat: Add Default implementation for JWE Anoncrypt feat: Add Default implementation for Anoncrypt encryption Apr 13, 2020
@baha-ai baha-ai requested a review from troyronda April 13, 2020 19:53
@baha-ai baha-ai force-pushed the jwe branch 6 times, most recently from 9b1d521 to 4fae730 Compare April 17, 2020 02:10
@baha-ai
Copy link
Contributor Author

baha-ai commented Apr 17, 2020

I reduced the scope of this PR and will push subsequent PRs for the rest of the Crypto primitives impelementations.

@troyronda
Copy link
Contributor

@Baha-sk the PR description is still the same?

@baha-ai baha-ai changed the title feat: Add Default implementation for Anoncrypt encryption feat: Add main crypto interfaces and proto buffs for a new ECDH-ES kw + AEAD crypto Apr 17, 2020
.golangci.yml Outdated Show resolved Hide resolved
@baha-ai baha-ai force-pushed the jwe branch 3 times, most recently from 70b5bb6 to 509d21a Compare April 17, 2020 15:01
…+AEAD Tink primtive type

This is a first change for Anoncrypt crypto primitives mainly called Composite primitives.

Following changes will build on top of this change, namely the crypto primitives, Tink templates
and helpers to complete full ECDH-ES key wrapping + AEAD content encryption logic needed
for building and parsing JWE messages.

part of hyperledger-archives#1469

Signed-off-by: Baha Shaaban <[email protected]>
@troyronda troyronda merged commit 2a21a6e into hyperledger-archives:master Apr 17, 2020
@baha-ai baha-ai self-assigned this Jun 4, 2020
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.

3 participants