xref: /openbsd-src/lib/libcrypto/arch/amd64/crypto_arch.h (revision e045734c6461b648f36a4cbeed4bd7082a607e47)
1 /*	$OpenBSD: crypto_arch.h,v 1.4 2024/11/16 13:05:35 jsing Exp $ */
2 /*
3  * Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 #include <stdint.h>
19 
20 #ifndef HEADER_CRYPTO_ARCH_H
21 #define HEADER_CRYPTO_ARCH_H
22 
23 #define HAVE_CRYPTO_CPU_CAPS_INIT
24 #define HAVE_CRYPTO_CPU_CAPS_IA32
25 
26 #ifndef __ASSEMBLER__
27 extern uint64_t crypto_cpu_caps_amd64;
28 #endif
29 
30 #define CRYPTO_CPU_CAPS_AMD64_SHA	(1ULL << 0)
31 
32 #ifndef OPENSSL_NO_ASM
33 
34 #define HAVE_AES_CBC_ENCRYPT_INTERNAL
35 #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL
36 #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL
37 #define HAVE_AES_ENCRYPT_INTERNAL
38 #define HAVE_AES_DECRYPT_INTERNAL
39 
40 #define HAVE_RC4_INTERNAL
41 #define HAVE_RC4_SET_KEY_INTERNAL
42 
43 #endif
44 
45 #endif
46