Hi,

On Mon, Feb 14, 2011 at 10:35 AM, johnm <[email protected]> wrote:

>
> - For example, I want to encrypt a file asymmetrically. As far as I
> understood, I first have to encrypt the data with a symmetric key,
> then encode the symmetric key with a public RSA key and send both to
> the recipient. Is this correct (and secure)?
>
>
Well, it depends on your application.  If you wanted to do something similar
to GnuPG / PGP, then you would do that.  I believe it's called hybrid
encryption.  If you wanted to do an encrypted session, you'd probably do a
Diffie-Hellman to generate a secret asym. key, then use a block cipher to
encrypt with that key.


> - What is the IV parameter good for?
>

See:  http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation , and
read about the problems with ECB mode, then read the other things like CBC
and you will get an idea of what the IV is for.


>
> - I used examples from the Crypto++ Wiki AES page. Is it save to
> generate a random key with rng.GenerateBlock(..) and how do I define
> whether AES128, AES192 or AES256 will be used - by setup the key
> variable to lengths like 16, 24 and 32 bytes?
>

I haven't used it much, but if the wiki says to do it, it's probably fine,
and yes, you can use the CryptoPP interface to set the key size to one of
those 3 sizes in bytes.


>
> Thanks in advance,
> John M.
>
> --
> 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.




-- 
smu johnson <[email protected]>

-- 
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.

Reply via email to