-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
E2EE: directly encrypt/decrypt #3802
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: tobiasKaminsky <[email protected]>
@@ -201,7 +200,7 @@ protected RemoteOperationResult run(OwnCloudClient client) { | |||
.get(mFile.getEncryptedFileName()).getAuthenticationTag()); | |||
|
|||
try { | |||
byte[] decryptedBytes = EncryptionUtils.decryptFile(tmpFile, key, iv, authenticationTag); | |||
// byte[] decryptedBytes = EncryptionUtils.decryptFile(tmpFile, key, iv, authenticationTag); |
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.
Is this dead code needed here?
@@ -519,7 +519,9 @@ private RemoteOperationResult encryptedUpload(OwnCloudClient client, OCFile pare | |||
// IV, always generate new one | |||
byte[] iv = EncryptionUtils.randomBytes(EncryptionUtils.ivLength); | |||
|
|||
EncryptionUtils.EncryptedFile encryptedFile = EncryptionUtils.encryptFile(mFile, key, iv); | |||
// EncryptionUtils.EncryptedFile encryptedFile = EncryptionUtils.encryptFile(mFile, key, iv); |
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.
Do we need this dead line?
// check authentication tag | ||
byte[] extractedAuthenticationTag = Arrays.copyOfRange(fileBytes, | ||
fileBytes.length - (128 / 8), fileBytes.length); | ||
FileOutputStream fileOutputStream1 = new FileOutputStream(output); |
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 name looks like autogenerated by some bad generator. I'm sure we can avoid names like someVar7
.
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.
Thanks for your first review, however this is in dev by me and I mainly opened a PR to not forget about it ;-)
I'll enhance this prior setting it to "2. to review".
Previously it was first reading complete file into memory.
Signed-off-by: tobiasKaminsky [email protected]