Commit Graph

171 Commits

Author SHA1 Message Date
itojun 6e50408d00 Makefile for generating manpage (require perl, should be used offline) 2000-10-04 05:34:15 +00:00
itojun 169eefc02f move rc5/idea dummy functions from crypto/dist/openssl/crypto to lib/libcrypto.
they are not part of the openssl distribution.
suggested by thorpej.
2000-10-01 22:17:59 +00:00
itojun e5e807d114 always compile RSA into libcrypto.
MKCRYPTO disables the whole crypto tree, and in that case,
we will not have RSA (nor libcrypto) with us.
2000-09-30 12:21:51 +00:00
itojun 8d26d03189 repair openssl (libcrypto) for non-32bit architecture.
don't use unsigned long where 32bit unsigned variable is asked for.
use u_int32_t.  (not sure if uint32_t is better or not, but anyway,
u_int32_t <-> uint32_t should not raise binary compatibility issue)
PR10921.

TODO: have arch-dependent Makefiles where we supply -DFOO for optimization.
(do not change size of variable though)

XXX: we should actually nuke all other #ifdef in /usr/include/openssl/*.h,
however, that needs a lot of work and will make future openssl upgrade harder.

remove RC5 and IDEA by default.  build them separately as
libcrypto_{rc5,idea}.a.  put dummy function, which is "warning to stderr
and exit(1)".  NOCRYPTO_{RC5,IDEA} are obsoleted.
PR10883.
2000-09-30 00:23:28 +00:00
jhawk a022cf9d37 Use
${MAKE}
instead of
  make
2000-08-30 23:51:46 +00:00
thorpej cf6fc32958 Add support for building the assembly versions of some BIGNUM
routines from OpenSSL.  Speeds up DSA significantly.  A similar
gain should also be seen for RSA.

Before:
Doing 512 bit sign dsa's for 10s: 965 512 bit DSA signs in 9.97s
Doing 512 bit verify dsa's for 10s: 766 512 bit DSA verify in 9.93s
Doing 1024 bit sign dsa's for 10s: 276 1024 bit DSA signs in 9.99s
Doing 1024 bit verify dsa's for 10s: 217 1024 bit DSA verify in 9.93s
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0103s   0.0130s     96.8     77.1
dsa 1024 bits   0.0362s   0.0458s     27.6     21.9

After:
Doing 512 bit sign dsa's for 10s: 3742 512 bit DSA signs in 9.88s
Doing 512 bit verify dsa's for 10s: 3065 512 bit DSA verify in 9.92s
Doing 1024 bit sign dsa's for 10s: 1357 1024 bit DSA signs in 9.99s
Doing 1024 bit verify dsa's for 10s: 1094 1024 bit DSA verify in 9.83s
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0026s   0.0032s    378.7    309.0
dsa 1024 bits   0.0074s   0.0090s    135.8    111.3
2000-07-31 19:57:30 +00:00
thorpej 557e12076d Add support for building the assembly version of RMD160 from OpenSSL.
Before:
Doing rmd160 for 3s on 8 size blocks: 778828 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 430214 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 182108 rmd160's in 3.00s
Doing rmd160 for 3s on 1024 size blocks: 55050 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 7339 rmd160's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
rmd160            2076.87k     9177.90k    15539.88k    18790.40k    20040.36k

After:
Doing rmd160 for 3s on 8 size blocks: 1084941 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 617966 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 267381 rmd160's in 2.99s
Doing rmd160 for 3s on 1024 size blocks: 82001 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 10974 rmd160's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
rmd160            2893.18k    13183.27k    22892.82k    27989.67k    29966.34k
2000-07-31 19:22:04 +00:00
thorpej cb83ceb68d Add support for building the assembly version of MD5 from OpenSSL.
Before:
Doing md5 for 3s on 8 size blocks: 1490796 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 895849 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 410807 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 129416 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 17527 md5's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5               3975.46k    19111.45k    35055.53k    44173.99k    47860.39k

