-
Notifications
You must be signed in to change notification settings - Fork 13
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
allow binary encoding for written files to reduce file size #224
Conversation
e3396bf
to
7130676
Compare
@phil-davis @micbar looks like we have common problem in web ui tests independent from this pr. Daily buils are also failing. Probably, it is related with the web ui changes of oc10. (tags, open with etc.) |
PR #223 |
@phil-davis thank you for information. |
7130676
to
58227a6
Compare
@micbar the repo is still set to require |
removed the check |
@karakayasemi How does this work with existing encrypted files? |
@mmattel I already read your comments on the issue. In this pr's current implementation, the code checks For the migration, as you said we can add an |
58227a6
to
154d047
Compare
@mmattel I thought about the migration command again. Actually, we have What do you think? I am open to suggestions. |
Just reading the occ command description: Yes, this would work I would thing that it would be good to have the choice, at least to see which (old or new) method will be used. That was the reason for my thoughts of a new config setting... |
Another option would be making binary encoding default and writing the encoding info to the file metadata. I guess no reason to keep base64 encoding format for new files. In this way, all the newly created files encrypted with binary encoding. |
as long you can still reade the old format for existing files... 😄 |
Idea: as old files are still readable and new files will have the new format... |
0c41a5b
to
bde9d10
Compare
It is interresting that the blocksize was set to
I just think about that on the filesystem level, blocks are usually chunks in 4k. Where is 6k coming from, because that allone is producing a overhead and misaglingment ...? |
@mmattel It is really not easy to understand these calculations for me either. Still I could not exactly understand the reason of magic number 6126 also. As far as I understand, ownCloud filesystem blocksize is 8192. With current base64 encoding format, we can only use 6072 bytes in an 8192 bytes block for storing data. Its the cause of %33 file overhead. Each signed encrypted block also stores initialization vector, signature and extra padding. Seems like storing signature of each block takes (6126-6072) = 54 bytes and if a block signed, the available bytes reduces to 6072. Since I only touched encoded block, I just adjusted 6072 to 8096 for binary encoded data by multiplying it with coefficient 1.33. |
628c5d5
to
747492a
Compare
@karakayasemi we were forced to switch drone CI to use @dpakach is
|
bb82610
to
c74099d
Compare
If everyone is happy, IMO this PR is OK to merge. |
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi.
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on owncloud/encryption#224 and owncloud/core#38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Fixes #210, owncloud/core#10831
Needs owncloud/core#38249
This PR makes binary encoding default and writes the encoding info to the file metadata. After this PR, all the newly created files will be encrypted with binary encoding.
For decryption, if no metadata presents we keep continue to decrypt these files with legacy base64 encoding, if header is present we use binary encoding to decrypt those files.