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 9b2917298a8f74cd950c69cd66442440d2ad40ca..41c2a5ec3df51dce1a082fd014cdaec8f6218133 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];