11558Srgrimes/* crypto/evp/c_allc.c */ 21558Srgrimes/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 31558Srgrimes * All rights reserved. 41558Srgrimes * 51558Srgrimes * This package is an SSL implementation written 61558Srgrimes * by Eric Young (eay@cryptsoft.com). 71558Srgrimes * The implementation was written so as to conform with Netscapes SSL. 81558Srgrimes * 91558Srgrimes * This library is free for commercial and non-commercial use as long as 101558Srgrimes * the following conditions are aheared to. The following conditions 111558Srgrimes * apply to all code found in this distribution, be it the RC4, RSA, 121558Srgrimes * lhash, DES, etc., code; not just the SSL code. The SSL documentation 131558Srgrimes * included with this distribution is covered by the same copyright terms 141558Srgrimes * except that the holder is Tim Hudson (tjh@cryptsoft.com). 151558Srgrimes * 161558Srgrimes * Copyright remains Eric Young's, and as such any Copyright notices in 171558Srgrimes * the code are not to be removed. 181558Srgrimes * If this package is used in a product, Eric Young should be given attribution 191558Srgrimes * as the author of the parts of the library used. 201558Srgrimes * This can be in the form of a textual message at program startup or 211558Srgrimes * in documentation (online or textual) provided with the package. 221558Srgrimes * 231558Srgrimes * Redistribution and use in source and binary forms, with or without 241558Srgrimes * modification, are permitted provided that the following conditions 251558Srgrimes * are met: 261558Srgrimes * 1. Redistributions of source code must retain the copyright 271558Srgrimes * notice, this list of conditions and the following disclaimer. 281558Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 291558Srgrimes * notice, this list of conditions and the following disclaimer in the 301558Srgrimes * documentation and/or other materials provided with the distribution. 311558Srgrimes * 3. All advertising materials mentioning features or use of this software 321558Srgrimes * must display the following acknowledgement: 331558Srgrimes * "This product includes cryptographic software written by 341558Srgrimes * Eric Young (eay@cryptsoft.com)" 351558Srgrimes * The word 'cryptographic' can be left out if the rouines from the library 361558Srgrimes * being used are not cryptographic related :-). 371558Srgrimes * 4. If you include any Windows specific code (or a derivative thereof) from 381558Srgrimes * the apps directory (application code) you must include an acknowledgement: 391558Srgrimes * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 4037906Scharnier * 4123685Speter * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 4237906Scharnier * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4337906Scharnier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 4450476Speter * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 451558Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 461558Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 471558Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 481558Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 491558Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 501558Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5166907Swollman * SUCH DAMAGE. 521558Srgrimes * 531558Srgrimes * The licence and distribution terms for any publically available version or 541558Srgrimes * derivative of this code cannot be changed. i.e. this code cannot simply be 551558Srgrimes * copied and put under another distribution licence 561558Srgrimes * [including the GNU Public Licence.] 5773986Sobrien */ 581558Srgrimes 591558Srgrimes#include <stdio.h> 601558Srgrimes#include "cryptlib.h" 611558Srgrimes#include <openssl/evp.h> 6266907Swollman#include <openssl/pkcs12.h> 631558Srgrimes#include <openssl/objects.h> 641558Srgrimes 651558Srgrimesvoid OpenSSL_add_all_ciphers(void) 661558Srgrimes { 671558Srgrimes 681558Srgrimes#ifndef OPENSSL_NO_DES 691558Srgrimes EVP_add_cipher(EVP_des_cfb()); 701558Srgrimes EVP_add_cipher(EVP_des_cfb1()); 7121174Sguido EVP_add_cipher(EVP_des_cfb8()); 721558Srgrimes EVP_add_cipher(EVP_des_ede_cfb()); 731558Srgrimes EVP_add_cipher(EVP_des_ede3_cfb()); 741558Srgrimes EVP_add_cipher(EVP_des_ede3_cfb1()); 751558Srgrimes EVP_add_cipher(EVP_des_ede3_cfb8()); 761558Srgrimes 7790827Siedowse EVP_add_cipher(EVP_des_ofb()); 781558Srgrimes EVP_add_cipher(EVP_des_ede_ofb()); 791558Srgrimes EVP_add_cipher(EVP_des_ede3_ofb()); 801558Srgrimes 811558Srgrimes EVP_add_cipher(EVP_desx_cbc()); 821558Srgrimes EVP_add_cipher_alias(SN_desx_cbc,"DESX"); 831558Srgrimes EVP_add_cipher_alias(SN_desx_cbc,"desx"); 841558Srgrimes 851558Srgrimes EVP_add_cipher(EVP_des_cbc()); 861558Srgrimes EVP_add_cipher_alias(SN_des_cbc,"DES"); 871558Srgrimes EVP_add_cipher_alias(SN_des_cbc,"des"); 881558Srgrimes EVP_add_cipher(EVP_des_ede_cbc()); 891558Srgrimes EVP_add_cipher(EVP_des_ede3_cbc()); 901558Srgrimes EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3"); 911558Srgrimes EVP_add_cipher_alias(SN_des_ede3_cbc,"des3"); 921558Srgrimes 931558Srgrimes EVP_add_cipher(EVP_des_ecb()); 9492837Simp EVP_add_cipher(EVP_des_ede()); 9592837Simp EVP_add_cipher(EVP_des_ede3()); 9692837Simp#endif 9792837Simp 9892837Simp#ifndef OPENSSL_NO_RC4 9992837Simp EVP_add_cipher(EVP_rc4()); 10092837Simp EVP_add_cipher(EVP_rc4_40()); 10192837Simp#ifndef OPENSSL_NO_MD5 10292837Simp EVP_add_cipher(EVP_rc4_hmac_md5()); 10392837Simp#endif 10492837Simp#endif 10592837Simp 10692837Simp#ifndef OPENSSL_NO_IDEA 10792837Simp EVP_add_cipher(EVP_idea_ecb()); 10892837Simp EVP_add_cipher(EVP_idea_cfb()); 10992837Simp EVP_add_cipher(EVP_idea_ofb()); 11092837Simp EVP_add_cipher(EVP_idea_cbc()); 1111558Srgrimes EVP_add_cipher_alias(SN_idea_cbc,"IDEA"); 11237923Simp EVP_add_cipher_alias(SN_idea_cbc,"idea"); 11337923Simp#endif 1141558Srgrimes 1151558Srgrimes#ifndef OPENSSL_NO_SEED 1161558Srgrimes EVP_add_cipher(EVP_seed_ecb()); 1171558Srgrimes EVP_add_cipher(EVP_seed_cfb()); 11892837Simp EVP_add_cipher(EVP_seed_ofb()); 1191558Srgrimes EVP_add_cipher(EVP_seed_cbc()); 1201558Srgrimes EVP_add_cipher_alias(SN_seed_cbc,"SEED"); 1211558Srgrimes EVP_add_cipher_alias(SN_seed_cbc,"seed"); 1221558Srgrimes#endif 1231558Srgrimes 1241558Srgrimes#ifndef OPENSSL_NO_RC2 1251558Srgrimes EVP_add_cipher(EVP_rc2_ecb()); 1261558Srgrimes EVP_add_cipher(EVP_rc2_cfb()); 1271558Srgrimes EVP_add_cipher(EVP_rc2_ofb()); 12823685Speter EVP_add_cipher(EVP_rc2_cbc()); 1291558Srgrimes EVP_add_cipher(EVP_rc2_40_cbc()); 13023685Speter EVP_add_cipher(EVP_rc2_64_cbc()); 1311558Srgrimes EVP_add_cipher_alias(SN_rc2_cbc,"RC2"); 1321558Srgrimes EVP_add_cipher_alias(SN_rc2_cbc,"rc2"); 1331558Srgrimes#endif 1341558Srgrimes 1351558Srgrimes#ifndef OPENSSL_NO_BF 1361558Srgrimes EVP_add_cipher(EVP_bf_ecb()); 1371558Srgrimes EVP_add_cipher(EVP_bf_cfb()); 1381558Srgrimes EVP_add_cipher(EVP_bf_ofb()); 1391558Srgrimes EVP_add_cipher(EVP_bf_cbc()); 1401558Srgrimes EVP_add_cipher_alias(SN_bf_cbc,"BF"); 1411558Srgrimes EVP_add_cipher_alias(SN_bf_cbc,"bf"); 1421558Srgrimes EVP_add_cipher_alias(SN_bf_cbc,"blowfish"); 1431558Srgrimes#endif 1441558Srgrimes 1451558Srgrimes#ifndef OPENSSL_NO_CAST 1461558Srgrimes EVP_add_cipher(EVP_cast5_ecb()); 1471558Srgrimes EVP_add_cipher(EVP_cast5_cfb()); 1481558Srgrimes EVP_add_cipher(EVP_cast5_ofb()); 1491558Srgrimes EVP_add_cipher(EVP_cast5_cbc()); 1501558Srgrimes EVP_add_cipher_alias(SN_cast5_cbc,"CAST"); 1511558Srgrimes EVP_add_cipher_alias(SN_cast5_cbc,"cast"); 1521558Srgrimes EVP_add_cipher_alias(SN_cast5_cbc,"CAST-cbc"); 1531558Srgrimes EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc"); 1541558Srgrimes#endif 15521174Sguido 15621174Sguido#ifndef OPENSSL_NO_RC5 15721174Sguido EVP_add_cipher(EVP_rc5_32_12_16_ecb()); 15821174Sguido EVP_add_cipher(EVP_rc5_32_12_16_cfb()); 15921174Sguido EVP_add_cipher(EVP_rc5_32_12_16_ofb()); 1601558Srgrimes EVP_add_cipher(EVP_rc5_32_12_16_cbc()); 1611558Srgrimes EVP_add_cipher_alias(SN_rc5_cbc,"rc5"); 1621558Srgrimes EVP_add_cipher_alias(SN_rc5_cbc,"RC5"); 16392837Simp#endif 1641558Srgrimes 16592837Simp#ifndef OPENSSL_NO_AES 1661558Srgrimes EVP_add_cipher(EVP_aes_128_ecb()); 1671558Srgrimes EVP_add_cipher(EVP_aes_128_cbc()); 1681558Srgrimes EVP_add_cipher(EVP_aes_128_cfb()); 1691558Srgrimes EVP_add_cipher(EVP_aes_128_cfb1()); 1701558Srgrimes EVP_add_cipher(EVP_aes_128_cfb8()); 1711558Srgrimes EVP_add_cipher(EVP_aes_128_ofb()); 1721558Srgrimes EVP_add_cipher(EVP_aes_128_ctr()); 1731558Srgrimes EVP_add_cipher(EVP_aes_128_gcm()); 1741558Srgrimes EVP_add_cipher(EVP_aes_128_xts()); 1751558Srgrimes EVP_add_cipher_alias(SN_aes_128_cbc,"AES128"); 1761558Srgrimes EVP_add_cipher_alias(SN_aes_128_cbc,"aes128"); 1771558Srgrimes EVP_add_cipher(EVP_aes_192_ecb()); 1781558Srgrimes EVP_add_cipher(EVP_aes_192_cbc()); 1791558Srgrimes EVP_add_cipher(EVP_aes_192_cfb()); 1801558Srgrimes EVP_add_cipher(EVP_aes_192_cfb1()); 1811558Srgrimes EVP_add_cipher(EVP_aes_192_cfb8()); 1821558Srgrimes EVP_add_cipher(EVP_aes_192_ofb()); 1831558Srgrimes EVP_add_cipher(EVP_aes_192_ctr()); 1841558Srgrimes EVP_add_cipher(EVP_aes_192_gcm()); 18592837Simp EVP_add_cipher_alias(SN_aes_192_cbc,"AES192"); 1861558Srgrimes EVP_add_cipher_alias(SN_aes_192_cbc,"aes192"); 1871558Srgrimes EVP_add_cipher(EVP_aes_256_ecb()); 1881558Srgrimes EVP_add_cipher(EVP_aes_256_cbc()); 1891558Srgrimes EVP_add_cipher(EVP_aes_256_cfb()); 1901558Srgrimes EVP_add_cipher(EVP_aes_256_cfb1()); 1911558Srgrimes EVP_add_cipher(EVP_aes_256_cfb8()); 1921558Srgrimes EVP_add_cipher(EVP_aes_256_ofb()); 1931558Srgrimes EVP_add_cipher(EVP_aes_256_ctr()); 1941558Srgrimes EVP_add_cipher(EVP_aes_256_gcm()); 1951558Srgrimes EVP_add_cipher(EVP_aes_256_xts()); 1961558Srgrimes EVP_add_cipher_alias(SN_aes_256_cbc,"AES256"); 1971558Srgrimes EVP_add_cipher_alias(SN_aes_256_cbc,"aes256"); 1981558Srgrimes#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) 1991558Srgrimes EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1()); 2001558Srgrimes EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1()); 2011558Srgrimes#endif 2021558Srgrimes#endif 2031558Srgrimes 2041558Srgrimes#ifndef OPENSSL_NO_CAMELLIA 2051558Srgrimes EVP_add_cipher(EVP_camellia_128_ecb()); 2061558Srgrimes EVP_add_cipher(EVP_camellia_128_cbc()); 2071558Srgrimes EVP_add_cipher(EVP_camellia_128_cfb()); 2081558Srgrimes EVP_add_cipher(EVP_camellia_128_cfb1()); 2091558Srgrimes EVP_add_cipher(EVP_camellia_128_cfb8()); 2101558Srgrimes EVP_add_cipher(EVP_camellia_128_ofb()); 2111558Srgrimes EVP_add_cipher_alias(SN_camellia_128_cbc,"CAMELLIA128"); 2121558Srgrimes EVP_add_cipher_alias(SN_camellia_128_cbc,"camellia128"); 2131558Srgrimes EVP_add_cipher(EVP_camellia_192_ecb()); 2141558Srgrimes EVP_add_cipher(EVP_camellia_192_cbc()); 2151558Srgrimes EVP_add_cipher(EVP_camellia_192_cfb()); 2161558Srgrimes EVP_add_cipher(EVP_camellia_192_cfb1()); 2171558Srgrimes EVP_add_cipher(EVP_camellia_192_cfb8()); 2181558Srgrimes EVP_add_cipher(EVP_camellia_192_ofb()); 2191558Srgrimes EVP_add_cipher_alias(SN_camellia_192_cbc,"CAMELLIA192"); 2201558Srgrimes EVP_add_cipher_alias(SN_camellia_192_cbc,"camellia192"); 2211558Srgrimes EVP_add_cipher(EVP_camellia_256_ecb()); 2221558Srgrimes EVP_add_cipher(EVP_camellia_256_cbc()); 2231558Srgrimes EVP_add_cipher(EVP_camellia_256_cfb()); 2241558Srgrimes EVP_add_cipher(EVP_camellia_256_cfb1()); 2251558Srgrimes EVP_add_cipher(EVP_camellia_256_cfb8()); 2261558Srgrimes EVP_add_cipher(EVP_camellia_256_ofb()); 2271558Srgrimes EVP_add_cipher_alias(SN_camellia_256_cbc,"CAMELLIA256"); 2281558Srgrimes EVP_add_cipher_alias(SN_camellia_256_cbc,"camellia256"); 2291558Srgrimes#endif 2301558Srgrimes } 2311558Srgrimes