-
Notifications
You must be signed in to change notification settings - Fork 997
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
Conversation
Codecov Report
@@ 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@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. |
Ok. Thank you. |
pkg/meta/config.go
Outdated
@@ -58,6 +58,7 @@ type Format struct { | |||
Capacity uint64 `json:",omitempty"` | |||
Inodes uint64 `json:",omitempty"` | |||
EncryptKey string `json:",omitempty"` | |||
EncryptAglo string `json:",omitempty"` |
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 be EncryptAlgo
@@ -126,7 +126,7 @@ func BenchmarkRSA4096Decrypt(b *testing.B) { | |||
|
|||
func TestAESGCM(t *testing.T) { | |||
kc := NewRSAEncryptor(testkey) | |||
dc := NewAESEncryptor(kc) |
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.
There are 2 return values
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.
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"), |
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.
This flag should be ignored like encrypt-rsa-key
as handled in L388~L389
@qingyunha Hi, I leave a few comments, could you continue to complete this PR? |
@SandyXSD Thank you. Updated, please take a look. |
close #317