libgcrypt - Initialization Vector

Moritz Schulte mo at g10code.com
Thu Apr 28 21:22:37 CEST 2005


On Thu, Apr 28, 2005 at 01:38:31PM -0400, Tod Thomas wrote:

> My understanding from reading the libgcrypt info is that the
> Initialization Vector "is a non-secret random string acting as a
> kind of salt value".
[...]
> Once I change the IV in one I no longer get the correct, decrypted
> string back.  I discovered this because I decided to make my IV a
> truly random value by using the output of gcry_randomize to set it
> and that failed.

Well, the IV needs to be the same for encryption and decryption; this
is so, since it has direct influence on the ciphertext (in case of
encryption) and plaintext (in case of decryption).

Moritz

-- 
Moritz Schulte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 193 bytes
Desc: not available
Url : /pipermail/attachments/20050428/f42d4d6f/attachment.pgp


More information about the Gcrypt-devel mailing list