32 static const uint8_t GOST_R_3411_TEST_PARAMS[64] = {
33 0x4E, 0x57, 0x64, 0xD1, 0xAB, 0x8D, 0xCB, 0xBF, 0x94, 0x1A, 0x7A, 0x4D, 0x2C, 0xD1, 0x10, 0x10,
34 0xD6, 0xA0, 0x57, 0x35, 0x8D, 0x38, 0xF2, 0xF7, 0x0F, 0x49, 0xD1, 0x5A, 0xEA, 0x2F, 0x8D, 0x94,
35 0x62, 0xEE, 0x43, 0x09, 0xB3, 0xF4, 0xA6, 0xA2, 0x18, 0xC6, 0x98, 0xE3, 0xC1, 0x7C, 0xE5, 0x7E,
36 0x70, 0x6B, 0x09, 0x66, 0xF7, 0x02, 0x3C, 0x8B, 0x55, 0x95, 0xBF, 0x28, 0x39, 0xB3, 0x2E, 0xCC};
39 static const uint8_t GOST_R_3411_CRYPTOPRO_PARAMS[64] = {
40 0xA5, 0x74, 0x77, 0xD1, 0x4F, 0xFA, 0x66, 0xE3, 0x54, 0xC7, 0x42, 0x4A, 0x60, 0xEC, 0xB4, 0x19,
41 0x82, 0x90, 0x9D, 0x75, 0x1D, 0x4F, 0xC9, 0x0B, 0x3B, 0x12, 0x2F, 0x54, 0x79, 0x08, 0xA0, 0xAF,
42 0xD1, 0x3E, 0x1A, 0x38, 0xC7, 0xB1, 0x81, 0xC6, 0xE6, 0x56, 0x05, 0x87, 0x03, 0x25, 0xEB, 0xFE,
43 0x9C, 0x6D, 0xF8, 0x6D, 0x2E, 0xAB, 0xDE, 0x20, 0xBA, 0x89, 0x3C, 0x92, 0xF8, 0xD3, 0x53, 0xBC};
45 if(m_name ==
"R3411_94_TestParam") {
46 m_sboxes = GOST_R_3411_TEST_PARAMS;
47 }
else if(m_name ==
"R3411_CryptoPro") {
48 m_sboxes = GOST_R_3411_CRYPTOPRO_PARAMS;
95 for(
size_t i = 0; i != blocks; ++i) {
99 for(
size_t j = 0; j != 3; ++j) {
100 GOST_ROUND2<0, 1>(N1, N2, m_SBOX, m_EK);
101 GOST_ROUND2<2, 3>(N1, N2, m_SBOX, m_EK);
102 GOST_ROUND2<4, 5>(N1, N2, m_SBOX, m_EK);
103 GOST_ROUND2<6, 7>(N1, N2, m_SBOX, m_EK);
106 GOST_ROUND2<7, 6>(N1, N2, m_SBOX, m_EK);
107 GOST_ROUND2<5, 4>(N1, N2, m_SBOX, m_EK);
108 GOST_ROUND2<3, 2>(N1, N2, m_SBOX, m_EK);
109 GOST_ROUND2<1, 0>(N1, N2, m_SBOX, m_EK);
124 for(
size_t i = 0; i != blocks; ++i) {
128 GOST_ROUND2<0, 1>(N1, N2, m_SBOX, m_EK);
129 GOST_ROUND2<2, 3>(N1, N2, m_SBOX, m_EK);
130 GOST_ROUND2<4, 5>(N1, N2, m_SBOX, m_EK);
131 GOST_ROUND2<6, 7>(N1, N2, m_SBOX, m_EK);
133 for(
size_t j = 0; j != 3; ++j) {
134 GOST_ROUND2<7, 6>(N1, N2, m_SBOX, m_EK);
135 GOST_ROUND2<5, 4>(N1, N2, m_SBOX, m_EK);
136 GOST_ROUND2<3, 2>(N1, N2, m_SBOX, m_EK);
137 GOST_ROUND2<1, 0>(N1, N2, m_SBOX, m_EK);