gcry_cipher_setkey(h,k,l)

kingruedi cplusplushelp@gmx.net
Mon, 22 Apr 2002 17:55:03 +0200


Am Sonntag, 21. April 2002 21:43 schrieb Werner Koch:
> On Sun, 21 Apr 2002 15:48:57 +0200, kingruedi  said:
> > That is good! so I can use MD5 sums as key
>
> No you can't.  An MD5 digest is just 16 bytes.  The usual way to
> create a key is by using a ranodm key and having some key agreement
> mechanism.  AES256 doesn't buy you anything when using a weak keay
> (i.e. which can be easy attacked with an dictionary attack).

That's bad :( I wanted to use the md5 sum of the user password as AES256 key. 

I don't now what you mean with the random key's. If I create a random key the 
user have to remember the 32 byte key (!!) and I don't think that a lot users 
can remember it and so they will make notes and that isn't very good :(

Is there a way to get a 32 byte AES256 key from the user password?