diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-27 18:43:25 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-27 19:05:50 -0500 |
commit | 3e9e810f2e047effb1056211794d2d12ec2b04e7 (patch) | |
tree | 26c730915e8c56590fa8fc148da2651dab7f7c8c /crypto/des/fcrypt_b.c | |
parent | 8ed40b83ec19aab146a3df701c83066c8788a7a8 (diff) | |
download | openssl-3e9e810f2e047effb1056211794d2d12ec2b04e7.tar.gz |
Remove outdated legacy crypto options
Many options for supporting optimizations for legacy crypto on legacy
platforms have been removed. This simplifies the source code and
does not really penalize anyone.
DES_PTR (always on)
DES_RISC1, DES_RISC2 (always off)
DES_INT (always 'unsigned int')
DES_UNROLL (always on)
BF_PTR (always on) BF_PTR2 (removed)
MD2_CHAR, MD2_LONG (always 'unsigned char')
IDEA_SHORT, IDEA_LONG (always 'unsigned int')
RC2_SHORT, RC2_LONG (always 'unsigned int')
RC4_LONG (only int and char (for assembler) are supported)
RC4_CHUNK (always long), RC_CHUNK_LL (removed)
RC4_INDEX (always on)
And also make D_ENCRYPT macro more clear (@appro)
This is done in consultation with Andy.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/des/fcrypt_b.c')
-rw-r--r-- | crypto/des/fcrypt_b.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/crypto/des/fcrypt_b.c b/crypto/des/fcrypt_b.c index 8fb9350c87..6e02ac7c3c 100644 --- a/crypto/des/fcrypt_b.c +++ b/crypto/des/fcrypt_b.c @@ -80,9 +80,6 @@ void fcrypt_body(DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0, DES_LONG Eswap1) { register DES_LONG l, r, t, u; -#ifdef DES_PTR - register const unsigned char *des_SP = (const unsigned char *)DES_SPtrans; -#endif register DES_LONG *s; register int j; register DES_LONG E0, E1; @@ -95,14 +92,6 @@ void fcrypt_body(DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0, E1 = Eswap1; for (j = 0; j < 25; j++) { -#ifndef DES_UNROLL - register int i; - - for (i = 0; i < 32; i += 4) { - D_ENCRYPT(l, r, i + 0); /* 1 */ - D_ENCRYPT(r, l, i + 2); /* 2 */ - } -#else D_ENCRYPT(l, r, 0); /* 1 */ D_ENCRYPT(r, l, 2); /* 2 */ D_ENCRYPT(l, r, 4); /* 3 */ @@ -119,8 +108,6 @@ void fcrypt_body(DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0, D_ENCRYPT(r, l, 26); /* 14 */ D_ENCRYPT(l, r, 28); /* 15 */ D_ENCRYPT(r, l, 30); /* 16 */ -#endif - t = l; l = r; r = t; @@ -128,11 +115,11 @@ void fcrypt_body(DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0, l = ROTATE(l, 3) & 0xffffffffL; r = ROTATE(r, 3) & 0xffffffffL; - PERM_OP(l, r, t, 1, 0x55555555L); - PERM_OP(r, l, t, 8, 0x00ff00ffL); - PERM_OP(l, r, t, 2, 0x33333333L); + PERM_OP(l, r, t, 1, 0x55555555L); + PERM_OP(r, l, t, 8, 0x00ff00ffL); + PERM_OP(l, r, t, 2, 0x33333333L); PERM_OP(r, l, t, 16, 0x0000ffffL); - PERM_OP(l, r, t, 4, 0x0f0f0f0fL); + PERM_OP(l, r, t, 4, 0x0f0f0f0fL); out[0] = r; out[1] = l; |