From f7696c32de55f7342bdca40de3a971c38465bc7d Mon Sep 17 00:00:00 2001 From: Helder Eijs Date: Fri, 15 Sep 2023 17:00:42 +0200 Subject: [PATCH] Rename to Crypto.Protocol.DH --- Doc/src/protocol/dh.rst | 6 +++--- lib/Crypto/Protocol/{dh.py => DH.py} | 0 lib/Crypto/Protocol/{dh.pyi => DH.pyi} | 0 lib/Crypto/Protocol/__init__.py | 2 +- lib/Crypto/SelfTest/Protocol/test_ecdh.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename lib/Crypto/Protocol/{dh.py => DH.py} (100%) rename lib/Crypto/Protocol/{dh.pyi => DH.pyi} (100%) diff --git a/Doc/src/protocol/dh.rst b/Doc/src/protocol/dh.rst index 3502cde85..db5b33b8b 100644 --- a/Doc/src/protocol/dh.rst +++ b/Doc/src/protocol/dh.rst @@ -34,7 +34,7 @@ First, a minimal example where only static keys are used:: from Crypto.PublicKey import ECC from Crypto.Hash import SHAKE128 - from Crypto.Protocol.dh import key_agreement + from Crypto.Protocol.DH import key_agreement # This KDF has been agreed in advance def kdf(x): @@ -56,7 +56,7 @@ NIST SP 800-56A recommends to bind the key agreement to some information concerning the context of the operation, for instance a description of what the keys are used for:: from Crypto.Hash import TupleHash128 - from Crypto.Protocol.dh import key_agreement + from Crypto.Protocol.DH import key_agreement from functools import partial # Random value (e.g., a nonce) @@ -94,7 +94,7 @@ contributes to the key agreement with one ephemeral key from Crypto.PublicKey import ECC from Crypto.Hash import SHAKE128 - from Crypto.Protocol.dh import key_agreement + from Crypto.Protocol.DH import key_agreement # This KDF has been agreed in advance def kdf(x): diff --git a/lib/Crypto/Protocol/dh.py b/lib/Crypto/Protocol/DH.py similarity index 100% rename from lib/Crypto/Protocol/dh.py rename to lib/Crypto/Protocol/DH.py diff --git a/lib/Crypto/Protocol/dh.pyi b/lib/Crypto/Protocol/DH.pyi similarity index 100% rename from lib/Crypto/Protocol/dh.pyi rename to lib/Crypto/Protocol/DH.pyi diff --git a/lib/Crypto/Protocol/__init__.py b/lib/Crypto/Protocol/__init__.py index efdf034f7..76e22bf64 100644 --- a/lib/Crypto/Protocol/__init__.py +++ b/lib/Crypto/Protocol/__init__.py @@ -28,4 +28,4 @@ # POSSIBILITY OF SUCH DAMAGE. # =================================================================== -__all__ = ['KDF', 'SecretSharing'] +__all__ = ['KDF', 'SecretSharing', 'DH'] diff --git a/lib/Crypto/SelfTest/Protocol/test_ecdh.py b/lib/Crypto/SelfTest/Protocol/test_ecdh.py index bea423dc8..1bac80e0e 100644 --- a/lib/Crypto/SelfTest/Protocol/test_ecdh.py +++ b/lib/Crypto/SelfTest/Protocol/test_ecdh.py @@ -9,7 +9,7 @@ from Crypto.SelfTest.st_common import list_test_cases from Crypto.SelfTest.loader import load_test_vectors, load_test_vectors_wycheproof -from Crypto.Protocol.dh import key_agreement +from Crypto.Protocol.DH import key_agreement class FIPS_ECDH_Tests_KAT(unittest.TestCase):