You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Increased file size when sharing between encrypted devices #8556
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Data is not supposed to be interchangeable nor comparable, and this is done on purpose, as it's encryption after all.
Otherwise you potentially open up oracles and known cipher text attacks.
i.e, if I know that I have an encrypted file that is top secret government document, and encryption was interchangeable and comparable, I could just find all other people that have the same encrypted file, and expose them.
"Adds xyz zero data" - yes, encryption requires padding and adds non-trivial overheads.
If you wish to discuss this further, please take this to the forum.
I don't think the OP was a complaint about added data/bytes when encrypting, but about unexpected behaviour of size when sharing with multiple encrypted devices. And the zeros look weird, data should be all random for encrypted files. Anyway it's not clear how the sharing exactly works. @Ratio2 Could you please explain with steps what you did to arrive to those file sizes, as suggest in a topic on https://forum.syncthing.net/ please.
With the additional information from the thread above, it's clear there is a bug:
The problem lies in the trailer added on receive-encrypted folders containing the encrypted file-info (for offline decryption): On device 2, the size on the global file is 1064 as expected (minPaddedSize + blockOverhead). The local file is 1435 bytes, as the trailer size is added to the fileinfo. dev3 has those 1435 bytes as global, and adds its own trailer -> 1812 bytes.
changed the title [-]Increase size of data when sync encrypted folder from one device to encrypted folder on other device[/-][+]Increased file size when sharing between encrypted devices[/+]on Sep 30, 2022
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
AudriusButkevicius commentedon Sep 26, 2022
Data is not supposed to be interchangeable nor comparable, and this is done on purpose, as it's encryption after all.
Otherwise you potentially open up oracles and known cipher text attacks.
i.e, if I know that I have an encrypted file that is top secret government document, and encryption was interchangeable and comparable, I could just find all other people that have the same encrypted file, and expose them.
"Adds xyz zero data" - yes, encryption requires padding and adds non-trivial overheads.
If you wish to discuss this further, please take this to the forum.
Ratio2 commentedon Sep 26, 2022
Discussion on forum problem for me, just some notes:
imsodin commentedon Sep 29, 2022
I don't think the OP was a complaint about added data/bytes when encrypting, but about unexpected behaviour of size when sharing with multiple encrypted devices. And the zeros look weird, data should be all random for encrypted files. Anyway it's not clear how the sharing exactly works. @Ratio2 Could you please explain with steps what you did to arrive to those file sizes, as suggest in a topic on https://forum.syncthing.net/ please.
Ratio2 commentedon Sep 30, 2022
https://forum.syncthing.net/t/adding-unnecessary-zeros-when-sync-between-encrypted-folders/19028
imsodin commentedon Sep 30, 2022
With the additional information from the thread above, it's clear there is a bug:
The problem lies in the trailer added on receive-encrypted folders containing the encrypted file-info (for offline decryption): On device 2, the size on the global file is 1064 as expected (minPaddedSize + blockOverhead). The local file is 1435 bytes, as the trailer size is added to the fileinfo. dev3 has those 1435 bytes as global, and adds its own trailer -> 1812 bytes.
[-]Increase size of data when sync encrypted folder from one device to encrypted folder on other device[/-][+]Increased file size when sharing between encrypted devices[/+]lib: Don't add enc. trailer to info size (fixes syncthing#8556)
Merge branch 'main' into encenc
Merge branch 'main' into enccache
Merge branch 'main' into encenc
Merge branch 'main' into tomasz86-lib/config-allowtodisablewatcherdelay
lib/model: Set enc. trailer size on pull (ref syncthing#8563, syncthi…
lib/model: Set enc. trailer size on pull (ref syncthing#8563, syncthi…
lib/model: Set enc. trailer size on pull (ref #8563, #8556) (#8839)
Merge branch 'main' into windowsfixtests
lib: Correctly handle encrypted trailer size (fixes syncthing#8556) (s…