Repository navigation
Description
So I have had a look at BitTorrent sync, syncthing and alternatives and what I always wondered about was the possibility to not only sync between resources I own and trust, but also external resources/servers which I do NOT trust with my data, up to a certain extent.
One way to do this is using ecryptfs or encfs, but this has many obvious downsides: it is not an interoperable solution (only works on Linux), the files are actually stored in encrypted form on the disk (even if the resource is trusted and this is not necessary, for instance because of the file system being encrypted already), etc.
What I propose is somehow configuring nodes which are only sent the files in an encrypted format, with all file contents (and potentially file/directory names as well; or even permissions) being encrypted. This way, if I want to store my private files on a fast server in a datacenter to access them from anywhere, I could do this with syncthing without essentially giving up ownership of those files. I could also prevent that particular sync node from being allowed/able to make any changes to the files without me noticing.
I realize that this requires a LOT of additional effort, but it would be a killer feature that seems to not be available in any other "private cloud" solution so far. What are your thoughts on this feature?
EDIT: BitTorrent sync mentions a feature like this in their API docs: "Encryption secret
API users can generate folder secrets with encrypted peer support. Encryption secrets are read-only. They make Sync data encrypted on the receiver’s side. Recipients can sync files, but they can’t see file content, and they can’t modify the files. Encryption secrets come in handy if you need to sync to an untrusted location." (from http://www.bittorrent.com/intl/de/sync/developers/api)
Activity
jewel commentedon Apr 4, 2014
This would be amazing. I tried to spec out what this might look like in this clearskies extension, but it adds so much complexity that I've tabled plans for it for now.
Like you say, if only the file contents are synchronized to the "untrusted" peers, that would be a lot simpler to implement (i.e. the metadata never hits the untrusted peer in any form). I hadn't thought of that.
Natanji commentedon Apr 4, 2014
It seems like you even thought of a zero-knowledge-proof to show that the server is legitimate/actually stores the files (did I understand that correctly?). Not bad.
CTR mode sounds like an extremely bad choice for me, just like other stream ciphers like GCM. Yes, it is seekable and that is useful, but XORing two snapshots of encryption on top of each other will result in an adversary knowing what changed between the plaintext of those two files. CBC is a much better choice: when seeking, you may need two blocks of ciphertext to decrypt the first block of plaintext, but that is negligible usually because you will read more than one block anyway, and the more you decrypt the less overhead you get.
I don't really understand why encrypting everything - including metadata - should somehow be "easier" or simpler to implement. Maybe I'm misunderstanding you? What do you mean?
jewel commentedon Apr 4, 2014
I think you might have misunderstood, I was trying to say that it'd be simpler to implement if the metadata isn't synced.
Thanks for the feedback on CTR mode, I wasn't aware that seeking was possible with CBC mode.
calmh commentedon Apr 5, 2014
I could see how this would be useful. As you say, it would require some work because it's currently not a part of the design at all - an additional layer of encryption would be needed. There would obviously be some trade offs between privacy and efficiency, ie if a blocks changes in the middle of a large file, do we resynchronize just that block and leak that fact or re-encrypt the entire file etc.
calmh commentedon Apr 5, 2014
Also slightly related to #62 which is similar functionality, minus the encryption (ie for when we trust the node with the data, just not with modifying it).
NickPyz commentedon Apr 7, 2014
This idea is particularly useful for people who would use syncthing to setup a network of devices, and require 1 of them to be available 24 hours a day. Let's say all the devices are trusted except for the always on device, which is a 3rd party VPS server.
In this case, it would desirable for some additional properties built into syncthing so that the VPS node has the following characteristics:
READ ONLY (can't change any data)
ENCRYPTED (so the VPS personnel can't see the data).
No doubt this adds complexity and performance hits to support the encryption, especially if this project eventually extends to devices that don't support hardware-based encryption, such as most current smartphones,
kylemanna commentedon Apr 13, 2014
Tahoe-LAFS has this feature and it would be awesome if a more usable implementation (I find tahoe-lafs WebAPI very painful and difficult to use).
https://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/docs/architecture.rst#security
It has the notion of "storage nodes" that hold chunks of distributed encrypted data. The default configuration is that any 3 chunks can restore the file out of a goal of 10 chunks on different storage nodes using erasure coding.
It would be nice if syncthing could support the distributed fractional concept as well, but that sounds like a topic for another issue. It may be out of scope too, hopefully not :)
Natanji commentedon Apr 16, 2014
Tahoe-LAFS sounds pretty much exactly like what we want - what and incredible find, I hadn't heard of it. Thanks, @kylemanna :)
The way I see it, syncthing already has the functionality to keep directories in sync and perform upload/download operations between the nodes whenever something changes. So the feature we want might not be that far out of reach: whenever a file changes, then we have to call the API of tahoe-lafs and upload/download the file.
I agree that we should start with a configuration where files are simply replicated completely on all foreign nodes. Fractional distribution can be added later if this setup turns out to work well.
The solution would also work on both Windows and Linux, which is a huge plus! And we don't have to do any crypto storage of our own, which would most probably turn out to be a failure anyway, I presume. :)
Sooo... anyone see a problem with this approach yet, from a design perspective? @calmh, do you think syncthing's design is compatible with tahoe-lafs?
calmh commentedon Apr 16, 2014
Sure. However if Tahoe-lafs is a "cloud storage system", then perhaps that is all you need and syncthing doesn't add much to the equation if you already have that up and running?
kylemanna commentedon Apr 16, 2014
I played with Tahoe-lafs for a while and it doesn't really do what I want. The major deal breaker for me was that the storage nodes don't work behind NAT. Everything I could find suggested that I needed to do port forwarding and tunneling of some sort. I'd imagine that a significant portion of the user base for syncthing is behind a NAT.
mcg commentedon May 12, 2014
These days, without some form of encrypted/untrusted node support, Syncthing is probably going to be unusable for some portion of users. One of the reasons I choose BT Sync over other solutions was it's support for this.
elimisteve commentedon May 17, 2014
This feature would be great because it'd allow me to replace the rather bulky and Mono dependency-laden SparkleShare with syncthing, which is much easier to set up :-).
SparkleShare has been working well for me, though.
EvdH0 commentedon May 18, 2014
This would indeed be a great feature!
menelic commentedon May 19, 2014
This would indeed be a great feature, especially if it could be defined on a folder and/or file level as in BTSync. I'd argue adding this feature is part of the "BTSync-replacement" goal. This would add complexity for sure, but it would be great to have one Syncthing interface from which I can manage my synchronised shares with people who are supposed to have access as well as with locations which are not supposed to either have access or be able to see the files. As a VPS user, this would be great for me - and surely for a lot of others as well.
129 remaining items
lkwg82 commentedon Feb 4, 2018
see PR #4331
Max-Schmeling commentedon Dec 27, 2020
Is end-to-end-encryption still being considered by the devs? I found librevault, but it has not been updated since 2016.
nunesgh commentedon Dec 27, 2020
Actually E2EE is being currently tested by the devs. You can find more information here:
https://github.com/syncthing/syncthing/wiki/Untrusted-devices-(encryption)-status
onlyjob commentedon Dec 28, 2020
Or restic.
imsodin commentedon Dec 28, 2020
Please only comment if you have something to write that is pertinent to the issue at hand. That Syncthing isn't a backup solution on its own and what actual backup programs exist is not relevant here.
As @nunesgh wrote, a solution for untrusted/encrypted devices is being tested and improved at the moment. A wider call for testing will likely happen in on of the next releases (and will also be announced in this issue). Please do not ask questions about the feature here or start any related discussions - join https://forum.syncthing.net/ for that.
Absolucy commentedon Dec 28, 2020
It is useful information for anyone who searches "syncthing encryption" and finds this issue.
imsodin commentedon Apr 6, 2021
This feature is currently being tested. You can try it out and help ensure it is ready to be used on our precious data. Check this forum thread for infos on how to try it out: https://forum.syncthing.net/t/testing-untrusted-encrypted-devices/16470
all: Remove untrusted feature flag (fixes syncthing#109)
all: Remove untrusted feature flag (fixes syncthing#109)
all: Remove untrusted feature flag (fixes syncthing#109) (syncthing#7567