From f1cefb8fd09b3771c89c1a796712c98981f86c19 Mon Sep 17 00:00:00 2001 From: Raccoon Date: Tue, 4 Feb 2025 03:22:05 +0100 Subject: [PATCH] Fix typo from SP 800-180 to SP 800-108 --- Doc/src/protocol/dh.rst | 2 +- Doc/src/protocol/kdf.rst | 4 ++-- lib/Crypto/SelfTest/Protocol/test_KDF.py | 6 +++--- .../Protocol/KDF_SP800_108_COUNTER.txt | 2 +- test_vectors/src/sp800_108.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Doc/src/protocol/dh.rst b/Doc/src/protocol/dh.rst index 89b67c05..f985c132 100644 --- a/Doc/src/protocol/dh.rst +++ b/Doc/src/protocol/dh.rst @@ -140,7 +140,7 @@ not password-based. For instance, some reasonable choices are: * :ref:`hkdf` * :ref:`shake128` or :ref:`shake256` -* :ref:`sp800-180-counter` +* :ref:`sp800-108-counter` * :ref:`tuplehash128` or :ref:`tuplehash256` KDFs are typically fed with multiple inputs, diff --git a/Doc/src/protocol/kdf.rst b/Doc/src/protocol/kdf.rst index cb5dd43d..7083f5ff 100644 --- a/Doc/src/protocol/kdf.rst +++ b/Doc/src/protocol/kdf.rst @@ -125,9 +125,9 @@ Example, for deriving two AES256 keys:: .. autofunction:: Crypto.Protocol.KDF.HKDF -.. _sp800-180-counter: +.. _sp800-108-counter: -SP 800-180 Counter Mode +SP 800-108 Counter Mode ++++++++++++++++++++++++ A KDF can be generically constructed with a pseudorandom function (PRF). diff --git a/lib/Crypto/SelfTest/Protocol/test_KDF.py b/lib/Crypto/SelfTest/Protocol/test_KDF.py index 8d736456..1b2aa54c 100644 --- a/lib/Crypto/SelfTest/Protocol/test_KDF.py +++ b/lib/Crypto/SelfTest/Protocol/test_KDF.py @@ -714,7 +714,7 @@ def load_hash_by_name(hash_name): return __import__("Crypto.Hash." + hash_name, globals(), locals(), ["new"]) -class SP800_180_Counter_Tests(unittest.TestCase): +class SP800_108_Counter_Tests(unittest.TestCase): def test_negative_zeroes(self): def prf(s, x): @@ -781,7 +781,7 @@ def add_tests_sp800_108_counter(cls): setattr(cls, "test_kdf_sp800_108_counter_%d" % idx, kdf_test) -add_tests_sp800_108_counter(SP800_180_Counter_Tests) +add_tests_sp800_108_counter(SP800_108_Counter_Tests) def get_tests(config={}): @@ -799,7 +799,7 @@ def get_tests(config={}): tests += [TestVectorsHKDFWycheproof(wycheproof_warnings)] tests += list_test_cases(scrypt_Tests) tests += list_test_cases(bcrypt_Tests) - tests += list_test_cases(SP800_180_Counter_Tests) + tests += list_test_cases(SP800_108_Counter_Tests) return tests diff --git a/test_vectors/pycryptodome_test_vectors/Protocol/KDF_SP800_108_COUNTER.txt b/test_vectors/pycryptodome_test_vectors/Protocol/KDF_SP800_108_COUNTER.txt index eb0cbc55..85a06a6e 100644 --- a/test_vectors/pycryptodome_test_vectors/Protocol/KDF_SP800_108_COUNTER.txt +++ b/test_vectors/pycryptodome_test_vectors/Protocol/KDF_SP800_108_COUNTER.txt @@ -1,5 +1,5 @@ # -# Test vectors for NIST SP-800 180, KDF in Counter mode +# Test vectors for NIST SP-800 108, KDF in Counter mode # Generated with Botan v2.19.1 # diff --git a/test_vectors/src/sp800_108.cpp b/test_vectors/src/sp800_108.cpp index e4c20c08..6f1ff510 100644 --- a/test_vectors/src/sp800_108.cpp +++ b/test_vectors/src/sp800_108.cpp @@ -7,7 +7,7 @@ using namespace std; /* - * Generate test vectors for SP 800-180 using the Botan library. + * Generate test vectors for SP 800-108 using the Botan library. * * Input key: 16 bytes * PRF: HMAC-256, HMAC-384, HMAC-512 @@ -74,7 +74,7 @@ int main(void) unsigned count = 0; printf("#\n"); - printf("# Test vectors for NIST SP-800 180, KDF in Counter mode\n"); + printf("# Test vectors for NIST SP-800 108, KDF in Counter mode\n"); printf("# Generated with Botan v%d.%d.%d\n", BOTAN_VERSION_MAJOR, BOTAN_VERSION_MINOR, BOTAN_VERSION_PATCH); printf("#\n");