head	1.8;
access;
symbols
	RELENG_3_5_0_RELEASE:1.4.2.1
	RELENG_3_4_0_RELEASE:1.4.2.1
	RELENG_3_3_0_RELEASE:1.4.2.1
	RELENG_3_2_PAO:1.4.0.4
	RELENG_3_2_PAO_BP:1.4
	RELENG_3_2_0_RELEASE:1.4
	RELENG_3_1_0_RELEASE:1.4
	RELENG_3:1.4.0.2
	RELENG_3_BP:1.4
	RELENG_2_2_8_RELEASE:1.2
	RELENG_3_0_0_RELEASE:1.4
	RELENG_2_2_7_RELEASE:1.2
	RELENG_2_2_6_RELEASE:1.2
	RELENG_2_2_5_RELEASE:1.2
	RELENG_2_2_2_RELEASE:1.2
	RELENG_2_2_1_RELEASE:1.2
	RELENG_2_2_0_RELEASE:1.2
	RELENG_2_1_7_RELEASE:1.2
	RELENG_2_1_6_1_RELEASE:1.2
	RELENG_2_1_6_RELEASE:1.2
	RELENG_2_2:1.2.0.8
	RELENG_2_2_BP:1.2
	RELENG_2_1_5_RELEASE:1.2
	RELENG_2_1_0_RELEASE:1.2
	RELENG_2_1_0:1.2.0.6
	RELENG_2_1_0_BP:1.2
	RELENG_2_0_5_RELEASE:1.2
	RELENG_2_0_5:1.2.0.4
	RELENG_2_0_5_BP:1.2
	RELENG_2_0_5_ALPHA:1.2
	RELEASE_2_0:1.2
	BETA_2_0:1.2
	ALPHA_2_0:1.2.0.2
	securedist_1_1_5:1.1.1.1
	Burren:1.1.1;
locks; strict;
comment	@# @;


1.8
date	99.09.20.12.39.20;	author markm;	state dead;
branches;
next	1.7;

1.7
date	99.08.28.01.30.23;	author peter;	state Exp;
branches;
next	1.6;

1.6
date	99.01.23.08.26.01;	author markm;	state Exp;
branches;
next	1.5;

1.5
date	99.01.21.13.51.30;	author brandon;	state dead;
branches;
next	1.4;

1.4
date	97.02.22.14.40.28;	author peter;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	97.01.14.06.25.49;	author jkh;	state Exp;
branches;
next	1.2;

1.2
date	94.08.08.17.28.49;	author csgr;	state Exp;
branches
	1.2.6.1
	1.2.8.1;
next	1.1;

1.1
date	94.08.08.17.18.08;	author csgr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.08.08.17.18.09;	author csgr;	state Exp;
branches;
next	;

1.2.6.1
date	99.09.05.11.51.43;	author peter;	state Exp;
branches;
next	;

1.2.8.1
date	99.09.05.11.48.53;	author peter;	state Exp;
branches;
next	;

1.4.2.1
date	99.08.29.15.17.05;	author peter;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Make this completely dependant on the exportable libcrypt, to avoid
duplication of effort. Also a large cleanup of the code, inspired
by Brandon Gillespie.
@
text
@
	FreeSec - NetBSD libcrypt replacement

	  David Burren <davidb@@werj.com.au>
	  Release 1.0, March 1994

    Document ref: $FreeBSD: src/secure/lib/libcrypt/README,v 1.7 1999/08/28 01:30:23 peter Exp $


Description
===========
This library is a drop-in replacement for the libcrypt used in U.S. copies
of NetBSD, duplicating that library's functionality.  A suite of verification
and benchmark tools is provided.

FreeSec 1.0 is an original implementation of the DES algorithm and the
crypt(3) interfaces used in Unix-style operating systems.  It was produced
in Australia and as such is not covered by U.S. export restrictions (at
least for copies that remain outside the U.S.).


History
=======
An earlier version of the FreeSec library was built using the UFC-crypt
package that is distributed as part of the GNU library.  UFC-crypt did not
support the des_cipher() or des_setkey() functions, nor the new-style
crypt with long keys.  These were implemented in FreeSec 0.2, but at least
one bug remained, where encryption would only succeed if either the salt
or the plaintext was zero.  Because of its heritage FreeSec 0.2 was covered
by the GNU Library Licence.

