Teya Salat
HomeBlogAbout Me

Crypt Sync Files 1 3



Whenever files are copied or saved to your CryptSync source, they'll be encrypted in the cloud storage folder, and uploaded. And the sync works in both directions, too, so if a file is changed in the cloud storage folder then it'll be decrypted and updated in the source. This scheme does introduce some obvious complications.

Crypt

The Crypt Sync Files encrypts / decrypts and synchronize files between local folders and USB Drive, memory cards, network drives, folders on Cloud services (Dropbox, etc.) You can store your encrypted files on external drives, folders, cloud services and don’t worry about file security. Download cryptsync for free. A folder sync tool with encryption. Synchronizes multiple folders with each other, keeping them up-to-date. One folder of each pair is kept encrypted. File: Crypt Sync Files 1.3.zip 6828581: Contact us: contact@dam ag.net.

The crypt remote encrypts and decrypts another remote.

To use it first set up the underlying remote following the configinstructions for that remote. You can also use a local pathnameinstead of a remote which will encrypt and decrypt from that directorywhich might be useful for encrypting onto a USB stick for example.

First check your chosen remote is working - we'll call itremote:path in these docs. Note that anything inside remote:pathwill be encrypted and anything outside won't. This means that if youare using a bucket based remote (eg S3, B2, swift) then you shouldprobably put the bucket in the remote s3:bucket. If you just uses3: then rclone will make encrypted bucket names too (if using filename encryption) which may or may not be what you want.

Now configure crypt using rclone config. We will call this onesecret to differentiate it from the remote.

Important The password is stored in the config file is lightlyobscured so it isn't immediately obvious what it is. It is in no waysecure unless you use config file encryption.

A long passphrase is recommended, or you can use a random one.

The obscured password is created by using AES-CTR with a static key, withthe salt stored verbatim at the beginning of the obscured password. Thisstatic key is shared by between all versions of rclone.

If you reconfigure rclone with the same passwords/passphraseselsewhere it will be compatible, but the obscured version will be differentdue to the different salt.

Note that rclone does not encrypt

  • file length - this can be calculated within 16 bytes
  • modification time - used for syncing

Specifying the remote

In normal use, make sure the remote has a : in. If you specify theremote without a : then rclone will use a local directory of thatname. So if you use a remote of /path/to/secret/files then rclonewill encrypt stuff to that directory. If you use a remote of namethen rclone will put files in a directory called name in the currentdirectory.

If you specify the remote as remote:path/to/dir then rclone willstore encrypted files in path/to/dir on the remote. If you are usingfile name encryption, then when you save files tosecret:subdir/subfile this will store them in the unencrypted pathpath/to/dir but the subdir/subpath bit will be encrypted.

Crypt Sync Files 1 3.0

