aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_shift.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Reject negative shifts for BN_rshift and BN_lshiftMatt Caswell2015-05-221-0/+10
| | | | | | | | | | | The functions BN_rshift and BN_lshift shift their arguments to the right or left by a specified number of bits. Unpredicatable results (including crashes) can occur if a negative number is supplied for the shift value. Thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian for discovering and reporting this issue. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
* memset, memcpy, sizeof consistency fixesRich Salz2015-05-051-4/+1
| | | | | | | | Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-150/+141
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT2163: Remove some unneeded #include'sDoug Goldstein2014-08-181-1/+0
| | | | | | | Several files #include stdio.h and don't need it. Also, per tjh, remove BN_COUNT Reviewed-by: Emilia Kasper <emilia@openssl.org>
* bn_shift.c: minimize reallocations, which allows BN_FLG_STATIC_DATA toAndy Polyakov2011-10-171-12/+15
| | | | be shifted in specific cases.
* Fix crash in BN_rshift.Andy Polyakov2008-10-281-1/+1
| | | | PR: 1663
* This rewrites two "for" loops in BN_rshift() - equality with zero isGeoff Thorpe2003-11-131-3/+2
| | | | | | | | | | generally a more efficient comparison than comparing two integers, and the first of these two loops was off-by-one (copying one too many values). This change also removes a superfluous assignment that would set an unused word to zero (and potentially allow an overrun in some cases). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
* Add debug-screening of input parameters to some functions I'd missedGeoff Thorpe2003-11-061-0/+12
| | | | before.
* Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe2003-11-041-3/+7
| | | | | | is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
* Fix BN_rshift, which caused lots of trouble.Bodo Möller2000-11-301-0/+5
|
* Fix warnings in expspeed.c (but the segmentation fault remains)Bodo Möller2000-11-291-1/+1
| | | | | | | | Improve readability of bn_shift.c. Add comment in bn_lib.c (why zero data between top and max?) Change bntest.c output for BN_kronecker test
* Constify the BIGNUM routines a bit more. The only trouble were theRichard Levitte2000-11-061-3/+3
| | | | | | two functions that did expansion on in parameters (BN_mul() and BN_sqr()). The problem was solved by making bn_dup_expand() which is a mix of bn_expand2() and BN_dup().
* This probably fixes a BN_rshift bug.Bodo Möller2000-06-131-1/+1
|
* Some constification and stacks that slipped through the cracks (how?).Ben Laurie1999-06-041-1/+1
|
* Change functions to ANSI C.Ulf Möller1999-04-191-14/+4
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-6/+6
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+210