Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich procedure is more secure for encryption using Password and Seed
    primarykey
    data
    text
    <p>I am designing a procedure and file format for the encryption application. I came to a point when I need to make a decision regarding the method/workflow of the encryption. I can't make up my mind on pros vs cons of using one approach over another.</p> <p>Below is an overview of the format structure:</p> <pre> ------------------------------------------ | File signature || fixed | plain | |----------------||----------|-----------| | Algorithm info || fixed | plain | |----------------||----------|-----------| | Seed || fixed | encrypted | |----------------||----------|-----------| | Data || variable | encrypted | |----------------||----------|-----------| | CRC || fixed | encrypted | ------------------------------------------ </pre> <p>Initially, I am going to use <strong>SHA-256</strong> for a Hash function and <strong>AES-256</strong> for an Encryption algorithm, but later it will be configurable, as the format suggests.</p> <p>Proposed procedure for creating encrypted container:</p> <ol> <li>Hash(Password) => Key-Pass</li> <li>Generate random Seed</li> <li>Key-Pass XOR Seed => Key-Seeded</li> <li>Encrypt Seed with Key-Pass and store encrypted Seed</li> <li>Encrypt Data with Key-Seeded and store encrypted Data</li> <li>Encrypt CRC with Key-Seeded and store encrypted CRC</li> </ol> <h3>Questions</h3> <p><strong>A.</strong> Do I gain anything from storing encrypted Seed and CRC? Would it be less secure if I store them not encrypted?</p> <p><strong>B.</strong> Is it more or less or no difference in security of using [ Hash(Password + Seed) ] for key generation rather than prosed [ Hash(Password) XOR Seed ] for the final key?</p> <p><strong>C.</strong> A concluding question from two questions above. Would it be better or worse to use the alternative procedure for creating encrypted container:</p> <ol> <li>Hash(Password + Seed) => Key</li> <li>Store unencrypted Seed</li> <li>Encrypt Data with Key and store encrypted Data</li> <li>Store unencrypted CRC (or encrypted)</li> </ol> <p>I guess I would have to store unencrypted Seed in order to regenerate Key on reading back the encrypted content. CRC can be either encrypted or unencrypted.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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