blob: 7acc92b08f07708f7cfdd336d236b8e53839b74f [file] [log] [blame]
Paul Bakker37ca75d2011-01-06 12:28:03 +00001/**
Jaeden Amero25facdd2018-01-23 15:36:58 +00002 * \file doc_encdec.h
3 *
4 * \brief Encryption/decryption module documentation file.
5 */
6/*
Manuel Pégourié-Gonnard8119dad2015-08-06 10:59:26 +02007 *
Bence Szépkúti1e148272020-08-07 13:07:28 +02008 * Copyright The Mbed TLS Contributors
Manuel Pégourié-Gonnard37ff1402015-09-04 14:21:07 +02009 * SPDX-License-Identifier: Apache-2.0
10 *
11 * Licensed under the Apache License, Version 2.0 (the "License"); you may
12 * not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
Paul Bakker37ca75d2011-01-06 12:28:03 +000022 */
23
24/**
25 * @addtogroup encdec_module Encryption/decryption module
Paul Bakkerf3b86c12011-01-27 15:24:17 +000026 *
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020027 * The Encryption/decryption module provides encryption/decryption functions.
28 * One can differentiate between symmetric and asymmetric algorithms; the
29 * symmetric ones are mostly used for message confidentiality and the asymmetric
30 * ones for key exchange and message integrity.
31 * Some symmetric algorithms provide different block cipher modes, mainly
32 * Electronic Code Book (ECB) which is used for short (64-bit) messages and
33 * Cipher Block Chaining (CBC) which provides the structure needed for longer
34 * messages. In addition the Cipher Feedback Mode (CFB-128) stream cipher mode,
35 * Counter mode (CTR) and Galois Counter Mode (GCM) are implemented for
36 * specific algorithms.
37 *
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020038 * All symmetric encryption algorithms are accessible via the generic cipher
39 * layer (see \c mbedtls_cipher_setup()).
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020040 *
41 * The asymmetric encryptrion algorithms are accessible via the generic public
Manuel Pégourié-Gonnard151dc772015-05-14 13:55:51 +020042 * key layer (see \c mbedtls_pk_init()).
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020043 *
Paul Bakker37ca75d2011-01-06 12:28:03 +000044 * The following algorithms are provided:
45 * - Symmetric:
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020046 * - AES (see \c mbedtls_aes_crypt_ecb(), \c mbedtls_aes_crypt_cbc(), \c
47 * mbedtls_aes_crypt_cfb128() and \c mbedtls_aes_crypt_ctr()).
48 * - Camellia (see \c mbedtls_camellia_crypt_ecb(), \c
49 * mbedtls_camellia_crypt_cbc(), \c mbedtls_camellia_crypt_cfb128() and \c
50 * mbedtls_camellia_crypt_ctr()).
51 * - DES/3DES (see \c mbedtls_des_crypt_ecb(), \c mbedtls_des_crypt_cbc(), \c
52 * mbedtls_des3_crypt_ecb() and \c mbedtls_des3_crypt_cbc()).
Manuel Pégourié-Gonnard151dc772015-05-14 13:55:51 +020053 * - GCM (AES-GCM and CAMELLIA-GCM) (see \c mbedtls_gcm_init())
Paul Bakker37ca75d2011-01-06 12:28:03 +000054 * - Asymmetric:
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020055 * - Diffie-Hellman-Merkle (see \c mbedtls_dhm_read_public(), \c
56 * mbedtls_dhm_make_public() and \c mbedtls_dhm_calc_secret()).
Manuel Pégourié-Gonnard151dc772015-05-14 13:55:51 +020057 * - RSA (see \c mbedtls_rsa_public() and \c mbedtls_rsa_private()).
58 * - Elliptic Curves over GF(p) (see \c mbedtls_ecp_point_init()).
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020059 * - Elliptic Curve Digital Signature Algorithm (ECDSA) (see \c
60 * mbedtls_ecdsa_init()).
Manuel Pégourié-Gonnard151dc772015-05-14 13:55:51 +020061 * - Elliptic Curve Diffie Hellman (ECDH) (see \c mbedtls_ecdh_init()).
Paul Bakker37ca75d2011-01-06 12:28:03 +000062 *
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020063 * This module provides encryption/decryption which can be used to provide
Paul Bakker37ca75d2011-01-06 12:28:03 +000064 * secrecy.
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +020065 *
66 * It also provides asymmetric key functions which can be used for
67 * confidentiality, integrity, authentication and non-repudiation.
Paul Bakker37ca75d2011-01-06 12:28:03 +000068 */