diff options
author | Nils Larsch <nils@openssl.org> | 2006-04-20 13:11:52 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-04-20 13:11:52 +0000 |
commit | f8296228f1f7d30e8fd7c9188dc90b0211ad8514 (patch) | |
tree | 42cedbfbaddb382118ceb6285cb6d5f3c4161103 /crypto/aes | |
parent | 930b0c4b8a4a1acab0a9af8808883391f7ddc280 (diff) |
as we encrypt every bit separately we need to loop through the number
of bits; thanks to Michael McDougall <mmcdouga@saul.cis.upenn.edu>
PR: 1318
Diffstat (limited to 'crypto/aes')
-rw-r--r-- | crypto/aes/aes_cfb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/aes/aes_cfb.c b/crypto/aes/aes_cfb.c index 49f0411010..294f746f66 100644 --- a/crypto/aes/aes_cfb.c +++ b/crypto/aes/aes_cfb.c @@ -202,7 +202,7 @@ void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, assert(*num == 0); memset(out,0,(length+7)/8); - for(n=0 ; n < length ; ++n) + for(n=0 ; n < length * 8; ++n) { c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; AES_cfbr_encrypt_block(c,d,1,key,ivec,enc); |