diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-08-24 15:59:43 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-08-24 15:59:43 +0000 |
commit | 51b45bc2b5e5f920d2ac306a6f5b2896bdd8a284 (patch) | |
tree | 88ef5e18f221f23bd9ee60b7ec629886cc7416da /sys/crypto/xform.c | |
parent | 4b853e170897608b4ce241466591f33acbfe0de1 (diff) |
switch to the optimised AES reference code from
http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndael-fst-3.0.zip
the same code is used by ssh, so please make sure to update
usr.sbin/ssh/rijndael.c if you change this code.
tested on sparc (jason) and with swap encryption (me); ok deraadt@, provos@
Diffstat (limited to 'sys/crypto/xform.c')
-rw-r--r-- | sys/crypto/xform.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/crypto/xform.c b/sys/crypto/xform.c index 9ebb2063f85..9730e779f13 100644 --- a/sys/crypto/xform.c +++ b/sys/crypto/xform.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xform.c,v 1.14 2001/08/17 17:37:12 ben Exp $ */ +/* $OpenBSD: xform.c,v 1.15 2001/08/24 15:59:42 markus Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -356,14 +356,14 @@ skipjack_zerokey(u_int8_t **sched) void rijndael128_encrypt(caddr_t key, u_int8_t *blk) { - rijndael_encrypt((rijndael_ctx *) key, (u4byte *) blk, (u4byte *) blk); + rijndael_encrypt((rijndael_ctx *) key, (u_char *) blk, (u_char *) blk); } void rijndael128_decrypt(caddr_t key, u_int8_t *blk) { - rijndael_decrypt(((rijndael_ctx *) key) + 1, (u4byte *) blk, - (u4byte *) blk); + rijndael_decrypt(((rijndael_ctx *) key) + 1, (u_char *) blk, + (u_char *) blk); } void @@ -372,8 +372,8 @@ rijndael128_setkey(u_int8_t **sched, u_int8_t *key, int len) MALLOC(*sched, u_int8_t *, 2 * sizeof(rijndael_ctx), M_CRYPTO_DATA, M_WAITOK); bzero(*sched, 2 * sizeof(rijndael_ctx)); - rijndael_set_key((rijndael_ctx *) *sched, (u4byte *) key, len * 8, 1); - rijndael_set_key(((rijndael_ctx *) *sched) + 1, (u4byte *) key, + rijndael_set_key((rijndael_ctx *) *sched, (u_char *) key, len * 8, 1); + rijndael_set_key(((rijndael_ctx *) *sched) + 1, (u_char *) key, len * 8, 0); } |