summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2017-01-08RSA-PSS key printing.Dr. Stephen Henson
Print out RSA-PSS key parameters if present. 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-08PSS parameter encode and decode.Dr. Stephen Henson
For RSA PSS keys encode and decode parameters when handling public and private keys. 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-08Split PSS parameter creation.Dr. Stephen Henson
Split PSS parameter creation. This adds a new function rsa_pss_params_create which creates PSS parameters from digest and salt values. This will be used for PSS key generation. 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-08Use method key type instead of EVP_PKEY_RSADr. Stephen Henson
Make RSA method more flexible by using the key type from the method instead of hard coding EVP_PKEY_RSA: by doing this the same code supports both RSA and RSA-PSS. 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-08PSS ASN.1 methodDr. 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 EVP_PKEY_RSA_PSSDr. 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 field to RSA structure and free it.Dr. 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-08Cache maskHash parameterDr. Stephen Henson
Store hash algorithm used for MGF1 masks in PSS and OAEP modes in PSS and OAEP parameter structure: this avoids the need to decode part of the ASN.1 structure every time it is used. 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-06Make rand_add predictable when fuzzingKurt Roeckx
Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #2182
2016-12-25chacha/asm/chacha-x86_64.pl: add AVX512 path optimized for shorter inputs.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-22Fix EVP_MD_meth_get_flagsTodd Short
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2134)
2016-12-20Reformat M_check_autoarg to match our coding styleRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2121)
2016-12-20M_check_autoarg: sanity check the keyRichard Levitte
For now, checking that the size is non-zero will suffice. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2120)
2016-12-19Add bwrite_conv and bread_conv values to methods_dgramp_sctpRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2116)
2016-12-19x86 assembly pack: update performance results.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-16HP-UX doesn't have hstrerror(), so make our own for that platformRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2092) (cherry picked from commit 46766d003666da5f90346da7e6d09e109355f5c6)
2016-12-15Don't call memcpy with NULL as sourceKurt Roeckx
Calling it with lenght 0 and NULL as source is undefined behaviour. Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #2089
2016-12-15poly1305/asm/poly1305-x86_64.pl: allow nasm to assemble AVX512 code.Andy Polyakov
chacha/asm/chacha-x86_64.pl: refine nasm version detection logic. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-15perlasm/x86_64-xlate.pl: add support for AVX512 OPMASK-ing.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-14CRL critical extension bugfixRich Salz
More importantly, port CRL test from boringSSL crypto/x509/x509_test.cc Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1775)
2016-12-13Add X509_VERIFY_PARAM inheritance flag set/getRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2079)
2016-12-12updated macro spacing for styling purposesPaul Hovey
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> CLA: trivial
2016-12-12fix undoes errors introduced by ↵Paul Hovey
https://github.com/openssl/openssl/commit/fc6076ca272f74eb1364c29e6974ad5da5ef9777?diff=split#diff-1014acebaa2c13d44ca196b9a433ef2eR184 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> CLA: trivial
2016-12-12perlasm/x86_64-xlate.pl: refine sign extension in ea package.Andy Polyakov
$1<<32>>32 worked fine with either 32- or 64-bit perl for a good while, relying on quirk that [pure] 32-bit perl performed it as $1<<0>>0. But this apparently changed in some version past minimally required 5.10, and operation result became 0. Yet, it went unnoticed for another while, because most perl package providers configure their packages with -Duse64bitint option. Reviewed-by: Rich Salz <rsalz@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-12poly1305/poly1305_base2_44.c: add reference base 2^44 implementation.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-10Avoid the call to OPENSSL_malloc with a negative value (then casted to unsigned)Davide Galassi
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2021)
2016-12-10VMS UI_OpenSSL: generate OpenSSL errors when things go wrong.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2063)
2016-12-10VMS UI_OpenSSL: if the TT device isn't a tty, flag instead of errorRichard Levitte
On all platforms, if the controlling tty isn't an actual tty, this is flagged by setting is_a_tty to zero... except on VMS, where this was treated as an error. Change this to behave like the other platforms. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2063)
2016-12-09Check input length to pkey_rsa_verify()Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2065)
2016-12-08Remove extra bangRichard Levitte
A bang (!) slipped through in the recent UI cleanup Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2051)
2016-12-08UI code style cleanupRichard Levitte
Mostly condition check changes. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2047)
2016-12-08Make the predictable numbers start from 1Kurt Roeckx
There is code that retries calling RAND_bytes() until it gets something other than 0, which just hangs if we always return 0. Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #2041
2016-12-08UI_OpenSSL()'s session opener fails on MacOS XRichard Levitte
If on a non-tty stdin, TTY_get() will fail with errno == ENODEV. We didn't catch that. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2039)
2016-12-08In UI_OpenSSL's open(), generate an error on unknown errnoRichard Levitte
TTY_get() sometimes surprises us with new errno values to determine if we have a controling terminal or not. This generated error is a helpful tool to figure out that this was what happened and what the unknown value is. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2043)
2016-12-08UI_process() didn't generate errorsRichard Levitte
Since there are many parts of UI_process() that can go wrong, it isn't very helpful to only return -1 with no further explanation. With this change, the error message will at least show which part went wrong. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2037)
2016-12-02Restore last-resort expired untrusted intermediate issuersViktor Dukhovni
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-12-03Make the random number generator predictable when fuzzing.Kurt Roeckx
Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #2023
2016-12-02Fix a typo in bio_read_internMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-11-25Fix ctrl operation for SHA1/MD5SHA1.Dr. Stephen Henson
This makes S/MIME and CMS signing in MIME format for SHA1 work again. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-25modes/ctr128.c: fix false carry in counter increment procedure.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-25bn/asm/ppc-mont.pl: signal no-op in 32-bit bit build.Andy Polyakov
The bug was introduced in 80d27cdb84985c697f8fabb7649abf1f54714d13, one too many instructions was removed. It went unnoticed, because new subroutine introduced in previous commit is called in real-life RSA/DSA/DH cases, while original code is called only in rare tests. The bug was caught in test_fuzz. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-17Fix name of "locked" variableKurt Roeckx
It's called with 0 when it's already locked, with 1 when it's not. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1500
2016-11-17Add support for reference counting using C11 atomicsKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1500
2016-11-17sha/asm/sha512-armv8.pl: fix big-endian support in __KERNEL__ case.Andy Polyakov
In non-__KERNEL__ context 32-bit-style __ARMEB__/__ARMEL__ macros were set in arm_arch.h, which is shared between 32- and 64-bit builds. Since it's not included in __KERNEL__ case, we have to adhere to official 64-bit pre-defines, __AARCH64EB__/__AARCH64EL__. [If we are to share more code, it would need similar adjustment.] Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-17Fix MSBLOB format with RSA.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-16Raise an error on memory alloc failure.FdaSilvaYY
Both strdup or malloc failure should raise à err. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1905)
2016-11-16Missing free item on push failureFdaSilvaYY
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1905)
2016-11-16Move SCT_LIST_free definition into a more logical placeRob Percival
This reflects its position in include/openssl/ct.h. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1548)
2016-11-16Pass a temporary pointer to o2i_SCT_signature from SCT_new_from_base64Rob Percival
Otherwise, |dec| gets moved past the end of the signature by o2i_SCT_signature and then can't be correctly freed afterwards. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1548)