summaryrefslogtreecommitdiffstats
path: root/crypto/bn
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Move more comments that confuse indentMatt Caswell
Conflicts: crypto/dsa/dsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix indent comment corruption issueMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/bn_const.c: make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/asm/x86_64-gcc.cL make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/bn_asm.c: make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/bn_exp.c: make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/bntest.c: make it indent-friendly.Andy Polyakov
Conflicts: crypto/bn/bntest.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/bn_recp.c: make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22bn/rsaz_exp.c: make it indent-friendly.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix source where indent will not be able to copeMatt Caswell
Conflicts: apps/ciphers.c ssl/s3_pkt.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Additional comment changes for reformat of 1.0.2Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
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