summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/aes
diff options
context:
space:
mode:
authormarkus <>2002-09-05 12:51:50 +0000
committermarkus <>2002-09-05 12:51:50 +0000
commit15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch)
treebf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/aes
parent027351f729b9e837200dae6e1520cda6577ab930 (diff)
downloadopenbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz
openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2
openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/aes')
-rw-r--r--src/lib/libcrypto/aes/aes_cfb.c2
-rw-r--r--src/lib/libcrypto/aes/aes_ctr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/aes/aes_cfb.c b/src/lib/libcrypto/aes/aes_cfb.c
index 9b2917298a..41c2a5ec3d 100644
--- a/src/lib/libcrypto/aes/aes_cfb.c
+++ b/src/lib/libcrypto/aes/aes_cfb.c
@@ -137,7 +137,7 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
137 } else { 137 } else {
138 while (l--) { 138 while (l--) {
139 if (n == 0) { 139 if (n == 0) {
140 AES_decrypt(ivec, ivec, key); 140 AES_encrypt(ivec, ivec, key);
141 } 141 }
142 c = *(in); 142 c = *(in);
143 *(out++) = *(in++) ^ ivec[n]; 143 *(out++) = *(in++) ^ ivec[n];
diff --git a/src/lib/libcrypto/aes/aes_ctr.c b/src/lib/libcrypto/aes/aes_ctr.c
index 8e800481de..aea3db2092 100644
--- a/src/lib/libcrypto/aes/aes_ctr.c
+++ b/src/lib/libcrypto/aes/aes_ctr.c
@@ -106,8 +106,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
106 106
107 while (l--) { 107 while (l--) {
108 if (n == 0) { 108 if (n == 0) {
109 AES_ctr128_inc(counter);
110 AES_encrypt(counter, tmp, key); 109 AES_encrypt(counter, tmp, key);
110 AES_ctr128_inc(counter);
111 } 111 }
112 *(out++) = *(in++) ^ tmp[n]; 112 *(out++) = *(in++) ^ tmp[n];
113 n = (n+1) % AES_BLOCK_SIZE; 113 n = (n+1) % AES_BLOCK_SIZE;