FreeSec 1.0 is an original implementation by myself, and has been tested
against the verification suite I'd been using with FreeSec 0.2 (this is not
encumbered by any licence).  FreeSec 1.0 is covered by a Berkeley-style
licence, which better fits into the *BSD hierarchy than the earlier GNU
licence.


Why should you use FreeSec?
===========================
FreeSec is intended as a replacement for the U.S.-only NetBSD libcrypt,
to act as a baseline for encryption functionality.

Some other packages (such as Eric Young's libdes package) are faster and
more complete than FreeSec, but typically have different licencing
arrangements.  While some applications will justify the use of these
packages, the idea here is that everyone should have access to *at least*
the functionality of FreeSec.


Performance of FreeSec 1.0
==========================
I compare below the performance of three libcrypt implementations.  As can be
seen, it's between the U.S. library and UFC-crypt.  While the performance of
FreeSec 1.0 is good enough to keep me happy for now, I hope to improve it in
future versions.  I was interested to note that while UFC-crypt is faster on
a 386, hardware characteristics can have markedly different effects on each
implementation.


386DX40, 128k cache	| U.S. BSD	| FreeSec 1.0	| FreeSec 0.2
CFLAGS=-O2		|		|		|
========================+===============+===============+==================
crypt (alternate keys)	| 317		| 341		| 395
	crypt/sec	|		|		|
------------------------+---------------+---------------+------------------
crypt (constant key)	| 317		| 368		| 436
	crypt/sec	|		|		|
------------------------+---------------+---------------+------------------
des_cipher( , , , 1)	| 6037		| 7459		| 3343
	blocks/sec	|		|		|
------------------------+---------------+---------------+------------------
des_cipher( , , , 25)	| 8871		| 9627		| 15926
	blocks/sec	|		|		|

Notes:	The results tabled here are the average over 10 runs.
	The entry/exit code for FreeSec 0.2's des_cipher() is particularly
	inefficient, thus the anomalous result for single encryptions.


As an experiment using a machine with a larger register set and an
obscenely fast CPU, I obtained the following results:

	60 MHz R4400		| FreeSec 1.0	| FreeSec 0.2
	========================+=================================
	crypt (alternate keys)	| 2545		| 2702
		crypt/sec	|		|
	------------------------+---------------------------------
	crypt (constant key)	| 2852		| 2981
		crypt/sec	|		|
	------------------------+---------------------------------
	des_cipher( , , , 1)	| 56443		| 21409
		blocks/sec	|		|
	------------------------+---------------------------------
	des_cipher( , , , 25)	| 82531		| 18276
		blocks/sec	|		|

Obviously your mileage will vary with your hardware and your compiler...
@


1.7
log
@$Id$ -> $FreeBSD$
@
text
@d7 1
a7 1
    Document ref: $FreeBSD$
@


1.6
log
@The new crypt code breaks "make world". Back it out.
@
text
@d7 1
a7 1
    Document ref: $Id$
@


1.5
log
@Removed from the secure/lib/libcrypt area, because of the rewrite to how
the Makefile handles des support by just including the single .c file.

Reviewed by:	Mark Murray
@
text
@d7 1
a7 1
    Document ref: $Id: README,v 1.4 1997/02/22 14:40:28 peter Exp $
@


1.4
log
@Revert $FreeBSD$ to $Id$
@
text
@d7 1
a7 1
    Document ref: $Id$
@


1.4.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d7 1
a7 1
    Document ref: $FreeBSD$
@


1.3
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d7 1
a7 1
    Document ref: $FreeBSD$
@


1.2
log
@Modify libcrypt so that the only exported symbol is _crypt().
Submitted by:	 Geoff Rehmet
@
text
@d7 1
a7 1
    Document ref: $Id: README,v 1.1.1.1 1994/04/04 14:57:18 g89r4222 Exp $
@


1.2.6.1
log
@$Id$ -> $FreeBSD$
@
text
@d7 1
a7 1
    Document ref: $FreeBSD$
@


1.2.8.1
log
@$Id$ -> $FreeBSD$
@
text
@d7 1
a7 1
    Document ref: $FreeBSD$
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Unecumbered securedist from FreeBSD 1.1.5.1 - sources for libcrypt.
The next commit will remove all symbols except _crypt()
Reviewed by:	Geoff Rehmet
Submitted by:	David Burren
@
text
@@
