From 04e783f5610d3983bb3cbdf82720d17a97c779a7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Sep 2014 18:27:56 +0100 Subject: Implemented support for loading EC private keys Loads Elliptic Curve private keys from .PEM files, whether encrypted or unencrypted, given that the encryption method is supported. Also included changes to the test files and documentation for said method. --- cryptography/hazmat/backends/openssl/backend.py | 5 +++++ .../hazmat/primitives/asymmetric/serialization.rst | 2 +- tests/hazmat/primitives/test_serialization.py | 23 ++++++++++++++++++++++ .../asymmetric/PEM_Serialization/README.txt | 7 +++++++ .../PEM_Serialization/ec_private_key.pem | 8 ++++++++ .../PEM_Serialization/ec_private_key_encrypted.pem | 8 ++++++++ 6 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt create mode 100644 vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem create mode 100644 vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index d1d18a10..b59b2391 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -473,6 +473,11 @@ class Backend(object): assert dsa_cdata != self._ffi.NULL dsa_cdata = self._ffi.gc(dsa_cdata, self._lib.DSA_free) return _DSAPrivateKey(self, dsa_cdata) + elif type == self._lib.EVP_PKEY_EC: + ec_cdata = self._lib.EVP_PKEY_get1_EC_KEY(evp_pkey) + assert ec_cdata != self._ffi.NULL + ec_cdata = self._ffi.gc(ec_cdata, self._lib.EC_KEY_free) + return _EllipticCurvePrivateKey(self, ec_cdata, None) else: raise UnsupportedAlgorithm("Unsupported key type.") diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst index 84b69fdc..7a953d9b 100644 --- a/docs/hazmat/primitives/asymmetric/serialization.rst +++ b/docs/hazmat/primitives/asymmetric/serialization.rst @@ -76,7 +76,7 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END be ``None`` if the private key is not encrypted. :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.PKCS8SerializationBackend` + :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend` provider. :returns: A new instance of a private key. diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 9333a6bd..4d32fba2 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -46,6 +46,29 @@ class TestPEMSerialization(object): if isinstance(key, interfaces.RSAPrivateKeyWithNumbers): _check_rsa_private_numbers(key.private_numbers()) + def test_load_pem_ec_private_key_unencrypted(self, backend): + key = load_vectors_from_file( + os.path.join( + "asymmetric", "PEM_Serialization", "ec_private_key.pem"), + lambda pemfile: load_pem_private_key( + pemfile.read().encode(), None, backend + ) + ) + + assert key + assert isinstance(key, interfaces.EllipticCurvePrivateKey) + + def test_load_pem_ec_private_key_encrypted(self, backend): + key = load_vectors_from_file( + os.path.join( + "asymmetric", "PEM_Serialization", "ec_private_key_encrypted.pem"), + lambda pemfile: load_pem_private_key( + pemfile.read().encode(), b"123456", backend + ) + ) + + assert key + assert isinstance(key, interfaces.EllipticCurvePrivateKey) @pytest.mark.traditional_openssl_serialization class TestTraditionalOpenSSLSerialization(object): diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt new file mode 100644 index 00000000..f48833c7 --- /dev/null +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt @@ -0,0 +1,7 @@ +Example test files for PEM Serialization Backend tests + +Contains + +1. ec_private_key.pem - Contains an Elliptic Curve key generated using OpenSSL, from the curve secp256k1. +2. ec_private_key_encrypted.pem - Contains the same Elliptic Curve key as ec_private_key.pem, except that + it is encrypted with AES-256 with the password "123456". \ No newline at end of file diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem new file mode 100644 index 00000000..6544ab05 --- /dev/null +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BgUrgQQACg== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHQCAQEEID5KKJYoOFVI+B9/BAynBUSl+lXgGOLdxd2b+JprRaL7oAcGBSuBBAAK +oUQDQgAE44pVr9HTSgw9lPJiZ+yHW2vxdT7vvhMEKuCf+e1/Rvgl/IcPHPKD7GvU +NhlwDsAVf6//ji7c4VzFpRwfXoRQGg== +-----END EC PRIVATE KEY----- diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem new file mode 100644 index 00000000..a971f47a --- /dev/null +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,49858E10DCF0F870F0D3AC4F3B6B09A7 + +aTLUOmFF8IJyy3hABHPVapdAmJXrG8YCyXZw48Es801ie/CsX/9YsPoUKNqkT0WK +PcyA60ZrCGi9y3eCgfEyBWFZAmDtHnSqk/q8/jvf+GAIvu+u4+j9Ium8cDhMZYwK +7tBYqBCyxItmEIeAZqkZv6/4QbQ5E9xVK0dd2GGxtAo= +-----END EC PRIVATE KEY----- -- cgit v1.2.3 From 84005936bc02bc928fc7901e08b7866bf808da6b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Sep 2014 10:03:56 +0100 Subject: Adjusted formatting and added EC check Due to the code failing the PEP-8 test, the test code has been reformatted so that there are two blank lines between the function and the next class, and the overlong line has been adjusted. Also added a check to the private key loading function to check for the Cryptography_HAS_EC field. This has been tested on Windows only. --- cryptography/hazmat/backends/openssl/backend.py | 2 +- tests/hazmat/primitives/test_serialization.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index b59b2391..c04c6603 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -473,7 +473,7 @@ class Backend(object): assert dsa_cdata != self._ffi.NULL dsa_cdata = self._ffi.gc(dsa_cdata, self._lib.DSA_free) return _DSAPrivateKey(self, dsa_cdata) - elif type == self._lib.EVP_PKEY_EC: + elif self._lib.Cryptography_HAS_EC == 1 and type == self._lib.EVP_PKEY_EC: ec_cdata = self._lib.EVP_PKEY_get1_EC_KEY(evp_pkey) assert ec_cdata != self._ffi.NULL ec_cdata = self._ffi.gc(ec_cdata, self._lib.EC_KEY_free) diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 4d32fba2..77d748b3 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -61,7 +61,8 @@ class TestPEMSerialization(object): def test_load_pem_ec_private_key_encrypted(self, backend): key = load_vectors_from_file( os.path.join( - "asymmetric", "PEM_Serialization", "ec_private_key_encrypted.pem"), + "asymmetric", "PEM_Serialization", + "ec_private_key_encrypted.pem"), lambda pemfile: load_pem_private_key( pemfile.read().encode(), b"123456", backend ) @@ -70,6 +71,7 @@ class TestPEMSerialization(object): assert key assert isinstance(key, interfaces.EllipticCurvePrivateKey) + @pytest.mark.traditional_openssl_serialization class TestTraditionalOpenSSLSerialization(object): @pytest.mark.parametrize( -- cgit v1.2.3 From faa35a8b4c94bf2f47a0ea36ed0401f33a4fca00 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Sep 2014 11:05:13 +0100 Subject: Corrected formatting Line was too long in ./cryptography/hazmat/backends/openssl/backend.py, so moved the second part of the statement onto a new line using \ --- cryptography/hazmat/backends/openssl/backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index c04c6603..944f87bb 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -473,7 +473,8 @@ class Backend(object): assert dsa_cdata != self._ffi.NULL dsa_cdata = self._ffi.gc(dsa_cdata, self._lib.DSA_free) return _DSAPrivateKey(self, dsa_cdata) - elif self._lib.Cryptography_HAS_EC == 1 and type == self._lib.EVP_PKEY_EC: + elif self._lib.Cryptography_HAS_EC == 1 \ + and type == self._lib.EVP_PKEY_EC: ec_cdata = self._lib.EVP_PKEY_get1_EC_KEY(evp_pkey) assert ec_cdata != self._ffi.NULL ec_cdata = self._ffi.gc(ec_cdata, self._lib.EC_KEY_free) -- cgit v1.2.3 From f0ec609bd18c050b270d87d26e454b073b67a76e Mon Sep 17 00:00:00 2001 From: michael-hart Date: Fri, 12 Sep 2014 12:14:55 +0100 Subject: Further formatting changes Essentially a continuation of the previous commit, this commit tabs a line which should have been tabbed before. --- cryptography/hazmat/backends/openssl/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index 944f87bb..7e619a10 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -474,7 +474,7 @@ class Backend(object): dsa_cdata = self._ffi.gc(dsa_cdata, self._lib.DSA_free) return _DSAPrivateKey(self, dsa_cdata) elif self._lib.Cryptography_HAS_EC == 1 \ - and type == self._lib.EVP_PKEY_EC: + and type == self._lib.EVP_PKEY_EC: ec_cdata = self._lib.EVP_PKEY_get1_EC_KEY(evp_pkey) assert ec_cdata != self._ffi.NULL ec_cdata = self._ffi.gc(ec_cdata, self._lib.EC_KEY_free) -- cgit v1.2.3 From 909f8222a5ee23c558876a783741e38b3027f59d Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 12 Sep 2014 16:19:39 +0100 Subject: Changed EC curve type and add test markers Changed the Elliptic Curve curve type from secp256k1 to secp256r1, as this is supported, in an attempt to pass tests on CentOS 7; also added markers and methods to skip test functions for systems that do not support ECC. --- tests/hazmat/primitives/test_serialization.py | 8 ++++++++ .../cryptography_vectors/asymmetric/PEM_Serialization/README.txt | 2 +- .../asymmetric/PEM_Serialization/ec_private_key.pem | 8 ++++---- .../asymmetric/PEM_Serialization/ec_private_key_encrypted.pem | 8 ++++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 77d748b3..cbcc772d 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -25,6 +25,10 @@ from cryptography.hazmat.primitives.serialization import ( load_pem_pkcs8_private_key, load_pem_private_key, load_pem_traditional_openssl_private_key ) +from tests.hazmat.primitives.test_ec import ( + _skip_curve_unsupported +) +from cryptography.hazmat.primitives.asymmetric import ec from .utils import _check_rsa_private_numbers, load_vectors_from_file from ...utils import raises_unsupported_algorithm @@ -46,7 +50,9 @@ class TestPEMSerialization(object): if isinstance(key, interfaces.RSAPrivateKeyWithNumbers): _check_rsa_private_numbers(key.private_numbers()) + @pytest.mark.elliptic def test_load_pem_ec_private_key_unencrypted(self, backend): + _skip_curve_unsupported(backend, ec.SECP256R1()) key = load_vectors_from_file( os.path.join( "asymmetric", "PEM_Serialization", "ec_private_key.pem"), @@ -58,7 +64,9 @@ class TestPEMSerialization(object): assert key assert isinstance(key, interfaces.EllipticCurvePrivateKey) + @pytest.mark.elliptic def test_load_pem_ec_private_key_encrypted(self, backend): + _skip_curve_unsupported(backend, ec.SECP256R1()) key = load_vectors_from_file( os.path.join( "asymmetric", "PEM_Serialization", diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt index f48833c7..97879f5c 100644 --- a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/README.txt @@ -2,6 +2,6 @@ Example test files for PEM Serialization Backend tests Contains -1. ec_private_key.pem - Contains an Elliptic Curve key generated using OpenSSL, from the curve secp256k1. +1. ec_private_key.pem - Contains an Elliptic Curve key generated using OpenSSL, from the curve secp256r1. 2. ec_private_key_encrypted.pem - Contains the same Elliptic Curve key as ec_private_key.pem, except that it is encrypted with AES-256 with the password "123456". \ No newline at end of file diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem index 6544ab05..4ea43082 100644 --- a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem @@ -1,8 +1,8 @@ -----BEGIN EC PARAMETERS----- -BgUrgQQACg== +BggqhkjOPQMBBw== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- -MHQCAQEEID5KKJYoOFVI+B9/BAynBUSl+lXgGOLdxd2b+JprRaL7oAcGBSuBBAAK -oUQDQgAE44pVr9HTSgw9lPJiZ+yHW2vxdT7vvhMEKuCf+e1/Rvgl/IcPHPKD7GvU -NhlwDsAVf6//ji7c4VzFpRwfXoRQGg== +MHcCAQEEIGIq02UsfuTvGOrZRnJGulum7SYqHHa3aJX3LpEqExJPoAoGCCqGSM49 +AwEHoUQDQgAEJLzzbuz2tRnLFlOL+6bTX6giVavAsc6NDFFT0IMCd2ibTTNUDDkF +Gsgq0cH5JYPg/6xUlMBFKrWYe3yQ4has9w== -----END EC PRIVATE KEY----- diff --git a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem index a971f47a..d04cd665 100644 --- a/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem +++ b/vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem @@ -1,8 +1,8 @@ -----BEGIN EC PRIVATE KEY----- Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,49858E10DCF0F870F0D3AC4F3B6B09A7 +DEK-Info: AES-256-CBC,DF9D9E8C48BDB6A878E63D99E12D4996 -aTLUOmFF8IJyy3hABHPVapdAmJXrG8YCyXZw48Es801ie/CsX/9YsPoUKNqkT0WK -PcyA60ZrCGi9y3eCgfEyBWFZAmDtHnSqk/q8/jvf+GAIvu+u4+j9Ium8cDhMZYwK -7tBYqBCyxItmEIeAZqkZv6/4QbQ5E9xVK0dd2GGxtAo= +wwTwrkAsOWBrk7LeiR3m3yWeqaBQIEmywfgLZjuOte/HKxH8QHs/Enw896zE03aw +xb6sFXpCM8Q1L0rIlT7xoaNxXxA8WmIyiXIyX+JkY+3zm1iEzoP5xbU2q/Y3c4wb +wNSmiY094Jf0+EO/i/G/9zLYUlJDRVQ5fkIGazDwPMc= -----END EC PRIVATE KEY----- -- cgit v1.2.3 From ed2a510d39d87540fc9c3a2239a0cdd34c7bc7de Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 12 Sep 2014 16:56:32 +0100 Subject: Reorganised imports Swapped the order of the imports so that flake8 will see that they are correct, and changed the test import to be relative rather than absolute, as is the standard --- tests/hazmat/primitives/test_serialization.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index cbcc772d..8542408b 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -21,15 +21,14 @@ import pytest from cryptography.exceptions import _Reasons from cryptography.hazmat.primitives import interfaces +from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.serialization import ( load_pem_pkcs8_private_key, load_pem_private_key, load_pem_traditional_openssl_private_key ) -from tests.hazmat.primitives.test_ec import ( - _skip_curve_unsupported -) -from cryptography.hazmat.primitives.asymmetric import ec + +from .test_ec import _skip_curve_unsupported from .utils import _check_rsa_private_numbers, load_vectors_from_file from ...utils import raises_unsupported_algorithm -- cgit v1.2.3 From acda0445b1d22da120bbd46283e374887758c8b2 Mon Sep 17 00:00:00 2001 From: Michael Hart Date: Fri, 12 Sep 2014 23:21:32 +0100 Subject: Added PKCS8 encoded private keys to tests Generated two files with the same private key as PEM_Serialization's ec_private_key.pem, one unencrypted and one encrypted with "123456". Also changed existing PEMSerialization unit tests to take parameters so that tests can be extended easily. --- tests/hazmat/primitives/test_serialization.py | 48 ++++++++++++++-------- .../asymmetric/PKCS8/ec_private_key.pem | 5 +++ .../asymmetric/PKCS8/ec_private_key_encrypted.pem | 6 +++ 3 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key.pem create mode 100644 vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key_encrypted.pem diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 8542408b..7c912a92 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -49,29 +49,21 @@ class TestPEMSerialization(object): if isinstance(key, interfaces.RSAPrivateKeyWithNumbers): _check_rsa_private_numbers(key.private_numbers()) + @pytest.mark.parametrize( + ("key_file", "password"), + [ + ("ec_private_key.pem", None), + ("ec_private_key_encrypted.pem", b"123456"), + ] + ) @pytest.mark.elliptic - def test_load_pem_ec_private_key_unencrypted(self, backend): - _skip_curve_unsupported(backend, ec.SECP256R1()) - key = load_vectors_from_file( - os.path.join( - "asymmetric", "PEM_Serialization", "ec_private_key.pem"), - lambda pemfile: load_pem_private_key( - pemfile.read().encode(), None, backend - ) - ) - - assert key - assert isinstance(key, interfaces.EllipticCurvePrivateKey) - - @pytest.mark.elliptic - def test_load_pem_ec_private_key_encrypted(self, backend): + def test_load_pem_ec_private_key(self, key_file, password, backend): _skip_curve_unsupported(backend, ec.SECP256R1()) key = load_vectors_from_file( os.path.join( - "asymmetric", "PEM_Serialization", - "ec_private_key_encrypted.pem"), + "asymmetric", "PEM_Serialization", key_file), lambda pemfile: load_pem_private_key( - pemfile.read().encode(), b"123456", backend + pemfile.read().encode(), password, backend ) ) @@ -335,6 +327,26 @@ class TestPKCS8Serialization(object): if isinstance(key, interfaces.RSAPrivateKeyWithNumbers): _check_rsa_private_numbers(key.private_numbers()) + @pytest.mark.parametrize( + ("key_file", "password"), + [ + ("ec_private_key.pem", None), + ("ec_private_key_encrypted.pem", b"123456"), + ] + ) + @pytest.mark.elliptic + def test_load_pem_ec_private_key(self, key_file, password, backend): + _skip_curve_unsupported(backend, ec.SECP256R1()) + key = load_vectors_from_file( + os.path.join( + "asymmetric", "PKCS8", key_file), + lambda pemfile: load_pem_pkcs8_private_key( + pemfile.read().encode(), password, backend + ) + ) + assert key + assert isinstance(key, interfaces.EllipticCurvePrivateKey) + def test_unused_password(self, backend): key_file = os.path.join( "asymmetric", "PKCS8", "unencpkcs8.pem") diff --git a/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key.pem b/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key.pem new file mode 100644 index 00000000..3a625b6b --- /dev/null +++ b/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgYirTZSx+5O8Y6tlG +cka6W6btJiocdrdolfcukSoTEk+hRANCAAQkvPNu7Pa1GcsWU4v7ptNfqCJVq8Cx +zo0MUVPQgwJ3aJtNM1QMOQUayCrRwfklg+D/rFSUwEUqtZh7fJDiFqz3 +-----END PRIVATE KEY----- diff --git a/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key_encrypted.pem b/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key_encrypted.pem new file mode 100644 index 00000000..7c35200f --- /dev/null +++ b/vectors/cryptography_vectors/asymmetric/PKCS8/ec_private_key_encrypted.pem @@ -0,0 +1,6 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIGwMBsGCSqGSIb3DQEFAzAOBAh618AJwpxyvQICCAAEgZBhr8rmqfqMHmPh/Gjo +S1VgD8sZUG3oILVzmuSb/k4uvynfctSG/ajwkacMF9UR6PvbTHjJUqX9RXHF6hug +r08T/tXDaHhdNkj0TzW+ZZD1Ky6+saBkMZr9C0XDdsHDEEtRkYAb9xtWj+Z1iars +C/xyREp46ZyeinO4Vy8BJXxCwMaSa/6HtogSb9eWWXKk0uA= +-----END ENCRYPTED PRIVATE KEY----- -- cgit v1.2.3