Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/object: support chacha20 cipher #2330

Merged
merged 3 commits into from
Aug 17, 2022
Merged

pkg/object: support chacha20 cipher #2330

merged 3 commits into from
Aug 17, 2022

Conversation

qingyunha
Copy link
Contributor

close #317

@CLAassistant
Copy link

CLAassistant commented Jul 3, 2022

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #2330 (37620f9) into main (3ade892) will decrease coverage by 0.02%.
The diff coverage is 76.66%.

@@            Coverage Diff             @@
##             main    #2330      +/-   ##
==========================================
- Coverage   61.67%   61.64%   -0.03%     
==========================================
  Files         137      138       +1     
  Lines       25400    25710     +310     
==========================================
+ Hits        15665    15850     +185     
- Misses       7911     8005      +94     
- Partials     1824     1855      +31     
Impacted Files Coverage Δ
pkg/meta/config.go 55.04% <ø> (-2.76%) ⬇️
cmd/format.go 60.34% <60.00%> (+0.34%) ⬆️
pkg/object/encrypt.go 71.65% <85.00%> (+1.73%) ⬆️
pkg/object/file_unix.go 74.19% <0.00%> (-25.81%) ⬇️
pkg/object/redis.go 50.95% <0.00%> (-21.27%) ⬇️
pkg/chunk/utils_unix.go 73.33% <0.00%> (-20.00%) ⬇️
pkg/sync/sync.go 44.65% <0.00%> (-1.82%) ⬇️
pkg/object/hdfs.go 67.15% <0.00%> (-1.63%) ⬇️
pkg/meta/interface.go 51.61% <0.00%> (-1.37%) ⬇️
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

pkg/meta/config.go Outdated Show resolved Hide resolved
@davies
Copy link
Contributor

davies commented Jul 6, 2022

@qingyunha Thanks for contributing this, it look good overall, more work needed for compatibility, and config/load/dump.

Since we are close to 1.0 release, it's better to merge this after 1.0 released.

@davies davies added this to the Release 1.1 milestone Jul 6, 2022
@qingyunha
Copy link
Contributor Author

Ok. Thank you.

@@ -58,6 +58,7 @@ type Format struct {
Capacity uint64 `json:",omitempty"`
Inodes uint64 `json:",omitempty"`
EncryptKey string `json:",omitempty"`
EncryptAglo string `json:",omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be EncryptAlgo

@@ -126,7 +126,7 @@ func BenchmarkRSA4096Decrypt(b *testing.B) {

func TestAESGCM(t *testing.T) {
kc := NewRSAEncryptor(testkey)
dc := NewAESEncryptor(kc)
Copy link
Contributor

Choose a reason for hiding this comment

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

There are 2 return values

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also add tests for ChaCha20?

cmd/format.go Outdated
@@ -392,6 +400,7 @@ func format(c *cli.Context) error {
SecretKey: c.String("secret-key"),
SessionToken: c.String("session-token"),
EncryptKey: loadEncrypt(c.String("encrypt-rsa-key")),
EncryptAglo: c.String("encrypt-aglo"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This flag should be ignored like encrypt-rsa-key as handled in L388~L389

@SandyXSD
Copy link
Contributor

@qingyunha Hi, I leave a few comments, could you continue to complete this PR?

@qingyunha
Copy link
Contributor Author

@SandyXSD Thank you. Updated, please take a look.

@SandyXSD SandyXSD requested a review from davies August 16, 2022 03:11
@davies davies merged commit e67da41 into juicedata:main Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for modern stream ciphers like Chacha20
5 participants