diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_aes.c')
| -rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 35c8d944ed..3d3b1a9d6c 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_aes.c,v 1.52 2023/07/07 13:54:45 beck Exp $ */ | 1 | /* $OpenBSD: e_aes.c,v 1.53 2023/07/07 19:37:53 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -572,7 +572,6 @@ EVP_aes_128_cbc(void) | |||
| 572 | return &aes_128_cbc; | 572 | return &aes_128_cbc; |
| 573 | #endif | 573 | #endif |
| 574 | } | 574 | } |
| 575 | LCRYPTO_ALIAS(EVP_aes_128_cbc); | ||
| 576 | 575 | ||
| 577 | #ifdef AESNI_CAPABLE | 576 | #ifdef AESNI_CAPABLE |
| 578 | static const EVP_CIPHER aesni_128_ecb = { | 577 | static const EVP_CIPHER aesni_128_ecb = { |
| @@ -607,7 +606,6 @@ EVP_aes_128_ecb(void) | |||
| 607 | return &aes_128_ecb; | 606 | return &aes_128_ecb; |
| 608 | #endif | 607 | #endif |
| 609 | } | 608 | } |
| 610 | LCRYPTO_ALIAS(EVP_aes_128_ecb); | ||
| 611 | 609 | ||
| 612 | #ifdef AESNI_CAPABLE | 610 | #ifdef AESNI_CAPABLE |
| 613 | static const EVP_CIPHER aesni_128_ofb = { | 611 | static const EVP_CIPHER aesni_128_ofb = { |
| @@ -642,7 +640,6 @@ EVP_aes_128_ofb(void) | |||
| 642 | return &aes_128_ofb; | 640 | return &aes_128_ofb; |
| 643 | #endif | 641 | #endif |
| 644 | } | 642 | } |
| 645 | LCRYPTO_ALIAS(EVP_aes_128_ofb); | ||
| 646 | 643 | ||
| 647 | #ifdef AESNI_CAPABLE | 644 | #ifdef AESNI_CAPABLE |
| 648 | static const EVP_CIPHER aesni_128_cfb = { | 645 | static const EVP_CIPHER aesni_128_cfb = { |
| @@ -711,7 +708,6 @@ EVP_aes_128_cfb1(void) | |||
| 711 | return &aes_128_cfb1; | 708 | return &aes_128_cfb1; |
| 712 | #endif | 709 | #endif |
| 713 | } | 710 | } |
| 714 | LCRYPTO_ALIAS(EVP_aes_128_cfb1); | ||
| 715 | 711 | ||
| 716 | #ifdef AESNI_CAPABLE | 712 | #ifdef AESNI_CAPABLE |
| 717 | static const EVP_CIPHER aesni_128_cfb8 = { | 713 | static const EVP_CIPHER aesni_128_cfb8 = { |
| @@ -746,7 +742,6 @@ EVP_aes_128_cfb8(void) | |||
| 746 | return &aes_128_cfb8; | 742 | return &aes_128_cfb8; |
| 747 | #endif | 743 | #endif |
| 748 | } | 744 | } |
| 749 | LCRYPTO_ALIAS(EVP_aes_128_cfb8); | ||
| 750 | 745 | ||
| 751 | #ifdef AESNI_CAPABLE | 746 | #ifdef AESNI_CAPABLE |
| 752 | static const EVP_CIPHER aesni_128_ctr = { | 747 | static const EVP_CIPHER aesni_128_ctr = { |
| @@ -781,7 +776,6 @@ EVP_aes_128_ctr(void) | |||
| 781 | return &aes_128_ctr; | 776 | return &aes_128_ctr; |
| 782 | #endif | 777 | #endif |
| 783 | } | 778 | } |
| 784 | LCRYPTO_ALIAS(EVP_aes_128_ctr); | ||
| 785 | 779 | ||
| 786 | 780 | ||
| 787 | #ifdef AESNI_CAPABLE | 781 | #ifdef AESNI_CAPABLE |
| @@ -817,7 +811,6 @@ EVP_aes_192_cbc(void) | |||
| 817 | return &aes_192_cbc; | 811 | return &aes_192_cbc; |
| 818 | #endif | 812 | #endif |
| 819 | } | 813 | } |
| 820 | LCRYPTO_ALIAS(EVP_aes_192_cbc); | ||
| 821 | 814 | ||
| 822 | #ifdef AESNI_CAPABLE | 815 | #ifdef AESNI_CAPABLE |
| 823 | static const EVP_CIPHER aesni_192_ecb = { | 816 | static const EVP_CIPHER aesni_192_ecb = { |
| @@ -852,7 +845,6 @@ EVP_aes_192_ecb(void) | |||
| 852 | return &aes_192_ecb; | 845 | return &aes_192_ecb; |
| 853 | #endif | 846 | #endif |
| 854 | } | 847 | } |
| 855 | LCRYPTO_ALIAS(EVP_aes_192_ecb); | ||
| 856 | 848 | ||
| 857 | #ifdef AESNI_CAPABLE | 849 | #ifdef AESNI_CAPABLE |
| 858 | static const EVP_CIPHER aesni_192_ofb = { | 850 | static const EVP_CIPHER aesni_192_ofb = { |
| @@ -887,7 +879,6 @@ EVP_aes_192_ofb(void) | |||
| 887 | return &aes_192_ofb; | 879 | return &aes_192_ofb; |
| 888 | #endif | 880 | #endif |
| 889 | } | 881 | } |
| 890 | LCRYPTO_ALIAS(EVP_aes_192_ofb); | ||
| 891 | 882 | ||
| 892 | #ifdef AESNI_CAPABLE | 883 | #ifdef AESNI_CAPABLE |
| 893 | static const EVP_CIPHER aesni_192_cfb = { | 884 | static const EVP_CIPHER aesni_192_cfb = { |
| @@ -956,7 +947,6 @@ EVP_aes_192_cfb1(void) | |||
| 956 | return &aes_192_cfb1; | 947 | return &aes_192_cfb1; |
| 957 | #endif | 948 | #endif |
| 958 | } | 949 | } |
| 959 | LCRYPTO_ALIAS(EVP_aes_192_cfb1); | ||
| 960 | 950 | ||
| 961 | #ifdef AESNI_CAPABLE | 951 | #ifdef AESNI_CAPABLE |
| 962 | static const EVP_CIPHER aesni_192_cfb8 = { | 952 | static const EVP_CIPHER aesni_192_cfb8 = { |
| @@ -991,7 +981,6 @@ EVP_aes_192_cfb8(void) | |||
| 991 | return &aes_192_cfb8; | 981 | return &aes_192_cfb8; |
| 992 | #endif | 982 | #endif |
| 993 | } | 983 | } |
| 994 | LCRYPTO_ALIAS(EVP_aes_192_cfb8); | ||
| 995 | 984 | ||
| 996 | #ifdef AESNI_CAPABLE | 985 | #ifdef AESNI_CAPABLE |
| 997 | static const EVP_CIPHER aesni_192_ctr = { | 986 | static const EVP_CIPHER aesni_192_ctr = { |
| @@ -1026,7 +1015,6 @@ EVP_aes_192_ctr(void) | |||
| 1026 | return &aes_192_ctr; | 1015 | return &aes_192_ctr; |
| 1027 | #endif | 1016 | #endif |
| 1028 | } | 1017 | } |
| 1029 | LCRYPTO_ALIAS(EVP_aes_192_ctr); | ||
| 1030 | 1018 | ||
| 1031 | 1019 | ||
| 1032 | #ifdef AESNI_CAPABLE | 1020 | #ifdef AESNI_CAPABLE |
| @@ -1062,7 +1050,6 @@ EVP_aes_256_cbc(void) | |||
| 1062 | return &aes_256_cbc; | 1050 | return &aes_256_cbc; |
| 1063 | #endif | 1051 | #endif |
| 1064 | } | 1052 | } |
| 1065 | LCRYPTO_ALIAS(EVP_aes_256_cbc); | ||
| 1066 | 1053 | ||
| 1067 | #ifdef AESNI_CAPABLE | 1054 | #ifdef AESNI_CAPABLE |
| 1068 | static const EVP_CIPHER aesni_256_ecb = { | 1055 | static const EVP_CIPHER aesni_256_ecb = { |
| @@ -1097,7 +1084,6 @@ EVP_aes_256_ecb(void) | |||
| 1097 | return &aes_256_ecb; | 1084 | return &aes_256_ecb; |
| 1098 | #endif | 1085 | #endif |
| 1099 | } | 1086 | } |
| 1100 | LCRYPTO_ALIAS(EVP_aes_256_ecb); | ||
| 1101 | 1087 | ||
| 1102 | #ifdef AESNI_CAPABLE | 1088 | #ifdef AESNI_CAPABLE |
| 1103 | static const EVP_CIPHER aesni_256_ofb = { | 1089 | static const EVP_CIPHER aesni_256_ofb = { |
| @@ -1132,7 +1118,6 @@ EVP_aes_256_ofb(void) | |||
| 1132 | return &aes_256_ofb; | 1118 | return &aes_256_ofb; |
| 1133 | #endif | 1119 | #endif |
| 1134 | } | 1120 | } |
| 1135 | LCRYPTO_ALIAS(EVP_aes_256_ofb); | ||
| 1136 | 1121 | ||
| 1137 | #ifdef AESNI_CAPABLE | 1122 | #ifdef AESNI_CAPABLE |
| 1138 | static const EVP_CIPHER aesni_256_cfb = { | 1123 | static const EVP_CIPHER aesni_256_cfb = { |
| @@ -1201,7 +1186,6 @@ EVP_aes_256_cfb1(void) | |||
| 1201 | return &aes_256_cfb1; | 1186 | return &aes_256_cfb1; |
| 1202 | #endif | 1187 | #endif |
| 1203 | } | 1188 | } |
| 1204 | LCRYPTO_ALIAS(EVP_aes_256_cfb1); | ||
| 1205 | 1189 | ||
| 1206 | #ifdef AESNI_CAPABLE | 1190 | #ifdef AESNI_CAPABLE |
| 1207 | static const EVP_CIPHER aesni_256_cfb8 = { | 1191 | static const EVP_CIPHER aesni_256_cfb8 = { |
| @@ -1236,7 +1220,6 @@ EVP_aes_256_cfb8(void) | |||
| 1236 | return &aes_256_cfb8; | 1220 | return &aes_256_cfb8; |
| 1237 | #endif | 1221 | #endif |
| 1238 | } | 1222 | } |
| 1239 | LCRYPTO_ALIAS(EVP_aes_256_cfb8); | ||
| 1240 | 1223 | ||
| 1241 | #ifdef AESNI_CAPABLE | 1224 | #ifdef AESNI_CAPABLE |
| 1242 | static const EVP_CIPHER aesni_256_ctr = { | 1225 | static const EVP_CIPHER aesni_256_ctr = { |
| @@ -1271,7 +1254,6 @@ EVP_aes_256_ctr(void) | |||
| 1271 | return &aes_256_ctr; | 1254 | return &aes_256_ctr; |
| 1272 | #endif | 1255 | #endif |
| 1273 | } | 1256 | } |
| 1274 | LCRYPTO_ALIAS(EVP_aes_256_ctr); | ||
| 1275 | 1257 | ||
| 1276 | static int | 1258 | static int |
| 1277 | aes_gcm_cleanup(EVP_CIPHER_CTX *c) | 1259 | aes_gcm_cleanup(EVP_CIPHER_CTX *c) |
| @@ -1690,7 +1672,6 @@ EVP_aes_128_gcm(void) | |||
| 1690 | return &aes_128_gcm; | 1672 | return &aes_128_gcm; |
| 1691 | #endif | 1673 | #endif |
| 1692 | } | 1674 | } |
| 1693 | LCRYPTO_ALIAS(EVP_aes_128_gcm); | ||
| 1694 | 1675 | ||
| 1695 | #ifdef AESNI_CAPABLE | 1676 | #ifdef AESNI_CAPABLE |
| 1696 | static const EVP_CIPHER aesni_192_gcm = { | 1677 | static const EVP_CIPHER aesni_192_gcm = { |
| @@ -1729,7 +1710,6 @@ EVP_aes_192_gcm(void) | |||
| 1729 | return &aes_192_gcm; | 1710 | return &aes_192_gcm; |
| 1730 | #endif | 1711 | #endif |
| 1731 | } | 1712 | } |
| 1732 | LCRYPTO_ALIAS(EVP_aes_192_gcm); | ||
| 1733 | 1713 | ||
| 1734 | #ifdef AESNI_CAPABLE | 1714 | #ifdef AESNI_CAPABLE |
| 1735 | static const EVP_CIPHER aesni_256_gcm = { | 1715 | static const EVP_CIPHER aesni_256_gcm = { |
| @@ -1768,7 +1748,6 @@ EVP_aes_256_gcm(void) | |||
| 1768 | return &aes_256_gcm; | 1748 | return &aes_256_gcm; |
| 1769 | #endif | 1749 | #endif |
| 1770 | } | 1750 | } |
| 1771 | LCRYPTO_ALIAS(EVP_aes_256_gcm); | ||
| 1772 | 1751 | ||
| 1773 | static int | 1752 | static int |
| 1774 | aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 1753 | aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) |
| @@ -1935,7 +1914,6 @@ EVP_aes_128_xts(void) | |||
| 1935 | return &aes_128_xts; | 1914 | return &aes_128_xts; |
| 1936 | #endif | 1915 | #endif |
| 1937 | } | 1916 | } |
| 1938 | LCRYPTO_ALIAS(EVP_aes_128_xts); | ||
| 1939 | 1917 | ||
| 1940 | #ifdef AESNI_CAPABLE | 1918 | #ifdef AESNI_CAPABLE |
| 1941 | static const EVP_CIPHER aesni_256_xts = { | 1919 | static const EVP_CIPHER aesni_256_xts = { |
| @@ -1974,7 +1952,6 @@ EVP_aes_256_xts(void) | |||
| 1974 | return &aes_256_xts; | 1952 | return &aes_256_xts; |
| 1975 | #endif | 1953 | #endif |
| 1976 | } | 1954 | } |
| 1977 | LCRYPTO_ALIAS(EVP_aes_256_xts); | ||
| 1978 | 1955 | ||
| 1979 | static int | 1956 | static int |
| 1980 | aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 1957 | aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) |
| @@ -2171,7 +2148,6 @@ EVP_aes_128_ccm(void) | |||
| 2171 | return &aes_128_ccm; | 2148 | return &aes_128_ccm; |
| 2172 | #endif | 2149 | #endif |
| 2173 | } | 2150 | } |
| 2174 | LCRYPTO_ALIAS(EVP_aes_128_ccm); | ||
| 2175 | 2151 | ||
| 2176 | #ifdef AESNI_CAPABLE | 2152 | #ifdef AESNI_CAPABLE |
| 2177 | static const EVP_CIPHER aesni_192_ccm = { | 2153 | static const EVP_CIPHER aesni_192_ccm = { |
| @@ -2210,7 +2186,6 @@ EVP_aes_192_ccm(void) | |||
| 2210 | return &aes_192_ccm; | 2186 | return &aes_192_ccm; |
| 2211 | #endif | 2187 | #endif |
| 2212 | } | 2188 | } |
| 2213 | LCRYPTO_ALIAS(EVP_aes_192_ccm); | ||
| 2214 | 2189 | ||
| 2215 | #ifdef AESNI_CAPABLE | 2190 | #ifdef AESNI_CAPABLE |
| 2216 | static const EVP_CIPHER aesni_256_ccm = { | 2191 | static const EVP_CIPHER aesni_256_ccm = { |
| @@ -2249,7 +2224,6 @@ EVP_aes_256_ccm(void) | |||
| 2249 | return &aes_256_ccm; | 2224 | return &aes_256_ccm; |
| 2250 | #endif | 2225 | #endif |
| 2251 | } | 2226 | } |
| 2252 | LCRYPTO_ALIAS(EVP_aes_256_ccm); | ||
| 2253 | 2227 | ||
| 2254 | #define EVP_AEAD_AES_GCM_TAG_LEN 16 | 2228 | #define EVP_AEAD_AES_GCM_TAG_LEN 16 |
| 2255 | 2229 | ||
| @@ -2440,14 +2414,12 @@ EVP_aead_aes_128_gcm(void) | |||
| 2440 | { | 2414 | { |
| 2441 | return &aead_aes_128_gcm; | 2415 | return &aead_aes_128_gcm; |
| 2442 | } | 2416 | } |
| 2443 | LCRYPTO_ALIAS(EVP_aead_aes_128_gcm); | ||
| 2444 | 2417 | ||
| 2445 | const EVP_AEAD * | 2418 | const EVP_AEAD * |
| 2446 | EVP_aead_aes_256_gcm(void) | 2419 | EVP_aead_aes_256_gcm(void) |
| 2447 | { | 2420 | { |
| 2448 | return &aead_aes_256_gcm; | 2421 | return &aead_aes_256_gcm; |
| 2449 | } | 2422 | } |
| 2450 | LCRYPTO_ALIAS(EVP_aead_aes_256_gcm); | ||
| 2451 | 2423 | ||
| 2452 | typedef struct { | 2424 | typedef struct { |
| 2453 | union { | 2425 | union { |
| @@ -2573,7 +2545,6 @@ EVP_aes_128_wrap(void) | |||
| 2573 | { | 2545 | { |
| 2574 | return &aes_128_wrap; | 2546 | return &aes_128_wrap; |
| 2575 | } | 2547 | } |
| 2576 | LCRYPTO_ALIAS(EVP_aes_128_wrap); | ||
| 2577 | 2548 | ||
| 2578 | static const EVP_CIPHER aes_192_wrap = { | 2549 | static const EVP_CIPHER aes_192_wrap = { |
| 2579 | .nid = NID_id_aes192_wrap, | 2550 | .nid = NID_id_aes192_wrap, |
| @@ -2596,7 +2567,6 @@ EVP_aes_192_wrap(void) | |||
| 2596 | { | 2567 | { |
| 2597 | return &aes_192_wrap; | 2568 | return &aes_192_wrap; |
| 2598 | } | 2569 | } |
| 2599 | LCRYPTO_ALIAS(EVP_aes_192_wrap); | ||
| 2600 | 2570 | ||
| 2601 | static const EVP_CIPHER aes_256_wrap = { | 2571 | static const EVP_CIPHER aes_256_wrap = { |
| 2602 | .nid = NID_id_aes256_wrap, | 2572 | .nid = NID_id_aes256_wrap, |
| @@ -2619,6 +2589,5 @@ EVP_aes_256_wrap(void) | |||
| 2619 | { | 2589 | { |
| 2620 | return &aes_256_wrap; | 2590 | return &aes_256_wrap; |
| 2621 | } | 2591 | } |
| 2622 | LCRYPTO_ALIAS(EVP_aes_256_wrap); | ||
| 2623 | 2592 | ||
| 2624 | #endif | 2593 | #endif |
