aboutsummaryrefslogtreecommitdiffstats
path: root/vectors/cryptography_vectors/asymmetric
Commit message (Collapse)AuthorAgeFilesLines
* fix coverage by adding two artificial DSA public keys (#4984)Paul Kehrer2019-09-062-0/+0
| | | | | | | | | | * fix coverage by adding two artificial DSA public keys One key removes the optional parameters from the structure to cover a branch conditional, and the other key has its BITSTRING padding value set to a non-zero value. * lexicographic? never heard of it
* add ed25519 PKCS8 and subjectPublicKeyInfo vectors (#4719)Paul Kehrer2019-02-206-0/+12
| | | | | | * add ed25519 PKCS8 and subjectPublicKeyInfo vectors * line length fix
* add ed448 PKCS8 and subjectPublicKeyInfo vectors (#4718)Paul Kehrer2019-02-206-0/+14
|
* add x25519 pkcs8/subjectpublickeyinfo vectors (#4685)Paul Kehrer2019-01-136-0/+12
|
* add x448 private/public PEM/DER pkcs8/subjectpublickeyinfo vectors (#4667)Paul Kehrer2019-01-016-0/+14
|
* document what the vector format is a little better (#4639)Paul Kehrer2018-12-111-0/+1
|
* add compressed point EC vectors (#4637)Paul Kehrer2018-12-101-0/+25
|
* add ed448 test vectors (#4608)Paul Kehrer2018-11-241-0/+58
|
* x448 test vectors (#4576)Paul Kehrer2018-11-121-0/+16
|
* Fix encoding errors in RSA test keys. (#4410)David Benjamin2018-08-233-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.
* brainpool vectors from rfc 7027 (#4143)Paul Kehrer2018-03-151-0/+34
|
* oaep label vector (#3895)Paul Kehrer2017-09-071-0/+8
| | | | | | | | | | * oaep label vector * add count so we can use the nist vector loader * add RSA key from the boring vectors as well https://boringssl.googlesource.com/boringssl/+/ce3773f9fe25c3b54390bc51d72572f251c7d7e6/crypto/evp/evp_tests.txt#8
* add rfc 3526 DH groups (#3767)Paul Kehrer2017-07-081-0/+31
|
* Dh parameters serialization (#3504)Aviv Palivoda2017-06-241-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support DH parameter serizalization - no X9.42 * Support X9.42 serialization - DER not working * Fix dhp_rfc5114_2.der Changing the DER parameters serialization after the fix in openssl commit a292c9f1b835 * DH parameters X9.42 DER serialization fixed * fix _skip_dhx_unsupported * document DH parameter_bytes * PEP8 fixes * Document load_pem_parameters * Document load_der_parameters * document ParameterFormat * Increase test coverage * Increase test covrage * Remove unneeded check * Fix typo * Fix error in load_der_parameters * Add load_pem_parameters and load_der_parameters to interfaces * CR fixes * Removed unverified phrase * Update version to 2.0 * Fix pep8 * Rename ParameterFormat.ASN1 to ParameterFormat.DHParameter * link pkcs3 * Add new line at end of file to serialization.rst * Rename DHparameters to PKCS3 * doc CR fix
* add X25519 test vectors from RFC 7748 section 5.2 (#3685)Paul Kehrer2017-06-061-0/+16
|
* Remove trailing space in vector #3522 (#3523)Alex Gaynor2017-04-281-1/+1
| | | The original source of this vector does not have a space, we added it by accident
* DH subgroup order (q) (#3369)Aviv Palivoda2017-03-058-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support DH q (subgroup order) * Change RFC5114.txt to NIST format * Add tests for DH q * Update docs for DH q * Fix pep8 * Improve test covergae for DH q * Create _dh_params_dup that copy q if DHparams_dup don't On OpenSSL < 1.0.2 DHparams_dup don't copy q. _dh_params_dup call DHparams_dup and if the version is smaller than 1.0.2 copy q manually * Copy q manually on libressl * Add to test vectors serialized RFC5114 2048 bit DH parameters with 224 bit subgroup * Support serialization of DH with q * Add tests for serialization of DH with q * Support DH serialization with q only if Cryptography_HAS_EVP_PKEY_DHX is true * Raise exception when trying to serialize DH X9.42 when not supported * raise unsupported key type when deserilizing DH X9.42 if not supported * pep8 fixes * Fix test_serialization * Add dhx_serialization_supported method to DHBacked * document q in dh_parameters_supported * Rename dhx_serialization_supported to dh_x942_serialization_supported
* DH serialization (#3297)Aviv Palivoda2017-02-077-0/+29
| | | | | | | | | | | | | | | | | | * DH keys support serialization * Add DH serialization documentation * Add tests for DH keys serialization in DER encoding * update version to 1.8 * Allow only SubjectPublicKeyInfo serialization * Remove support in TraditionalOpenSSL format * Fix pep8 * Refactor dh serialization tests
* OpenSSL DH backend implementation [Second attempt] (#2914)Aviv Palivoda2016-11-262-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start of OpenSSL DH backend implementation * Supporting DH in MultiBackend * DHBackend has dh_parameters_supported method * Removed DHParametersWithNumbers and DHPrivateKeyWithNumbers from documentation * Removed ExchangeContext. exchange is a method of DHPrivateKeyWithSerialization * PEP8 fixes * Fixed TestDH.test_bad_tls_exchange * Fixed generate_private_key reference in dh documentation * test DH multibackend support * testing DH coversion to serialized * Validating that we receive serialized class in test_generate_dh * Testing DH exchange symmetric key padding * struct DH is now opaqued * PEP8 fixes * Testing load_dh_private_numbers throws ValueError when DH_check fails * Using openssl_assert * Passing keywords arguments in DH key exchange example * test_dh::test_bad_tls_exchange now uses pre calculated parameters * TestDH - Add test that the computed secret is equivalent to the definition by comparing with secret computed in pure python * Add missing generator parameter to DHBackend interface docs. * Include parameter type in DHBackend abc docs. * Add docs for dh.generate_parameters function * Remove the dh Numbers section, and move the DHNumbers class docs to where they are first used. * Add note of big endian byte packing to DH exchange method. * DH documentation updates. Add single sentence overview with wikipedia link. Add paragraph on assembling using Numbers objects. Add link to backend interface docs. First section was all indented, I think by mistake. * Add exchange method to DHPrivateKey abstract base class. * Small tweaks to DH documentation - remove Provider. * Add endian to dictionary * Use utils.int_from_bytes in test_tls_exchange_algorithm * Removed duplicate line * Change dh.rst exchange algorithm from doctest to code-block The example in the Diffie-Hellman exhange algorithm is using 2048 bits key. Generating the parameters of 2048 takes long time. This caused the automated tests to fail. In order to pass the tests we change the example to code-block so it will not run in the doc tests. * Fix dh docs * Document the generator in DHBackend relevant methods * Fix dh tests * use DHparams_dup * Fix key type to unsigned char as expected by DH_compute_key * Validate that DH generator is 2 or 5 * test dh exchange using botan vectors * group all numbers classes * Simplify _DHPrivateKey * Rename test with serialized to numbers * Move bad exchange params to external vector file * update exchange versionadded to 1.7 * Make key_size bit accurate * Change botan link * Added CHANGELOG entry
* add RSA OAEP SHA2 vectors via custom vector creation (#2829)Paul Kehrer2016-06-0224-0/+13056
| | | | | | | | | | | | | | | | | | | | | | | | * add RSA OAEP SHA2 vectors via custom vector creation * update the docs * retab * remove sha2 oaep support (it will be added again in another PR) * add header to each vector file * Add Java 8 Bouncy Castle based verification of RSA-OAEP SHA-2 test vectors (#4) * Update Java verifier to skip past test vector file header if present (#5) * Update Java verifier to skip past test vector file header if present * Fix tabs vs. space whitespace * generate sha1 oaep permutations as well + verify support in java * address review feedback
* Merge pull request #1897 from reaperhulk/add-secp256k1-generated-vectorsAlex Gaynor2015-05-081-0/+7890
|\ | | | | vectors generated by the custom vector generator in #1867
| * vectors generated by the custom vector generator in #1867Paul Kehrer2015-05-031-0/+7890
| |
* | Add NIST vectors for ECDH plus ConcatKDFSimo Sorce2015-05-062-0/+10930
| | | | | | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* | Add loader for ECDH test vectorsSimo Sorce2015-05-012-2/+2
|/ | | | | | | Also fix test vector files, they had a truncated line for the EE set in both init and resp files. Signed-off-by: Simo Sorce <simo@redhat.com>
* DH examples from https://tools.ietf.org/rfc/rfc5114.txtAlex Stapleton2015-04-211-0/+44
| | | | | | A.{4,5,6,7,8} are omitted as they are ECDH examples. These are converted to the NIST KASVS format for easier loading.
* DER conversion of PKCS1 rsa.pub.pemPaul Kehrer2015-03-021-0/+0
|
* add RSA/DSA PKCS1 public keysPaul Kehrer2015-03-022-0/+12
| | | | | | unenc-rsa-pkcs8.pub.pem is PEM PKCS1 formatted public key converted from the subjectPublicKeyInfo version dsa.pub.pem is the DSA key from the ruby OpenSSL tests
* add DER asymmetric keysPaul Kehrer2015-01-0415-0/+0
|
* 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
* Remove the EC PARAMETERS section from the PEMAlex Gaynor2014-10-081-3/+0
|
* Added missing newline, corrected changesmichael-hart2014-09-261-1/+1
|
* Part 1 of rebase, with corrections for pep8michael-hart2014-09-261-2/+2
|
* Added missing vector filemichael-hart2014-09-261-0/+4
|
* Test Vector changesmichael-hart2014-09-2311-1/+123
| | | | | | | 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.
* Changed EC curve type and add test markersMichael2014-09-123-9/+9
| | | | | | 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.
* Implemented support for loading EC private keysunknown2014-09-113-0/+23
| | | | | | 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.
* NIST KASVS values for DH and ECDHAlex Stapleton2014-07-164-0/+5624
| | | | | | | http://csrc.nist.gov/groups/STM/cavp/documents/keymgmt/kastestvectors.zip Only the "Static" scheme is added here since we are only testing the primitive DH and ECDH key agreement operation.
* remove executable bit from vector filesPaul Kehrer2014-06-1514-0/+0
|
* 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.
* Rename vectors now we have a name for this formatAlex Stapleton2014-04-037-0/+0
|
* Ed25519 test vectorsAlex Stapleton2014-04-021-0/+1024
|
* FIPS 186-3 ECDSA CAVP vectorsAlex Stapleton2014-04-026-0/+25558
|
* FIPS 186-2 ECDSA CAVP vectorsAlex Stapleton2014-04-026-0/+6254
|
* Move cryptography.vectors to cryptography_vectorsAlex Stapleton2014-03-2463-0/+62568
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.