Note that unless you want encrypted bucket names (which are difficultto manage because you won't know what directory they represent in webinterfaces etc), you should probably specify a bucket, egremote:secretbucket when using bucket based remotes such as S3,Swift, Hubic, B2, GCS. https://datsitetype.weebly.com/direct-message-for-instagram-4-1-3.html.

Example

To test I made a little directory of files using 'standard' file nameencryption.

Copy these to the remote and list them back

Now see what that looked like when encrypted

Note that this retains the directory structure which means you can do this

If don't use file name encryption then the remote will look like this

  • note the .bin extensions added to prevent the cloud providerattempting to interpret the data.

File name encryption modes

Here are some of the features of the file name encryption modes

Off

  • doesn't hide file names or directory structure
  • allows for longer file names (~246 characters)
  • can use sub paths and copy single files

Standard

  • file names encrypted
  • file names can't be as long (~143 characters)
  • can use sub paths and copy single files
  • directory structure visible
  • identical files names will have identical uploaded names
  • can use shortcuts to shorten the directory recursion

Obfuscation

This is a simple 'rotate' of the filename, with each file having a rotdistance based on the filename. We store the distance at the beginningof the filename. So a file called 'hello' may become '53.jgnnq'.

This is not a strong encryption of filenames, but it may stop automatedscanning tools from picking up on filename patterns. As such it's anintermediate between 'off' and 'standard'. The advantage is that itallows for longer path segment names.

There is a possibility with some unicode based filenames that theobfuscation is weak and may map lower case characters to upper caseequivalents. You can not rely on this for strong protection.

  • file names very lightly obfuscated
  • file names can be longer than standard encryption
  • can use sub paths and copy single files
  • directory structure visible
  • identical files names will have identical uploaded names

Cloud storage systems have various limits on file name length andtotal path length which you are more likely to hit using 'Standard'file name encryption. If you keep your file names to below 156characters in length then you should be OK on all providers.

There may be an even more secure file name encryption mode in thefuture which will address the long file name problem.

Directory name encryption

Crypt offers the option of encrypting dir names or leaving them intact.There are two options:

True

Encrypts the whole file path including directory namesExample:1/12/123.txt is encrypted top0e52nreeaj0a5ea7s64m4j72s/l42g6771hnv3an9cgc8cr2n1ng/qgm4avr35m5loi1th53ato71v0

False

Only encrypts file names, skips directory namesExample:1/12/123.txt is encrypted to1/12/qgm4avr35m5loi1th53ato71v0

Modified time and hashes

Crypt stores modification times using the underlying remote so supportdepends on that.

Hashes are not stored for crypt. However the data integrity isprotected by an extremely strong crypto authenticator.

Note that you should use the rclone cryptcheck command to check theintegrity of a crypted remote instead of rclone check which can'tcheck the checksums properly.

Standard Options

Here are the standard options specific to crypt (Encrypt/Decrypt a remote).

--crypt-remote

Crypt

Remote to encrypt/decrypt.Normally should contain a ':' and a path, eg 'myremote:path/to/dir','myremote:bucket' or maybe 'myremote:' (not recommended).

  • Config: remote
  • Env Var: RCLONE_CRYPT_REMOTE
  • Type: string
  • Default: '

--crypt-filename-encryption

How to encrypt the filenames.

  • Config: filename_encryption
  • Env Var: RCLONE_CRYPT_FILENAME_ENCRYPTION
  • Type: string
  • Default: 'standard'
  • Examples:
    • 'standard'
      • Encrypt the filenames see the docs for the details.
    • 'obfuscate'
      • Very simple filename obfuscation.
    • 'off'
      • Don't encrypt the file names. Adds a '.bin' extension only.

--crypt-directory-name-encryption

Option to either encrypt directory names or leave them intact.

NB If filename_encryption is 'off' then this option will do nothing.

  • Config: directory_name_encryption
  • Env Var: RCLONE_CRYPT_DIRECTORY_NAME_ENCRYPTION
  • Type: bool
  • Default: true
  • Examples:
    • 'true'
      • Encrypt directory names.
    • 'false'
      • Don't encrypt directory names, leave them intact.

--crypt-password

Password or pass phrase for encryption.

NB Input to this must be obscured - see rclone obscure.

  • Config: password
  • Env Var: RCLONE_CRYPT_PASSWORD
  • Type: string
  • Default: '

--crypt-password2

https://ernmoneyproandroidfreesolution.peatix.com. Password or pass phrase for salt. Optional but recommended.Should be different to the previous password.

NB Input to this must be obscured - see rclone obscure.

  • Config: password2
  • Env Var: RCLONE_CRYPT_PASSWORD2
  • Type: string
  • Default: '

Advanced Options

Here are the advanced options specific to crypt (Encrypt/Decrypt a remote).

--crypt-server-side-across-configs

Allow server side operations (eg copy) to work across different crypt configs.

Normally this option is not what you want, but if you have two cryptspointing to the same backend you can use it.

This can be used, for example, to change file name encryption typewithout re-uploading all the data. Just make two crypt backendspointing to two different directories with the single changedparameter and use rclone move to move the files between the cryptremotes.

  • Config: server_side_across_configs
  • Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS
  • Type: bool
  • Default: false

Crypt Sync Files 1 3.5

--crypt-show-mapping

For all files listed show how the names encrypt.

If this flag is set then for each file that the remote is asked tolist, it will log (at level INFO) a line stating the decrypted filename and the encrypted file name.

This is so you can work out which encrypted names are which decryptednames just in case you need to do something with the encrypted filenames, or for debugging purposes.

  • Config: show_mapping
  • Env Var: RCLONE_CRYPT_SHOW_MAPPING
  • Type: bool
  • Default: false

Backend commands

Here are the commands specific to the crypt backend.

Run them with

The help below will explain what arguments each command takes.

See the 'rclone backend' command for moreinfo on how to pass options and arguments.

These can be run on a running backend using the rc commandbackend/command.

encode

Encode the given filename(s)

This encodes the filenames given as arguments returning a list ofstrings of the encoded results.

Usage Example:

decode

Decode the given filename(s)

This decodes the filenames given as arguments returning a list ofstrings of the decoded results. It will return an error if any of theinputs are invalid.

Usage Example:

Backing up a crypted remote

If you wish to backup a crypted remote, it is recommended that you userclone sync on the encrypted files, and make sure the passwords arethe same in the new encrypted remote.

This will have the following advantages

  • rclone sync will check the checksums while copying
  • you can use rclone check between the encrypted remotes
  • you don't decrypt and encrypt unnecessarily

For example, let's say you have your original remote at remote: withthe encrypted version at eremote: with path remote:crypt. Youwould then set up the new remote remote2: and then the encryptedversion eremote2: with path remote2:crypt using the same passwordsas eremote:.

To sync the two remotes you would do

And to check the integrity you would do

File formats

File encryption

Files are encrypted 1:1 source file to destination object. The filehas a header and is divided into chunks.

Header

  • 8 bytes magic string RCLONEx00x00
  • 24 bytes Nonce (IV)

The initial nonce is generated from the operating systems cryptostrong random number generator. The nonce is incremented for eachchunk read making sure each nonce is unique for each block written.The chance of a nonce being re-used is minuscule. If you wrote anexabyte of data (10¹⁸ bytes) you would have a probability ofapproximately 2×10⁻³² of re-using a nonce.

Chunk

Each chunk will contain 64kB of data, except for the last one whichmay have less data. The data chunk is in standard NACL secretboxformat. Secretbox uses XSalsa20 and Poly1305 to encrypt andauthenticate messages.

Each chunk contains:

  • 16 Bytes of Poly1305 authenticator
  • 1 - 65536 bytes XSalsa20 encrypted data

64k chunk size was chosen as the best performing chunk size (theauthenticator takes too much time below this and the performance dropsoff due to cache effects above this). Note that these chunks arebuffered in memory so they can't be too big.

This uses a 32 byte (256 bit key) key derived from the user password.

Examples

1 byte file will encrypt to

  • 32 bytes header
  • 17 bytes data chunk

49 bytes total

1MB (1048576 bytes) file will encrypt to

  • 32 bytes header
  • 16 chunks of 65568 bytes

1049120 bytes total (a 0.05% overhead). This is the overhead for bigfiles.

Name encryption

File names are encrypted segment by segment - the path is broken upinto / separated strings and these are encrypted individually.

File segments are padded using PKCS#7 to a multiple of 16 bytesbefore encryption.

They are then encrypted with EME using AES with 256 bit key. EME(ECB-Mix-ECB) is a wide-block encryption mode presented in the 2003paper 'A Parallelizable Enciphering Mode' by Halevi and Rogaway.

This makes for deterministic encryption which is what we want - thesame filename must encrypt to the same thing otherwise we can't findit on the cloud storage system.

This means that

  • filenames with the same name will encrypt the same
  • filenames which start the same won't have a common prefix

This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both ofwhich are derived from the user password.

After encryption they are written out using a modified version ofstandard base32 encoding as described in RFC4648. The standardencoding is modified in two ways:

  • it becomes lower case (no-one likes upper case filenames!)
  • we strip the padding character =

base32 is used rather than the more efficient base64 so rclone can beused on case insensitive remotes (eg Windows, Amazon Drive).

Key derivation

Rclone uses scrypt with parameters N=16384, r=8, p=1 with anoptional user supplied salt (password2) to derive the 32+32+16 = 80bytes of key material required. If the user doesn't supply a saltthen rclone uses an internal one.

scrypt makes it impractical to mount a dictionary attack on rcloneencrypted data. For full protection against this you should always usea salt.

  • CredentialsFileView1.07NEW
    Decrypt the Credentials files of Windows
  • KeePass Password Safe Portable2.45NEW
    KeePass Portable is the popular KeePass Password Safe packaged as a portable app.
  • KeePass Password Safe2.45NEW
    A free, open-source, light-weight and easy-to-use password safe.
  • Apeaksoft iOS Unlocker1.0.8NEW
    Remove iOS passcode, Apple ID, Screen Time passcode
  • CredentialsFileView1.07NEW
    Decrypt the Credentials files of Windows
  • KeePass Password Safe Portable2.45NEW
    KeePass Portable is the popular KeePass Password Safe packaged as a portable app.
  • KeePass Password Safe2.45NEW
    A free, open-source, light-weight and easy-to-use password safe.
  • Disk Redactor2.1.329
    Disk wipe utility to clean deleted files
  • Apeaksoft iOS Unlocker1.0.8NEW
    Remove iOS passcode, Apple ID, Screen Time passcode
  • UnHackMe11.70.0.970
    UnHackMe is First BootWatch Antirootkit
  • Manyprog Opera Password Recovery1.5NEW
    Opera Password Recovery, Opera saved passwords
  • GiliSoft File Lock11.1.29
    Protect files, folders and drives in an easy and reliable way with this software
  • NetMaster1.0.4
    Control Internet access of each application and optimise your bandwidth usage.




Crypt Sync Files 1 3
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE