News for hackers. Stuff that matters.
Re:Syncthing: Untrusted Device Encryption by Sprite_tm on Thursday December 07, 2023 @12:40AM (#38553236)
Am I the only one a bit worried about them using a fixed string as a salt? A salt is intended to make it hard to create a rainbow table. I don't know how much entropy is in their 'folderID' variable, but given that it's a 'short string', it seems low-entropy and not random. If so, the current implementation makes it trivial to make a rainbow table. That means that if you can get the passwordtoken and know a folderID, you can create a rainbow table that maps all possible passwordtokens to valid passwords.

BTW: 'worried' as in 'code smell', not 'worried' as in 'the encryption can be easily broken'.

Re:Syncthing: Untrusted Device Encryption by h4kor on Thursday December 07, 2023 @01:52AM (#38553607)
> The string “syncthing” with the folder ID concatenated make up the salt

Meaning its not fixed but every folder has its own salt

Re:Syncthing: Untrusted Device Encryption by halJordan on Friday December 08, 2023 @02:31PM (#38573121)
The question is how trivial is it to get the folder id. If it's just an incrementing integer, is it really providing a good salt? Im not actually asking that question or asserting that it isnt, just explaining what you missed.
Re:Syncthing: Untrusted Device Encryption by dpc_01234 on Thursday December 07, 2023 @01:22AM (#38553457)
I think you're right. Reported on Syncthing forum. https://forum.syncthing.net/t/entropy-of-untrusted-device-sc...
Re:Syncthing: Untrusted Device Encryption by scoot on Thursday December 07, 2023 @07:52AM (#38555769)
>> Is it less safe to share the “Default Folder” as encrypted then? Its folder ID is always just 'default'.

> In the sense that someone could easier pre-brute-force all passwords for that specific folder ID, yes.

That's the definition of a rainbow table, and a fixed, known folder ID makes the "salt" effectively worthless.

Re:Syncthing: Untrusted Device Encryption by sneak on Thursday December 07, 2023 @03:26AM (#38554149)
the folder ID is a (from memory) 6 character random alnum string.

this is more than adequate for a salt.

Re:Syncthing: Untrusted Device Encryption by notfed on Thursday December 07, 2023 @12:15PM (#38559020)
That would mean each salt is about 36 bits. If you create 2^18=262k folders in your lifetime using the same algorithm and same password, there's a 50% chance one of the salts is dup'd.

Maybe we can wave this as good enough, but cryptography usually has higher standards.

Re:Syncthing: Untrusted Device Encryption by sneak on Thursday December 07, 2023 @02:15PM (#38560539)
These don’t refer to individual directories, only top level syncthing folders. Nobody in their lifetime is making even 1000 of these.