diff options
author | jsing <> | 2024-03-28 01:49:29 +0000 |
---|---|---|
committer | jsing <> | 2024-03-28 01:49:29 +0000 |
commit | efdc2fdd7e31b41f518a70445b050722a765ff02 (patch) | |
tree | ca5f083b55057a8157b330fc459a97936af57f81 /src/lib/libcrypto/arch/amd64 | |
parent | 852ce4f4fa6a26ebd4801907061f85fb0c1f4e99 (diff) | |
download | openbsd-efdc2fdd7e31b41f518a70445b050722a765ff02.tar.gz openbsd-efdc2fdd7e31b41f518a70445b050722a765ff02.tar.bz2 openbsd-efdc2fdd7e31b41f518a70445b050722a765ff02.zip |
Use C functions for RC4 public API.
Rather than having public API switch between C and assembly, always
use C functions as entry points, which then call an assembly
implementation (if available). This makes it significantly easier
to deal with symbol aliasing/namespaces and it also means we
benefit from vulnerability prevention provided by the C compiler.
Rename the assembly generated functions from RC4() to rc4_internal()
and RC4_set_key() to rc4_set_key_internal(). Always include rc4.c
and change it to use defines that are similar to those used in BN.
ok beck@ joshua@ tb@
Diffstat (limited to 'src/lib/libcrypto/arch/amd64')
-rw-r--r-- | src/lib/libcrypto/arch/amd64/Makefile.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc index b04923b596..617b9feb9a 100644 --- a/src/lib/libcrypto/arch/amd64/Makefile.inc +++ b/src/lib/libcrypto/arch/amd64/Makefile.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.16 2024/03/28 01:41:16 jsing Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.17 2024/03/28 01:49:29 jsing Exp $ |
2 | 2 | ||
3 | # amd64-specific libcrypto build rules | 3 | # amd64-specific libcrypto build rules |
4 | 4 | ||
@@ -46,7 +46,10 @@ SSLASM+= md5 md5-x86_64 | |||
46 | CFLAGS+= -DGHASH_ASM | 46 | CFLAGS+= -DGHASH_ASM |
47 | SSLASM+= modes ghash-x86_64 | 47 | SSLASM+= modes ghash-x86_64 |
48 | # rc4 | 48 | # rc4 |
49 | CFLAGS+= -DHAVE_RC4_INTERNAL | ||
50 | CFLAGS+= -DHAVE_RC4_SET_KEY_INTERNAL | ||
49 | SSLASM+= rc4 rc4-x86_64 | 51 | SSLASM+= rc4 rc4-x86_64 |
52 | SRCS+= rc4.c | ||
50 | # ripemd | 53 | # ripemd |
51 | # sha | 54 | # sha |
52 | CFLAGS+= -DSHA1_ASM | 55 | CFLAGS+= -DSHA1_ASM |