cryptography/docs/development
David Benjamin 3ce8883fd6 Fix encoding errors in RSA test keys. (#4410)
* Fix encoding errors in RSA test keys.

enc-rsa-pkcs8.pem and unenc-rsa-pkcs8.pem did not encode the RSA key
correctly. Per RFC 8017, appendix A.1:

   The object identifier rsaEncryption identifies RSA public and private
   keys as defined in Appendices A.1.1 and A.1.2.  The parameters field
   has associated with this OID in a value of type AlgorithmIdentifier
   SHALL have a value of type NULL.

      rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }

unenc-rsa-pkcs8.pem, however, was missing that NULL, which was, in turn,
carried into the encrypted payload of enc-rsa-pkcs8.pem. The DER
version, enc-rsa-pkcs8.der, carries this mistake too. Interestingly,
unenc-rsa-pkcs8.der does *not* have it. I'm guessing it was converted
with the openssl command-line tool which fixed the encoding in
conversion.

Current versions of OpenSSL are lax and ignore the parameters field, but
it's best to test against spec-compliant inputs. Fix unenc-rsa-pkcs8.pem
to match unenc-rsa-pkcs8.der and then refresh enc-rsa-pkcs8.{der,pem}
with the new encoding but otherwise the same encryption parameters.

I've refreshed the dumpasn1 (at least that's what it looks like)
preamble at the top of each file, but the current version of dumpasn1
appears to have changed the spacing slightly, so there's some whitespace
diff noise.

* Update test-vectors.rst.
2018-08-23 14:58:30 -05:00
..
custom-vectors Update URLs for new pypi! (#4194) 2018-04-16 07:41:11 +08:00
c-bindings.rst Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use (#3763) 2017-07-08 19:35:02 -05:00
getting-started.rst Use pytest instead of py.test per upstream recommendation, #dropthedot (#4236) 2018-05-13 10:23:49 -04:00
index.rst Add C bindings document to index 2014-06-23 14:05:22 +02:00
reviewing-patches.rst Make code review docs friendlier 2014-03-29 13:26:10 +00:00
submitting-patches.rst Fixed links to sphinx docs (#4182) 2018-04-01 09:19:18 -05:00
test-vectors.rst Fix encoding errors in RSA test keys. (#4410) 2018-08-23 14:58:30 -05:00