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
Implement high security name encryption mode for crypt #637
pretty please put encrypted metadata in the file - i'd like to be able to move files around using ACD Web UI without caring about per directory index.
Can you request from ACD and other backends a portion of the file (or simply terminate receiving the response) to receive just metadata - that way you wouldn't need the index file at all - apologies if this was discussed already.
@spiffytech good point about number of reads (with performance and cost implications - except ACD Unlimited).
How do you like the idea of turning things around and keeping the index locally instead of in the cloud. It could be built incrementally as user uploads files (and rebuilt when needed, like on a new machine, when user lists directories, with termination of connections upon receiving metadata portion of the file). Concurrent access from multiple processes on the same machine is as simple as write-locking a local file. Concurrent access from multiple machines is obviously non-issue.
The index could be simply: UUID -> Plain-text file name (+other meta if needed, like salt). The beauty of it is that a file move wouldn't require any updates to the index and it could be done with any UI or CLI at user's disposal.
@romusz yes you can just terminate the read - I think that will work with all the remotes. It will break the underlying ssl connection though which would otherwise be re-used by a subsequent request and remaking ssl connections is reasonably expensive, but if it saves downloading the whole file it is a big saving.
The index could be kept locally... I'm not terribly keen on the idea though, however the index could be rebuilt if you need to backup from scratch.
To clarify, in the previous comment I'm talking about GLOBAL local index not PER DIRECTORY so that it's not affected by file moves. User lists directory with one API call to a backend and rclone matches it to the filename/meta.
@ncw you're absolutely right about the cost of terminating SSL connections (though I agree there would be a significant net benefit for big files, and for tiny files you could leave the connection open, having a predefined file size threshold to decide).
I'm not keen of index in general, remote or local, but it's needed for the aforementioned cost+performance optimizations. Important to note, however that having a remote index requires all the things you need for local index, plus multinode concurrency control, minus ability to move files between directories w/o partially invalidating 2 indices (from and to), and some other drawbacks (see below)
Speaking of cost + performance - I don't know if it's significant but with remote index you'd likely upload a file and then modify the remote index resulting in 2x API calls. You could defer it till the end of an upload at an increased risk of getting the remote index being inconsistent with the files in a given directory (and requiring the index rebuild).
The local index needs only updates on file listing command and only if there are UUIDs in the remote directory that are not in the local index yet (normally inserted by an upload). The upload of a file is 1 API call (meta + file content blob, unless segmented, but that's another topic) as it is for plain-text files.
Just some bugs so far: Seems like after setting up the whole config doing something like
remote:
for the config and then when executing:
rclone --transfers=5 sync path secret:test
it does not go into the subfolder.
Additionally when specifying passwords and then using a salt, it then returns a different password for password1 and password2 then the ones that were either typed in or randomly generated. If this is from the salting then why is password2 different as well.
@rourke750 can you make a separate issue about the path thing please with some steps to reproduce? The integration test check that works but there are a lot of combinations and I may have missed something.
Confusingly the passwords it shows you when it summarises the config for the remote are the encrypted ones. I should probably fix this, so can you make another issue about this too please.
TL;DR: This is a brainstorm where I propose git-inspired storage system with the objects stored as 7z files. It is just for fun.
This creates encrypted storage which supports arbitrary filename/path lengths, hashes, modification times, deduplication, compression, versioning, file-splitting and it hides directory structure. The underlying storage system does not have to support any of those.
I apologize for reinventing the wheel from scratch. I find this project very interesting, and I just want to share some of ideas that have been running though my head.
The intention of using 7z as container is to use standard format (7z natively supports AES). This means that it is in theory possible to manually download a file, and decrypt it without rclone. I am just a bit reluctant to spend weeks uploading my data in custom format. There are also other potential standard containers for AES, but 7z seems most cross platform.
I favor AES since it know and tested. I have never heard of XSalsa20, but that is probably just my lack of knowledge.
The 7z format potentially allows us to add compression as side-effect.
7z also has a concept of splinting the archive to smaller parts (e.g. to fit CDs).
Each 7z archive stores one object. The filename inside the 7z archive is the SHA1 of the unencrypted data (this filename is encrypted by 7z as well). The path of the archive is based on the AES encrypted SHA1 of the object (e.g. /obj/01/02/0102030405060708090A.7z)
Directories are recursive immutable objects in git-inspired fashion. We create a text object for each directory with one line per subdirectory/file in the format ([encrypted SHA1] [mod-time] [size] [name]). Names of nested directories must end with / to differentiate them from files. This directory listing is then also stored as encrypted 7z file (e.g. /dir/0F/0E/0F0E030405060708090A.7z). (putting it in separate root directory might make it easier prefetch/cache directory listings locally).
Reference to the root directory is stored in (/ref/HEAD). We can also store other references (e.g. /ref/backup-2016-09-06)
(having said all that, I am personally perfectly happy with the imperfections of the current naming scheme, I feel more attached to having standard encryption container)
Reacted by Trentflix, piratetub, fregante and ac615223s5
Here is completely different and a bit more conservative idea - use extra filenames on the remote to store the extra metadata. This means that we get all the extra data during directory listing and we do not need extra file reads.
For example, long (already encrypted) file name 0102..48495051..9899 can be stored as two files:
BEEF-0102..4849 (this file contains the actual data)
BEEF-extra-name-1-5051..9899 (this file is always empty and exists only if the filename is too long)
where BEEF is the SHA1 hash of the long filename to ensure uniqueness and determinism (or let's use HMAC and kill two birds with one stone).
Other examples:
ACE0-0102030405 (normal file with short filename, no need for any extra files)
B150-01020304 (large file - part 0)
B150-extra-data-1-01020304 (large file - part 1)
B150-mod-time-FECE03765 (overwrite of modification time if storage does not support it)
Properties of encrypted backup: no leaking metadata, no leaking content through collision attacks, recovery from 0 with no local context.
I was working on a similar project and my solution for this problem was a global directory on a sqlite file that's treated pretty much like any other except it had a special name so the client could bootstrap.
The sqlite dbs are versioned so you have some protection against corruption but i didn't tackle collisions from concurrent clients.
The files themselves are on a flat namespace (no leaked tree) with the names being a guid so you can't correlate the contents (as opposed to sha1 of the contents). The directory has a list of blobs so that it can accommodate backends with limitations of size per item.
This scheme can generate garbage as the sqlite version is only uploaded after the content blob so it requires house keeping where all the blobs are listed and compared checked if they are still used on the index.
The sqlite schema I came up with is
create table files (
id integer primary key,
path text unique,
size integer,
mtime integer,
perms smallint,
sha1 char(40),
viewed smallint
);
create table blobs (
file integer,
blob text,
ord integer,
foreign key(file) references files(id)
);
create table meta (
localpath text,
localhost text
);
Just gave a cursory read of the posts above, lots of good ideas. Here's some thoughts:
I like @dsrbecky's idea of storing each encrypted file in a 7z "container", as in a situation where rclone isn't available, one could (if s/he knew the encrypted file path/name) just download it using the plain cloud web interface (where available, or one of the standard, non-rclone cloud clients) and then open it using a standard 7z extraction program. The problem I see with this exclusively is that, as many (all?) cloud providers don't provide partial reads on stored files (eg, ACD), then the whole file would have to be downloaded to check its hash (eg, during "rclone check" or "rclone md5sum").
Also regarding 7z, I'm not sure I trust AES completely: I've followed the NIST competition where rijndael got chosen as the AES, and I found the justification for its choosing among the other candidates quite flimsy. I think Dan Bernstein's XSalsa20 has a chance of being stronger, but on the other hand I don't think it has been attacked/cryptanalyzed as deeply or extensively as rijndael/AES.
ACD API documentation allows for a lot of metadata to be stored along with a file, namely: labels (up to 10 labels, each up to 256 characters), and description (max 500 characters). I don't know about the other clouds, but these ACD fields seem ideal to store the additional data... say, full file name in the description, both the "local" (ie, unencrypted) and the "remote" (ie, encrypted) hashes could be encrypted and stored in label#1 (256 bytes, even base64-encoded, are a lot of bits and should be enough for that), label#2 could be used to store "stitching" info to segment large files (to work around a cloud's max file limit), etc. EDIT: I just learned that on ACD (what about other clouds?) an app can set an arbitrary list of "properties" (key:value pairs), so this would a better place to store that additional metadata).
If not enough cloud-defined storage for metadata is available for some (most) providers, I think the best method would be to use individual "blablabla.meta" files (not just filenames, as proposed by @dsrbecky), one for each encrypted file, where "blablabla" is the (encrypted) name for the file whose metadata it stores. I think this would be preferable to any "global metadata databases" as proposed by @chbm, be they local or remote, as in my experience such "unified" places for saving data have a nasty tendency to get corrupted or out-of-date (imagine aborted transfers, or worse, multiple clients uploading files to a single directory at the same time -- which is something I do here all the time). With the metadata saved in individual ".meta" files, it's easy to check whether they are current: just compare its "last update" time with the one on the file it's supposed to represent.
Why store both the local (for the file's plain content) and the remote (ditto, encrypted) hashes for a file: that way, "rclone check" can request each file's remote/encrypted hash from the cloud, then calculate the "local" hash for the local file, and then compare both to what's stored in the metadata. Any differences would point to modifications: a different local hash would tell rclone the file was modified locally (and should be uploaded again, if during a "rclone copy" or "rclone sync"), a different remote hash would tell rclone the file was somehow messed with remotely (not that I don't trust the cloud provider, but I'd sleep much better if rclone had a way to easily and quickly check, eg, with "rclone check" for corruption there, without having to download everything).
Well, that's it for now. Hope the above helps.
Cheers,
Durval.
Reacted by Jurikay, WG47, spiffytech and ac615223s5
So the only thing currently stopping me from using rclone is the absence of directory flattening. I saw that it was previously implemented in the first iteration of crypt, but was then removed to favor of different encryption. Is there a particular reason as to why it was removed?
I'd be willing to try implementing it later, but it seems like most crypt development has stagnated. Is there anything I should be aware of before I begin?
@Vesnyx I took the directory flattening out because the file names became too long. Lots of the remotes are limited to 256 char file names.
If you take away the mapping between directories and encrypted directories then you also have the problem that you can't use a sub path in the remote, eg asking to copy cryptedremote:sub/path.
I suspect both of these problems are soluble with a lot of cunning. If you want to have a go then please open another issue with a design proposal so we can discuss.
I think retaining the directory-to-directory mapping is a necessary evil. However, if the files within a particular directory were able to be split/merged so that they were all sized to approximately the same target size (with some randomness) I don't think there would be much info leakage that would be too detrimental. The number of files and size of all files would be changed, so not much info would leak. If the directory only contains a small total size of data, we could provide an option to add some random number of bogus files to make it more murky.
If file name length is a problem, it seems like a reasonable tactic there is to just name files/dirs by some partial salted hash of their name or encrypted name (perhaps the first 6 or 8 characters plus optional additional digit(s) to enumerate any possible collisions would be sufficient), and store the real name within the file data (for files) or within a sidecar file (for directories). But if the file splitting/merging feature works, storing directory info should be fairly easy to support too.
I do think that any solution that allows moving files around external to rclone (as suggested in an earlier comment) is prone to too much info leakage. However I think being able to move a whole directory or directory tree is a useful ability that should be preserved, and I think these suggestions allow for that.
any news on this?
being able to use xattr would be a great addition.
rednoah, filebot-dev:
"rclone and gdfs provide a virtual filesystem, so they can handle xattr read/write requests, and store them in some extra hidden file / folder. Maybe a feature request to support xattr would be good, to show the developers that users would be interested in that."
@ncw What do you think about encrypting the filename based on some of the contents of the encrypted data using a md5 or SHA-256 in addition to the salt given earlier? This gives us two benefits, one would be making sure the encrypted data itself hasn't been modified and letting us move files individually without worrying about the folders above it.
This does present a different issue of how files with the same data will encrypt to the same name. However, if we include the name, md5, and the salt, I think it solves that issue. The problem I can't figure out how to solve is if we have two of the exact same file with the same file name. Those would encrypt to the same data but I think it's an issue that shouldn't be encountered much if at all.
Hello everyone, would it be a good idea integrating into rclone the efforts of gocryptfs's reverse mode?
Currently I thought of using them in cascade and they works well, but this inevitably involves a double FUSE mount.
I second usage of gocryptfs! For me it works reliably and security has been audited as well. Furthermore, this would allow cross-compatibility (rclone+gocryptfs = rclone+internalCrypt2)!
So changing the contents would change the encrypted name as well 🤔
Yeah, I totally forgot about this because I had this in mind for long-term archiving rather than a live file system mount. But, the file itself would still be reuploaded if it's changed, no? I believe rclone has it's own verification method to validate the upload so I'm actually fine if it's just the file name changing. The problem then would be if you have the same filename and different versions on the cloud provider. Oh well, back to the drawing board I guess.
Getting gocryptfs support would also be very nice and I agree that a library would probably be the easiest way to integrate it with rclone. I actually made an issue about this a few days ago so it's probably best to discuss the implementation of it over there (#4194)
Activity
romusz commentedon Aug 24, 2016
pretty please put encrypted metadata in the file - i'd like to be able to move files around using ACD Web UI without caring about per directory index.
Can you request from ACD and other backends a portion of the file (or simply terminate receiving the response) to receive just metadata - that way you wouldn't need the index file at all - apologies if this was discussed already.
spiffytech commentedon Aug 24, 2016
@romusz For rebuilding a corrupted index, partial file reads (for the backends that support it - not all do (do any?)) would be an excellent approach!
Also, see my previous comment for why a single metadata file per directory is still important, even if the metadata is attached to each file.
romusz commentedon Aug 24, 2016
@spiffytech good point about number of reads (with performance and cost implications - except ACD Unlimited).
How do you like the idea of turning things around and keeping the index locally instead of in the cloud. It could be built incrementally as user uploads files (and rebuilt when needed, like on a new machine, when user lists directories, with termination of connections upon receiving metadata portion of the file). Concurrent access from multiple processes on the same machine is as simple as write-locking a local file. Concurrent access from multiple machines is obviously non-issue.
The index could be simply: UUID -> Plain-text file name (+other meta if needed, like salt). The beauty of it is that a file move wouldn't require any updates to the index and it could be done with any UI or CLI at user's disposal.
ncw commentedon Aug 24, 2016
@romusz yes you can just terminate the read - I think that will work with all the remotes. It will break the underlying ssl connection though which would otherwise be re-used by a subsequent request and remaking ssl connections is reasonably expensive, but if it saves downloading the whole file it is a big saving.
The index could be kept locally... I'm not terribly keen on the idea though, however the index could be rebuilt if you need to backup from scratch.
romusz commentedon Aug 24, 2016
To clarify, in the previous comment I'm talking about GLOBAL local index not PER DIRECTORY so that it's not affected by file moves. User lists directory with one API call to a backend and rclone matches it to the filename/meta.
romusz commentedon Aug 24, 2016
@ncw you're absolutely right about the cost of terminating SSL connections (though I agree there would be a significant net benefit for big files, and for tiny files you could leave the connection open, having a predefined file size threshold to decide).
I'm not keen of index in general, remote or local, but it's needed for the aforementioned cost+performance optimizations. Important to note, however that having a remote index requires all the things you need for local index, plus multinode concurrency control, minus ability to move files between directories w/o partially invalidating 2 indices (from and to), and some other drawbacks (see below)
Speaking of cost + performance - I don't know if it's significant but with remote index you'd likely upload a file and then modify the remote index resulting in 2x API calls. You could defer it till the end of an upload at an increased risk of getting the remote index being inconsistent with the files in a given directory (and requiring the index rebuild).
The local index needs only updates on file listing command and only if there are UUIDs in the remote directory that are not in the local index yet (normally inserted by an upload). The upload of a file is 1 API call (meta + file content blob, unless segmented, but that's another topic) as it is for plain-text files.
rourke750 commentedon Aug 27, 2016
Just some bugs so far: Seems like after setting up the whole config doing something like
remote:
for the config and then when executing:
rclone --transfers=5 sync path secret:test
it does not go into the subfolder.
rourke750 commentedon Aug 27, 2016
Additionally when specifying passwords and then using a salt, it then returns a different password for password1 and password2 then the ones that were either typed in or randomly generated. If this is from the salting then why is password2 different as well.
ncw commentedon Aug 27, 2016
@rourke750 can you make a separate issue about the path thing please with some steps to reproduce? The integration test check that works but there are a lot of combinations and I may have missed something.
Confusingly the passwords it shows you when it summarises the config for the remote are the encrypted ones. I should probably fix this, so can you make another issue about this too please.
Thanks
Nick
dsrbecky commentedon Sep 6, 2016
TL;DR: This is a brainstorm where I propose git-inspired storage system with the objects stored as 7z files. It is just for fun.
This creates encrypted storage which supports arbitrary filename/path lengths, hashes, modification times, deduplication, compression, versioning, file-splitting and it hides directory structure. The underlying storage system does not have to support any of those.
I apologize for reinventing the wheel from scratch. I find this project very interesting, and I just want to share some of ideas that have been running though my head.
(having said all that, I am personally perfectly happy with the imperfections of the current naming scheme, I feel more attached to having standard encryption container)
dsrbecky commentedon Sep 6, 2016
Here is completely different and a bit more conservative idea - use extra filenames on the remote to store the extra metadata. This means that we get all the extra data during directory listing and we do not need extra file reads.
For example, long (already encrypted) file name 0102..48495051..9899 can be stored as two files:
BEEF-0102..4849 (this file contains the actual data)
BEEF-extra-name-1-5051..9899 (this file is always empty and exists only if the filename is too long)
where BEEF is the SHA1 hash of the long filename to ensure uniqueness and determinism (or let's use HMAC and kill two birds with one stone).
Other examples:
ACE0-0102030405 (normal file with short filename, no need for any extra files)
B150-01020304 (large file - part 0)
B150-extra-data-1-01020304 (large file - part 1)
B150-mod-time-FECE03765 (overwrite of modification time if storage does not support it)
dsrbecky commentedon Sep 13, 2016
Side-note: One of the limiting providers is ACD - however, that also includes metadata in listing, so it would be trivial to store full name there.
chbm commentedon Sep 19, 2016
Properties of encrypted backup: no leaking metadata, no leaking content through collision attacks, recovery from 0 with no local context.
I was working on a similar project and my solution for this problem was a global directory on a sqlite file that's treated pretty much like any other except it had a special name so the client could bootstrap.
The sqlite dbs are versioned so you have some protection against corruption but i didn't tackle collisions from concurrent clients.
The files themselves are on a flat namespace (no leaked tree) with the names being a guid so you can't correlate the contents (as opposed to sha1 of the contents). The directory has a list of blobs so that it can accommodate backends with limitations of size per item.
This scheme can generate garbage as the sqlite version is only uploaded after the content blob so it requires house keeping where all the blobs are listed and compared checked if they are still used on the index.
The sqlite schema I came up with is
create table files (
id integer primary key,
path text unique,
size integer,
mtime integer,
perms smallint,
sha1 char(40),
viewed smallint
);
create table blobs (
file integer,
blob text,
ord integer,
foreign key(file) references files(id)
);
create table meta (
localpath text,
localhost text
);
I have an implementation of the directory scheme at
https://github.com/chbm/securetomb/blob/master/lib/securetomb/fileset.rb
DurvalMenezes commentedon Oct 9, 2016
Hello folks,
Just gave a cursory read of the posts above, lots of good ideas. Here's some thoughts:
I like @dsrbecky's idea of storing each encrypted file in a 7z "container", as in a situation where rclone isn't available, one could (if s/he knew the encrypted file path/name) just download it using the plain cloud web interface (where available, or one of the standard, non-rclone cloud clients) and then open it using a standard 7z extraction program. The problem I see with this exclusively is that, as many (all?) cloud providers don't provide partial reads on stored files (eg, ACD), then the whole file would have to be downloaded to check its hash (eg, during "rclone check" or "rclone md5sum").
Also regarding 7z, I'm not sure I trust AES completely: I've followed the NIST competition where rijndael got chosen as the AES, and I found the justification for its choosing among the other candidates quite flimsy. I think Dan Bernstein's XSalsa20 has a chance of being stronger, but on the other hand I don't think it has been attacked/cryptanalyzed as deeply or extensively as rijndael/AES.
ACD API documentation allows for a lot of metadata to be stored along with a file, namely: labels (up to 10 labels, each up to 256 characters), and description (max 500 characters). I don't know about the other clouds, but these ACD fields seem ideal to store the additional data... say, full file name in the description, both the "local" (ie, unencrypted) and the "remote" (ie, encrypted) hashes could be encrypted and stored in label#1 (256 bytes, even base64-encoded, are a lot of bits and should be enough for that), label#2 could be used to store "stitching" info to segment large files (to work around a cloud's max file limit), etc. EDIT: I just learned that on ACD (what about other clouds?) an app can set an arbitrary list of "properties" (key:value pairs), so this would a better place to store that additional metadata).
If not enough cloud-defined storage for metadata is available for some (most) providers, I think the best method would be to use individual "blablabla.meta" files (not just filenames, as proposed by @dsrbecky), one for each encrypted file, where "blablabla" is the (encrypted) name for the file whose metadata it stores. I think this would be preferable to any "global metadata databases" as proposed by @chbm, be they local or remote, as in my experience such "unified" places for saving data have a nasty tendency to get corrupted or out-of-date (imagine aborted transfers, or worse, multiple clients uploading files to a single directory at the same time -- which is something I do here all the time). With the metadata saved in individual ".meta" files, it's easy to check whether they are current: just compare its "last update" time with the one on the file it's supposed to represent.
Why store both the local (for the file's plain content) and the remote (ditto, encrypted) hashes for a file: that way, "rclone check" can request each file's remote/encrypted hash from the cloud, then calculate the "local" hash for the local file, and then compare both to what's stored in the metadata. Any differences would point to modifications: a different local hash would tell rclone the file was modified locally (and should be uploaded again, if during a "rclone copy" or "rclone sync"), a different remote hash would tell rclone the file was somehow messed with remotely (not that I don't trust the cloud provider, but I'd sleep much better if rclone had a way to easily and quickly check, eg, with "rclone check" for corruption there, without having to download everything).
Well, that's it for now. Hope the above helps.
Cheers,
Durval.
natoriousbigg commentedon Nov 16, 2016
Any plan to make this backward compatible with previous filename encryption (current standard filename encryption)?
Vesnyx commentedon Dec 5, 2017
So the only thing currently stopping me from using rclone is the absence of directory flattening. I saw that it was previously implemented in the first iteration of crypt, but was then removed to favor of different encryption. Is there a particular reason as to why it was removed?
I'd be willing to try implementing it later, but it seems like most crypt development has stagnated. Is there anything I should be aware of before I begin?
ncw commentedon Dec 5, 2017
@Vesnyx I took the directory flattening out because the file names became too long. Lots of the remotes are limited to 256 char file names.
If you take away the mapping between directories and encrypted directories then you also have the problem that you can't use a sub path in the remote, eg asking to copy cryptedremote:sub/path.
I suspect both of these problems are soluble with a lot of cunning. If you want to have a go then please open another issue with a design proposal so we can discuss.
Thanks
eharris commentedon Dec 5, 2017
I think retaining the directory-to-directory mapping is a necessary evil. However, if the files within a particular directory were able to be split/merged so that they were all sized to approximately the same target size (with some randomness) I don't think there would be much info leakage that would be too detrimental. The number of files and size of all files would be changed, so not much info would leak. If the directory only contains a small total size of data, we could provide an option to add some random number of bogus files to make it more murky.
If file name length is a problem, it seems like a reasonable tactic there is to just name files/dirs by some partial salted hash of their name or encrypted name (perhaps the first 6 or 8 characters plus optional additional digit(s) to enumerate any possible collisions would be sufficient), and store the real name within the file data (for files) or within a sidecar file (for directories). But if the file splitting/merging feature works, storing directory info should be fairly easy to support too.
I do think that any solution that allows moving files around external to rclone (as suggested in an earlier comment) is prone to too much info leakage. However I think being able to move a whole directory or directory tree is a useful ability that should be preserved, and I think these suggestions allow for that.
snickers2k commentedon Aug 27, 2019
any news on this?
being able to use xattr would be a great addition.
rednoah, filebot-dev:
Vesnyx commentedon May 20, 2020
@ncw What do you think about encrypting the filename based on some of the contents of the encrypted data using a md5 or SHA-256 in addition to the salt given earlier? This gives us two benefits, one would be making sure the encrypted data itself hasn't been modified and letting us move files individually without worrying about the folders above it.
This does present a different issue of how files with the same data will encrypt to the same name. However, if we include the name, md5, and the salt, I think it solves that issue. The problem I can't figure out how to solve is if we have two of the exact same file with the same file name. Those would encrypt to the same data but I think it's an issue that shouldn't be encountered much if at all.
darkdragon-001 commentedon May 20, 2020
So changing the contents would change the encrypted name as well 🤔
acavalin commentedon May 20, 2020
Hello everyone, would it be a good idea integrating into rclone the efforts of gocryptfs's reverse mode?
Currently I thought of using them in cascade and they works well, but this inevitably involves a double FUSE mount.
darkdragon-001 commentedon May 20, 2020
I second usage of gocryptfs! For me it works reliably and security has been audited as well. Furthermore, this would allow cross-compatibility (rclone+gocryptfs = rclone+internalCrypt2)!
Vesnyx commentedon May 20, 2020
Yeah, I totally forgot about this because I had this in mind for long-term archiving rather than a live file system mount. But, the file itself would still be reuploaded if it's changed, no? I believe rclone has it's own verification method to validate the upload so I'm actually fine if it's just the file name changing. The problem then would be if you have the same filename and different versions on the cloud provider. Oh well, back to the drawing board I guess.
Getting gocryptfs support would also be very nice and I agree that a library would probably be the easiest way to integrate it with rclone. I actually made an issue about this a few days ago so it's probably best to discuss the implementation of it over there (#4194)