17 lines
740 B
Diff
17 lines
740 B
Diff
diff -up Botan-1.10.16/src/hash/gost_3411/gost_3411.cpp.orig Botan-1.10.16/src/hash/gost_3411/gost_3411.cpp
|
|
--- Botan-1.10.16/src/hash/gost_3411/gost_3411.cpp.orig 2017-04-05 03:06:45.000000000 +0200
|
|
+++ Botan-1.10.16/src/hash/gost_3411/gost_3411.cpp 2017-08-13 16:29:34.720567939 +0200
|
|
@@ -90,8 +90,11 @@ void GOST_34_11::compress_n(const byte i
|
|
|
|
// P transformation
|
|
for(size_t k = 0; k != 4; ++k)
|
|
+ {
|
|
+ const uint64_t UVk = U[k] ^ V[k];
|
|
for(size_t l = 0; l != 8; ++l)
|
|
- key[4*l+k] = get_byte(l, U[k]) ^ get_byte(l, V[k]);
|
|
+ key[4*l+k] = get_byte(l, UVk);
|
|
+ }
|
|
|
|
cipher.set_key(key, 32);
|
|
cipher.encrypt(&hash[8*j], S + 8*j);
|