aboutsummaryrefslogtreecommitdiffstats
path: root/vectors/cryptography_vectors/asymmetric/PKCS8
Commit message (Collapse)AuthorAgeFilesLines
* Fix encoding errors in RSA test keys. (#4410)David Benjamin2018-08-232-111/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Upgrade the encryption algorithm on another thing. This uses the same PBES2 ↵Alex Gaynor2014-11-181-38/+16
| | | | | | parameters as the previous one. If someone has a choice for a 2nd algorithm, I'm happy to do that. See previous PR for ideas about how to review
* Re-encrypts one of our vectors from a truly atrocious algorithm (single DES, ↵Alex Gaynor2014-11-171-4/+5
| | | | | | MD5) to a PBES#2 based one (PBKDF2HMAC + AES) Refs #1390
* Test Vector changesmichael-hart2014-09-235-0/+18
| | | | | | | Changed names of existing vectors to be more instructive about what the key contains, and adapted tests to compensate, which pass. Added public keys for all encryption types and two new private keys for PEM serialization, documented in the README.txt in the same folder
* Added PKCS8 encoded private keys to testsMichael Hart2014-09-122-0/+11
| | | | | | | 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.
* Add PKCS8 key with bad encryption OIDAlex Stapleton2014-05-271-0/+17
| | | | This is encpkcs8.pem with the base64 OID replaced with Ys
* Add PKCS#8 key with unknown OIDAlex Stapleton2014-05-271-0/+9
| | | | This is unenc-dsa-pkcs8.pem with the base64 OID replaced with X's
* Unencrypted 1024-bit DSA key in PKCS#8Alex Stapleton2014-05-271-0/+9
| | | | Generated by myself.
* Move cryptography.vectors to cryptography_vectorsAlex Stapleton2014-03-2418-0/+367
All vectors are now stored in the subpackage in the vectors/ folder. This package is automatically installed by setup.py test and will also be uploaded with a matching version number by the PyPI upload task.