diff options
| author | tb <> | 2024-01-13 10:57:08 +0000 |
|---|---|---|
| committer | tb <> | 2024-01-13 10:57:08 +0000 |
| commit | fa1aed9be4e7cffefc5a40174eb97c98d39a9942 (patch) | |
| tree | 0fd48c87176036b6c3e261429aa318870888df67 | |
| parent | fdc0b6d6723ac761e12533c4208099d4bbc2af0e (diff) | |
| download | openbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.tar.gz openbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.tar.bz2 openbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.zip | |
Add a table of cipher names, ciphers and aliases
This arranges the data provided by dynamic library initialization
in a static table and will help avoid gross code with missing error
checking and other defects on every use of the library. This table
isn't pretty due to various naming inconsistecies accumulated over
the decades. It will significantly simplify the implementation of
API such as EVP_get_cipherbyname() and EVP_CIPHER_do_all().
All the table does is map strings to ciphers, typically used on the
openssl(1) command line or in code it's the mechanism that underlies
the map from NID_chacha20 to the data returned by EVP_chacha20().
It's of course more complicated because it just had to be stupid.
This is one of the places where the use of bsearch() is justified.
The price to pay for the simplification is that adding custom aliases
and custom ciphers to this table will no longer be supported. It is
one significant user of the LHASH madness. That's just another piece
of the awful "toolkit aspect"-guided misdesign that contributes to
making this codebase so terrible.
A corresponding table for the digests will be added in the next
commit.
ok jsing
| -rw-r--r-- | src/lib/libcrypto/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_names.c | 1088 |
2 files changed, 1090 insertions, 1 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index 2a12e43a7c..c308a47c62 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.162 2023/12/29 06:56:38 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.163 2024/01/13 10:57:08 tb Exp $ |
| 2 | 2 | ||
| 3 | LIB= crypto | 3 | LIB= crypto |
| 4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
| @@ -372,6 +372,7 @@ SRCS+= evp_digest.c | |||
| 372 | SRCS+= evp_encode.c | 372 | SRCS+= evp_encode.c |
| 373 | SRCS+= evp_err.c | 373 | SRCS+= evp_err.c |
| 374 | SRCS+= evp_key.c | 374 | SRCS+= evp_key.c |
| 375 | SRCS+= evp_names.c | ||
| 375 | SRCS+= evp_pbe.c | 376 | SRCS+= evp_pbe.c |
| 376 | SRCS+= evp_pkey.c | 377 | SRCS+= evp_pkey.c |
| 377 | SRCS+= m_gost2814789.c | 378 | SRCS+= m_gost2814789.c |
diff --git a/src/lib/libcrypto/evp/evp_names.c b/src/lib/libcrypto/evp/evp_names.c new file mode 100644 index 0000000000..abe2d5bcbd --- /dev/null +++ b/src/lib/libcrypto/evp/evp_names.c | |||
| @@ -0,0 +1,1088 @@ | |||
| 1 | /* $OpenBSD: evp_names.c,v 1.1 2024/01/13 10:57:08 tb Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2023 Theo Buehler <tb@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 <openssl/evp.h> | ||
| 19 | #include <openssl/objects.h> | ||
| 20 | |||
| 21 | /* | ||
| 22 | * The .name is the lookup name used by EVP_get_cipherbyname() while .alias | ||
| 23 | * keeps track of the aliased name. | ||
| 24 | */ | ||
| 25 | |||
| 26 | struct cipher_name { | ||
| 27 | const char *name; | ||
| 28 | const EVP_CIPHER *(*cipher)(void); | ||
| 29 | const char *alias; | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Keep this table alphabetically sorted by increasing .name. | ||
| 34 | * regress/lib/libcrypto/evp/evp_test.c checks that. | ||
| 35 | */ | ||
| 36 | |||
| 37 | const struct cipher_name cipher_names[] = { | ||
| 38 | #ifndef OPENSSL_NO_AES | ||
| 39 | { | ||
| 40 | .name = SN_aes_128_cbc, | ||
| 41 | .cipher = EVP_aes_128_cbc, | ||
| 42 | }, | ||
| 43 | { | ||
| 44 | .name = SN_aes_128_cbc_hmac_sha1, | ||
| 45 | .cipher = EVP_aes_128_cbc_hmac_sha1, | ||
| 46 | }, | ||
| 47 | { | ||
| 48 | .name = SN_aes_128_cfb128, | ||
| 49 | .cipher = EVP_aes_128_cfb128, | ||
| 50 | }, | ||
| 51 | { | ||
| 52 | .name = SN_aes_128_cfb1, | ||
| 53 | .cipher = EVP_aes_128_cfb1, | ||
| 54 | }, | ||
| 55 | { | ||
| 56 | .name = SN_aes_128_cfb8, | ||
| 57 | .cipher = EVP_aes_128_cfb8, | ||
| 58 | }, | ||
| 59 | { | ||
| 60 | .name = SN_aes_128_ctr, | ||
| 61 | .cipher = EVP_aes_128_ctr, | ||
| 62 | }, | ||
| 63 | { | ||
| 64 | .name = SN_aes_128_ecb, | ||
| 65 | .cipher = EVP_aes_128_ecb, | ||
| 66 | }, | ||
| 67 | { | ||
| 68 | .name = SN_aes_128_ofb128, | ||
| 69 | .cipher = EVP_aes_128_ofb, | ||
| 70 | }, | ||
| 71 | { | ||
| 72 | .name = SN_aes_128_xts, | ||
| 73 | .cipher = EVP_aes_128_xts, | ||
| 74 | }, | ||
| 75 | |||
| 76 | { | ||
| 77 | .name = SN_aes_192_cbc, | ||
| 78 | .cipher = EVP_aes_192_cbc, | ||
| 79 | }, | ||
| 80 | { | ||
| 81 | .name = SN_aes_192_cfb128, | ||
| 82 | .cipher = EVP_aes_192_cfb128, | ||
| 83 | }, | ||
| 84 | { | ||
| 85 | .name = SN_aes_192_cfb1, | ||
| 86 | .cipher = EVP_aes_192_cfb1, | ||
| 87 | }, | ||
| 88 | { | ||
| 89 | .name = SN_aes_192_cfb8, | ||
| 90 | .cipher = EVP_aes_192_cfb8, | ||
| 91 | }, | ||
| 92 | { | ||
| 93 | .name = SN_aes_192_ctr, | ||
| 94 | .cipher = EVP_aes_192_ctr, | ||
| 95 | }, | ||
| 96 | { | ||
| 97 | .name = SN_aes_192_ecb, | ||
| 98 | .cipher = EVP_aes_192_ecb, | ||
| 99 | }, | ||
| 100 | { | ||
| 101 | .name = SN_aes_192_ofb128, | ||
| 102 | .cipher = EVP_aes_192_ofb, | ||
| 103 | }, | ||
| 104 | |||
| 105 | { | ||
| 106 | .name = SN_aes_256_cbc, | ||
| 107 | .cipher = EVP_aes_256_cbc, | ||
| 108 | }, | ||
| 109 | { | ||
| 110 | .name = SN_aes_256_cbc_hmac_sha1, | ||
| 111 | .cipher = EVP_aes_256_cbc_hmac_sha1, | ||
| 112 | }, | ||
| 113 | { | ||
| 114 | .name = SN_aes_256_cfb128, | ||
| 115 | .cipher = EVP_aes_256_cfb128, | ||
| 116 | }, | ||
| 117 | { | ||
| 118 | .name = SN_aes_256_cfb1, | ||
| 119 | .cipher = EVP_aes_256_cfb1, | ||
| 120 | }, | ||
| 121 | { | ||
| 122 | .name = SN_aes_256_cfb8, | ||
| 123 | .cipher = EVP_aes_256_cfb8, | ||
| 124 | }, | ||
| 125 | { | ||
| 126 | .name = SN_aes_256_ctr, | ||
| 127 | .cipher = EVP_aes_256_ctr, | ||
| 128 | }, | ||
| 129 | { | ||
| 130 | .name = SN_aes_256_ecb, | ||
| 131 | .cipher = EVP_aes_256_ecb, | ||
| 132 | }, | ||
| 133 | { | ||
| 134 | .name = SN_aes_256_ofb128, | ||
| 135 | .cipher = EVP_aes_256_ofb, | ||
| 136 | }, | ||
| 137 | { | ||
| 138 | .name = SN_aes_256_xts, | ||
| 139 | .cipher = EVP_aes_256_xts, | ||
| 140 | }, | ||
| 141 | |||
| 142 | { | ||
| 143 | .name = "AES128", | ||
| 144 | .cipher = EVP_aes_128_cbc, | ||
| 145 | .alias = SN_aes_128_cbc, | ||
| 146 | }, | ||
| 147 | { | ||
| 148 | .name = "AES192", | ||
| 149 | .cipher = EVP_aes_192_cbc, | ||
| 150 | .alias = SN_aes_192_cbc, | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | .name = "AES256", | ||
| 154 | .cipher = EVP_aes_256_cbc, | ||
| 155 | .alias = SN_aes_256_cbc, | ||
| 156 | }, | ||
| 157 | #endif /* OPENSSL_NO_AES */ | ||
| 158 | |||
| 159 | #ifndef OPENSSL_NO_BF | ||
| 160 | { | ||
| 161 | .name = "BF", | ||
| 162 | .cipher = EVP_bf_cbc, | ||
| 163 | .alias = SN_bf_cbc, | ||
| 164 | }, | ||
| 165 | |||
| 166 | { | ||
| 167 | .name = SN_bf_cbc, | ||
| 168 | .cipher = EVP_bf_cbc, | ||
| 169 | }, | ||
| 170 | { | ||
| 171 | .name = SN_bf_cfb64, | ||
| 172 | .cipher = EVP_bf_cfb64, | ||
| 173 | }, | ||
| 174 | { | ||
| 175 | .name = SN_bf_ecb, | ||
| 176 | .cipher = EVP_bf_ecb, | ||
| 177 | }, | ||
| 178 | { | ||
| 179 | .name = SN_bf_ofb64, | ||
| 180 | .cipher = EVP_bf_ofb, | ||
| 181 | }, | ||
| 182 | #endif | ||
| 183 | |||
| 184 | #ifndef OPENSSL_NO_CAMELLIA | ||
| 185 | { | ||
| 186 | .name = SN_camellia_128_cbc, | ||
| 187 | .cipher = EVP_camellia_128_cbc, | ||
| 188 | }, | ||
| 189 | { | ||
| 190 | .name = SN_camellia_128_cfb128, | ||
| 191 | .cipher = EVP_camellia_128_cfb128, | ||
| 192 | }, | ||
| 193 | { | ||
| 194 | .name = SN_camellia_128_cfb1, | ||
| 195 | .cipher = EVP_camellia_128_cfb1, | ||
| 196 | }, | ||
| 197 | { | ||
| 198 | .name = SN_camellia_128_cfb8, | ||
| 199 | .cipher = EVP_camellia_128_cfb8, | ||
| 200 | }, | ||
| 201 | { | ||
| 202 | .name = SN_camellia_128_ecb, | ||
| 203 | .cipher = EVP_camellia_128_ecb, | ||
| 204 | }, | ||
| 205 | { | ||
| 206 | .name = SN_camellia_128_ofb128, | ||
| 207 | .cipher = EVP_camellia_128_ofb, | ||
| 208 | }, | ||
| 209 | |||
| 210 | { | ||
| 211 | .name = SN_camellia_192_cbc, | ||
| 212 | .cipher = EVP_camellia_192_cbc, | ||
| 213 | }, | ||
| 214 | { | ||
| 215 | .name = SN_camellia_192_cfb128, | ||
| 216 | .cipher = EVP_camellia_192_cfb128, | ||
| 217 | }, | ||
| 218 | { | ||
| 219 | .name = SN_camellia_192_cfb1, | ||
| 220 | .cipher = EVP_camellia_192_cfb1, | ||
| 221 | }, | ||
| 222 | { | ||
| 223 | .name = SN_camellia_192_cfb8, | ||
| 224 | .cipher = EVP_camellia_192_cfb8, | ||
| 225 | }, | ||
| 226 | { | ||
| 227 | .name = SN_camellia_192_ecb, | ||
| 228 | .cipher = EVP_camellia_192_ecb, | ||
| 229 | }, | ||
| 230 | { | ||
| 231 | .name = SN_camellia_192_ofb128, | ||
| 232 | .cipher = EVP_camellia_192_ofb, | ||
| 233 | }, | ||
| 234 | |||
| 235 | { | ||
| 236 | .name = SN_camellia_256_cbc, | ||
| 237 | .cipher = EVP_camellia_256_cbc, | ||
| 238 | }, | ||
| 239 | { | ||
| 240 | .name = SN_camellia_256_cfb128, | ||
| 241 | .cipher = EVP_camellia_256_cfb128, | ||
| 242 | }, | ||
| 243 | { | ||
| 244 | .name = SN_camellia_256_cfb1, | ||
| 245 | .cipher = EVP_camellia_256_cfb1, | ||
| 246 | }, | ||
| 247 | { | ||
| 248 | .name = SN_camellia_256_cfb8, | ||
| 249 | .cipher = EVP_camellia_256_cfb8, | ||
| 250 | }, | ||
| 251 | { | ||
| 252 | .name = SN_camellia_256_ecb, | ||
| 253 | .cipher = EVP_camellia_256_ecb, | ||
| 254 | }, | ||
| 255 | { | ||
| 256 | .name = SN_camellia_256_ofb128, | ||
| 257 | .cipher = EVP_camellia_256_ofb, | ||
| 258 | }, | ||
| 259 | |||
| 260 | { | ||
| 261 | .name = "CAMELLIA128", | ||
| 262 | .cipher = EVP_camellia_128_cbc, | ||
| 263 | .alias = SN_camellia_128_cbc, | ||
| 264 | }, | ||
| 265 | { | ||
| 266 | .name = "CAMELLIA192", | ||
| 267 | .cipher = EVP_camellia_192_cbc, | ||
| 268 | .alias = SN_camellia_192_cbc, | ||
| 269 | }, | ||
| 270 | { | ||
| 271 | .name = "CAMELLIA256", | ||
| 272 | .cipher = EVP_camellia_256_cbc, | ||
| 273 | .alias = SN_camellia_256_cbc, | ||
| 274 | }, | ||
| 275 | #endif /* OPENSSL_NO_CAMELLIA */ | ||
| 276 | |||
| 277 | #ifndef OPENSSL_NO_CAST | ||
| 278 | { | ||
| 279 | .name = "CAST", | ||
| 280 | .cipher = EVP_cast5_cbc, | ||
| 281 | .alias = SN_cast5_cbc, | ||
| 282 | }, | ||
| 283 | { | ||
| 284 | .name = "CAST-cbc", | ||
| 285 | .cipher = EVP_cast5_cbc, | ||
| 286 | .alias = SN_cast5_cbc, | ||
| 287 | }, | ||
| 288 | |||
| 289 | { | ||
| 290 | .name = SN_cast5_cbc, | ||
| 291 | .cipher = EVP_cast5_cbc, | ||
| 292 | }, | ||
| 293 | { | ||
| 294 | .name = SN_cast5_cfb64, | ||
| 295 | .cipher = EVP_cast5_cfb, | ||
| 296 | }, | ||
| 297 | { | ||
| 298 | .name = SN_cast5_ecb, | ||
| 299 | .cipher = EVP_cast5_ecb, | ||
| 300 | }, | ||
| 301 | { | ||
| 302 | .name = SN_cast5_ofb64, | ||
| 303 | .cipher = EVP_cast5_ofb, | ||
| 304 | }, | ||
| 305 | #endif | ||
| 306 | |||
| 307 | #ifndef OPENSSL_NO_CHACHA | ||
| 308 | { | ||
| 309 | .name = SN_chacha20, | ||
| 310 | .cipher = EVP_chacha20, | ||
| 311 | }, | ||
| 312 | { | ||
| 313 | .name = "ChaCha20", | ||
| 314 | .cipher = EVP_chacha20, | ||
| 315 | .alias = SN_chacha20, | ||
| 316 | }, | ||
| 317 | #endif /* OPENSSL_NO_CHACHA */ | ||
| 318 | |||
| 319 | #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) | ||
| 320 | { | ||
| 321 | .name = SN_chacha20_poly1305, | ||
| 322 | .cipher = EVP_chacha20_poly1305, | ||
| 323 | }, | ||
| 324 | #endif /* OPENSSL_NO_CHACHA && OPENSSL_NO_POLY1305 */ | ||
| 325 | |||
| 326 | #ifndef OPENSSL_NO_DES | ||
| 327 | { | ||
| 328 | .name = "DES", | ||
| 329 | .cipher = EVP_des_cbc, | ||
| 330 | .alias = SN_des_cbc, | ||
| 331 | }, | ||
| 332 | |||
| 333 | { | ||
| 334 | .name = SN_des_cbc, | ||
| 335 | .cipher = EVP_des_cbc, | ||
| 336 | }, | ||
| 337 | { | ||
| 338 | .name = SN_des_cfb64, | ||
| 339 | .cipher = EVP_des_cfb64, | ||
| 340 | }, | ||
| 341 | { | ||
| 342 | .name = SN_des_cfb1, | ||
| 343 | .cipher = EVP_des_cfb1, | ||
| 344 | }, | ||
| 345 | { | ||
| 346 | .name = SN_des_cfb8, | ||
| 347 | .cipher = EVP_des_cfb8, | ||
| 348 | }, | ||
| 349 | { | ||
| 350 | .name = SN_des_ecb, | ||
| 351 | .cipher = EVP_des_ecb, | ||
| 352 | }, | ||
| 353 | { | ||
| 354 | .name = SN_des_ede_ecb, | ||
| 355 | .cipher = EVP_des_ede, | ||
| 356 | }, | ||
| 357 | { | ||
| 358 | .name = SN_des_ede_cbc, | ||
| 359 | .cipher = EVP_des_ede_cbc, | ||
| 360 | }, | ||
| 361 | { | ||
| 362 | .name = SN_des_ede_cfb64, | ||
| 363 | .cipher = EVP_des_ede_cfb64, | ||
| 364 | }, | ||
| 365 | { | ||
| 366 | .name = SN_des_ede_ofb64, | ||
| 367 | .cipher = EVP_des_ede_ofb, | ||
| 368 | }, | ||
| 369 | { | ||
| 370 | .name = SN_des_ede3_ecb, | ||
| 371 | .cipher = EVP_des_ede3_ecb, | ||
| 372 | }, | ||
| 373 | { | ||
| 374 | .name = SN_des_ede3_cbc, | ||
| 375 | .cipher = EVP_des_ede3_cbc, | ||
| 376 | }, | ||
| 377 | { | ||
| 378 | .name = SN_des_ede3_cfb64, | ||
| 379 | .cipher = EVP_des_ede3_cfb, | ||
| 380 | }, | ||
| 381 | { | ||
| 382 | .name = SN_des_ede3_cfb1, | ||
| 383 | .cipher = EVP_des_ede3_cfb1, | ||
| 384 | }, | ||
| 385 | { | ||
| 386 | .name = SN_des_ede3_cfb8, | ||
| 387 | .cipher = EVP_des_ede3_cfb8, | ||
| 388 | }, | ||
| 389 | { | ||
| 390 | .name = SN_des_ede3_ofb64, | ||
| 391 | .cipher = EVP_des_ede3_ofb, | ||
| 392 | }, | ||
| 393 | { | ||
| 394 | .name = SN_des_ofb64, | ||
| 395 | .cipher = EVP_des_ofb, | ||
| 396 | }, | ||
| 397 | |||
| 398 | { | ||
| 399 | .name = "DES3", | ||
| 400 | .cipher = EVP_des_ede3_cbc, | ||
| 401 | .alias = SN_des_ede3_cbc, | ||
| 402 | }, | ||
| 403 | |||
| 404 | { | ||
| 405 | .name = "DESX", | ||
| 406 | .cipher = EVP_desx_cbc, | ||
| 407 | .alias = SN_desx_cbc, | ||
| 408 | }, | ||
| 409 | { | ||
| 410 | .name = SN_desx_cbc, | ||
| 411 | .cipher = EVP_desx_cbc, | ||
| 412 | }, | ||
| 413 | #endif /* OPENSSL_NO_DES */ | ||
| 414 | |||
| 415 | #ifndef OPENSSL_NO_GOST | ||
| 416 | { | ||
| 417 | .name = LN_id_Gost28147_89, | ||
| 418 | .cipher = EVP_gost2814789_cfb64, | ||
| 419 | }, | ||
| 420 | #endif /* OPENSSL_NO_GOST */ | ||
| 421 | |||
| 422 | #ifndef OPENSSL_NO_IDEA | ||
| 423 | { | ||
| 424 | .name = "IDEA", | ||
| 425 | .cipher = EVP_idea_cbc, | ||
| 426 | .alias = SN_idea_cbc, | ||
| 427 | }, | ||
| 428 | |||
| 429 | { | ||
| 430 | .name = SN_idea_cbc, | ||
| 431 | .cipher = EVP_idea_cbc, | ||
| 432 | }, | ||
| 433 | { | ||
| 434 | .name = SN_idea_cfb64, | ||
| 435 | .cipher = EVP_idea_cfb64, | ||
| 436 | }, | ||
| 437 | { | ||
| 438 | .name = SN_idea_ecb, | ||
| 439 | .cipher = EVP_idea_ecb, | ||
| 440 | }, | ||
| 441 | { | ||
| 442 | .name = SN_idea_ofb64, | ||
| 443 | .cipher = EVP_idea_ofb, | ||
| 444 | }, | ||
| 445 | #endif /* OPENSSL_NO_IDEA */ | ||
| 446 | |||
| 447 | #ifndef OPENSSL_NO_RC2 | ||
| 448 | { | ||
| 449 | .name = "RC2", | ||
| 450 | .cipher = EVP_rc2_cbc, | ||
| 451 | .alias = SN_rc2_cbc, | ||
| 452 | }, | ||
| 453 | |||
| 454 | { | ||
| 455 | .name = SN_rc2_40_cbc, | ||
| 456 | .cipher = EVP_rc2_40_cbc, | ||
| 457 | }, | ||
| 458 | { | ||
| 459 | .name = SN_rc2_64_cbc, | ||
| 460 | .cipher = EVP_rc2_64_cbc, | ||
| 461 | }, | ||
| 462 | { | ||
| 463 | .name = SN_rc2_cbc, | ||
| 464 | .cipher = EVP_rc2_cbc, | ||
| 465 | }, | ||
| 466 | { | ||
| 467 | .name = SN_rc2_cfb64, | ||
| 468 | .cipher = EVP_rc2_cfb64, | ||
| 469 | }, | ||
| 470 | { | ||
| 471 | .name = SN_rc2_ecb, | ||
| 472 | .cipher = EVP_rc2_ecb, | ||
| 473 | }, | ||
| 474 | { | ||
| 475 | .name = SN_rc2_ofb64, | ||
| 476 | .cipher = EVP_rc2_ofb, | ||
| 477 | }, | ||
| 478 | #endif /* OPENSSL_NO_RC2 */ | ||
| 479 | |||
| 480 | #ifndef OPENSSL_NO_RC4 | ||
| 481 | { | ||
| 482 | .name = SN_rc4, | ||
| 483 | .cipher = EVP_rc4, | ||
| 484 | }, | ||
| 485 | { | ||
| 486 | .name = SN_rc4_40, | ||
| 487 | .cipher = EVP_rc4_40, | ||
| 488 | }, | ||
| 489 | { | ||
| 490 | .name = SN_rc4_hmac_md5, | ||
| 491 | .cipher = EVP_rc4_hmac_md5, | ||
| 492 | }, | ||
| 493 | #endif /* OPENSSL_NO_RC4 */ | ||
| 494 | |||
| 495 | #ifndef OPENSSL_NO_SM4 | ||
| 496 | { | ||
| 497 | .name = "SM4", | ||
| 498 | .cipher = EVP_sm4_cbc, | ||
| 499 | .alias = SN_sm4_cbc, | ||
| 500 | }, | ||
| 501 | |||
| 502 | { | ||
| 503 | .name = SN_sm4_cbc, | ||
| 504 | .cipher = EVP_sm4_cbc, | ||
| 505 | }, | ||
| 506 | { | ||
| 507 | .name = SN_sm4_cfb128, | ||
| 508 | .cipher = EVP_sm4_cfb128, | ||
| 509 | }, | ||
| 510 | { | ||
| 511 | .name = SN_sm4_ctr, | ||
| 512 | .cipher = EVP_sm4_ctr, | ||
| 513 | }, | ||
| 514 | { | ||
| 515 | .name = SN_sm4_ecb, | ||
| 516 | .cipher = EVP_sm4_ecb, | ||
| 517 | }, | ||
| 518 | { | ||
| 519 | .name = SN_sm4_ofb128, | ||
| 520 | .cipher = EVP_sm4_ofb, | ||
| 521 | }, | ||
| 522 | #endif /* OPENSSL_NO_SM4 */ | ||
| 523 | |||
| 524 | #ifndef OPENSSL_NO_AES | ||
| 525 | { | ||
| 526 | .name = LN_aes_128_cbc, | ||
| 527 | .cipher = EVP_aes_128_cbc, | ||
| 528 | }, | ||
| 529 | { | ||
| 530 | .name = LN_aes_128_cbc_hmac_sha1, | ||
| 531 | .cipher = EVP_aes_128_cbc_hmac_sha1, | ||
| 532 | }, | ||
| 533 | { | ||
| 534 | .name = LN_aes_128_ccm, | ||
| 535 | .cipher = EVP_aes_128_ccm, | ||
| 536 | }, | ||
| 537 | { | ||
| 538 | .name = LN_aes_128_cfb128, | ||
| 539 | .cipher = EVP_aes_128_cfb128, | ||
| 540 | }, | ||
| 541 | { | ||
| 542 | .name = LN_aes_128_cfb1, | ||
| 543 | .cipher = EVP_aes_128_cfb1, | ||
| 544 | }, | ||
| 545 | { | ||
| 546 | .name = LN_aes_128_cfb8, | ||
| 547 | .cipher = EVP_aes_128_cfb8, | ||
| 548 | }, | ||
| 549 | { | ||
| 550 | .name = LN_aes_128_ctr, | ||
| 551 | .cipher = EVP_aes_128_ctr, | ||
| 552 | }, | ||
| 553 | { | ||
| 554 | .name = LN_aes_128_ecb, | ||
| 555 | .cipher = EVP_aes_128_ecb, | ||
| 556 | }, | ||
| 557 | { | ||
| 558 | .name = LN_aes_128_gcm, | ||
| 559 | .cipher = EVP_aes_128_gcm, | ||
| 560 | }, | ||
| 561 | { | ||
| 562 | .name = LN_aes_128_ofb128, | ||
| 563 | .cipher = EVP_aes_128_ofb, | ||
| 564 | }, | ||
| 565 | { | ||
| 566 | .name = LN_aes_128_xts, | ||
| 567 | .cipher = EVP_aes_128_xts, | ||
| 568 | }, | ||
| 569 | |||
| 570 | { | ||
| 571 | .name = LN_aes_192_cbc, | ||
| 572 | .cipher = EVP_aes_192_cbc, | ||
| 573 | }, | ||
| 574 | { | ||
| 575 | .name = LN_aes_192_ccm, | ||
| 576 | .cipher = EVP_aes_192_ccm, | ||
| 577 | }, | ||
| 578 | { | ||
| 579 | .name = LN_aes_192_cfb128, | ||
| 580 | .cipher = EVP_aes_192_cfb128, | ||
| 581 | }, | ||
| 582 | { | ||
| 583 | .name = LN_aes_192_cfb1, | ||
| 584 | .cipher = EVP_aes_192_cfb1, | ||
| 585 | }, | ||
| 586 | { | ||
| 587 | .name = LN_aes_192_cfb8, | ||
| 588 | .cipher = EVP_aes_192_cfb8, | ||
| 589 | }, | ||
| 590 | { | ||
| 591 | .name = LN_aes_192_ctr, | ||
| 592 | .cipher = EVP_aes_192_ctr, | ||
| 593 | }, | ||
| 594 | { | ||
| 595 | .name = LN_aes_192_ecb, | ||
| 596 | .cipher = EVP_aes_192_ecb, | ||
| 597 | }, | ||
| 598 | { | ||
| 599 | .name = LN_aes_192_gcm, | ||
| 600 | .cipher = EVP_aes_192_gcm, | ||
| 601 | }, | ||
| 602 | { | ||
| 603 | .name = LN_aes_192_ofb128, | ||
| 604 | .cipher = EVP_aes_192_ofb, | ||
| 605 | }, | ||
| 606 | |||
| 607 | { | ||
| 608 | .name = LN_aes_256_cbc, | ||
| 609 | .cipher = EVP_aes_256_cbc, | ||
| 610 | }, | ||
| 611 | { | ||
| 612 | .name = LN_aes_256_cbc_hmac_sha1, | ||
| 613 | .cipher = EVP_aes_256_cbc_hmac_sha1, | ||
| 614 | }, | ||
| 615 | { | ||
| 616 | .name = LN_aes_256_ccm, | ||
| 617 | .cipher = EVP_aes_256_ccm, | ||
| 618 | }, | ||
| 619 | { | ||
| 620 | .name = LN_aes_256_cfb128, | ||
| 621 | .cipher = EVP_aes_256_cfb128, | ||
| 622 | }, | ||
| 623 | { | ||
| 624 | .name = LN_aes_256_cfb1, | ||
| 625 | .cipher = EVP_aes_256_cfb1, | ||
| 626 | }, | ||
| 627 | { | ||
| 628 | .name = LN_aes_256_cfb8, | ||
| 629 | .cipher = EVP_aes_256_cfb8, | ||
| 630 | }, | ||
| 631 | { | ||
| 632 | .name = LN_aes_256_ctr, | ||
| 633 | .cipher = EVP_aes_256_ctr, | ||
| 634 | }, | ||
| 635 | { | ||
| 636 | .name = LN_aes_256_ecb, | ||
| 637 | .cipher = EVP_aes_256_ecb, | ||
| 638 | }, | ||
| 639 | { | ||
| 640 | .name = LN_aes_256_gcm, | ||
| 641 | .cipher = EVP_aes_256_gcm, | ||
| 642 | }, | ||
| 643 | { | ||
| 644 | .name = LN_aes_256_ofb128, | ||
| 645 | .cipher = EVP_aes_256_ofb, | ||
| 646 | }, | ||
| 647 | { | ||
| 648 | .name = LN_aes_256_xts, | ||
| 649 | .cipher = EVP_aes_256_xts, | ||
| 650 | }, | ||
| 651 | |||
| 652 | { | ||
| 653 | .name = "aes128", | ||
| 654 | .cipher = EVP_aes_128_cbc, | ||
| 655 | .alias = SN_aes_128_cbc, | ||
| 656 | }, | ||
| 657 | { | ||
| 658 | .name = "aes192", | ||
| 659 | .cipher = EVP_aes_192_cbc, | ||
| 660 | .alias = SN_aes_192_cbc, | ||
| 661 | }, | ||
| 662 | { | ||
| 663 | .name = "aes256", | ||
| 664 | .cipher = EVP_aes_256_cbc, | ||
| 665 | .alias = SN_aes_256_cbc, | ||
| 666 | }, | ||
| 667 | #endif /* OPENSSL_NO_AES */ | ||
| 668 | |||
| 669 | #ifndef OPENSSL_NO_BF | ||
| 670 | { | ||
| 671 | .name = "bf", | ||
| 672 | .cipher = EVP_bf_cbc, | ||
| 673 | .alias = SN_bf_cbc, | ||
| 674 | }, | ||
| 675 | |||
| 676 | { | ||
| 677 | .name = LN_bf_cbc, | ||
| 678 | .cipher = EVP_bf_cbc, | ||
| 679 | }, | ||
| 680 | { | ||
| 681 | .name = LN_bf_cfb64, | ||
| 682 | .cipher = EVP_bf_cfb64, | ||
| 683 | }, | ||
| 684 | { | ||
| 685 | .name = LN_bf_ecb, | ||
| 686 | .cipher = EVP_bf_ecb, | ||
| 687 | }, | ||
| 688 | { | ||
| 689 | .name = LN_bf_ofb64, | ||
| 690 | .cipher = EVP_bf_ofb, | ||
| 691 | }, | ||
| 692 | |||
| 693 | { | ||
| 694 | .name = "blowfish", | ||
| 695 | .cipher = EVP_bf_cbc, | ||
| 696 | .alias = SN_bf_cbc, | ||
| 697 | }, | ||
| 698 | #endif /* OPENSSL_NO_BF */ | ||
| 699 | |||
| 700 | #ifndef OPENSSL_NO_CAMELLIA | ||
| 701 | { | ||
| 702 | .name = LN_camellia_128_cbc, | ||
| 703 | .cipher = EVP_camellia_128_cbc, | ||
| 704 | }, | ||
| 705 | { | ||
| 706 | .name = LN_camellia_128_cfb128, | ||
| 707 | .cipher = EVP_camellia_128_cfb128, | ||
| 708 | }, | ||
| 709 | { | ||
| 710 | .name = LN_camellia_128_cfb1, | ||
| 711 | .cipher = EVP_camellia_128_cfb1, | ||
| 712 | }, | ||
| 713 | { | ||
| 714 | .name = LN_camellia_128_cfb8, | ||
| 715 | .cipher = EVP_camellia_128_cfb8, | ||
| 716 | }, | ||
| 717 | { | ||
| 718 | .name = LN_camellia_128_ecb, | ||
| 719 | .cipher = EVP_camellia_128_ecb, | ||
| 720 | }, | ||
| 721 | { | ||
| 722 | .name = LN_camellia_128_ofb128, | ||
| 723 | .cipher = EVP_camellia_128_ofb, | ||
| 724 | }, | ||
| 725 | |||
| 726 | { | ||
| 727 | .name = LN_camellia_192_cbc, | ||
| 728 | .cipher = EVP_camellia_192_cbc, | ||
| 729 | }, | ||
| 730 | { | ||
| 731 | .name = LN_camellia_192_cfb128, | ||
| 732 | .cipher = EVP_camellia_192_cfb128, | ||
| 733 | }, | ||
| 734 | { | ||
| 735 | .name = LN_camellia_192_cfb1, | ||
| 736 | .cipher = EVP_camellia_192_cfb1, | ||
| 737 | }, | ||
| 738 | { | ||
| 739 | .name = LN_camellia_192_cfb8, | ||
| 740 | .cipher = EVP_camellia_192_cfb8, | ||
| 741 | }, | ||
| 742 | { | ||
| 743 | .name = LN_camellia_192_ecb, | ||
| 744 | .cipher = EVP_camellia_192_ecb, | ||
| 745 | }, | ||
| 746 | { | ||
| 747 | .name = LN_camellia_192_ofb128, | ||
| 748 | .cipher = EVP_camellia_192_ofb, | ||
| 749 | }, | ||
| 750 | |||
| 751 | { | ||
| 752 | .name = LN_camellia_256_cbc, | ||
| 753 | .cipher = EVP_camellia_256_cbc, | ||
| 754 | }, | ||
| 755 | { | ||
| 756 | .name = LN_camellia_256_cfb128, | ||
| 757 | .cipher = EVP_camellia_256_cfb128, | ||
| 758 | }, | ||
| 759 | { | ||
| 760 | .name = LN_camellia_256_cfb1, | ||
| 761 | .cipher = EVP_camellia_256_cfb1, | ||
| 762 | }, | ||
| 763 | { | ||
| 764 | .name = LN_camellia_256_cfb8, | ||
| 765 | .cipher = EVP_camellia_256_cfb8, | ||
| 766 | }, | ||
| 767 | { | ||
| 768 | .name = LN_camellia_256_ecb, | ||
| 769 | .cipher = EVP_camellia_256_ecb, | ||
| 770 | }, | ||
| 771 | { | ||
| 772 | .name = LN_camellia_256_ofb128, | ||
| 773 | .cipher = EVP_camellia_256_ofb, | ||
| 774 | }, | ||
| 775 | |||
| 776 | { | ||
| 777 | .name = "camellia128", | ||
| 778 | .cipher = EVP_camellia_128_cbc, | ||
| 779 | .alias = SN_camellia_128_cbc, | ||
| 780 | }, | ||
| 781 | { | ||
| 782 | .name = "camellia192", | ||
| 783 | .cipher = EVP_camellia_192_cbc, | ||
| 784 | .alias = SN_camellia_192_cbc, | ||
| 785 | }, | ||
| 786 | { | ||
| 787 | .name = "camellia256", | ||
| 788 | .cipher = EVP_camellia_256_cbc, | ||
| 789 | .alias = SN_camellia_256_cbc, | ||
| 790 | }, | ||
| 791 | #endif /* OPENSSL_NO_CAMELLIA */ | ||
| 792 | |||
| 793 | #ifndef OPENSSL_NO_CAST | ||
| 794 | { | ||
| 795 | .name = "cast", | ||
| 796 | .cipher = EVP_cast5_cbc, | ||
| 797 | .alias = SN_cast5_cbc, | ||
| 798 | }, | ||
| 799 | { | ||
| 800 | .name = "cast-cbc", | ||
| 801 | .cipher = EVP_cast5_cbc, | ||
| 802 | .alias = SN_cast5_cbc, | ||
| 803 | }, | ||
| 804 | |||
| 805 | { | ||
| 806 | .name = LN_cast5_cbc, | ||
| 807 | .cipher = EVP_cast5_cbc, | ||
| 808 | }, | ||
| 809 | { | ||
| 810 | .name = LN_cast5_cfb64, | ||
| 811 | .cipher = EVP_cast5_cfb, | ||
| 812 | }, | ||
| 813 | { | ||
| 814 | .name = LN_cast5_ecb, | ||
| 815 | .cipher = EVP_cast5_ecb, | ||
| 816 | }, | ||
| 817 | { | ||
| 818 | .name = LN_cast5_ofb64, | ||
| 819 | .cipher = EVP_cast5_ofb, | ||
| 820 | }, | ||
| 821 | #endif | ||
| 822 | |||
| 823 | #ifndef OPENSSL_NO_CHACHA | ||
| 824 | { | ||
| 825 | .name = LN_chacha20, | ||
| 826 | .cipher = EVP_chacha20, | ||
| 827 | }, | ||
| 828 | { | ||
| 829 | .name = "chacha20", | ||
| 830 | .cipher = EVP_chacha20, | ||
| 831 | .alias = LN_chacha20, | ||
| 832 | }, | ||
| 833 | |||
| 834 | { | ||
| 835 | .name = LN_chacha20_poly1305, | ||
| 836 | .cipher = EVP_chacha20_poly1305, | ||
| 837 | }, | ||
| 838 | #endif | ||
| 839 | |||
| 840 | #ifndef OPENSSL_NO_DES | ||
| 841 | { | ||
| 842 | .name = "des", | ||
| 843 | .cipher = EVP_des_cbc, | ||
| 844 | .alias = SN_des_cbc, | ||
| 845 | }, | ||
| 846 | |||
| 847 | { | ||
| 848 | .name = LN_des_cbc, | ||
| 849 | .cipher = EVP_des_cbc, | ||
| 850 | }, | ||
| 851 | { | ||
| 852 | .name = LN_des_cfb64, | ||
| 853 | .cipher = EVP_des_cfb64, | ||
| 854 | }, | ||
| 855 | { | ||
| 856 | .name = LN_des_cfb1, | ||
| 857 | .cipher = EVP_des_cfb1, | ||
| 858 | }, | ||
| 859 | { | ||
| 860 | .name = LN_des_cfb8, | ||
| 861 | .cipher = EVP_des_cfb8, | ||
| 862 | }, | ||
| 863 | { | ||
| 864 | .name = LN_des_ecb, | ||
| 865 | .cipher = EVP_des_ecb, | ||
| 866 | }, | ||
| 867 | { | ||
| 868 | .name = LN_des_ede_ecb, | ||
| 869 | .cipher = EVP_des_ede, | ||
| 870 | }, | ||
| 871 | { | ||
| 872 | .name = LN_des_ede_cbc, | ||
| 873 | .cipher = EVP_des_ede_cbc, | ||
| 874 | }, | ||
| 875 | { | ||
| 876 | .name = LN_des_ede_cfb64, | ||
| 877 | .cipher = EVP_des_ede_cfb64, | ||
| 878 | }, | ||
| 879 | { | ||
| 880 | .name = LN_des_ede_ofb64, | ||
| 881 | .cipher = EVP_des_ede_ofb, | ||
| 882 | }, | ||
| 883 | { | ||
| 884 | .name = LN_des_ede3_ecb, | ||
| 885 | .cipher = EVP_des_ede3_ecb, | ||
| 886 | }, | ||
| 887 | { | ||
| 888 | .name = LN_des_ede3_cbc, | ||
| 889 | .cipher = EVP_des_ede3_cbc, | ||
| 890 | }, | ||
| 891 | { | ||
| 892 | .name = LN_des_ede3_cfb64, | ||
| 893 | .cipher = EVP_des_ede3_cfb, | ||
| 894 | }, | ||
| 895 | { | ||
| 896 | .name = LN_des_ede3_cfb1, | ||
| 897 | .cipher = EVP_des_ede3_cfb1, | ||
| 898 | }, | ||
| 899 | { | ||
| 900 | .name = LN_des_ede3_cfb8, | ||
| 901 | .cipher = EVP_des_ede3_cfb8, | ||
| 902 | }, | ||
| 903 | { | ||
| 904 | .name = LN_des_ede3_ofb64, | ||
| 905 | .cipher = EVP_des_ede3_ofb, | ||
| 906 | }, | ||
| 907 | { | ||
| 908 | .name = LN_des_ofb64, | ||
| 909 | .cipher = EVP_des_ofb, | ||
| 910 | }, | ||
| 911 | |||
| 912 | { | ||
| 913 | .name = "des3", | ||
| 914 | .cipher = EVP_des_ede3_cbc, | ||
| 915 | .alias = SN_des_ede3_cbc, | ||
| 916 | }, | ||
| 917 | |||
| 918 | { | ||
| 919 | .name = "desx", | ||
| 920 | .cipher = EVP_desx_cbc, | ||
| 921 | .alias = SN_desx_cbc, | ||
| 922 | }, | ||
| 923 | { | ||
| 924 | .name = LN_desx_cbc, | ||
| 925 | .cipher = EVP_desx_cbc, | ||
| 926 | }, | ||
| 927 | #endif /* OPENSSL_NO_DES */ | ||
| 928 | |||
| 929 | #ifndef OPENSSL_NO_GOST | ||
| 930 | { | ||
| 931 | .name = SN_id_Gost28147_89, | ||
| 932 | .cipher = EVP_gost2814789_cfb64, | ||
| 933 | }, | ||
| 934 | { | ||
| 935 | .name = SN_gost89_cnt, | ||
| 936 | .cipher = EVP_gost2814789_cnt, | ||
| 937 | }, | ||
| 938 | { | ||
| 939 | .name = SN_gost89_ecb, | ||
| 940 | .cipher = EVP_gost2814789_ecb, | ||
| 941 | }, | ||
| 942 | #endif /* OPENSSL_NO_GOST */ | ||
| 943 | |||
| 944 | #ifndef OPENSSL_NO_AES | ||
| 945 | { | ||
| 946 | .name = SN_aes_128_ccm, | ||
| 947 | .cipher = EVP_aes_128_ccm, | ||
| 948 | }, | ||
| 949 | { | ||
| 950 | .name = SN_aes_128_gcm, | ||
| 951 | .cipher = EVP_aes_128_gcm, | ||
| 952 | }, | ||
| 953 | { | ||
| 954 | .name = SN_id_aes128_wrap, | ||
| 955 | .cipher = EVP_aes_128_wrap, | ||
| 956 | }, | ||
| 957 | |||
| 958 | { | ||
| 959 | .name = SN_aes_192_ccm, | ||
| 960 | .cipher = EVP_aes_192_ccm, | ||
| 961 | }, | ||
| 962 | { | ||
| 963 | .name = SN_aes_192_gcm, | ||
| 964 | .cipher = EVP_aes_192_gcm, | ||
| 965 | }, | ||
| 966 | { | ||
| 967 | .name = SN_id_aes192_wrap, | ||
| 968 | .cipher = EVP_aes_192_wrap, | ||
| 969 | }, | ||
| 970 | |||
| 971 | { | ||
| 972 | .name = SN_aes_256_ccm, | ||
| 973 | .cipher = EVP_aes_256_ccm, | ||
| 974 | }, | ||
| 975 | { | ||
| 976 | .name = SN_aes_256_gcm, | ||
| 977 | .cipher = EVP_aes_256_gcm, | ||
| 978 | }, | ||
| 979 | { | ||
| 980 | .name = SN_id_aes256_wrap, | ||
| 981 | .cipher = EVP_aes_256_wrap, | ||
| 982 | }, | ||
| 983 | #endif /* OPENSSL_NO_AES */ | ||
| 984 | |||
| 985 | #ifndef OPENSSL_NO_IDEA | ||
| 986 | { | ||
| 987 | .name = "idea", | ||
| 988 | .cipher = EVP_idea_cbc, | ||
| 989 | .alias = SN_idea_cbc, | ||
| 990 | }, | ||
| 991 | |||
| 992 | { | ||
| 993 | .name = LN_idea_cbc, | ||
| 994 | .cipher = EVP_idea_cbc, | ||
| 995 | }, | ||
| 996 | { | ||
| 997 | .name = LN_idea_cfb64, | ||
| 998 | .cipher = EVP_idea_cfb64, | ||
| 999 | }, | ||
| 1000 | { | ||
| 1001 | .name = LN_idea_ecb, | ||
| 1002 | .cipher = EVP_idea_ecb, | ||
| 1003 | }, | ||
| 1004 | { | ||
| 1005 | .name = LN_idea_ofb64, | ||
| 1006 | .cipher = EVP_idea_ofb, | ||
| 1007 | }, | ||
| 1008 | #endif /* OPENSSL_NO_IDEA */ | ||
| 1009 | |||
| 1010 | #ifndef OPENSSL_NO_RC2 | ||
| 1011 | { | ||
| 1012 | .name = "rc2", | ||
| 1013 | .cipher = EVP_rc2_cbc, | ||
| 1014 | .alias = SN_rc2_cbc, | ||
| 1015 | }, | ||
| 1016 | |||
| 1017 | { | ||
| 1018 | .name = LN_rc2_40_cbc, | ||
| 1019 | .cipher = EVP_rc2_40_cbc, | ||
| 1020 | }, | ||
| 1021 | { | ||
| 1022 | .name = LN_rc2_64_cbc, | ||
| 1023 | .cipher = EVP_rc2_64_cbc, | ||
| 1024 | }, | ||
| 1025 | { | ||
| 1026 | .name = LN_rc2_cbc, | ||
| 1027 | .cipher = EVP_rc2_cbc, | ||
| 1028 | }, | ||
| 1029 | { | ||
| 1030 | .name = LN_rc2_cfb64, | ||
| 1031 | .cipher = EVP_rc2_cfb64, | ||
| 1032 | }, | ||
| 1033 | { | ||
| 1034 | .name = LN_rc2_ecb, | ||
| 1035 | .cipher = EVP_rc2_ecb, | ||
| 1036 | }, | ||
| 1037 | { | ||
| 1038 | .name = LN_rc2_ofb64, | ||
| 1039 | .cipher = EVP_rc2_ofb, | ||
| 1040 | }, | ||
| 1041 | #endif /* OPENSSL_NO_RC2 */ | ||
| 1042 | |||
| 1043 | #ifndef OPENSSL_NO_RC4 | ||
| 1044 | { | ||
| 1045 | .name = LN_rc4, | ||
| 1046 | .cipher = EVP_rc4, | ||
| 1047 | }, | ||
| 1048 | { | ||
| 1049 | .name = LN_rc4_40, | ||
| 1050 | .cipher = EVP_rc4_40, | ||
| 1051 | }, | ||
| 1052 | { | ||
| 1053 | .name = LN_rc4_hmac_md5, | ||
| 1054 | .cipher = EVP_rc4_hmac_md5, | ||
| 1055 | }, | ||
| 1056 | #endif /* OPENSSL_NO_RC4 */ | ||
| 1057 | |||
| 1058 | #ifndef OPENSSL_NO_SM4 | ||
| 1059 | { | ||
| 1060 | .name = "sm4", | ||
| 1061 | .cipher = EVP_sm4_cbc, | ||
| 1062 | .alias = SN_sm4_cbc, | ||
| 1063 | }, | ||
| 1064 | |||
| 1065 | { | ||
| 1066 | .name = LN_sm4_cbc, | ||
| 1067 | .cipher = EVP_sm4_cbc, | ||
| 1068 | }, | ||
| 1069 | { | ||
| 1070 | .name = LN_sm4_cfb128, | ||
| 1071 | .cipher = EVP_sm4_cfb128, | ||
| 1072 | }, | ||
| 1073 | { | ||
| 1074 | .name = LN_sm4_ctr, | ||
| 1075 | .cipher = EVP_sm4_ctr, | ||
| 1076 | }, | ||
| 1077 | { | ||
| 1078 | .name = LN_sm4_ecb, | ||
| 1079 | .cipher = EVP_sm4_ecb, | ||
| 1080 | }, | ||
| 1081 | { | ||
| 1082 | .name = LN_sm4_ofb128, | ||
| 1083 | .cipher = EVP_sm4_ofb, | ||
| 1084 | }, | ||
| 1085 | #endif /* OPENSSL_NO_SM4 */ | ||
| 1086 | }; | ||
| 1087 | |||
| 1088 | #define N_CIPHER_NAMES (sizeof(cipher_names) / sizeof(cipher_names[0])) | ||
