Commit graph

150 commits

Author SHA1 Message Date
Ulf Möller
ce76ce43ae *** empty log message *** 2000-02-03 23:38:55 +00:00
Ulf Möller
657e60fa00 ispell (and minor modifications) 2000-02-03 23:23:24 +00:00
Bodo Möller
7999c65c9b Some 'const's for BNs. 2000-02-03 01:26:07 +00:00
Bodo Möller
bfe30e4d1b Include OpenSSL license. 2000-02-02 23:30:32 +00:00
Bodo Möller
aff0825c61 Tolerate negative numbers in BN_is_prime. 2000-02-02 22:18:01 +00:00
Bodo Möller
e74231ed9e rndsort{Miller, Rabin} primality test. 2000-02-02 21:20:44 +00:00
Andy Polyakov
fb81ac5e6b Support for "multiply high" instruction, see BN_UMULT_HIGH comment in
crypto/bn/bn_lcl.h for further details. It should be noted that for
the moment of this writing the code was tested only on Alpha. If
compiled with DEC C the C implementation exhibits 12% performance
improvement over the crypto/bn/asm/alpha.s (on EV56 box running
AlphaLinux). GNU C is (unfortunately) 8% behind the assembler
implementation. But it's OpenVMS Alpha users who *may* benefit most
as 'apps/openssl speed rsa' exhibits 6 (six) times performance
improvement over the original VMS bignum implementation. Where "*may*"
means "as soon as code is enabled though #define SIXTY_FOUR_BIT and
crypto/bn/asm/vms.mar is skipped."
2000-02-02 16:18:12 +00:00
Ulf Möller
1399f17a07 Bug fix: BN_is_prime() would fail with a high probability for small
primes (negligible for larger ones).
2000-02-01 23:48:55 +00:00
Ulf Möller
0bde1089f8 match the prototype 2000-02-01 23:47:24 +00:00
Bodo Möller
cb5b7850ac If n0 == d0, we must alway compute 'rem' "by hand" 2000-02-01 11:10:54 +00:00
Bodo Möller
fe7cd1647d Typo in preprocessor symbol. 2000-02-01 08:48:30 +00:00
Ulf Möller
f40c02d908 undo. I keep confusing my directories. :( 2000-02-01 02:24:10 +00:00
Ulf Möller
8efb60144d EBCDIC support.
Submitted by: Martin Kraemer <martin.kraemer@mch.sni.de>
2000-02-01 02:21:16 +00:00
Ulf Möller
51ca375e7e Seek out and destroy another evil cast. 2000-01-30 23:33:40 +00:00
Bodo Möller
1baa94907c Make output of "openssl dsaparam 1024" more interesting :-) 2000-01-30 03:32:28 +00:00
Bodo Möller
a87030a1ed Make DSA_generate_parameters, and fix a couple of bug
(including another problem in the s3_srvr.c state machine).
2000-01-30 02:23:03 +00:00
Richard Levitte
f95a9f678a Declare BN_pseudo_rand(). 2000-01-27 22:07:42 +00:00
Bodo Möller
953aa79040 A couple of things were reversed for BN_pseudo_rand ... 2000-01-27 21:09:25 +00:00
Ulf Möller
157be2b67d comment was wrong. 2000-01-27 19:52:58 +00:00
Ulf Möller
38e33cef15 Document DSA and SHA.
New function BN_pseudo_rand().
Use BN_prime_checks_size(BN_num_bits(w)) rounds of Miller-Rabin when
generating DSA primes (why not use BN_is_prime()?)
2000-01-27 19:31:26 +00:00
Bodo Möller
2233bed1cb typo in a comment 2000-01-27 14:31:31 +00:00
Bodo Möller
ec1258dd44 Update comments to provide a better approximation of reality. 2000-01-27 13:00:10 +00:00
Bodo Möller
b99b110766 Add a pointer to a paper (is the algorithm in section 4.2 the
word-based algorithm we are using?)
2000-01-27 12:52:41 +00:00
Bodo Möller
6e0cad8d34 enable Montgomery test 2000-01-27 11:26:28 +00:00
Bodo Möller
5f5e96d92b Update references. 2000-01-27 09:15:49 +00:00
Ulf Möller
e93f9a3284 Run ispell.
Clean up bn_mont.c.
2000-01-27 01:50:42 +00:00
Dr. Stephen Henson
dd9d233e2a Tidy up CRYPTO_EX_DATA structures. 2000-01-23 23:41:49 +00:00
Ulf Möller
dd8dec69b8 Document the BN library. 2000-01-23 22:06:24 +00:00
Ulf Möller
4486d0cd7a Document the DH library, and make some minor changes along the way. 2000-01-22 20:05:23 +00:00
Ulf Möller
b25c8db872 AFAICS lst1 stands for "lshift test" not "list". 2000-01-21 00:00:12 +00:00
Bodo Möller
4146aa6b42 Rename lst1 to list1 to avoid name conflict on some platforms. 2000-01-20 23:15:50 +00:00
Bodo Möller
0c50e02b30 - Pseudo-seed the PRNG in programs used for "make test"
because otherwise BN_rand will fail unless DEVRANDOM works,
  which causes the programs to dump core because they
  don't check the return value of BN_rand (and if they
  did, we still couldn't test anything).

