**SPAM** Re: Little help please...

Tod Thomas tthomas at chubb.com
Wed Jun 1 13:09:27 CEST 2005


Werner Koch wrote:
> On Mon, 23 May 2005 09:46:23 -0400, Tod Thomas said:
> 
> 
>>err = gcry_cipher_setkey(hd, key, keylen);
> 
> 
> Use a fixed key for testing, like
> 
>   err = gcry_cipher_setkey(hd, "123456789abcdef0", 16 );


This triggered something that led me to solve my problem.  My key length 
was too short, for some reason I thought the key length was variable. 
Oddly though, none of the API calls flagged me for an invalid key length...


>>gcry_cipher_decrypt(hd,decryptedtext,strlen(ciphertext),ciphertext,strlen(ciphertext));
> 
> 
> This won't work:  You can't use strlen on CIPHERTEXT becuase that one
> is binary.


Won't it?  All strings ultimately are just binary data.


> 
> Shalom-Salam,
> 
>    Werner

Thanks for your help.



More information about the Gcrypt-devel mailing list