In CFB mode, the iv is always encrypted.
authorRichard Levitte <levitte@openssl.org>
Fri, 31 May 2002 13:07:39 +0000 (13:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 31 May 2002 13:07:39 +0000 (13:07 +0000)
crypto/aes/aes_cfb.c

index 9b29172..41c2a5e 100644 (file)
@@ -137,7 +137,7 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
        } else {
                while (l--) {
                        if (n == 0) {
-                               AES_decrypt(ivec, ivec, key);
+                               AES_encrypt(ivec, ivec, key);
                        }
                        c = *(in);
                        *(out++) = *(in++) ^ ivec[n];