- add comment to some files that appear not to be used at all.
2000-01-14 17:55:37 +00:00
Ulf Möller
eb952088f0 Precautions against using the PRNG uninitialized: RAND_bytes() now
returns int (1 = ok, 0 = not seeded). New function RAND_add() is the
same as RAND_seed() but takes an estimate of the entropy as an additional
argument.
2000-01-13 20:59:17 +00:00
Bodo Möller
76aa0ddc86 Turn BN_prime_checks into a macro.
Primes p where (p-1)/2 is prime too are called "safe", not "strong".
2000-01-12 11:57:30 +00:00
Bodo Möller
e4b7645631 add dependency and auto-generation rule for bn_prime.h
(created by bn_prime.pl, which now prints the copyright/license
note as found in bn_prime.h)
2000-01-12 09:16:22 +00:00
Andy Polyakov
b96eb06f79 Makefile clean-ups, crypto/bn/asm/alpha.s compiles on Alpha Linux. 1999-12-25 16:08:31 +00:00
Ulf Möller
3b14cb717d Solaris x86 assembler problem is already addressed in ./config
(bug reports keep coming in because that was still missing in 0.9.4)
1999-12-14 15:28:10 +00:00
Ulf Möller
a4af39ac44 Don't use inline assembler on x86 Solaris (would need a different syntax). 1999-12-08 22:55:06 +00:00
Mark J. Cox
ce2c95b2a2 Fix assembler for Alpha (tested only on DEC OSF not Linux or *BSD). The
problem was that one of the replacement routines had not been working since
SSLeay releases.  For now the offending routine has been replaced with
non-optimised assembler.  Even so, this now gives around 95% performance
improvement for 1024 bit RSA signs.
1999-11-03 14:10:10 +00:00
Bodo Möller
798757762a Improve support for running everything as a monolithic application.
Submitted by: Lennart Bång, Bodo Möller
1999-10-25 19:36:01 +00:00
Ulf Möller
8e1589ece5 VC++ warning. 1999-09-29 22:11:06 +00:00
Andy Polyakov
0bbd03525e Minor MIPS III/IV tune-up. 1999-08-24 16:02:16 +00:00
Ben Laurie
97e84e38df Make it compile under -pedantic. 1999-08-03 10:18:27 +00:00
Andy Polyakov
4c22909e31 Extra i386+gcc bn_div.c tune-up featuring inline division and saving
the remainder left in %edx. Here is the resulting performance improvement
matrix (improvement as a result of this *and* previous tune-up committed
two days ago). The results were obtained by profiling the "div" part of
the crypto/bn/bnspeed.c.

CPU	BN_div	bn_div_words	overall	comment
------------------------------------------------------------------------
PII	+16%	accumulated by	+2-3%	PII multiplies damn fast! Taking
		inlining		multiplication out of the loop
					didn't make too much difference.
					Eliminating of the multiplication
					involved in remainder calculation
					is the major factor.

Pentium	+45%	accumulated by	+7-9%	mull isn't that fast and replacing
		inlining		multiplications with additions in
					the loop has more visible effect:-)

MIPS	+75%	+12%		+20-25%	In addition to the taking mults
R10000					out of the loop (giving 12% in the
					asm/mips3.s) three mults were
					eliminated in BN_div.

Alpha	+30%	+50%		+10-15%	Same as above. But remember that
EV4					bn_div_words is a C implementation.
					It takes 4 Alpha mults in C to do
					the same thing as 1 MIPS mult in
					assembler does. So the effect (50%)
					is more impressive. But not the
					overall one... Well, if Alpha
					bn_mul_add would be implemented
					in assembler overall improvement
					would be closer to MIPS...
1999-07-31 23:27:41 +00:00
Bodo Möller
8d85b33eb5 by request: let BN_dup(NULL) just return NULL 1999-07-30 19:22:57 +00:00
Andy Polyakov
0dd25e3606 Bignum division tune-up. Idea is to move multiplications in front of
loop body and replace 'em with addition/subtraction.
1999-07-30 11:43:43 +00:00
Andy Polyakov
5965902e6e when invoking bn_*_comba[48] result->top wasn't always set correctly. 1999-07-27 09:36:59 +00:00
Andy Polyakov
1656ef2997 SPARC Solaris config updates.
./config sences whole range of SPARC instruction sets. Do note that
it favors Sun C now if both gcc and cc 4.2 or later are present!
1999-07-25 22:25:12 +00:00
Andy Polyakov
a0618e3e5e Added support for SPARC Linux. 1999-07-25 15:13:49 +00:00
Andy Polyakov
fccbb9b34f - performance retunes, v8plus bn_*_comba routines are reimplemented;
- support for GNU assembler (read SPARC Linux);
1999-07-25 12:34:30 +00:00