diff options
Diffstat (limited to 'src/lib/libcrypto/rc4')
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-586.pl | 28 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl | 13 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-parisc.pl | 18 | ||||
-rwxr-xr-x | src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | 27 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_skey.c | 20 |
6 files changed, 3 insertions, 106 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-586.pl b/src/lib/libcrypto/rc4/asm/rc4-586.pl index 4991c37c2c..bb30f9b88f 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-586.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-586.pl | |||
@@ -384,32 +384,4 @@ $idx="edx"; | |||
384 | &mov (&DWP(-4,$out),"eax"); # key->y=0; | 384 | &mov (&DWP(-4,$out),"eax"); # key->y=0; |
385 | &function_end("RC4_set_key"); | 385 | &function_end("RC4_set_key"); |
386 | 386 | ||
387 | # const char *RC4_options(void); | ||
388 | &static_label("opts"); | ||
389 | &function_begin_B("RC4_options"); | ||
390 | &picsetup("edx"); | ||
391 | &picsymbol("eax", &label("opts"), "edx"); | ||
392 | &picsymbol("edx", "OPENSSL_ia32cap_P", "edx");; | ||
393 | |||
394 | &mov ("edx",&DWP(0,"edx")); | ||
395 | &bt ("edx","\$IA32CAP_BIT0_INTELP4"); | ||
396 | &jc (&label("1xchar")); | ||
397 | &bt ("edx","\$IA32CAP_BIT0_SSE2"); | ||
398 | &jnc (&label("ret")); | ||
399 | &add ("eax",25); | ||
400 | &ret (); | ||
401 | &set_label("1xchar"); | ||
402 | &add ("eax",12); | ||
403 | &set_label("ret"); | ||
404 | &ret (); | ||
405 | &function_end_B("RC4_options"); | ||
406 | |||
407 | &rodataseg(); | ||
408 | &set_label("opts"); | ||
409 | &asciz ("rc4(4x,int)"); | ||
410 | &asciz ("rc4(1x,char)"); | ||
411 | &asciz ("rc4(8x,mmx)"); | ||
412 | &previous(); | ||
413 | |||
414 | &asm_finish(); | 387 | &asm_finish(); |
415 | |||
diff --git a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl index 6d058bd9d4..3190e6a8e7 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl | |||
@@ -491,19 +491,6 @@ RC4_set_key: | |||
491 | mov %eax,-4($dat) | 491 | mov %eax,-4($dat) |
492 | ret | 492 | ret |
493 | .size RC4_set_key,.-RC4_set_key | 493 | .size RC4_set_key,.-RC4_set_key |
494 | |||
495 | .globl RC4_options | ||
496 | .type RC4_options,\@abi-omnipotent | ||
497 | .align 16 | ||
498 | RC4_options: | ||
499 | endbr64 | ||
500 | lea .Lopts(%rip),%rax | ||
501 | ret | ||
502 | .align 64 | ||
503 | .Lopts: | ||
504 | .asciz "rc4(64x,int)" | ||
505 | .align 64 | ||
506 | .size RC4_options,.-RC4_options | ||
507 | ___ | 494 | ___ |
508 | } | 495 | } |
509 | 496 | ||
diff --git a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl index 24e3e0c30b..831d785979 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl | |||
@@ -286,24 +286,6 @@ L\$2nd | |||
286 | nop | 286 | nop |
287 | .PROCEND | 287 | .PROCEND |
288 | 288 | ||
289 | .EXPORT RC4_options,ENTRY | ||
290 | .ALIGN 8 | ||
291 | RC4_options | ||
292 | .PROC | ||
293 | .CALLINFO NO_CALLS | ||
294 | .ENTRY | ||
295 | #ifdef __PIC__ | ||
296 | addil LT'L\$opts, %r19 | ||
297 | ldw RT'L\$opts(%r1), %r28 | ||
298 | #else | ||
299 | ldil L'L\$opts, %t1 | ||
300 | ldo R'L\$opts(%t1), %r28 | ||
301 | #endif | ||
302 | bv (%r2) | ||
303 | .EXIT | ||
304 | nop | ||
305 | .PROCEND | ||
306 | |||
307 | .section .rodata | 289 | .section .rodata |
308 | .ALIGN 8 | 290 | .ALIGN 8 |
309 | L\$opts | 291 | L\$opts |
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl index 2bac7d744d..0472acce8a 100755 --- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl | |||
@@ -503,33 +503,6 @@ RC4_set_key: | |||
503 | mov %eax,-4($dat) | 503 | mov %eax,-4($dat) |
504 | ret | 504 | ret |
505 | .size RC4_set_key,.-RC4_set_key | 505 | .size RC4_set_key,.-RC4_set_key |
506 | |||
507 | .globl RC4_options | ||
508 | .type RC4_options,\@abi-omnipotent | ||
509 | .align 16 | ||
510 | RC4_options: | ||
511 | endbr64 | ||
512 | lea .Lopts(%rip),%rax | ||
513 | mov OPENSSL_ia32cap_P(%rip),%edx | ||
514 | bt \$IA32CAP_BIT0_INTELP4,%edx | ||
515 | jc .L8xchar | ||
516 | bt \$IA32CAP_BIT0_INTEL,%edx | ||
517 | jnc .Ldone | ||
518 | add \$25,%rax | ||
519 | ret | ||
520 | .L8xchar: | ||
521 | add \$12,%rax | ||
522 | .Ldone: | ||
523 | ret | ||
524 | .section .rodata | ||
525 | .align 64 | ||
526 | .Lopts: | ||
527 | .asciz "rc4(8x,int)" | ||
528 | .asciz "rc4(8x,char)" | ||
529 | .asciz "rc4(16x,int)" | ||
530 | .align 64 | ||
531 | .text | ||
532 | .size RC4_options,.-RC4_options | ||
533 | ___ | 506 | ___ |
534 | 507 | ||
535 | sub reg_part { | 508 | sub reg_part { |
diff --git a/src/lib/libcrypto/rc4/rc4.h b/src/lib/libcrypto/rc4/rc4.h index f59185ed33..7ebe232106 100644 --- a/src/lib/libcrypto/rc4/rc4.h +++ b/src/lib/libcrypto/rc4/rc4.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rc4.h,v 1.13 2015/10/20 15:50:13 jsing Exp $ */ | 1 | /* $OpenBSD: rc4.h,v 1.14 2023/07/28 10:35:14 tb Exp $ */ |
2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -76,7 +76,6 @@ typedef struct rc4_key_st { | |||
76 | RC4_INT data[256]; | 76 | RC4_INT data[256]; |
77 | } RC4_KEY; | 77 | } RC4_KEY; |
78 | 78 | ||
79 | const char *RC4_options(void); | ||
80 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); | 79 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); |
81 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); | 80 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); |
82 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, | 81 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, |
diff --git a/src/lib/libcrypto/rc4/rc4_skey.c b/src/lib/libcrypto/rc4/rc4_skey.c index e32a6e84a3..5833c7bd07 100644 --- a/src/lib/libcrypto/rc4/rc4_skey.c +++ b/src/lib/libcrypto/rc4/rc4_skey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rc4_skey.c,v 1.15 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rc4_skey.c,v 1.16 2023/07/28 10:35:14 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -57,24 +57,8 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/rc4.h> | 59 | #include <openssl/rc4.h> |
60 | #include "rc4_local.h" | ||
61 | #include <openssl/opensslv.h> | ||
62 | 60 | ||
63 | const char * | 61 | #include "rc4_local.h" |
64 | RC4_options(void) | ||
65 | { | ||
66 | #ifdef RC4_INDEX | ||
67 | if (sizeof(RC4_INT) == 1) | ||
68 | return("rc4(idx,char)"); | ||
69 | else | ||
70 | return("rc4(idx,int)"); | ||
71 | #else | ||
72 | if (sizeof(RC4_INT) == 1) | ||
73 | return("rc4(ptr,char)"); | ||
74 | else | ||
75 | return("rc4(ptr,int)"); | ||
76 | #endif | ||
77 | } | ||
78 | 62 | ||
79 | /* RC4 as implemented from a posting from | 63 | /* RC4 as implemented from a posting from |
80 | * Newsgroups: sci.crypt | 64 | * Newsgroups: sci.crypt |