Commit Graph

51 Commits

Author SHA1 Message Date
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
simonb f278adc002 The des_opts program suggests just "-DDES_UNROLL" on my 5000/260. 2001-09-11 04:10:41 +00:00
thorpej ba08e565cc Use MACHINE_CPU rather than an (incomplete) substitution of
MACHINE_ARCH;.
2001-09-10 02:59:09 +00:00
thorpej 792a41ba35 Do the CPU-specific optimization flags a better way, suggested
by Simon Burge.
2001-09-10 02:56:57 +00:00
tls c9d0af63e8 Use MACHINE_CPU, not MACHINE_ARCH, to select optimizations. Add BF_PTR/BF_PTR2 tweaks to bf.inc 2001-09-09 21:22:09 +00:00
tls f52ec0ef7e tweak the x86 options a bit 2001-09-09 20:54:25 +00:00
tls ad1c0d6d54 Add some of the options to select optimizations of the C DES code for
different architectures.

Doesn't help some platforms much, helps others quite a bit.  These
options are from options.txt in the libdes/libcrypto distribution; it
would probably be best to test and replace them with what's best with
the current gcc on each of our architectures.
2001-09-09 20:41:47 +00:00
thorpej 6fcde7aad3 Grumble. If you make external references, the code MUST be PIC
for shared libraries.  This code is not PIC, so DO NOT BUILD IT.
2001-09-09 19:55:24 +00:00
tls 43e3cefe90 Add assembly versions of DES transforms for x86; a performance improvement
of about 3.5X on my 1333MHz Athlon (about 37MB/sec!) compared to the old
C versions.

We could boost the speed of the C versions on most other architectures with
des.inc files that set the compile-time flags (DES_PTR, DES_RISC1, DES_RISC2)
correctly; at the moment they aren't set at all.
2001-09-09 10:44:24 +00:00
wiz 40ac848024 Fix various misspellings of compatible/compatibility. 2001-06-11 01:50:48 +00:00
sommerfeld 99c2c3dfe8 Fix (work around?) bin/12804.
(idea.h, rc5.h, and rsa.h appeared twice in INCS, confusing make -j)
2001-05-02 13:06:14 +00:00
itojun 768e5b5fad comment; use latest pod2man 2001-04-13 00:18:10 +00:00
itojun c0fa60f50c fix manpage paths to meet 0.9.6a. most of short names are escaped as
openssl_xx(1) or openssl_xx(3), as they are way too generic.
2001-04-12 10:45:33 +00:00
itojun 35a07da1df use openssl 0.9.6a. shlib major # is bumped for libcrypto, libssl and
all kerberos libraries.
2001-04-12 07:48:03 +00:00
wiz faed862d8f Regenerate with pod2man-1.0.2, which produces a bit better output. 2001-04-09 12:29:33 +00:00
wiz 6b5ab77765 fo -> for 2001-04-02 18:25:34 +00:00
enami b812acc76c Pass -B to the make command used to make print-shlib-{major,minor} so
that make install with -j option works.
2001-02-11 01:21:24 +00:00
wiz c9be164d2f Fix date (22/Jul/2000 instead of 22/Jul/100).
(pod2man problem?)
2001-01-09 12:11:27 +00:00
lukem c449d2d4f2 use more standard %lld in favour of %qd 2001-01-04 15:35:22 +00:00
itojun c68d2a0c47 s/MAN1/MAN/ 2000-10-07 04:23:32 +00:00
itojun 05a03575d1 avoid conflicting manpage filenames (like err.3) 2000-10-05 01:55:49 +00:00
itojun 5774bbe1fb describe crypto_{idea,rc5} 2000-10-04 09:10:34 +00:00
itojun 4b7b1d8d36 more change name to meet the filename 2000-10-04 07:22:56 +00:00
itojun f434bd4ff6 change name to meet the filename 2000-10-04 07:21:22 +00:00
itojun d3e00e4496 move ssl(4) to ssl(3). sorry for the mess. 2000-10-04 07:15:06 +00:00
itojun 23a6673513 modify some chapters 2000-10-04 06:52:11 +00:00
itojun 818f52495c avoid RCS tags 2000-10-04 06:46:13 +00:00
itojun 5ca577ee77 add manpages for libcrypto. still need to review contents. 2000-10-04 05:58:15 +00:00
itojun a20f489194 add manpages generated by pod2man. need fixes here and there. 2000-10-04 05:41:25 +00:00
itojun 57e22c0d8a a clean target.
move config.5 to openssl.cnf.5.
2000-10-04 05:39:08 +00:00
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