1

I'm looking for an unusual solution that uses the SFTP server for data transfer but said SFTP server also should act an encryption proxy i.e. all the data it stores on the server-side should be encrypted. Although I could use host (OS-wide) encryption it is not gonna be effective during runtime if the hoster I use decided to peek at it or will be forced by 3rd party or crappy government.

I did some googling but the only thing I found was: https://github.com/libfuse/sshfs Problem is I don't want any custom clients, I want to hide ANY implementation from the client, it should be just your basic SFTP you can use anywhere, even on your microwave, let alone phone or notebook.

This variant: https://serverfault.com/questions/887167/sftp-with-data-encryption-at-rest seems useable but again, at runtime, it only protects against other normal users (which I don't have).

1
  • If your risk model is the hosting company could act against you, it doesn't help whether you encrypt the whole drive or just some files. Actually it would be even easier to get access to the encryption keys. Aug 1, 2020 at 6:53

1 Answer 1

1

I'm looking for an unusual solution that uses SFTP server for data transfer but said SFTP server also should act an encryption proxy i.e. all the data it stores on the server side should be encrypted. Although I could use host (OS-wide) encryption it is not gonna be effective during runtime if the hoster I use decided to peek at it or will be forced by 3rd party or crappy government.

Where do you plan to store the encryption keys? What stops someone with access to the hardware from peeking at the files, using the encryption key?

If it's a virtual server, it's even more trivial for the hoster; they can take a snapshot of memory and the complete state of machine, including key material.

Heck, they could even throw up a proxy in front of your machine, with your ssh keys, and store a copy of the data transmitted, before encryption, without you ever being any wiser.

Refer to the 10 immutable laws of computer security:

Law #3: If a bad guy has unrestricted physical access to your computer, it’s not your computer anymore

What you need in your scenario is client side encryption, where the client handles the key material and encrypts the data before transferring it. This ensures that an attacker on the server side will not be able to decrypt the stored data - as the keys are not present there.

3
  • Fair enough. What you need in your scenario is client side encryption - no doable when it comes to corss-platform, especially including Android and their shitty limited system. Even if I find an SFTP client that automatically encrypts data before sending to remote host for one platform - there is 102% it wont exist for the rest. The whole idea is easy managing from everywhere and user's conern is to remember 256bit long passphrase.
    – Kirikan
    Aug 1, 2020 at 9:49
  • Write your own client - or use a system such as Owncloud, which can use the users password as encryption key. It's not a perfect solution if you're up against an active attacker, but it's better than what you propose... This should be fully possible on Android. What limitations stops you from encrypting files on Android?
    – vidarlo
    Aug 1, 2020 at 9:53
  • 1
    Then store your data on paper in a safe. This way you are independent from the shitty limited systems made by others. If you intend to create business on storing encrypted data for others, you must put some effort into creating something new instead of complaining about how the others haven't done things right. They have done something whereas you have done nothing. Aug 1, 2020 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .