projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cbe638
)
Correct AES counter mode, which incorrectly incremented the counter before
author
Richard Levitte
<levitte@openssl.org>
Thu, 30 May 2002 14:06:06 +0000
(14:06 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Thu, 30 May 2002 14:06:06 +0000
(14:06 +0000)
using it.
PR: 56
crypto/aes/aes_ctr.c
patch
|
blob
|
history
diff --git
a/crypto/aes/aes_ctr.c
b/crypto/aes/aes_ctr.c
index 8e800481de00fb26b4de1dcc50da38e070796749..aea3db209272189e4e8fcd6638a3e3ed51048e10 100644
(file)
--- a/
crypto/aes/aes_ctr.c
+++ b/
crypto/aes/aes_ctr.c
@@
-106,8
+106,8
@@
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
while (l--) {
if (n == 0) {
- AES_ctr128_inc(counter);
AES_encrypt(counter, tmp, key);
+ AES_ctr128_inc(counter);
}
*(out++) = *(in++) ^ tmp[n];
n = (n+1) % AES_BLOCK_SIZE;