[PATCH] cipher/gost28147: fix CryptoPro-B S-BOX

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Wed Nov 16 21:36:01 CET 2016


 * cipher/gost-s-box.c: CryptoPro_B s-box missed one line, resulting in
   incorrect encryption/decryption using that s-box. Add missing data.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 cipher/gost-s-box.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cipher/gost-s-box.c b/cipher/gost-s-box.c
index 0094f65..7bf6041 100644
--- a/cipher/gost-s-box.c
+++ b/cipher/gost-s-box.c
@@ -132,6 +132,7 @@ struct gost_sbox
       0xA, 0x3, 0x8, 0xC, 0x0, 0x7, 0xD, 0x9,
       0xC, 0xF, 0xF, 0xF, 0xD, 0xF, 0x0, 0x6,
 
+      0xD, 0xB, 0x3, 0x4, 0x6, 0xA, 0x6, 0xF,
       0x6, 0x8, 0x6, 0xE, 0x8, 0x0, 0xF, 0xD,
       0x7, 0x6, 0x1, 0x9, 0xE, 0x9, 0x8, 0x5,
       0xF, 0xE, 0x4, 0x8, 0x3, 0x5, 0xE, 0xC,
-- 
2.10.2




More information about the Gcrypt-devel mailing list