Wow, so much replies!... and so much terms (o_O)
You know, I have even decided to systematize all this material, and got the 
following: <Google Docs> 
<https://docs.google.com/document/d/1_HGALfl9uNKmVHwDpTjrVgmqYIbkx_4JCbquDQ7MiAE/edit?usp=sharing>
So, the best suggested idea is usage of authentificated encryption 
(AES/GCM).
The questions are:
1) Do I still need the header? And how should it look?
What I now have is:
----------------------------------------------------

struct Entangle_Header { 

char salt[64]; 

  /* ----- Format ----- */ 

uint16_t prog_version;       /* Header format version */

uint32_t keys_hash;    /* Should I leave it or not? */

uint64_t file_size;   /* size of original file */ 

  byte keys[32]; /* AES-256 key storage area */ 

} 
----------------------------------------------------
2) The example in Cryptopp Wiki is as follows:

string plaintext, ciphertext;
...

GCM< AES >::Encryption enc;
enc.SetKeyWithIV( key, sizeof(key), iv, sizeof(iv) );

AuthenticatedEncryptionFilter aef( enc,
    new StringSink( ciphertext )
); // AuthenticatedEncryptionFilter

aef.Put( plaintext.data(), plaintext.size() );
aef.MessageEnd();

Is it possible to use buffers instead of strings (e.g. byte buffer[16384]; 
aef.Put((byte *) buffer, 16384);)?
3) If decryption fails, how to detect whether the password is incorrect or 
the file is corrupted?

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to