]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/test_gost28147.py
Forbid any later GNU GPL versions autousage
[pygost.git] / pygost / test_gost28147.py
index 5928d6fc81ba1aef85c91c6c2b20b4a598ae404f..554343edbb249f0f7606d5dbdb9dda0a1cf36beb 100644 (file)
@@ -4,8 +4,7 @@
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation, version 3 of the License.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,7 +37,7 @@ class ECBTest(TestCase):
     def test_gcl(self):
         """ Test vectors from libgcl3
         """
-        sbox = "Gost2814789_TestParamSet"
+        sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"0475f6e05038fbfad2c7c390edb3ca3d1547124291ae1e8a2f79cd9ed2bcefbd")
         plaintext = bytes(bytearray((
             0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
@@ -136,7 +135,7 @@ class ECBTest(TestCase):
     def test_cryptomanager(self):
         """ Test vector from http://cryptomanager.com/tv.html
         """
-        sbox = "GostR3411_94_TestParamSet"
+        sbox = "id-GostR3411-94-TestParamSet"
         key = hexdec(b"75713134B60FEC45A607BB83AA3746AF4FF99DA6D1B53B5B1B402A1BAA030D1B")
         self.assertSequenceEqual(
             ecb_encrypt(key, hexdec(b"1122334455667788"), sbox=sbox),
@@ -149,7 +148,7 @@ class CFBTest(TestCase):
         """ Test vector from http://cryptomanager.com/tv.html
         """
         key = hexdec(b"75713134B60FEC45A607BB83AA3746AF4FF99DA6D1B53B5B1B402A1BAA030D1B")
-        sbox = "GostR3411_94_TestParamSet"
+        sbox = "id-GostR3411-94-TestParamSet"
         self.assertSequenceEqual(
             cfb_encrypt(
                 key,
@@ -209,7 +208,7 @@ class CTRTest(TestCase):
     def test_gcl(self):
         """ Test vectors from libgcl3
         """
-        sbox = "Gost2814789_TestParamSet"
+        sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"0475f6e05038fbfad2c7c390edb3ca3d1547124291ae1e8a2f79cd9ed2bcefbd")
         plaintext = bytes(bytearray((
             0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
@@ -288,7 +287,7 @@ class CTRTest(TestCase):
     def test_gcl2(self):
         """ Test vectors 2 from libgcl3
         """
-        sbox = "Gost2814789_TestParamSet"
+        sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"fc7ad2886f455b50d29008fa622b57d5c65b3c637202025799cadf0768519e8a")
         plaintext = bytes(bytearray((
             0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,