Encrypting with ECB

Werner Koch wk at gnupg.org
Fri Feb 25 23:03:52 CET 2005


On Fri, 25 Feb 2005 12:11:39 +0100, Madelman  said:

> gcry_cipher_open(&hd, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_ECB, 0);

ECB?  Not sure that has ever been tested.  Better send plaintext than
using ECB.

> If I understood it correctly in ECB mode I don't need to set the IV, but even if

There is no chaining at all with ECB thus no IV.  Don't use it.

  Werner




More information about the Gcrypt-devel mailing list