From ebc265065042a3aef34e96488b0f05114d911ac3 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 26 Nov 2014 19:18:56 -1000 Subject: add several new x509 test vectors --- docs/development/test-vectors.rst | 60 +++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 21 deletions(-) (limited to 'docs/development') diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst index 8c2d1361..a682562a 100644 --- a/docs/development/test-vectors.rst +++ b/docs/development/test-vectors.rst @@ -34,10 +34,45 @@ Asymmetric ciphers `enc2-rsa-pkcs8.pem`_ was re-encrypted using a stronger PKCS#8 cipher. * `Botan's ECC private keys`_. +Custom Asymmetric Vectors +~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ``ec_private_key.pem`` - Contains an Elliptic Curve key generated by OpenSSL + from the curve ``secp256r1``. +* ``ec_private_key_encrypted.pem`` - Contains the same Elliptic Curve key as + ``ec_private_key.pem``, except that it is encrypted with AES-128 with the + password "123456". +* ``ec_public_key.pem`` - Contains the public key corresponding to + ``ec_private_key.pem``, generated using OpenSSL. +* ``rsa_private_key.pem`` - Contains an RSA 2048 bit key generated using + OpenSSL, protected by the secret "123456" with DES3 encryption. +* ``rsa_public_key.pem`` - Contains an RSA 2048 bit public generated using + OpenSSL from ``rsa_private_key.pem``. +* ``dsaparam.pem`` - Contains 2048-bit DSA parameters generated using OpenSSL; + contains no keys. +* ``dsa_private_key.pem`` - Contains a DSA 2048 bit key generated using + OpenSSL from the parameters in ``dsaparam.pem``, protected by the secret + "123456" with DES3 encryption. +* ``dsa_public_key.pem`` - Contains a DSA 2048 bit key generated using OpenSSL + from ``dsa_private_key.pem``. + + X.509 ~~~~~ * PKITS test suite from `NIST PKI Testing`_. +* ``v1_cert.pem`` from the OpenSSL source tree (`testx509.pem`_). +* ``ecdsa_root.pem`` - `DigiCert Global Root G3`_, a ``secp384r1`` ECDSA root + certificate. + +Custom X.509 Vectors +~~~~~~~~~~~~~~~~~~~~ + +* ``invalid_version.pem`` - Contains an RSA 2048 bit certificate with the + X.509 version field set to ``0x7``. +* ``post2000utctime.pem`` - Contains an RSA 2048 bit certificate with the + ``notBefore`` and ``notAfter`` fields encoded as post-2000 ``UTCTime``. +* ``dsa_root.pem`` - Contains a DSA root certificate generated using OpenSSL. Hashes ~~~~~~ @@ -107,27 +142,8 @@ Creating test vectors When official vectors are unavailable ``cryptography`` may choose to build its own using existing vectors as source material. -Current custom vectors -~~~~~~~~~~~~~~~~~~~~~~ - -* ``ec_private_key.pem`` - Contains an Elliptic Curve key generated by OpenSSL - from the curve ``secp256r1``. -* ``ec_private_key_encrypted.pem`` - Contains the same Elliptic Curve key as - ``ec_private_key.pem``, except that it is encrypted with AES-128 with the - password "123456". -* ``ec_public_key.pem`` - Contains the public key corresponding to - ``ec_private_key.pem``, generated using OpenSSL. -* ``rsa_private_key.pem`` - Contains an RSA 2048 bit key generated using - OpenSSL, protected by the secret "123456" with DES3 encryption. -* ``rsa_public_key.pem`` - Contains an RSA 2048 bit public generated using - OpenSSL from ``rsa_private_key.pem``. -* ``dsaparam.pem`` - Contains 2048-bit DSA parameters generated using OpenSSL; - contains no keys. -* ``dsa_private_key.pem`` - Contains a DSA 2048 bit key generated using - OpenSSL from the parameters in ``dsaparam.pem``, protected by the secret - "123456" with DES3 encryption. -* ``dsa_public_key.pem`` - Contains a DSA 2048 bit key generated using OpenSSL - from ``dsa_private_key.pem``. +Custom Symmetric Vectors +~~~~~~~~~~~~~~~~~~~~~~~~ .. toctree:: :maxdepth: 1 @@ -174,3 +190,5 @@ header format (substituting the correct information): .. _`Ed25519 website`: http://ed25519.cr.yp.to/software.html .. _`NIST SP-800-38B`: http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf .. _`NIST PKI Testing`: http://csrc.nist.gov/groups/ST/crypto_apps_infra/pki/pkitesting.html +.. _`testx509.pem`: https://github.com/openssl/openssl/blob/master/test/testx509.pem +.. _`DigiCert Global Root G3`: http://cacerts.digicert.com/DigiCertGlobalRootG3.crt -- cgit v1.2.3 From d317baeba44c1cd35a4254712ae5a9a51f89ce1b Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 12 Dec 2014 11:42:31 -0600 Subject: add ECDSA certificate that does not have a named curve OID --- docs/development/test-vectors.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/development') diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst index a682562a..936540eb 100644 --- a/docs/development/test-vectors.rst +++ b/docs/development/test-vectors.rst @@ -73,6 +73,8 @@ Custom X.509 Vectors * ``post2000utctime.pem`` - Contains an RSA 2048 bit certificate with the ``notBefore`` and ``notAfter`` fields encoded as post-2000 ``UTCTime``. * ``dsa_root.pem`` - Contains a DSA root certificate generated using OpenSSL. +* ``ec_no_named_curve.pem`` - Contains an ECDSA certificate that does not have + an embedded OID defining the curve. Hashes ~~~~~~ -- cgit v1.2.3 From a850c613f0d2874a46a6ed883b32ca385048b395 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 12 Dec 2014 14:21:18 -0600 Subject: rename DSA test vector certificate to be more clear --- docs/development/test-vectors.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/development') diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst index 936540eb..10c20dba 100644 --- a/docs/development/test-vectors.rst +++ b/docs/development/test-vectors.rst @@ -72,7 +72,8 @@ Custom X.509 Vectors X.509 version field set to ``0x7``. * ``post2000utctime.pem`` - Contains an RSA 2048 bit certificate with the ``notBefore`` and ``notAfter`` fields encoded as post-2000 ``UTCTime``. -* ``dsa_root.pem`` - Contains a DSA root certificate generated using OpenSSL. +* ``dsa_selfsigned_ca.pem`` - Contains a DSA self-signed CA certificate + generated using OpenSSL. * ``ec_no_named_curve.pem`` - Contains an ECDSA certificate that does not have an embedded OID defining the curve. -- cgit v1.2.3 f='#n90'>90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204