diff --git a/lib/Crypto/SelfTest/PublicKey/test_import_Curve448.py b/lib/Crypto/SelfTest/PublicKey/test_import_Curve448.py index 543b19d7..e2fdb171 100644 --- a/lib/Crypto/SelfTest/PublicKey/test_import_Curve448.py +++ b/lib/Crypto/SelfTest/PublicKey/test_import_Curve448.py @@ -55,7 +55,7 @@ def compact(lines): def create_ref_keys_x448(): key_lines = load_file("ecc_x448.txt").splitlines() - seed = compact(key_lines[5:8]) + seed = compact(key_lines[6:10]) key = ECC.construct(curve="Curve448", seed=seed) return (key, key.public_key()) @@ -257,8 +257,8 @@ def test_export_private_pem_encrypted(self): def test_export_raw(self): encoded = self.ref_public.export_key(format='raw') - self.assertEqual(len(encoded), 32) - self.assertEqual(encoded, unhexlify(b'ff7561ef60c9c8a757f6d6372ec14142c9be208d0e719136d8d3c715dfcf7e15')) + self.assertEqual(len(encoded), 56) + self.assertEqual(encoded, unhexlify(b'e2abae24ab8f65b01969e61f84fee615b525f413a90e3d727f71d0ffe60fb1d0a1a0285f2a7fd88789206e0aa4f3e9fcb9e4ba5d644e691e')) def test_prng(self): # Test that password-protected containers use the provided PRNG diff --git a/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_ed448_public.pem b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_ed448_public.pem new file mode 100644 index 00000000..e88b4043 --- /dev/null +++ b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_ed448_public.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MEMwBQYDK2VxAzoAiZAU3cCg4SYM/BCFr9+VIBnp/WM3Lj42biba0ysXZiSIQzCh +RhcjfjCB/r2dGhUGnnSZQz0vVd2A +-----END PUBLIC KEY----- diff --git a/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519.txt b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519.txt index 9d76ad08..1fb9b4f0 100644 --- a/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519.txt +++ b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519.txt @@ -1,15 +1,12 @@ -----BEGIN PRIVATE KEY----- -MEYCAQAwBQYDK2VvBDoEOHxZhQFreFDMrRfsYFwh4JWoFIuB3ImZp2OET4L8E1Cv -ARzv49/Z1j81t2onGC1y6PXlRaL0ynXW +MC4CAQAwBQYDK2VuBCIEIKidnb+OLl6wrioGG+TGdIE/r0HdYmIxWOj8d7kvuW5f -----END PRIVATE KEY----- -X448 Private-Key: +X25519 Private-Key: priv: - 7c:59:85:01:6b:78:50:cc:ad:17:ec:60:5c:21:e0: - 95:a8:14:8b:81:dc:89:99:a7:63:84:4f:82:fc:13: - 50:af:01:1c:ef:e3:df:d9:d6:3f:35:b7:6a:27:18: - 2d:72:e8:f5:e5:45:a2:f4:ca:75:d6 + a8:9d:9d:bf:8e:2e:5e:b0:ae:2a:06:1b:e4:c6:74: + 81:3f:af:41:dd:62:62:31:58:e8:fc:77:b9:2f:b9: + 6e:5f pub: - 2c:b5:a2:77:ae:7c:3c:27:6c:c2:9d:6a:b7:d9:08: - 1a:7f:83:24:a5:a6:9f:3d:1a:a9:cb:7d:d8:49:a1: - 2c:0e:e2:01:9b:15:0f:75:4a:67:b3:81:ed:a7:1d: - 6c:37:17:91:12:0d:fa:8c:a4:40:62 + ff:75:61:ef:60:c9:c8:a7:57:f6:d6:37:2e:c1:41: + 42:c9:be:20:8d:0e:71:91:36:d8:d3:c7:15:df:cf: + 7e:15 diff --git a/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519_private.der b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519_private.der index 1067334d..7a28a117 100644 Binary files a/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519_private.der and b/test_vectors/pycryptodome_test_vectors/PublicKey/ECC/ecc_x25519_private.der differ