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

Unnecessary file size overhead #210

Closed
C0rby opened this issue Aug 17, 2020 · 6 comments · Fixed by #224
Closed

Unnecessary file size overhead #210

C0rby opened this issue Aug 17, 2020 · 6 comments · Fixed by #224
Assignees

Comments

@C0rby
Copy link
Contributor

C0rby commented Aug 17, 2020

Consider passing the OPENSSL_RAW_DATA argument to openssl_encrypt and pass true for $raw_output to hash_hmac() to store the files in binary instead of base64.
Base64 provides a size overhead of around 35%. Or is there a reason to use base64?

When changing this we should not forget about backwards compatibility for existing setups.

@C0rby
Copy link
Contributor Author

C0rby commented Aug 17, 2020

Related issue: owncloud/core#10831

@mmattel
Copy link
Contributor

mmattel commented Dec 4, 2020

@micbar, I know that this might not be a high prio thing, but a reduction in filesize of about 35% is a reason to think about that. What is your pov?

Adding also @pmaier1

@micbar
Copy link
Contributor

micbar commented Dec 4, 2020

@mmattel I put it on the radar.

@mmattel
Copy link
Contributor

mmattel commented Dec 5, 2020

@micbar I was thinking about a transition.
If this reduces the filesize as described, we could introduce a kind of config setting. This setting would explicitly enable this new way, to be set before a new installation enables encryption. If the setting is not present, it works like it currently does. Of course, a procedure should be defined how to get from old to new for those who want to migrate a existing encryption. Just my 2c.

@micbar
Copy link
Contributor

micbar commented Dec 7, 2020

@karakayasemi Can you take a look?

@jvillafanez
Copy link
Member

I don't know if we can reduce the header size somehow. It seems to use around 8k, which is huge for small text files or icons, specially when just a few bytes are being used at the moment. 7.5k or more bytes are wasted just in the header.

As said, I'm not sure if we can do something about it now, but next time we need to something similar, we should plan a proper file format.

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 a pull request may close this issue.

5 participants