X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fgost3410.py;h=cdb5b039eb1dd876604c74d4c63135721c1a3fd5;hb=63d5c5a81f29bfbb2e6eff3d8dc730a33ef80427;hp=96520cb48d7bce6919a19365d25d459d4288ef0f;hpb=2e336566fbe3a603b5565142f5112880035be7f1;p=pygost.git diff --git a/pygost/gost3410.py b/pygost/gost3410.py index 96520cb..cdb5b03 100644 --- a/pygost/gost3410.py +++ b/pygost/gost3410.py @@ -1,6 +1,6 @@ # coding: utf-8 # PyGOST -- Pure Python GOST cryptographic functions library -# Copyright (C) 2015-2021 Sergey Matveev +# Copyright (C) 2015-2023 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 @@ -55,6 +55,7 @@ class GOST3410Curve(object): the twisted Edwards form :param str name: human-readable curve name """ + def __init__(self, p, q, a, b, x, y, cofactor=1, e=None, d=None, name=None): self.p = p self.q = q @@ -236,8 +237,8 @@ CURVES["id-tc26-gost-3410-2012-512-paramSetTest"] = CURVES["id-tc26-gost-3410-12 CURVES["id-tc26-gost-3410-2012-512-paramSetA"] = CURVES["id-tc26-gost-3410-12-512-paramSetA"] CURVES["id-tc26-gost-3410-2012-512-paramSetB"] = CURVES["id-tc26-gost-3410-12-512-paramSetB"] CURVES["id-tc26-gost-3410-2012-512-paramSetC"] = CURVES["id-tc26-gost-3410-12-512-paramSetC"] -for name, curve in CURVES.items(): - curve.name = name +for _name, _curve in CURVES.items(): + _curve.name = _name DEFAULT_CURVE = CURVES["id-tc26-gost-3410-12-256-paramSetB"]