Commit graph

5533 commits

Author SHA1 Message Date
Andy Polyakov
6c01cbb6a0 modexp512-x86_64.pl: make it work with ml64. 2011-08-19 06:30:32 +00:00
Andy Polyakov
bf3dfe7fee bn_div.c: remove duplicate code by merging BN_div and BN_div_no_branch. 2011-08-14 11:31:35 +00:00
Andy Polyakov
e7d1363d12 x86_64-mont5.pl: add missing Win64 support. 2011-08-14 09:06:06 +00:00
Andy Polyakov
f744bcfd73 eng_rdrand.c: make it link in './config 386' case. 2011-08-14 08:30:56 +00:00
Andy Polyakov
10bd69bf4f armv4-mont.pl: profiler-assisted optimization gives 8%-14% improvement
(more for longer keys) on RSA/DSA.
2011-08-13 12:38:41 +00:00
Andy Polyakov
ae8b47f07f SPARC assembler pack: fix FIPS linking errors. 2011-08-12 21:38:19 +00:00
Andy Polyakov
272ba87017 x86_64-xlate.pl: fix movzw. 2011-08-12 21:24:19 +00:00
Andy Polyakov
361512da0d This commit completes recent modular exponentiation optimizations on
x86_64 platform. It targets specifically RSA1024 sign (using ideas
from http://eprint.iacr.org/2011/239) and adds more than 10% on most
platforms. Overall performance improvement relative to 1.0.0 is ~40%
in average, with best result of 54% on Westmere. Incidentally ~40%
is average improvement even for longer key lengths.
2011-08-12 16:44:32 +00:00
Andy Polyakov
20735f4c81 alphacpuid.pl: fix alignment bug.
alpha-mont.pl: fix typo.
PR: 2577
2011-08-12 12:28:52 +00:00
Dr. Stephen Henson
ab1ec69843 aesni TLS GCM support 2011-08-11 23:06:19 +00:00
Dr. Stephen Henson
19ad345739 prevent compilation errors and warnings 2011-08-11 21:12:17 +00:00
Andy Polyakov
37f010e248 Add provisory support for RDRAND instruction. 2011-08-10 18:52:42 +00:00
Andy Polyakov
85ec54a417 x86_64-mont.pl: futher optimization resulting in up to 48% improvement
(4096-bit RSA sign benchmark on Core2) in comparison to initial version
from 2005.
2011-08-09 13:05:05 +00:00
Andy Polyakov
267b481c47 aes/asm/aesni-*.pl: fix CCM and further optimize it.
modes/ccm128.c: minor branch optimization.
2011-08-07 17:47:56 +00:00
Dr. Stephen Henson
8a8cc84f74 fix memory leak 2011-08-03 16:39:58 +00:00
Dr. Stephen Henson
28dd49faec Expand range of ctrls for AES GCM to support retrieval and setting of
invocation field.

Add complete support for AES GCM ciphersuites including all those in
RFC5288 and RFC5289.
2011-08-03 15:37:22 +00:00
Dr. Stephen Henson
3699ec6056 recognise ecdsaWithSHA1 OID 2011-07-28 14:40:01 +00:00
Andy Polyakov
2667162d33 cryptlib.c: OPENSSL_ia32cap environment variable to interpret ~ as cpuid mask. 2011-07-23 12:10:26 +00:00
Dr. Stephen Henson
1d5121552d Make sure OPENSSL_FIPSCANISTER is visible to ARM assembly language files. 2011-07-22 14:20:50 +00:00
Dr. Stephen Henson
4f275f248e stop warnings 2011-07-21 13:45:06 +00:00
Andy Polyakov
7b41f350d4 aes-ppc.pl: minor optimization favoring embedded processors (performance
of "big" processors is unaffected).
2011-07-20 22:16:27 +00:00
Andy Polyakov
be9a8cc2af Add RSAX builtin engine. It optimizes RSA1024 sign benchmark. 2011-07-20 21:49:46 +00:00
Dr. Stephen Henson
dafce90ae5 PR: 2559
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve

Fix DTLS socket error bug
2011-07-20 15:22:11 +00:00
Andy Polyakov
9df286b13a sha512-sparcv9.pl: minor optimization of sha256. 2011-07-18 11:34:07 +00:00
Andy Polyakov
87873f4328 ARM assembler pack: add platform run-time detection. 2011-07-17 17:40:29 +00:00
Dr. Stephen Henson
9fe51d5f73 PR: 2556 (partial)
Reported by: Daniel Marschall <daniel-marschall@viathinksoft.de>
Reviewed by: steve

Fix OID routines.

Check on encoding leading zero rejection should start at beginning of
encoding.

Allow for initial digit when testing when to use BIGNUMs which can increase
first value by 2 * 40.
2011-07-14 12:01:53 +00:00
Andy Polyakov
4195a369fd perlasm/cbc.pl: fix tail processing bug.
PR: 2557
2011-07-13 06:20:30 +00:00
Andy Polyakov
a355cf9bf5 evp.h: add flag to distinguish AEAD ciphers and pair of control codes... 2011-07-11 13:54:53 +00:00
Andy Polyakov
6179f06077 x86_64-mont.pl: add squaring procedure and improve RSA sign performance
by up to 38% (4096-bit benchmark on Core2).
2011-07-05 09:21:03 +00:00
Andy Polyakov
6fa4c7c43b x86_64-xlate.pl: sha1 and md5 warnings made it to nasm 2.09, extend gnu
assembler workaround to all assemblers.
2011-07-04 13:10:50 +00:00
Andy Polyakov
169a274a41 sha1-x86_64.pl: nasm 2.07 screws up labels if AVX path is compiled. 2011-07-04 13:00:24 +00:00
Andy Polyakov
02a73e2bed s390x-gf2m.pl: commentary update (final performance numbers turned to be
higher).
2011-07-04 11:20:33 +00:00
Andy Polyakov
da5e9871e9 sha1-x86_64.pl: fix win64-specific typos and add masm support. 2011-07-01 21:23:13 +00:00
Andy Polyakov
94c64f9a1c x86_64-xlate.pl: masm-specific update. 2011-07-01 21:21:14 +00:00
Andy Polyakov
be6ddecb8b crypto/aes/Makefile: make it work on IRIX. 2011-06-28 12:55:39 +00:00
Andy Polyakov
450853cd04 crypto/whrlpool/wp_block.c: harmonize OPENSSL_ia32cap_P. 2011-06-28 12:42:10 +00:00
Andy Polyakov
5a0876cb8c crypto/sha/asm/sha[1|512]-mips.pl: minor updates. 2011-06-28 12:41:19 +00:00
Andy Polyakov
a908b711ac rc4-586.pl: add Atom performance results. 2011-06-28 12:36:10 +00:00
Andy Polyakov
2036c9a59a md5-x86_86.pl: remove redundant instructions. 2011-06-28 12:33:58 +00:00
Andy Polyakov
b247f7387f crypto/bn/Makefile: fix typo. 2011-06-28 08:52:36 +00:00
Andy Polyakov
0c237e42a4 s390x assembler pack: add s390x-gf2m.pl and harmonize AES_xts_[en|de]crypt. 2011-06-27 10:00:31 +00:00
Andy Polyakov
0772f3b4f6 rc4-x86_64.pl: commentary update. 2011-06-27 09:46:16 +00:00
Andy Polyakov
0a9a692e4e Minor x86_64 perlasm update. 2011-06-27 09:45:10 +00:00
Richard Levitte
021270af37 Add a symbol for the first parameter to OPENSSL_showfatal(). 2011-06-23 09:46:27 +00:00
Richard Levitte
ab688c234d Add symbols for the parameters on a couple more functions. 2011-06-23 09:43:54 +00:00
Dr. Stephen Henson
9a4be82388 PR: 2470
Submitted by: Corinna Vinschen <vinschen@redhat.com>
Reviewed by: steve

Don't call ERR_remove_state from DllMain.
2011-06-22 15:38:21 +00:00
Dr. Stephen Henson
8038e7e44c PR: 2540
Submitted by: emmanuel.azencot@bull.net
Reviewed by: steve

Prevent infinite loop in BN_GF2m_mod_inv().
2011-06-22 15:24:05 +00:00
Dr. Stephen Henson
b507284c7e correctly encode OIDs near 2^32 2011-06-22 15:15:58 +00:00
Dr. Stephen Henson
ce02589259 Now the FIPS capable OpenSSL is available simplify the various FIPS test
build options.

All fispcanisterbuild builds only build fipscanister.o and include symbol
renaming.

Move all renamed symbols to fipssyms.h

Update README.FIPS
2011-06-22 12:30:18 +00:00
Dr. Stephen Henson
a52b7b44b2 allow MD5 use for computing old format hash links 2011-06-22 02:18:19 +00:00
Dr. Stephen Henson
ff053fc847 Don't set FIPS rand method at same time as RAND method as this can cause the
FIPS library to fail. Applications that want to set the FIPS rand method can do
so explicitly and presumably they know what they are doing...
2011-06-21 17:10:21 +00:00
Dr. Stephen Henson
af17d99245 make EVP_dss() work for DSA signing 2011-06-20 20:05:51 +00:00
Dr. Stephen Henson
9ebc37e667 add null cipher to FIPS module 2011-06-20 19:48:44 +00:00
Dr. Stephen Henson
9945b460e2 Give parameters names in prototypes. 2011-06-17 16:47:41 +00:00
Dr. Stephen Henson
bd6386f59c make sure custom cipher flag doesn't use any mode bits 2011-06-13 23:06:43 +00:00
Dr. Stephen Henson
f41154b206 #undef bn_div_words as it is defined for FIPS builds. 2011-06-10 14:03:27 +00:00
Dr. Stephen Henson
3096d53b46 Update dependencies for m_dss.c too. 2011-06-10 14:00:02 +00:00
Dr. Stephen Henson
068291cd44 Remove x509.h from SHA1 clone digests, update dependencies. 2011-06-10 13:52:44 +00:00
Dr. Stephen Henson
4960411e1f Add flags for DH FIPS method.
Update/fix prototypes in fips.h
2011-06-08 15:53:08 +00:00
Dr. Stephen Henson
6b6abd627c Set flags in ECDH and ECDSA methods for FIPS. 2011-06-08 13:52:36 +00:00
Andy Polyakov
7eabad423c rc4_skey.c: remove dead/redundant code (it's never compiled) and
misleading/obsolete comment.
2011-06-06 20:02:26 +00:00
Dr. Stephen Henson
644ce07ecd Move function prototype to fips.h 2011-06-06 11:56:58 +00:00
Andy Polyakov
17f121de9d e_aes.c: move AES-NI run-time switch and implement the switch for remaining modes. 2011-06-06 11:40:03 +00:00
Andy Polyakov
4d01f2761d x86_64cpuid.pl: fix typo. 2011-06-04 13:08:25 +00:00
Andy Polyakov
301799b803 x86[_64]cpuid.pl: add function accessing rdrand instruction. 2011-06-04 12:20:45 +00:00
Dr. Stephen Henson
b8b90804b6 license correction, no EAY code included in this file 2011-06-03 17:56:17 +00:00
Dr. Stephen Henson
2280dc7c43 Remove FIPS RSA functions from crypto/rsa. 2011-06-02 17:52:39 +00:00
Dr. Stephen Henson
bce1af7762 Add DSA and ECDSA "clone digests" to module for compatibility with old
applications.
2011-06-01 14:07:32 +00:00
Andy Polyakov
62b6c5c404 e_aes.c: fix typo. 2011-05-30 10:13:42 +00:00
Andy Polyakov
e76cbcf686 e_aes.c: fix aes_cfb1_cipher. 2011-05-30 10:10:05 +00:00
Andy Polyakov
d1fff483d6 e_aes.c: integrate AESNI directly into EVP. 2011-05-30 09:16:01 +00:00
Andy Polyakov
8da721ee2b aesni-x86[_64].pl: relax alignment requirement. 2011-05-30 09:15:16 +00:00
Andy Polyakov
fe9a5107be Various mingw64 fixes. 2011-05-29 13:51:14 +00:00
Andy Polyakov
afa4b38671 sha1-586|x86_64.pl: minor portability fix. 2011-05-29 13:48:57 +00:00
Andy Polyakov
18f5603c53 x86cpuid.pl: last commit broke platforms with perl with 64-bit integer. 2011-05-29 12:50:02 +00:00
Andy Polyakov
0c149802a2 sha1-586|x86_64.pl: add SSSE3 and AVX code paths. 2011-05-29 12:39:48 +00:00
Andy Polyakov
cf3aeae419 aes-ppc.pl: handle unaligned data on page boundaries. 2011-05-28 09:41:36 +00:00
Andy Polyakov
f44cb15fab rc4-x86_64.pl: fix due credit. 2011-05-27 18:58:37 +00:00
Andy Polyakov
986289604e rc4-x86_64.pl: RC4_options fix-up. 2011-05-27 16:15:12 +00:00
Andy Polyakov
4bb90087d7 x86[_64]cpuid.pl: harmonize usage of reserved bits #20 and #30. 2011-05-27 15:32:43 +00:00
Andy Polyakov
6715034002 PPC assembler pack: adhere closer to ABI specs, add PowerOpen traceback data. 2011-05-27 13:32:34 +00:00
Andy Polyakov
0ca9a483af rc4-x86_64.pl: major optimization for contemporary Intel CPUs. 2011-05-27 09:51:09 +00:00
Andy Polyakov
0dff8ba248 rc4-586.pl: optimize even further... 2011-05-27 09:46:19 +00:00
Andy Polyakov
2bc3ad28b3 x86_64cpuid.pl: get AVX masking right. 2011-05-26 13:16:26 +00:00
Dr. Stephen Henson
a26e245ecd Fix the ECDSA timing attack mentioned in the paper at:
http://eprint.iacr.org/2011/232.pdf

Thanks to the original authors Billy Bob Brumley and Nicola Tuveri for
bringing this to our attention.
2011-05-25 14:52:21 +00:00
Dr. Stephen Henson
992bdde62d Fix the ECDSA timing attack mentioned in the paper at:
http://eprint.iacr.org/2011/232.pdf

Thanks to the original authors Billy Bob Brumley and Nicola Tuveri for
bringing this to our attention.
2011-05-25 14:41:56 +00:00
Dr. Stephen Henson
44ddb27fa6 PR: 2512
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve

Fix BIO_accept so it can be bound to IPv4 or IPv6 sockets consistently.
2011-05-25 12:37:07 +00:00
Andy Polyakov
6a99984b57 rc4-586.pl: optimize unused code path. 2011-05-25 09:36:13 +00:00
Andy Polyakov
760d2551fb rc4-586.pl: 50% improvement on Core2 and 80% on Westmere. 2011-05-24 13:07:29 +00:00
Andy Polyakov
62f29eb1cf spacrv9cap.c: addenum to recent EC optimizations. 2011-05-23 08:14:32 +00:00
Andy Polyakov
f8501464cc aesni-x86[_64].pl: optimize for Sandy Bridge and add XTS mode. 2011-05-22 18:38:00 +00:00
Andy Polyakov
96abea332c x86_64-gf2m.pl: add Win64 SEH. 2011-05-22 18:29:11 +00:00
Andy Polyakov
2e75ed332f ppccap.c: addenum to recent EC optimizations. 2011-05-21 10:17:02 +00:00
Andy Polyakov
d8ea368c41 ec_cvt.c: ARM comparison results were wrong, clarify the background. 2011-05-21 08:40:18 +00:00
Andy Polyakov
fdf6dac859 ec_cvt.c: avoid EC_GFp_nist_method on platforms with bn_mul_mont [see
commentary for details].
2011-05-20 20:31:37 +00:00
Dr. Stephen Henson
086e32a6c7 Implement FIPS_mode and FIPS_mode_set 2011-05-19 18:09:02 +00:00
Dr. Stephen Henson
92b4d936cb inherit HMAC flags from MD_CTX 2011-05-19 17:38:25 +00:00
Andy Polyakov
fb2f3411ea aesni-x86_64.pl: make it compile on MacOS X. 2011-05-18 17:05:24 +00:00
Andy Polyakov
c30a2505e2 x86gas.pl: don't omit .comm OPENSSL_ia32cap_P on MacOS X. 2011-05-18 16:28:53 +00:00
Andy Polyakov
c7b903e01d x86_64-xlate.pl: add inter-register movq and make x86_64-gfm.s compile on
Solaris, MacOS X, elderly gas...
2011-05-18 16:26:03 +00:00
Andy Polyakov
ddc20d4da9 x86_64cpuid.pl: allow shared build to work without -Bsymbolic.
PR: 2466
2011-05-18 16:24:19 +00:00
Andy Polyakov
b906422149 x86[_64]cpuid.pl: handle new extensions. 2011-05-16 20:35:11 +00:00
Andy Polyakov
a3e07010b4 ppc-xlate.pl: get linux64 declaration right. 2011-05-16 19:52:41 +00:00
Andy Polyakov
2b9a8ca15b x86gas.pl: add palignr and move pclmulqdq. 2011-05-16 18:07:00 +00:00
Andy Polyakov
afebe623c5 x86_64 assembler pack: add x86_64-gf2m module. 2011-05-16 17:46:45 +00:00
Andy Polyakov
b5c6aab57e x86_64-xlate.pl: allow "base-less" effective address, add palignr, move
pclmulqdq.
2011-05-16 17:44:38 +00:00
Dr. Stephen Henson
b9b0a177f8 new flag to stop ENGINE methods being registered 2011-05-15 15:56:49 +00:00
Dr. Stephen Henson
f76b1baf86 Fix error discrepancy. 2011-05-12 14:28:09 +00:00
Andy Polyakov
b0188c4f07 bn_nist.c: fix shadowing warnings. 2011-05-11 20:19:00 +00:00
Dr. Stephen Henson
c2fd598994 Rename FIPS_mode_set and FIPS_mode. Theses symbols will be defined in
the FIPS capable OpenSSL.
2011-05-11 14:43:38 +00:00
Dr. Stephen Henson
0b59755f43 Call fipsas.pl directly for pa-risc targets. 2011-05-09 15:23:00 +00:00
Andy Polyakov
1fb97e1313 Optimized bn_nist.c. Performance improvement varies from one benchmark
and platform to another. It was measured to deliver 20-30% better
performance on x86 platforms and 30-40% on x86_64, on nistp384 benchmark.
2011-05-09 10:16:32 +00:00
Dr. Stephen Henson
fc683d7213 allow SHA384, SHA512 wit DSA 2011-05-08 12:38:35 +00:00
Andy Polyakov
56c5f703c1 IA-64 assembler pack: fix typos and make it work on HP-UX. 2011-05-07 20:36:05 +00:00
Andy Polyakov
58cc21fdea x86 assembler pack: add bn_GF2m_mul_2x2 implementations (see x86-gf2m.pl for
details and performance data).
2011-05-07 10:31:06 +00:00
Dr. Stephen Henson
ad4784953d Return error codes for selftest failure instead of hard assertion errors. 2011-05-06 17:38:39 +00:00
Andy Polyakov
925596f85b ARM assembler pack: engage newly introduced armv4-gf2m module. 2011-05-05 21:57:11 +00:00
Dr. Stephen Henson
8d3cdd5b58 Fix warning of signed/unsigned comparison. 2011-05-05 14:47:38 +00:00
Andy Polyakov
75359644d0 ARM assembler pack. Add bn_GF2m_mul_2x2 implementation (see source code
for details and performance data).
2011-05-05 07:21:17 +00:00
Andy Polyakov
c7d0d0ae09 xts128.c: minor optimizaton. 2011-05-04 20:57:43 +00:00
Andy Polyakov
034688ec4d bn_gf2m.c: optimized BN_GF2m_mod_inv delivers sometimes 2x of ECDSA sign.
Exact improvement coefficients vary from one benchmark and platform to
another, e.g. it performs 70%-33% better on ARM, hereafter less for
longer keys, and 100%-90% better on x86_64.
2011-05-04 15:22:53 +00:00
Dr. Stephen Henson
a95bbadb57 Include fipssyms.h for ARM builds to translate symbols.
Translate arm symbol to fips_*.
2011-05-04 14:16:03 +00:00
Dr. Stephen Henson
e9093c9832 PR: 2499
Submitted by: "James 'J.C.' Jones" <james.jc.jones@gmail.com>

Typos.
2011-05-02 23:29:57 +00:00
Dr. Stephen Henson
9f7b2c76b1 Include crypto.h in ppccap.c 2011-05-01 16:54:24 +00:00
Dr. Stephen Henson
9a85e53813 no need to include memory.h 2011-04-30 23:37:42 +00:00
Dr. Stephen Henson
7c50694f05 Fix warning. 2011-04-24 12:40:26 +00:00
Andy Polyakov
3f0d14055b gcm128.c: minor optimization. 2011-04-24 11:10:54 +00:00
Andy Polyakov
f855b9d719 ccm128.c: add CRYPTO_ccm128_[en|de]crypt_ccm64 and minor optimization. 2011-04-24 11:10:14 +00:00
Richard Levitte
ce67647605 fips_check_dsa_prng() should only be built when OPENSSL_FIPS is defined. 2011-04-24 10:07:17 +00:00
Richard Levitte
171edf7ff4 Error discrepancy corrected. 2011-04-24 08:59:15 +00:00
Dr. Stephen Henson
69a80f7d5e More fixes for DSA FIPS overrides. 2011-04-23 21:59:12 +00:00
Dr. Stephen Henson
dc03504d09 Make sure overrides work for RSA/DSA. 2011-04-23 21:15:05 +00:00
Dr. Stephen Henson
383bc117bb Oops, work out expanded buffer length before allocating it... 2011-04-23 20:24:55 +00:00
Dr. Stephen Henson
e0d1a2f80a Always return multiple of block length bytes from default DRBG seed
callback.

Handle case where no multiple of the block size is in the interval
[min_len, max_len].
2011-04-23 20:05:19 +00:00
Dr. Stephen Henson
cac4fb58e0 Add PRNG security strength checking. 2011-04-23 19:55:55 +00:00
Andy Polyakov
9e5fe439b4 xts128.c: fix bug introduced in commit#20704. Bug affected encryption of
vectors whose lenght was not multiples of 16 bytes.
2011-04-23 09:15:03 +00:00
Dr. Stephen Henson
74fac927b0 Return errors instead of aborting when selftest fails. 2011-04-22 11:12:56 +00:00
Dr. Stephen Henson
84ed90f88b Fix WIN32 warning. 2011-04-21 14:54:33 +00:00
Dr. Stephen Henson
b8b6a13a56 Add continuous RNG test to entropy source. Entropy callbacks now need
to specify a "block length".
2011-04-21 14:17:15 +00:00
Dr. Stephen Henson
14264b19de Add periodic DRBG health checks as required by SP800-90. 2011-04-20 17:06:38 +00:00
Andy Polyakov
daaf5088fd xts128.c: minor optimization and clarified prototype. 2011-04-20 08:13:58 +00:00
Andy Polyakov
e382e4e603 perlasm/x86gas.pl: make OPENSSL_instrument_bus[2] compile. 2011-04-19 19:09:18 +00:00
Dr. Stephen Henson
cb1b3aa151 Add AES CCM selftest. 2011-04-19 18:57:58 +00:00
Dr. Stephen Henson
8c7096835b Use 0 for tbslen to perform strlen. 2011-04-19 11:10:54 +00:00
Dr. Stephen Henson
b5dd178740 Fix EVP CCM decrypt. Add decrypt support to algorithm test program. 2011-04-18 22:48:40 +00:00
Dr. Stephen Henson
98279c1629 Typo. 2011-04-18 21:01:24 +00:00
Andy Polyakov
a0cc46f8e4 ccm128.c: fix Win32 compiler warning. 2011-04-18 20:19:23 +00:00
Andy Polyakov
70d01a7f82 perlasm/x86[nm]asm.pl: make OPENSSL_instrument_bus[2] compile. 2011-04-18 20:18:03 +00:00
Andy Polyakov
5f1b10ed2e ccm128.c: fix STRICT_ALIGNMENT another bug in CRYPTO_ccm128_decrypt. 2011-04-18 19:17:28 +00:00
Dr. Stephen Henson
62dc7ed67c Override flag for XTS length limit. 2011-04-18 17:31:28 +00:00