Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Following is a solution that strongly protects files.</p> <p>Pro:</p> <ul> <li>An attacker can access the server but won't be able to use the data.</li> <li>Even you (the developer) cannot access the data.</li> </ul> <p>Cons:</p> <ul> <li>If user loses its password, data is lost too.</li> <li>Even you (the developer) cannot access the data (This means you cannot help the user if he encounters any problems).</li> </ul> <p>If its what you need, go for it ^^. Note: all that follows happens on the Server side.</p> <ol> <li>use https for all transmissions</li> <li>When the user log in, create a hash of the user's password (e.g. sha(password + salt))</li> <li>Store the hash in the user's session</li> <li>When an upload is done, use symmetric encryption (e.g. AES) to encipher the data with the hash stored in the session as the key.</li> <li>When a download is done, use the same symmetric decryption method to decipher the file and send it back to the user.</li> </ol> <p>This means that only a logged user can access the data as plain. And only the user to whom the data belongs. The only possibility to access the user's data is to know his password.</p> <p>Note: if the user that uploads the file and the one that read the file are not the same person, you can use a combination of asymmetric and symmetric encryption instead:</p> <ol> <li>generate a public/private key pair for the recipient. </li> <li>(symmetric) encrypt the private key with the recipient's hash or a dependency of his password.</li> <li><p><strike>When a file is uploaded, asymmetric encipher with the recipient's public key.</strike></p></li> <li><p>(new) Asymmetric encryption appear to be much slower than symmetric encryption (10-100x depending on algorithms/architecture). Hence it is far better to generate a random number (the session key), asymmetric-encrypt twice (once with sender's public key, once with recipient's public key) it and store them. Then use symmetric encryption to encrypt the file (use the plain session key as the symmetric key).</p></li> <li><p>When the recipient wants to access the file:</p> <p>a) decipher his private key with his hash or password dependency.</p> <p>b) <strike>asymmetric decipher the file with the private key.</strike></p> <p>b) (new) Use private key to decipher the recipient's encrypted session key. Then use symmetric decryption to decipher the file.</p></li> </ol> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload