X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Ftest_gost28147.py;h=3e4298c2b9f23935c6ebf2b2d96f65875b488c6c;hb=21a30721c31912c296e1faced73e2fd0db191be9;hp=4861b69c08a0a80d6584c25a8d1d2a9d5f0459e0;hpb=dacca17a69ca9a920bf69bc1dc47386bdd6d4def;p=pygost.git diff --git a/pygost/test_gost28147.py b/pygost/test_gost28147.py index 4861b69..3e4298c 100644 --- a/pygost/test_gost28147.py +++ b/pygost/test_gost28147.py @@ -1,6 +1,6 @@ # coding: utf-8 # PyGOST -- Pure Python GOST cryptographic functions library -# Copyright (C) 2015-2017 Sergey Matveev +# Copyright (C) 2015-2019 Sergey Matveev # # 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 @@ -338,6 +338,13 @@ class CBCTest(TestCase): iv = urandom(8) cbc_decrypt(key, cbc_encrypt(key, 8 * b"x", iv)) + def test_meshing(self): + pt = urandom(MESH_MAX_DATA * 3) + key = urandom(32) + ct = cbc_encrypt(key, pt) + dt = cbc_decrypt(key, ct) + self.assertEqual(pt, dt) + class CFBMeshingTest(TestCase): def setUp(self):