diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-18 12:39:06 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-18 12:39:06 +0000 |
commit | 3ecc1487d41b0329f588ff32ee48f4705f68abd3 (patch) | |
tree | 7eec320154c6278b9b33b5ff1490edcabae503da /lib/libcrypto/des | |
parent | 0d9a21b9e0a3bcb33d01f67bee2ce6bc20494ae6 (diff) |
use bn_asm_vax.S (from netbsd); test + ok by miod
use asm code for i386, except for the CBC code, because
it is not clean PIC code.
add <machime/asm.h> support to x86unix.pl
tested by: nick (on 30386), henning, djm, tedu, jmc and more;
no shlib minor crank necessary, only internal symbols changed.
Diffstat (limited to 'lib/libcrypto/des')
-rw-r--r-- | lib/libcrypto/des/asm/des-586.pl | 12 | ||||
-rw-r--r-- | lib/libcrypto/des/des_enc.c | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/libcrypto/des/asm/des-586.pl b/lib/libcrypto/des/asm/des-586.pl index b75d3c6b3a4..60d577cc8d5 100644 --- a/lib/libcrypto/des/asm/des-586.pl +++ b/lib/libcrypto/des/asm/des-586.pl @@ -22,10 +22,14 @@ $R="esi"; &external_label("DES_SPtrans"); &DES_encrypt("DES_encrypt1",1); &DES_encrypt("DES_encrypt2",0); -&DES_encrypt3("DES_encrypt3",1); -&DES_encrypt3("DES_decrypt3",0); -&cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1); -&cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5); + +if (!$main'openbsd) + { + &DES_encrypt3("DES_encrypt3",1); + &DES_encrypt3("DES_decrypt3",0); + &cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1); + &cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5); + } &asm_finish(); diff --git a/lib/libcrypto/des/des_enc.c b/lib/libcrypto/des/des_enc.c index 1c37ab96d3d..4f09804c44f 100644 --- a/lib/libcrypto/des/des_enc.c +++ b/lib/libcrypto/des/des_enc.c @@ -58,6 +58,7 @@ #include "des_locl.h" +#ifndef OPENBSD_DES_ASM void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc) { register DES_LONG l,r,t,u; @@ -246,6 +247,7 @@ void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc) data[1]=ROTATE(r,3)&0xffffffffL; l=r=t=u=0; } +#endif void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3) |