神刀安全网

Libmcrypt has been using the wrong S-Boxes for GOST for years

Hello

From google code view I got some code and fall in shock.

Taken from http://www.minix3.org/software/ libmcrypt-2.5.7.tar.bz2/ libmcrypt-2.5.7/ modules/ algorithms/

So it is 2.5.7 version;

Take a look on first S-Box:

static unsigned char const gost_k1 [16] = {

1, 15, 13, 0, 5, 7, 10, 4, 9, 2, 3, 14, 6, 11, 8, 2 };

Do you really think, that it is an permutation? I get "2" twice in this line and no "12";

Right S-Box (from wikipedia or http://www.cryptocom.ru/ OpenSource/ engine-gost-20061220.tar.gz/ engine-gost-20061220/ –> GostR3411_94_TestParamSet first line ) IS

1, 15, 13, 0, 5, 7, 10, 4, 9, 2, 3, 14, 6, 11, 8, 12 <– !!!

— Alex V BregerDone as part of Information Security Course in MIPT (Moscow Institute of Physics And Technology) — re.mipt.ru

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Libmcrypt has been using the wrong S-Boxes for GOST for years

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