Commit Graph

22 Commits

Author SHA1 Message Date
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
martin
1ec429dfd5 Constify, to make it compile (at least).
XXX - I'm not sure with what args this is called, but my bet is that
there is no chance this code will work on alignment requiring archs.
2005-06-03 11:31:57 +00:00
christos
0a86a6b05d sprinkle const 2005-05-30 04:13:14 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
keihan
6979203302 s/netbsd.org/NetBSD.org/g 2003-11-28 08:56:48 +00:00
thorpej
d5d0a860bc Add missing RCS ID. 2003-08-27 14:49:44 +00:00
tron
710886efc2 Fix build problem caused by adding "const", remove "register" usage. 2003-08-27 12:17:18 +00:00
thorpej
e77423d998 * Const poison, ANSI'ify, like newer OpenSSL Blowfish code.
* Add a BF_ecb_encrypt(), which makes for a prettier interface than
  using BF_encrypt()/BF_decrypt() directly.
2003-08-26 23:51:12 +00:00
itohy
f2cc0d2ae5 add non-ELF .align 2002-11-12 03:03:10 +00:00
thorpej
0ab79d5327 * Move config defns for the crypto algorithms into their own files.
Define an attribute for each crypto algorithm, and use that attribute
  to select the files that implement the algorithm.
* Give the "wlan" attribute a dependency on the "arc4" attribute.
* Give the "cgd" pseudo-device the "des", "blowfish", "cast128", and
  "rijndael" attributes.
* Use the new attribute-as-option-dependencies feature of config(8) to
  give the IPSEC_ESP option dependencies on the "des", "blowfish", "cast128",
  and "rijndael" attributes.
2002-10-11 01:52:04 +00:00
elric
c242f201c5 Modified to avoid compiler warnings. The specific warning related
to const BF_KEY * vars, and I chose to ``fix'' it in this file
rather than elsewhere in the framework because, although the other
fix was more appropriate, nothing seems to use the code in this
file and hence the risk of disrupting other people was lower.  In
the future, the more appropriate change would be to change blowfish.h
and bf_enc.c to have functions with signatures:

BF_encrypt(BF_LONG *, const BF_KEY *);
BF_decrypt(BF_LONG *, const BF_KEY *);
2002-09-08 07:52:41 +00:00
elric
7fbd07ccbe Include <sys/types.h> to allow compilation to occur. 2002-09-07 23:35:37 +00:00
elric
29db5af4a5 repoint include file for kernel use. 2002-09-07 22:58:04 +00:00
itojun
2ff9b43758 sync blowfish function prototype between i386 assembly and C.
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
2002-02-27 01:32:17 +00:00
lukem
4f2ad95259 add RCSIDs 2001-11-13 00:56:55 +00:00
tls
6b3afc53e0 Add asm versions of blowfish and des transforms for i386.
This also involved updating the in-kernel DES functions to correspond
to the versions in our in-tree OpenSSL, because the des_SPtrans table
has changed; the asm code will not work with the old permutation table!

C and i386 asm code for the DES, 3DES, and Blowfish CBC modes is also
included; it is not currently built as the ESP processing in esp_core.c
splits the CBC operation and the cipher transform apart.  Hopefully that
will be fixed as there is a substantial performance improvement to be had
from doing so.  It will remain necessary to use the C version of the
Blowfish CBC function on some i386 machines, however, as the asm version
uses bswapl, which ony 486 and later processors have.  The DES CBC code
doesn't have this problem.

Finally, change esp_core.c to use the ecb3_encrypt function instead of
calling ecb_encrypt three times; this improves performance a bit, in
particular in the asm case.
2001-09-09 11:03:59 +00:00
tls
3d4146e21f Add asm versions of blowfish and des transforms for i386.
This also involved updating the in-kernel DES functions to correspond
to the versions in our in-tree OpenSSL, because the des_SPtrans table
has changed; the asm code will not work with the old permutation table!

C and i386 asm code for the DES, 3DES, and Blowfish CBC modes is also
included; it is not currently built as the ESP processing in esp_core.c
splits the CBC operation and the cipher transform apart.  Hopefully that
will be fixed as there is a substantial performance improvement to be had
from doing so.  It will remain necessary to use the C version of the
Blowfish CBC function on some i386 machines, however, as the asm version
uses bswapl, which ony 486 and later processors have.  The DES CBC code
doesn't have this problem.

Finally, change esp_core.c to use the ecb3_encrypt function instead of
calling ecb_encrypt three times; this improves performance a bit, in
particular in the asm case.
2001-09-09 11:00:59 +00:00
itojun
00e5ad3408 remove files we no longer need/maintain. sync with kame 2001-05-27 01:03:53 +00:00
jdolecek
522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
itojun
7236276c18 sync with kame.
- include string.h (instead of sys/systm.h) on userland compilation.
  make compilation under src/regress/sys/crypto happier.  from minoura
- (blowfish) KNF.
2000-11-06 14:11:40 +00:00
itojun
0f1649155f make the code friendly with LP64 machines.
- use u_int32_t for 32bit quantity unsigned integer type.
- s/unsigned long/BF_LONG/ (BF_LONG = u_int32_t) where appropriate.
- prototype cleanup - due to *BSD code sharing, we still are using __P().
part of PR 10918.  sync with kame.
2000-08-31 06:46:21 +00:00
thorpej
599c8087c7 Import the IPsec crypto code from netbsd-cryptosrc-intl. 2000-06-14 19:45:33 +00:00