aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bn
Commit message (Collapse)AuthorAgeFilesLines
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-17/+1
| | | | | | | | | | | | With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
* Stop symlinking, move files to intended directoryRichard Levitte2015-03-313-3019/+0
| | | | | | | | | | | | | Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* RAND_bytes updatesMatt Caswell2015-03-252-3/+4
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix probable_prime over large shiftMatt Caswell2015-03-171-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | In the probable_prime() function we behave slightly different if the number of bits we are interested in is <= BN_BITS2 (the num of bits in a BN_ULONG). As part of the calculation we work out a size_limit as follows: size_limit = (((BN_ULONG)1) << bits) - BN_get_word(rnd) - 1; There is a problem though if bits == BN_BITS2. Shifting by that much causes undefined behaviour. I did some tests. On my system BN_BITS2 == 64. So I set bits to 64 and calculated the result of: (((BN_ULONG)1) << bits) I was expecting to get the result 0. I actually got 1! Strangely this... (((BN_ULONG)0) << BN_BITS2) ...does equal 0! This means that, on my system at least, size_limit will be off by 1 when bits == BN_BITS2. This commit fixes the behaviour so that we always get consistent results. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Fix error handling in bn_expMatt Caswell2015-03-121-2/+2
| | | | | | | In the event of an error |rr| could be NULL. Therefore don't assume you can use |rr| in the error handling code. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Remove some functions that are no longer used and break the build with:Matt Caswell2015-02-101-50/+0
| | | | | | ./config --strict-warnings enable-deprecated Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bn_add.c: fix dead code elimination that went bad.Andy Polyakov2015-02-091-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Final (for me, for now) dead code cleanupRich Salz2015-02-085-58/+0
| | | | | | | This is a final pass looking for '#if 0'/'#if 1' controls and removing the appropriate pieces. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Use memset in bn_montRich Salz2015-02-051-5/+0
| | | | | | Use memset() not inline code. Compilers are smarter now. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Dead code cleanup: #if 0 dropped from testsRich Salz2015-02-021-140/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* clang on Linux x86_64 complains about unreachable code.Richard Levitte2015-01-292-2/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* "#if 0" removal: header filesRich Salz2015-01-271-11/+0
| | | | | | Remove all "#if 0" blocks from header files. Reviewed-by: Tim Hudson <tjh@openssl.org>
* OPENSSL_NO_xxx cleanup: SHARich Salz2015-01-271-2/+0
| | | | | | | | | | | | | | | Remove support for SHA0 and DSS0 (they were broken), and remove the ability to attempt to build without SHA (it didn't work). For simplicity, remove the option of not building various SHA algorithms; you could argue that SHA_224/256/384/512 should be kept, since they're like crypto algorithms, but I decided to go the other way. So these options are gone: GENUINE_DSA OPENSSL_NO_SHA0 OPENSSL_NO_SHA OPENSSL_NO_SHA1 OPENSSL_NO_SHA224 OPENSSL_NO_SHA256 OPENSSL_NO_SHA384 OPENSSL_NO_SHA512 Reviewed-by: Richard Levitte <levitte@openssl.org>
* OPENSSL_NO_xxx cleanup: many removalsRich Salz2015-01-271-2/+0
| | | | | | | | | | | | The following compile options (#ifdef's) are removed: OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY This diff is big because of updating the indents on preprocessor lines. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove unused eng_rsax and related asm fileRich Salz2015-01-242-1499/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* ifdef cleanup, part 4a: '#ifdef undef'Rich Salz2015-01-241-5/+0
| | | | | | | | | | | This removes all code surrounded by '#ifdef undef' One case is left: memmove() replaced by open-coded for loop, in crypto/stack/stack.c That needs further review. Also removed a couple of instances of /* dead code */ if I saw them while doing the main removal. Reviewed-by: Matt Caswell <matt@openssl.org>
* More comment realignmentmaster-post-reformatMatt Caswell2015-01-223-39/+39
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Re-align some comments after running the reformat script.Matt Caswell2015-01-227-250/+250
| | | | | | | This should be a one off operation (subsequent invokation of the script should not move them) Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-2240-15919/+16484
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Move more comments that confuse indentMatt Caswell2015-01-222-7/+9
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix indent comment corruption issueMatt Caswell2015-01-221-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bn_const.c: make it indent-friendly.Andy Polyakov2015-01-221-280/+418
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/asm/x86_64-gcc.cL make it indent-friendly.Andy Polyakov2015-01-221-10/+10
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bn_asm.c: make it indent-friendly.Andy Polyakov2015-01-221-15/+15
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bn_exp.c: make it indent-friendly.Andy Polyakov2015-01-221-7/+7
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* indent has problems with comments that are on the right hand side of a line.Matt Caswell2015-01-222-11/+20
| | | | | | | Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bntest.c: make it indent-friendly.Andy Polyakov2015-01-221-25/+27
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/bn_recp.c: make it indent-friendly.Andy Polyakov2015-01-221-8/+8
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* bn/rsaz_exp.c: make it indent-friendly.Andy Polyakov2015-01-221-9/+13
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix source where indent will not be able to copeMatt Caswell2015-01-221-17/+33
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Further comment changes for reformat (master)Matt Caswell2015-01-226-13/+25
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz2015-01-142-3/+3
| | | | | | | | | | OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add Broadwell performance results.Andy Polyakov2015-01-131-0/+4
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Remove use of BN_init, BN_RECP_CTX_init from bntestDr. Stephen Henson2015-01-131-212/+212
| | | | | | | BN_init and BN_RECP_CTX_init are deprecated and are not exported from shared libraries on some platforms (e.g. Windows) convert bntest to use BN_new and BN_RECP_CTX_new instead. Reviewed-by: Matt Caswell <matt@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-1/+1
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove some unsupported platforms.Rich Salz2015-01-121-15/+0
| | | | | | | | | This commit removes NCR, Tandem, Cray. Regenerates TABLE. Removes another missing BEOS fluff. The last platform remaining on this ticket is WIN16. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix for CVE-2014-3570 (with minor bn_asm.c revamp).Andy Polyakov2015-01-084-676/+379
| | | | Reviewed-by: Emilia Kasper <emilia@openssl.org>
* Further comment amendments to preserve formatting prior to source reformatMatt Caswell2015-01-061-1/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Revert "CHANGES: mention "universal" ARM support."Andy Polyakov2015-01-061-1/+1
| | | | | | This reverts commit 4fec91506975f62a2f93be71a46acc7fae7eef45. Reviewed-by: Matt Caswell <matt@openssl.org>
* CHANGES: mention "universal" ARM support.Andy Polyakov2015-01-061-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove inconsistency in ARM support.Andy Polyakov2015-01-042-64/+73
| | | | | | | | | 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>
* mark all block comments that need format preserving so thatTim Hudson2014-12-3012-42/+76
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATEDMatt Caswell2014-12-181-17/+17
| | | | | | Introduce use of DECLARE_DEPRECATED Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove redundant OPENSSL_NO_DEPRECATED suppressionMatt Caswell2014-12-181-6/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Clear warnings/errors within BN_CTX_DEBUG code sectionsRichard Levitte2014-12-171-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Check for invalid divisors in BN_div.Emilia Kasper2014-12-171-3/+5
| | | | | | | Invalid zero-padding in the divisor could cause a division by 0. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit a43bcd9e96c5180e5c6c82164ece643c0097485e)
* Fix unused variable warningEmilia Kasper2014-12-151-1/+3
| | | | | | | 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>
* make updateMatt Caswell2014-12-111-3/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Move bn internal functions into bn_int.h and bn_lcl.hMatt Caswell2014-12-083-165/+97
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Make bn opaqueMatt Caswell2014-12-082-55/+54
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>