summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_mul.c
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
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 Conflicts: crypto/rc4/rc4_enc.c crypto/x509v3/v3_scts.c crypto/x509v3/v3nametest.c ssl/d1_both.c ssl/s3_srvr.c ssl/ssl.h ssl/ssl_locl.h ssl/ssltest.c ssl/t1_lib.c Conflicts: crypto/asn1/a_sign.c crypto/bn/bn_div.c crypto/dsa/dsa_asn1.c crypto/ec/ecp_nistp224.c crypto/ec/ecp_nistp256.c crypto/ec/ecp_nistp521.c crypto/ec/ecp_nistputil.c crypto/modes/gcm128.c crypto/opensslv.h ssl/d1_both.c ssl/heartbeat_test.c ssl/s3_clnt.c ssl/s3_srvr.c ssl/ssl_sess.c ssl/t1_lib.c test/testutil.h Conflicts: apps/openssl.c apps/ts.c apps/vms_decc_init.c crypto/aes/aes_core.c crypto/aes/aes_x86core.c crypto/dsa/dsa_ameth.c crypto/ec/ec2_mult.c crypto/evp/evp.h crypto/objects/objects.h crypto/rsa/rsa_pss.c crypto/stack/safestack.h crypto/ts/ts.h crypto/ts/ts_rsp_verify.c crypto/whrlpool/wp_dgst.c crypto/x509v3/v3_ncons.c e_os2.h engines/ccgost/gost89.c engines/ccgost/gost_ctl.c engines/ccgost/gost_keywrap.c engines/ccgost/gost_keywrap.h engines/ccgost/gost_sign.c ssl/kssl.c ssl/s3_srvr.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2010-06-12Fix gcc 4.6 warnings. Check TLS server hello extension length.Ben Laurie
2009-12-02PR: 2111Dr. Stephen Henson
Submitted by: Martin Olsson <molsson@opera.com> Check for bn_wexpand errors in bn_mul.c
2009-06-17Update from 1.0.0-stable.Dr. Stephen Henson
2007-11-03Commit #16325 fixed one thing but broke DH with certain moduli [from HEAD].Andy Polyakov
2007-07-08bn_mul_recursive doesn't handle all cases correctly, which results inAndy Polyakov
BN_mul failures at certain key-length mixes [from HEAD]. PR: 1427
2004-03-13Convert openssl code not to assume the deprecated form of BN_zero().Geoff Thorpe
Remove certain redundant BN_zero() initialisations, because BN_CTX_get(), BN_init(), [etc] already initialise to zero. Correct error checking in bn_sqr.c, and be less wishy-wash about how/why the result's 'top' value is set (note also, 'max' is always > 0 at this point).
2003-11-04Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe
is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
2003-05-28Make sure to compare unsigned against unsigned.Richard Levitte
2003-05-21Fix sign bugs.Richard Levitte
PR: 621
2003-01-09Finalizing asm support for UnixWare, SCO, OpenUnix... Note that I'veAndy Polyakov
replaced #if logic around bn_sub_part_words in bn_mul.c. I rely upon OPENSSL_BN_ASM_PART_WORDS being added by ./Configure script. Would it still work on non-Unix platforms?
2002-06-13Add support for DJGPP.Richard Levitte
PR: 75
2002-05-30Check the return values where memory allocation failures may happen.Richard Levitte
PR: 49
2002-05-10Fallback to normal multiply if n2 == 8 and dna or dnb is not zeroDr. Stephen Henson
in bn_mul_recursive. This is (hopefully) what was triggering bignum errors on 64 bit platforms and causing the BN_mod_mul test to fail.
2001-10-14openbsd-x86 macrosUlf Möller
Submitted by: Toomas Kiisk <vix@cyber.ee>
2001-02-19Make all configuration macros available for application by makingRichard Levitte
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
2000-12-15The C version of bn_sub_part_words is needed not onlyBodo Möller
in NO_ASM configurations
2000-12-13Problem: bn_mul_normal() misbehaves if the size of b is 0.Richard Levitte
Solution: multiply a with 0, putting the result in r, and return.
2000-12-13In bn_mul_recursive(), make sure the comba routines are only calledRichard Levitte
when both a and b are of the exact right size. This may change to something better later.
2000-12-13Rewrite the extension code to use an ASN1_ITEM structureDr. Stephen Henson
for its ASN1 operations as well as the old style function pointers (i2d, d2i, new, free). Change standard extensions to support this. Fix a warning in BN_mul(), bn_mul.c about uninitialised 'j'.
2000-12-06Intel assembler version for bn_sub_part_words(). I haven't gotUlf Möller
reliable timings yet, please try it out!
2000-12-05Use assert as in the rest of the BN library.Ulf Möller
2000-12-04Remove the last bn_wexpand()s that made us break constness. OfRichard Levitte
course, that means we need to handle the cases where the two arrays to bn_mul_recursive() and bn_mul_part_recursive() differ in size. I haven't yet changed the comments that describe bn_mul_recursive() and bn_mul_part_recursive(). I want this to be tested by more people before I consider this change final. Please test away!
2000-12-02Fix bn_cmp_part_words() and move it to bn_lib.c.Ulf Möller
2000-11-30Fix BN_rshift, which caused lots of trouble.Bodo Möller
2000-11-29Copy and paste error... bn_add_part_words() should of course callRichard Levitte
bn_add_words(), not bn_sub_words()...
2000-11-21Avoid getting warnings about unary - being used on unsigned integer.Richard Levitte
2000-11-18Remove two bn_wexpand() from BN_mul(), which is a step toward gettingRichard Levitte
BN_mul() correctly constified, avoids two realloc()'s that aren't really necessary and saves memory to boot. This required a small change in bn_mul_part_recursive() and the addition of variants of bn_cmp_words(), bn_add_words() and bn_sub_words() that can take arrays with differing sizes. The test results show a performance that very closely matches the original code from before my constification. This may seem like a very small win from a performance point of view, but if one remembers that the variants of bn_cmp_words(), bn_add_words() and bn_sub_words() are not at all optimized for the moment (and there's no corresponding assembler code), and that their use may be just as non-optimal, I'm pretty confident there are possibilities... This code needs reviewing!
2000-11-16Make sure to print the BN counting (BN_COUNT) to stderr instead ofRichard Levitte
stdout. bc gets so confused by bean counts.
2000-11-06Constify the BIGNUM routines a bit more. The only trouble were theRichard Levitte
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().
2000-07-26Darrel Hankerson <dhankers@cacr.math.uwaterloo.ca> correctly discoveredRichard Levitte
that of the result pointer to bn_mul was the same as one of the two arguments, That argument might have it's sign destroyed. He provided this fix.
2000-03-02Change comment.Bodo Möller
2000-03-01add comment.Ulf Möller
2000-02-27Bug fix!Ulf Möller
2000-02-26Reorganize bn_mul.c (no bugfix yet), remove obsolete files in BN library.Ulf Möller
2000-02-05New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to accessUlf Möller
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but the BN_CTX implementation could now easily be changed.
2000-02-03ispell (and minor modifications)Ulf Möller
1999-07-27when invoking bn_*_comba[48] result->top wasn't always set correctly.Andy Polyakov
1999-04-19Change functions to ANSI C.Ulf Möller
1999-01-28Fixes to BN code. Previously the default was to define BN_RECURSIONMark J. Cox
but the BN code had some problems that would cause failures when doing certificate verification and some other functions. Submitted by: Eric A Young from a C2Net version of SSLeay Reviewed by: Mark J Cox PR:
1998-12-22Various cleanups and fixed by Marc and Ralf to start the OpenTLS projectRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeayRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall