summaryrefslogtreecommitdiffstats
path: root/crypto/bn
AgeCommit message (Collapse)Author
2015-01-22Further comment amendments to preserve formatting prior to source reformatMatt Caswell
(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5) Conflicts: crypto/x509v3/pcy_tree.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-13Add Broadwell performance results.Andy Polyakov
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit b3d7294976c58e0e05d0ee44a0e7c9c3b8515e05)
2015-01-08Fix for CVE-2014-3570 (with minor bn_asm.c revamp).Andy Polyakov
Reviewed-by: Emilia Kasper <emilia@openssl.org> (cherry picked from commit 56df92efb6893abe323307939425957ce878c8f0)
2015-01-06Revert "CHANGES: mention "universal" ARM support."Andy Polyakov
This reverts commit caeed719fe3fd619415755f245ab8a904978d99d. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-06CHANGES: mention "universal" ARM support.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 4fec91506975f62a2f93be71a46acc7fae7eef45)
2015-01-06Remove inconsistency in ARM support.Andy Polyakov
This facilitates "universal" builds, ones that target multiple architectures, e.g. ARMv5 through ARMv7. See commentary in Configure for details. Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit c1669e1c205dc8e695fb0c10a655f434e758b9f7)
2014-12-17Clear warnings/errors within BN_CTX_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Backport regression testBodo Möller
master branch has a specific regression test for a bug in x86_64-mont5 code, see commit cdfe0fdde6a966bdb0447de66aa04a85d99a0551. This code is now in 1.0.2/1.0.1, so also backport the test. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-17Check for invalid divisors in BN_div.Emilia Kasper
Invalid zero-padding in the divisor could cause a division by 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-15Fix unused variable warningEmilia Kasper
The temporary variable causes unused variable warnings in opt mode with clang, because the subsequent assert is compiled out. Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-12-05Make 'make update' succeed and run itEmilia Kasper
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2014-09-25make updateMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-09-25crypto/bn/bn_nist.c: work around MSC ARM compiler bug.Andy Polyakov
RT: 3541 Reviewed-by: Emilia Kasper <emilia@openssl.org> (cherry picked from commit 8b07c005fe006044d0e4a795421447deca3c9f2c)
2014-09-20Harmonize Tru64 and Linux make rules.Andy Polyakov
RT: 3333,3165 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit d475b2a3bfde8d4aceefb41b21acc3711893d2a8)
2014-09-04Ensure that x**0 mod 1 = 0.Adam Langley
(cherry picked from commit 2b0180c37fa6ffc48ee40caa831ca398b828e680) Reviewed-by: Ben Laurie <ben@openssl.org>
2014-08-21bn/asm/rsaz-*.pl: allow spaces in Perl path name.Andy Polyakov
RT: 2835 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 15735e4f0e81d535cda0ad7ab52a0ed64b644cd0)
2014-08-01make updateDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-22make updateMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-07-13Fixed valgrind complaint due to BN_consttime_swap reading uninitialised data.Matt Caswell
This is actually ok for this function, but initialised to zero anyway if PURIFY defined. This does have the impact of masking any *real* unitialised data reads in bn though. Patch based on approach suggested by Rich Salz. PR#3415 (cherry picked from commit 77747e2d9a5573b1dbc15e247ce18c03374c760c)
2014-07-09x86_64 assembly pack: improve masm support.Andy Polyakov
(cherry picked from commit 1b0fe79f3ee27ebd20510da3af9ec04c6ee0f800)
2014-07-02bn_exp.c: fix x86_64-specific crash with one-word modulus.Andy Polyakov
PR: #3397 (cherry picked from commit eca441b2b4d33d2a18d163ef9b4b3aff14251c73)
2014-06-28x86_64 assembly pack: refine clang detection.Andy Polyakov
(cherry picked from commit a356e488ad50ca9de3fc4955839441c5aff11ed3) Resolved conflicts: crypto/bn/asm/rsaz-avx2.pl
2014-06-27x86_64 assembly pack: addendum to last clang commit.Andy Polyakov
(cherry picked from commit 7eb048828008f195fb6edceb8f767622694e7426)
2014-06-27x86_64 assembly pack: allow clang to compile AVX code.Andy Polyakov
(cherry picked from commit ac171925ab527a55fbb27872ff69af94f7ec995b)
2014-06-27bn/asm/rsaz-avx2.pl: fix occasional failures.Andy Polyakov
(cherry picked from commit 406d4af050cff0f52c5435504186eaf03ca69698)
2014-06-26Make sure BN_sqr can never return a negative value.Huzaifa Sidhpurwala
PR#3410 (cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb)
2014-06-27bn_exp.c: move check for AD*X to rsaz-avx2.pl.Andy Polyakov
This ensures high performance is situations when assembler supports AVX2, but not AD*X. (cherry picked from commit f3f620e1e0fa3553116f0b3e8c8d68b070fcdb79) Resolved conflicts: crypto/bn/asm/rsaz-avx2.pl
2014-06-12make updateDr. Stephen Henson
2014-06-10ARM assembly pack: get ARMv7 instruction endianness right.Andy Polyakov
Pointer out and suggested by: Ard Biesheuvel. (cherry picked from commit 5dcf70a1c57c2019bfad640fe14fd4a73212860a)
2014-05-06bignum: allow concurrent BN_MONT_CTX_set_locked()Geoff Thorpe
The lazy-initialisation of BN_MONT_CTX was serialising all threads, as noted by Daniel Sands and co at Sandia. This was to handle the case that 2 or more threads race to lazy-init the same context, but stunted all scalability in the case where 2 or more threads are doing unrelated things! We favour the latter case by punishing the former. The init work gets done by each thread that finds the context to be uninitialised, and we then lock the "set" logic after that work is done - the winning thread's work gets used, the losing threads throw away what they've done. Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-04-30bignum: fix boundary condition in montgomery logicGeoff Thorpe
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-24bn/asm/armv4-gf2m.pl, modes/asm/ghash-armv4.pl: faster multiplicationAndy Polyakov
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-03-12Fix for CVE-2014-0076Dr. Stephen Henson
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-02-24make updateDr. Stephen Henson
2014-02-01Add volatile qualifications to two blocks of inline asm to stop GCC fromAdam Langley
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-01PPC assembly pack: ppc64-mont update from master.Andy Polyakov
2014-01-09bn/asm/x86_64-mont5.pl: fix compilation error on Solaris.Andy Polyakov
(cherry picked from commit eedab5241e32f9f185cfee23a0c67264d3e3ecf2)
2013-12-28ARM assembly pack: make it work with older toolchain.Andy Polyakov
(cherry picked from commit 2218c296b4981af6f2639bbd7eabfb89437fe776)
2013-12-09bn/asm/armv4-mont.pl: add NEON code path.Andy Polyakov
(cherry picked from commit d1671f4f1a39d938499c67efe5d4a14c34c09b31)
2013-12-09crypto/bn/asm/x86_64-mont*.pl: update from master.Andy Polyakov
Add MULX/AD*X code paths and optimize even original code path.
2013-12-04bn/asm/x86_64-mont5.pl: comply with Win64 ABI.Andy Polyakov
PR: 3189 Submitted by: Oscar Ciurana (cherry picked from commit c5d5f5bd0fe8b2313bec844c0f80f3d49562bfa8)
2013-12-03crypto/bn/asm/rsaz-x86_64.pl: make it work on Win64.Andy Polyakov
(cherry picked from commit 8bd7ca99961f341ce2070373e86f22505aed2b2a)
2013-12-03crypto/bn/rsaz*: fix licensing note.Andy Polyakov
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-03bn/asm/rsaz-x86_64.pl: fix prototype.Andy Polyakov
(cherry picked from commit 6efef384c6f649399dcc837825a9ca5a37069733)
2013-12-01make updateDr. Stephen Henson
2013-11-12Make Makefiles OSF-make-friendly.Andy Polyakov
PR: 3165 (cherry picked from commit d1cf23ac86c05b22b8780e2c03b67230564d2d34)
2013-10-15PPC assembly pack: update from master branch.Andy Polyakov
Includes multiple updates: AES module to comply with more ABI flavors, SHA512 for PPC32, .size directives.
2013-10-13Initial aarch64 bits.Andy Polyakov
(cherry picked from commit 039081b80977e2a5de84e1f88f8b4d025b559956)
2013-10-13MIPS assembly pack: get rid of deprecated instructions.Andy Polyakov
Latest MIPS ISA specification declared 'branch likely' instructions obsolete. To makes code future-proof replace them with equivalent. (cherry picked from commit 0c2adb0a9be76da8de9bbfd5377215f71711a52e)