summaryrefslogtreecommitdiffstats
path: root/test/evptests.txt
AgeCommit message (Collapse)Author
2017-03-17Fixed PKCS5_PBKDF2_HMAC() to adhere to the documentation.Péter Budai
The documentation of this function states that the password parameter can be NULL. However, the implementation returns an error in this case due to the inner workings of the HMAC_Init_ex() function. With this change, NULL password will be treated as an empty string and PKCS5_PBKDF2_HMAC() no longer fails on this input. I have also added two new test cases that tests the handling of the special values NULL and -1 of the password and passlen parameters, respectively. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1692)
2017-03-15Add additional RSA-PSS and RSA-OAEP tests.Dr. Stephen Henson
Import test data from: ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip This is a set of RSA-PSS and RSA-OAEP test vectors including some edge cases with unusual key sizes. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2944)
2017-02-28Revert rc4test removal, it performs additional tests not in evptests.txtDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2789)
2017-02-28Remove more redundant tests: md4, md5, rmd, rc4, p5_crpt2Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2784)
2017-02-28Remove wp_test.c: exactly the same tests are in evptests.txtDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2783)
2017-02-21Implementation of the ARIA cipher as described in RFC 5794.Pauli
This implementation is written in endian agnostic C code. No attempt at providing machine specific assembly code has been made. This implementation expands the evptests by including the test cases from RFC 5794 and ARIA official site rather than providing an individual test case. Support for ARIA has been integrated into the command line applications, but not TLS. Implemented modes are CBC, CFB1, CFB8, CFB128, CTR, ECB and OFB128. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2337)
2017-02-01Add support for parameterized SipHashTodd Short
The core SipHash supports either 8 or 16-byte output and a configurable number of rounds. The default behavior, as added to EVP, is to use 16-byte output and 2,4 rounds, which matches the behavior of most implementations. There is an EVP_PKEY_CTRL that can control the output size. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2216)
2017-01-24Add support for Poly1305 in EVP_PKEYTodd Short
Add Poly1305 as a "signed" digest. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2128)
2017-01-18Defines and strings for special salt length values, add testsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2236)
2017-01-18additional PSS tests for -1 and invalid salt lengthDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2236)
2017-01-08add test for invalid key parametersDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-08add PSS key testsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2177)
2017-01-01Add RSA decrypt and OAEP tests.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-01-01evptests.txt is not a shell scriptDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-14Add function and reason checking to evp_testDr. Stephen Henson
Add options to check the function and reason code matches expected values. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-12x86_64 assembly pack: add AVX512 ChaCha20 and Poly1305 code paths.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-10Additional error tests in evp_test.cDr. Stephen Henson
Support checking for errors during test initialisation and parsing. Add errors and tests for key operation initalisation and ctrl errors. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-09Add RSA PSS testsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2065)
2016-11-25test/evptests.txt: add regression test for false carry in ctr128.c.Andy Polyakov
GH issue #1916 affects only big-endian platforms. TLS is not affected, because TLS fragment is never big enough. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-11-10test/evptests.txt: add negative tests for AEAD ciphers.Andy Polyakov
This is done by taking one vector, "corrupting" last bit of the tag value and verifying that decrypt fails. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-11-09Following the changes to HKDF to accept a mode, add some tests for thisMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-07Improve RSA test coverage.David Benjamin
MD5/SHA1 and MDC-2 have special-case logic beyond the generic DigestInfo wrapping. Test that each of these works, including hash and length mismatches (both input and signature). Also add VerifyRecover tests. It appears 5824cc298174d462c827cd090675e30fc03f0caf added support for VerifyRecover, but forgot to add the test data. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1474
2016-11-07Implement RSASSA-PKCS1-v1_5 as specified.David Benjamin
RFC 3447, section 8.2.2, steps 3 and 4 states that verifiers must encode the DigestInfo struct and then compare the result against the public key operation result. This implies that one and only one encoding is legal. OpenSSL instead parses with crypto/asn1, then checks that the encoding round-trips, and allows some variations for the parameter. Sufficient laxness in this area can allow signature forgeries, as described in https://www.imperialviolet.org/2014/09/26/pkcs1.html Although there aren't known attacks against OpenSSL's current scheme, this change makes OpenSSL implement the algorithm as specified. This avoids the uncertainty and, more importantly, helps grow a healthy ecosystem. Laxness beyond the spec, particularly in implementations which enjoy wide use, risks harm to the ecosystem for all. A signature producer which only tests against OpenSSL may not notice bugs and accidentally become widely deployed. Thus implementations have a responsibility to honor the specification as tightly as is practical. In some cases, the damage is permanent and the spec deviation and security risk becomes a tax all implementors must forever pay, but not here. Both BoringSSL and Go successfully implemented and deployed RSASSA-PKCS1-v1_5 as specified since their respective beginnings, so this change should be compatible enough to pin down in future OpenSSL releases. See also https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00 As a bonus, by not having to deal with sign/verify differences, this version is also somewhat clearer. It also more consistently enforces digest lengths in the verify_recover codepath. The NID_md5_sha1 codepath wasn't quite doing this right. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1474
2016-08-13Update X25519 key format in evptests.txtDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-23RT2867: des_ede3_cfb1 ignored "size in bits" flagRich Salz
Code and tests by Steve. Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14modes/asm/ghashp8-ppc.pl: improve performance by 2.7x.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14test/evptests.txt: add more XTS tests.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-01Add final(?) set of copyrights.Rich Salz
Add copyright to missing assembler files. Add copyrights to missing test/* files. Add copyrights Various source and misc files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-31crypto/blake2: make lowest-level function handle multiple blocks..Andy Polyakov
This minimizes inter-block overhead. Performance gain naturally varies from case to case, up to 10% was spotted so far. There is one thing to recognize, given same circumstances gain would be higher faster computational part is. Or in other words biggest improvement coefficient would have been observed with assembly. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Review commentsKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Add blake2 support.Bill Cox
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-03GH355: Implement HKDFAlessandro Ghedini
This patch implements the HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869. It is required to implement the QUIC and TLS 1.3 protocols (among others). Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-03-02Convert PRF tests to use CtrlDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-28Add X25519 test vectors from RFC7748 6.1Dr. Stephen Henson
Check sign/verify blocked with X25519 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-10x86[_64] assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-01Use PKCS#8 format EC key so test is skipped with no-ecDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-30Add test data for ECDHDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-19add TLS1-PRF testsDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-10x86[_64] assembly pack: add optimized AES-NI OCB subroutines.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-10evp/c_allc.c: wire ChaCha20-Poly1305 and add tests.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-17base64 decode: check for high bitEmilia Kasper
Previously, the conversion would silently coerce to ASCII. Now, we error out. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-17RT3757: base64 encoding bugsEmilia Kasper
Rewrite EVP_DecodeUpdate. In particular: reject extra trailing padding, and padding in the middle of the content. Don't limit line length. Add tests. Previously, the behaviour was ill-defined, and depended on the position of the padding within the input. In addition, this appears to fix a possible two-byte oob read. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2015-08-24More test cases.Dr. Stephen Henson
Add DSA tests. Add tests to verify signatures against public keys. This will also check that a public key is read in correctly. Reviewed-by: Ben Laurie <ben@openssl.org>
2015-05-26Add PBE tests.Dr. Stephen Henson
Add support for PKCS#12 and PBKDF2 password based encryption tests. Add additional test data. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-21correctionDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-20Add scrypt tests.Dr. Stephen Henson
Add scrypt test support to evp_test and add test values from from draft-josefsson-scrypt-kdf-03. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-31Stop symlinking, move files to intended directoryRichard Levitte
Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>