1 /** 2 * \file doc_encdec.h 3 * 4 * \brief Encryption/decryption module documentation file. 5 */ 6 /* 7 * 8 * Copyright The Mbed TLS Contributors 9 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 10 */ 11 12 /** 13 * @addtogroup encdec_module Encryption/decryption module 14 * 15 * The Encryption/decryption module provides encryption/decryption functions. 16 * One can differentiate between symmetric and asymmetric algorithms; the 17 * symmetric ones are mostly used for message confidentiality and the asymmetric 18 * ones for key exchange and message integrity. 19 * Some symmetric algorithms provide different block cipher modes, mainly 20 * Electronic Code Book (ECB) which is used for short (64-bit) messages and 21 * Cipher Block Chaining (CBC) which provides the structure needed for longer 22 * messages. In addition the Cipher Feedback Mode (CFB-128) stream cipher mode, 23 * Counter mode (CTR) and Galois Counter Mode (GCM) are implemented for 24 * specific algorithms. 25 * 26 * All symmetric encryption algorithms are accessible via the generic cipher layer 27 * (see \c mbedtls_cipher_setup()). 28 * 29 * The asymmetric encryption algorithms are accessible via the generic public 30 * key layer (see \c mbedtls_pk_init()). 31 * 32 * The following algorithms are provided: 33 * - Symmetric: 34 * - AES (see \c mbedtls_aes_crypt_ecb(), \c mbedtls_aes_crypt_cbc(), \c mbedtls_aes_crypt_cfb128() and 35 * \c mbedtls_aes_crypt_ctr()). 36 * - ARCFOUR (see \c mbedtls_arc4_crypt()). 37 * - Blowfish / BF (see \c mbedtls_blowfish_crypt_ecb(), \c mbedtls_blowfish_crypt_cbc(), 38 * \c mbedtls_blowfish_crypt_cfb64() and \c mbedtls_blowfish_crypt_ctr()) 39 * - Camellia (see \c mbedtls_camellia_crypt_ecb(), \c mbedtls_camellia_crypt_cbc(), 40 * \c mbedtls_camellia_crypt_cfb128() and \c mbedtls_camellia_crypt_ctr()). 41 * - DES/3DES (see \c mbedtls_des_crypt_ecb(), \c mbedtls_des_crypt_cbc(), \c mbedtls_des3_crypt_ecb() 42 * and \c mbedtls_des3_crypt_cbc()). 43 * - GCM (AES-GCM and CAMELLIA-GCM) (see \c mbedtls_gcm_init()) 44 * - XTEA (see \c mbedtls_xtea_crypt_ecb()). 45 * - Asymmetric: 46 * - Diffie-Hellman-Merkle (see \c mbedtls_dhm_read_public(), \c mbedtls_dhm_make_public() 47 * and \c mbedtls_dhm_calc_secret()). 48 * - RSA (see \c mbedtls_rsa_public() and \c mbedtls_rsa_private()). 49 * - Elliptic Curves over GF(p) (see \c mbedtls_ecp_point_init()). 50 * - Elliptic Curve Digital Signature Algorithm (ECDSA) (see \c mbedtls_ecdsa_init()). 51 * - Elliptic Curve Diffie Hellman (ECDH) (see \c mbedtls_ecdh_init()). 52 * 53 * This module provides encryption/decryption which can be used to provide 54 * secrecy. 55 * 56 * It also provides asymmetric key functions which can be used for 57 * confidentiality, integrity, authentication and non-repudiation. 58 */ 59