Geoff Thorpe
3cc546a3bb
bignum: fix boundary condition in montgomery logic
...
It's not clear whether this inconsistency could lead to an actual
computation error, but it involved a BIGNUM being passed around the
montgomery logic in an inconsistent state. This was found using flags
-DBN_DEBUG -DBN_DEBUG_RAND, and working backwards from this assertion
in 'ectest';
ectest: bn_mul.c:960: BN_mul: Assertion `(_bnum2->top == 0) ||
(_bnum2->d[_bnum2->top - 1] != 0)' failed
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
(cherry picked from commit a52926189155d906d8c11ff97cbc1e5191d202cd)
2014-04-30 11:53:09 -04:00
Andy Polyakov
0fb3d5b4fd
bn/asm/armv4-gf2m.pl, modes/asm/ghash-armv4.pl: faster multiplication
...
algorithm suggested in following paper:
Câmara, D.; Gouvêa, C. P. L.; López, J. & Dahab, R.: Fast Software
Polynomial Multiplication on ARM Processors using the NEON Engine.
http://conradoplg.cryptoland.net/files/2010/12/mocrysen13.pdf
(cherry picked from commit f8cee9d08181f9e966ef01d3b69ba78b6cb7c8a8)
2014-04-24 10:27:52 +02:00
Dr. Stephen Henson
0a9f7780e5
Fix for CVE-2014-0076
...
Fix for the attack described in the paper "Recovering OpenSSL
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
by Yuval Yarom and Naomi Benger. Details can be obtained from:
http://eprint.iacr.org/2014/140
Thanks to Yuval Yarom and Naomi Benger for discovering this
flaw and to Yuval Yarom for supplying a fix.
(cherry picked from commit 2198be3483259de374f91e57d247d0fc667aef29)
Conflicts:
CHANGES
2014-03-12 14:23:21 +00:00
Dr. Stephen Henson
d2a3c4497f
make update
2014-02-24 13:50:38 +00:00
Adam Langley
45d010255f
Add volatile qualifications to two blocks of inline asm to stop GCC from
...
eliminating them as dead code.
Both volatile and "memory" are used because of some concern that the compiler
may still cache values across the asm block without it, and because this was
such a painful debugging session that I wanted to ensure that it's never
repeated.
(cherry picked from commit 7753a3a68431aa81b82beea4c3f5374b41454679)
2014-02-01 22:01:46 +01:00
Andy Polyakov
7e569022c5
PPC assembly pack: ppc64-mont update from master.
2014-02-01 21:51:51 +01:00
Andy Polyakov
392fd8f89c
bn/asm/x86_64-mont5.pl: fix compilation error on Solaris.
...
(cherry picked from commit eedab5241e32f9f185cfee23a0c67264d3e3ecf2)
2014-01-09 13:47:53 +01:00
Andy Polyakov
d7d7e7b038
ARM assembly pack: make it work with older toolchain.
...
(cherry picked from commit 2218c296b4981af6f2639bbd7eabfb89437fe776)
2013-12-28 12:18:11 +01:00
Andy Polyakov
c012f6e576
bn/asm/armv4-mont.pl: add NEON code path.
...
(cherry picked from commit d1671f4f1a39d938499c67efe5d4a14c34c09b31)
2013-12-09 22:46:29 +01:00
Andy Polyakov
cf6d55961c
crypto/bn/asm/x86_64-mont*.pl: update from master.
...
Add MULX/AD*X code paths and optimize even original code path.
2013-12-09 22:40:53 +01:00
Andy Polyakov
e5eab8a199
bn/asm/x86_64-mont5.pl: comply with Win64 ABI.
...
PR: 3189
Submitted by: Oscar Ciurana
(cherry picked from commit c5d5f5bd0fe8b2313bec844c0f80f3d49562bfa8)
2013-12-04 00:02:18 +01:00
Andy Polyakov
7bab6eb6f0
crypto/bn/asm/rsaz-x86_64.pl: make it work on Win64.
...
(cherry picked from commit 8bd7ca99961f341ce2070373e86f22505aed2b2a)
2013-12-03 22:30:00 +01:00
Andy Polyakov
87d9526d0c
crypto/bn/rsaz*: fix licensing note.
...
rsaz_exp.c: harmonize line terminating;
asm/rsaz-*.pl: minor optimizations.
asm/rsaz-x86_64.pl: sync from master.
(cherry picked from commit 31ed9a21315c571db443c68e4f618ecb51c631f9)
2013-12-03 22:17:55 +01:00
Andy Polyakov
36982f056a
bn/asm/rsaz-x86_64.pl: fix prototype.
...
(cherry picked from commit 6efef384c6f649399dcc837825a9ca5a37069733)
2013-12-03 09:44:24 +01:00
Dr. Stephen Henson
bc35b8e435
make update
2013-12-01 23:09:44 +00:00
Andy Polyakov
ca44f72938
Make Makefiles OSF-make-friendly.
...
PR: 3165
(cherry picked from commit d1cf23ac86c05b22b8780e2c03b67230564d2d34)
2013-11-12 21:53:39 +01:00
Andy Polyakov
43ce9cdde9
PPC assembly pack: update from master branch.
...
Includes multiple updates: AES module to comply with more ABI
flavors, SHA512 for PPC32, .size directives.
2013-10-15 00:31:45 +02:00
Andy Polyakov
958608ca1c
Initial aarch64 bits.
...
(cherry picked from commit 039081b80977e2a5de84e1f88f8b4d025b559956)
2013-10-13 19:24:22 +02:00
Andy Polyakov
1aecb23f5b
MIPS assembly pack: get rid of deprecated instructions.
...
Latest MIPS ISA specification declared 'branch likely' instructions
obsolete. To makes code future-proof replace them with equivalent.
(cherry picked from commit 0c2adb0a9be76da8de9bbfd5377215f71711a52e)
2013-10-13 13:18:21 +02:00
Andy Polyakov
df5c435c0b
bn/asm/rsax-avx2.pl: minor optimization [for Decoded ICache].
...
(cherry picked from commit fa104be35e24f3fea895d55bb7042d6f4b2963e9)
2013-10-10 23:09:54 +02:00
Andy Polyakov
08853158b6
crypto/bn/asm/x86_64-mont.pl: minor optimization.
...
(cherry picked from commit 72a158703bf2b33f4eba6920302941560f7a848d)
2013-09-09 21:42:48 +02:00
Andy Polyakov
f15c16200b
crypto/bn/asm/rsax-x86_64.pl: make it work on Darwin.
...
(cherry picked from commit fd8ad019e194f54fbc651897c1b3b4cc1898c6c4)
2013-08-03 16:30:40 +02:00
Andy Polyakov
82ae22ef4d
bn/asm/rsaz-avx2.pl: Windows-specific fix.
...
(cherry picked from commit 5c57c69f9ebcc933161a24d77f87f17011c9977b)
2013-07-12 19:01:23 +02:00
Ben Laurie
b56bae5126
s/rsaz_eligible/rsaz_avx2_eligible/.
...
(cherry picked from commit 852f837f5ee81f2633ddf753fa3a30661ad3835a)
2013-07-12 18:53:05 +02:00
Andy Polyakov
ab8233ab81
Take RSAZ modules into build loop, add glue and engage.
...
RT: 2582, 2850
(cherry picked from commit ca48ace5c52feb0082954fff00a44e1914b9e7e9)
Conflicts:
Configure
2013-07-05 21:53:05 +02:00
Andy Polyakov
d5572bdc64
Add RSAZ assembly modules.
...
RT: 2582, 2850
(cherry picked from commit 0b4bb91db65697ab6d3a0fc05b140887cbce3080)
2013-07-05 21:49:19 +02:00
Andy Polyakov
e3990db59c
bn/asm/x86_86-mont.pl: optimize reduction for Intel Core family.
...
(cherry picked from commit 26e43b48a3fa72fc5d7f3aa849af3d7917deea9d)
2013-07-05 21:15:16 +02:00
Andy Polyakov
87d90528ac
bn/bn_exp.c: harmonize.
...
(cherry picked from commit cbce8c4644fa8dfa72e62a2aa921a74eee6d62c9)
2013-07-05 21:01:51 +02:00
Andy Polyakov
8508a80998
bn/bn_exp.c: Solaris-specific fix, T4 MONTMUL relies on alloca.
...
(cherry picked from commit b74ce8d9489b319c0d097ff116b5a0bdb634462d)
2013-06-30 23:14:31 +02:00
Andy Polyakov
6c7fa27404
PA-RISC assembler pack: switch to bve in 64-bit builds.
...
PR: 3074
(cherry picked from commit 02450ec69dda7815ba1e7bd74eb30f0ae1eb3042)
2013-06-30 23:13:23 +02:00
Andy Polyakov
03c8441b14
Optimize SPARC T4 MONTMUL support.
...
Improve RSA sing performance by 20-30% by:
- switching from floating-point to integer conditional moves;
- daisy-chaining sqr-sqr-sqr-sqr-sqr-mul sequences;
- using MONTMUL even during powers table setup;
(cherry picked from commit 4ddacd9921f48013b5cd011e4b93b294c14db1c2)
2013-06-18 11:07:16 +02:00
Andy Polyakov
8c1f9c56fd
crypto/bn/bn_exp.c: SPARC portability fix.
...
(cherry picked from commit b69437e1e5cdf9c6dfda17cc238f87f730b198ac)
2013-06-01 09:59:54 +02:00
Andy Polyakov
c92989d2b7
Add BN support for SPARC VIS3 and T4 [from master].
2013-05-20 15:48:13 +02:00
Andy Polyakov
2d9be79407
x86_64-gf2m.pl: fix typo.
...
(cherry picked from commit 342dbbbe4eb82b6e12163965a12f580c2deb03ad)
2013-03-01 22:37:53 +01:00
Andy Polyakov
2e4b7eede3
x86_64-gf2m.pl: add missing Windows build fix for #2963 .
...
PR: 3004
(cherry picked from commit 7c43601d4424575d589f028aed0d5a4ae337527f)
2013-03-01 21:57:25 +01:00
Andy Polyakov
b9eef98883
bn_nist.c: work around clang 3.0 bug.
...
(cherry picked from commit 750398acd85a7ae220d272d28a76dff7bb269c31)
2013-02-16 11:37:38 +01:00
Andy Polyakov
2a713eadc3
bn_word.c: fix overflow bug in BN_add_word.
...
(cherry picked from commit 134c00659a1bc67ad35a1e4620e16bc4315e6e37)
2013-02-02 22:37:35 +01:00
Andy Polyakov
2e7900b624
x86_64 assembly pack: keep making Windows build more robust.
...
PR: 2963 and a number of others
(cherry picked from commit 4568182a8b8cbfd15cbc175189029ac547bd1762)
2013-02-02 19:56:43 +01:00
Andy Polyakov
3f233a1e77
x86_64 assembly pack: make Windows build more robust [from master].
...
PR: 2963 and a number of others
2013-01-22 22:51:29 +01:00
Andy Polyakov
b17ffba915
bn/asm/mips.pl: hardwire local call to bn_div_words.
2013-01-22 21:16:02 +01:00
Ben Laurie
2a2e537983
Ignore more.
2012-12-13 12:43:18 +00:00
Andy Polyakov
a060fc3b8e
x86_64-gcc.c: resore early clobber constraint [from HEAD].
...
Submitted by: Florian Weimer
2012-11-19 15:02:34 +00:00
Andy Polyakov
d46a1a6178
bn_lcl.h: gcc removed support for "h" constraint, which broke inline
...
assembler [from HEAD].
2012-09-01 13:21:24 +00:00
Andy Polyakov
0e05b51fe5
Add linux-x32 target [from HEAD].
2012-08-29 14:12:10 +00:00
Andy Polyakov
8e1c33e160
MIPS assembly pack updates from HEAD.
2012-08-17 09:41:30 +00:00
Andy Polyakov
fd6a72fa1c
crypto/bn/*.h: move PTR_SIZE_INT to private header [from HEAD].
2012-07-04 08:51:44 +00:00
Andy Polyakov
5b7af6de43
bn_nist.c: harmonize buf in BN_nist_mod_256 with other mod functions and
...
compensate for VC buf [from HEAD].
PR: 2837
2012-07-02 14:38:22 +00:00
Andy Polyakov
8b654459be
x86_64 assembly pack: make it possible to compile with Perl located
...
on path with spaces [from HEAD].
PR: 2835
2012-06-27 12:48:50 +00:00
Ben Laurie
68d2cf51bc
Reduce version skew: trivia (I hope).
2012-06-03 22:03:37 +00:00
Andy Polyakov
265863c6a4
bn/bn_gf2m.c: make new BN_GF2m_mod_inv work with BN_DEBUG_RAND [from HEAD].
2012-03-30 17:41:00 +00:00