summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_lcl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Introduce bn_rand_interval() that allows specifying an interval [a, b)tb2018-11-051-1/+2
| | | | | | from which a a BIGNUM is chosen uniformly at random. ok beck jsing
* Use a size_t instead of an int for the byte count in BN_swap_ct().tb2018-07-231-2/+2
| | | | | | | | Since bignums use ints for the same purpose, this still uses an int internally after an overflow check. Suggested by and discussed with jsing. ok inoguchi, jsing
* Provide BN_swap_ct(), a constant time function that conditionally swapstb2018-07-101-1/+4
| | | | | | | | | | two bignums. It's saner and substantially less ugly than the existing public BN_constantime_swap() function and will be used in forthcoming work on constant time ECC code. From Billy Brumley and his team. Thanks! ok jsing
* Construct a BN_gcd_nonct, based on BN_mod_inverse_no_branch, as suggestedbeck2017-01-251-1/+3
| | | | | | | | | | | by Alejandro Cabrera <aldaya@gmail.com> to avoid the possibility of a sidechannel timing attack during RSA private key generation. Modify BN_gcd to become not visible under LIBRESSL_INTERNAL and force the use of the _ct or _nonct versions of the function only within the library. ok jsing@
* Add ct and nonct versions of BN_mod_inverse for internal usebeck2017-01-211-1/+5
| | | | ok jsing@
* Split out BN_div and BN_mod into ct and nonct versions for Internal use.beck2017-01-211-3/+7
| | | | ok jsing@
* Make explicit _ct and _nonct versions of bn_mod_exp funcitons thatbeck2017-01-211-1/+11
| | | | | | | | | | | | matter for constant time, and make the public interface only used external to the library. This moves us to a model where the important things are constant time versions unless you ask for them not to be, rather than the opposite. I'll continue with this method by method. Add regress tests for same. ok jsing@
* Explicitly export a list of symbols from libcrypto.jsing2016-12-211-8/+113
| | | | | | | | | | | | | | | | Move the "internal" BN functions from bn.h to bn_lcl.h and stop exporting the bn_* symbols. These are documented as only being intended for internal use, so why they were placed in a public header is beyond me... This hides 363 previously exported symbols, most of which exist in headers that are not installed and were never intended to be public. This also removes a few crusty old things that should have died long ago (like _ossl_old_des_read_pw). But don't worry... there are still 3451 symbols exported from the library. With input and testing from inoguchi@. ok beck@ inoguchi@
* Fix gcc version preprocessor checks to cope with gcc 5.x and beyond;miod2015-11-061-2/+2
| | | | reported by Ruslan Babayev.
* deregister; no binary changejsg2014-10-281-5/+5
| | | | ok jsing@ miod@
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-101-1/+3
| | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* Emergency knfectomie requested by tedu@.jsing2014-05-081-28/+28
|
* Try to clean the maze of <openssl/bn.h> defines regarding the BN internals.miod2014-04-241-22/+5
| | | | | | | | | | | | | | | | | | | | | | | The intent of this change is to only keep support for two kind of architectures: - those with 32-bit int and long, and 64-bit long long, where ``long * long -> long long'' multiplication routines are available. - those with 64-bit int and long, and no 128-bit long long type. This gets rid of the SIXTY_FOUR_BIT_LONG, SIXTY_FOUR_BIT (not the same!), THIRTY_TWO_BIT, SIXTEEN_BIT and EIGHT_BIT defines. After this change, the types and defines are as follows: arch: 64bit 32bit rationale BN_LLONG undefined defined defined if l * l -> ll BN_ULLONG undefined u long long result of BN_LONG * BN_LONG BN_ULONG u long u int native register size BN_LONG long int the same, signed BN_BITS 128 64 size of 2*BN_ULONG in bits BN_BYTES 8 4 size of 2*BN_ULONG in bytes BN_BITS2 64 32 BN_BITS / 2 Tested on various 32-bit and 64-bit OpenBSD systems of various endianness.
* One last Dec C tentacle on alpha.miod2014-04-231-4/+1
|
* Unifdef -UPEDANTIC. ok beck@ tedu@miod2014-04-231-1/+1
|
* Get rid of MS Visual C compiler and Intel C compiler specific defines.miod2014-04-171-9/+0
|
* remove FIPS mode support. people who require FIPS can buy something thattedu2014-04-151-4/+0
| | | | | meets their needs, but dumping it in here only penalizes the rest of us. ok beck deraadt
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-2/+9
|
* resolve conflictsdjm2012-10-131-3/+20
|
* resolve conflicts, fix local changesdjm2010-10-011-1/+2
|
* resolve conflictsdjm2008-09-061-58/+56
|
* resolve conflictsdjm2006-06-271-0/+39
|
* merge 0.9.7dmarkus2004-04-081-9/+8
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-6/+20
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-9/+30
|
* openssl-engine-0.9.6 mergebeck2000-12-151-1/+99
|
* OpenSSL 0.9.5 mergebeck2000-03-191-36/+89
| | | | | | *warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
* OpenSSL 0.9.4 mergebeck1999-09-291-19/+88
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+199
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.