After:
Doing md5 for 3s on 8 size blocks: 2041410 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 1345402 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 669827 md5's in 3.10s
Doing md5 for 3s on 1024 size blocks: 221744 md5's in 2.96s
Doing md5 for 3s on 8192 size blocks: 30685 md5's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5               5443.76k    28701.91k    56968.68k    76711.44k    83790.51k
2000-07-31 19:08:02 +00:00
thorpej dacf9960bf Add support for building the assembly versions of Blowfish encrypt
and decrypt from OpenSSL.  Right now we only build the 586 version,
but eventually we will be able to build the 686 version based on a
CPP flag defined as a result of using `cc -mcpu=pentiumpro'.

We don't build the assembly version of BF_cbc_encrypt(), as it would
have to be rewritten to be PIC.

Performance difference is quite noticeable.

Before:
Doing blowfish cbc for 3s on 8 size blocks: 2891026 blowfish cbc's in 2.97s
Doing blowfish cbc for 3s on 64 size blocks: 411766 blowfish cbc's in 3.10s
Doing blowfish cbc for 3s on 256 size blocks: 104721 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 26291 blowfish cbc's in 2.98s
Doing blowfish cbc for 3s on 8192 size blocks: 3290 blowfish cbc's in 3.10s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
blowfish cbc      7787.28k     8755.16k     8936.19k     9034.22k     8954.05k

After:
Doing blowfish cbc for 3s on 8 size blocks: 4573792 blowfish cbc's in 3.10s
Doing blowfish cbc for 3s on 64 size blocks: 713440 blowfish cbc's in 2.99s
Doing blowfish cbc for 3s on 256 size blocks: 183125 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 46221 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 8192 size blocks: 5787 blowfish cbc's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
blowfish cbc     12156.26k    15270.96k    15626.67k    15776.77k    15802.37k
2000-07-31 18:39:04 +00:00
thorpej caacba233b Rework this so what we can include arch-specific versions
of the crypto Makefile includes.
2000-07-31 17:04:05 +00:00
mrg 218aaf9ee5 bump libcrypto minor 2000-07-17 02:21:18 +00:00
mrg f23f12cbc5 update for openssl 0.9.5a 2000-07-16 07:16:20 +00:00
veego 94a5610765 Add CPPFLAGS+= -DNO_{RSA,IDEA,RC5}. 2000-07-05 14:00:38 +00:00
thorpej df83a2a3cd Add MK... variables to enable/disable various aspects of building
crypto support into the system.  See share/mk/bsd.README for more
a full description.
2000-06-23 06:01:10 +00:00
thorpej 9afca06751 Add cleaned up versions of des_set_random_generator_seed(),
des_new_random_key(), and des_init_random_number_generator()
from the crypto-us libdes.
2000-06-21 19:47:37 +00:00
thorpej 1013bcab9c Add cleaned up versions of des_set_random_generator_seed(),
des_new_random_key(), and des_init_random_number_generator()
from the crypto-us libdes.

While I'm here, fix a serious bug in des_init_random_number_generator()
whereby the accumlated data to be hashed was zero'd *before* actually
being hashed.  NOTE: The bug only affects people who are not using the
rnd(4) in-kernel random number generator, and it is worth noting that
the resulting keys are not always the same, but are likely easy to
determine.
2000-06-21 19:46:16 +00:00
thorpej c7fe9dcc88 s/CFLAGS/CPPFLAGS/g 2000-06-21 19:34:22 +00:00
thorpej e352d2ca43 Fix installing <kerberosIV/des.h> 2000-06-20 21:49:02 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so.  Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
2000-06-20 06:00:24 +00:00
thorpej b50999826e Fixup the OpenSSL library builds. 2000-06-16 06:16:37 +00:00
thorpej 285b0ffbdd Import libcrypto build framework from cryptosrc-intl. 2000-06-16 04:21:31 +00:00