This file contains an abstraction interface for use with the cipher primitives provided by the library.
More...
|
enum | mbedtls_cipher_id_t {
MBEDTLS_CIPHER_ID_NONE = 0
, MBEDTLS_CIPHER_ID_NULL
, MBEDTLS_CIPHER_ID_AES
, MBEDTLS_CIPHER_ID_DES
,
MBEDTLS_CIPHER_ID_3DES
, MBEDTLS_CIPHER_ID_CAMELLIA
, MBEDTLS_CIPHER_ID_BLOWFISH
, MBEDTLS_CIPHER_ID_ARC4
,
MBEDTLS_CIPHER_ID_ARIA
, MBEDTLS_CIPHER_ID_CHACHA20
} |
| Supported cipher types. More...
|
|
enum | mbedtls_cipher_type_t {
MBEDTLS_CIPHER_NONE = 0
, MBEDTLS_CIPHER_NULL
, MBEDTLS_CIPHER_AES_128_ECB
, MBEDTLS_CIPHER_AES_192_ECB
,
MBEDTLS_CIPHER_AES_256_ECB
, MBEDTLS_CIPHER_AES_128_CBC
, MBEDTLS_CIPHER_AES_192_CBC
, MBEDTLS_CIPHER_AES_256_CBC
,
MBEDTLS_CIPHER_AES_128_CFB128
, MBEDTLS_CIPHER_AES_192_CFB128
, MBEDTLS_CIPHER_AES_256_CFB128
, MBEDTLS_CIPHER_AES_128_CTR
,
MBEDTLS_CIPHER_AES_192_CTR
, MBEDTLS_CIPHER_AES_256_CTR
, MBEDTLS_CIPHER_AES_128_GCM
, MBEDTLS_CIPHER_AES_192_GCM
,
MBEDTLS_CIPHER_AES_256_GCM
, MBEDTLS_CIPHER_CAMELLIA_128_ECB
, MBEDTLS_CIPHER_CAMELLIA_192_ECB
, MBEDTLS_CIPHER_CAMELLIA_256_ECB
,
MBEDTLS_CIPHER_CAMELLIA_128_CBC
, MBEDTLS_CIPHER_CAMELLIA_192_CBC
, MBEDTLS_CIPHER_CAMELLIA_256_CBC
, MBEDTLS_CIPHER_CAMELLIA_128_CFB128
,
MBEDTLS_CIPHER_CAMELLIA_192_CFB128
, MBEDTLS_CIPHER_CAMELLIA_256_CFB128
, MBEDTLS_CIPHER_CAMELLIA_128_CTR
, MBEDTLS_CIPHER_CAMELLIA_192_CTR
,
MBEDTLS_CIPHER_CAMELLIA_256_CTR
, MBEDTLS_CIPHER_CAMELLIA_128_GCM
, MBEDTLS_CIPHER_CAMELLIA_192_GCM
, MBEDTLS_CIPHER_CAMELLIA_256_GCM
,
MBEDTLS_CIPHER_DES_ECB
, MBEDTLS_CIPHER_DES_CBC
, MBEDTLS_CIPHER_DES_EDE_ECB
, MBEDTLS_CIPHER_DES_EDE_CBC
,
MBEDTLS_CIPHER_DES_EDE3_ECB
, MBEDTLS_CIPHER_DES_EDE3_CBC
, MBEDTLS_CIPHER_BLOWFISH_ECB
, MBEDTLS_CIPHER_BLOWFISH_CBC
,
MBEDTLS_CIPHER_BLOWFISH_CFB64
, MBEDTLS_CIPHER_BLOWFISH_CTR
, MBEDTLS_CIPHER_ARC4_128
, MBEDTLS_CIPHER_AES_128_CCM
,
MBEDTLS_CIPHER_AES_192_CCM
, MBEDTLS_CIPHER_AES_256_CCM
, MBEDTLS_CIPHER_CAMELLIA_128_CCM
, MBEDTLS_CIPHER_CAMELLIA_192_CCM
,
MBEDTLS_CIPHER_CAMELLIA_256_CCM
, MBEDTLS_CIPHER_ARIA_128_ECB
, MBEDTLS_CIPHER_ARIA_192_ECB
, MBEDTLS_CIPHER_ARIA_256_ECB
,
MBEDTLS_CIPHER_ARIA_128_CBC
, MBEDTLS_CIPHER_ARIA_192_CBC
, MBEDTLS_CIPHER_ARIA_256_CBC
, MBEDTLS_CIPHER_ARIA_128_CFB128
,
MBEDTLS_CIPHER_ARIA_192_CFB128
, MBEDTLS_CIPHER_ARIA_256_CFB128
, MBEDTLS_CIPHER_ARIA_128_CTR
, MBEDTLS_CIPHER_ARIA_192_CTR
,
MBEDTLS_CIPHER_ARIA_256_CTR
, MBEDTLS_CIPHER_ARIA_128_GCM
, MBEDTLS_CIPHER_ARIA_192_GCM
, MBEDTLS_CIPHER_ARIA_256_GCM
,
MBEDTLS_CIPHER_ARIA_128_CCM
, MBEDTLS_CIPHER_ARIA_192_CCM
, MBEDTLS_CIPHER_ARIA_256_CCM
, MBEDTLS_CIPHER_AES_128_OFB
,
MBEDTLS_CIPHER_AES_192_OFB
, MBEDTLS_CIPHER_AES_256_OFB
, MBEDTLS_CIPHER_AES_128_XTS
, MBEDTLS_CIPHER_AES_256_XTS
,
MBEDTLS_CIPHER_CHACHA20
, MBEDTLS_CIPHER_CHACHA20_POLY1305
, MBEDTLS_CIPHER_AES_128_KW
, MBEDTLS_CIPHER_AES_192_KW
,
MBEDTLS_CIPHER_AES_256_KW
, MBEDTLS_CIPHER_AES_128_KWP
, MBEDTLS_CIPHER_AES_192_KWP
, MBEDTLS_CIPHER_AES_256_KWP
} |
| Supported {cipher type, cipher mode} pairs. More...
|
|
enum | mbedtls_cipher_mode_t {
MBEDTLS_MODE_NONE = 0
, MBEDTLS_MODE_ECB
, MBEDTLS_MODE_CBC
, MBEDTLS_MODE_CFB
,
MBEDTLS_MODE_OFB
, MBEDTLS_MODE_CTR
, MBEDTLS_MODE_GCM
, MBEDTLS_MODE_STREAM
,
MBEDTLS_MODE_CCM
, MBEDTLS_MODE_XTS
, MBEDTLS_MODE_CHACHAPOLY
, MBEDTLS_MODE_KW
,
MBEDTLS_MODE_KWP
} |
| Supported cipher modes. More...
|
|
enum | mbedtls_cipher_padding_t {
MBEDTLS_PADDING_PKCS7 = 0
, MBEDTLS_PADDING_ONE_AND_ZEROS
, MBEDTLS_PADDING_ZEROS_AND_LEN
, MBEDTLS_PADDING_ZEROS
,
MBEDTLS_PADDING_NONE
} |
| Supported cipher padding types. More...
|
|
enum | mbedtls_operation_t { } |
| Type of operation. More...
|
|
enum | { MBEDTLS_KEY_LENGTH_NONE = 0
, MBEDTLS_KEY_LENGTH_DES = 64
, MBEDTLS_KEY_LENGTH_DES_EDE = 128
, MBEDTLS_KEY_LENGTH_DES_EDE3 = 192
} |
|
|
const int * | mbedtls_cipher_list (void) |
| This function retrieves the list of ciphers supported by the generic cipher module. More...
|
|
const mbedtls_cipher_info_t * | mbedtls_cipher_info_from_string (const char *cipher_name) |
| This function retrieves the cipher-information structure associated with the given cipher name. More...
|
|
const mbedtls_cipher_info_t * | mbedtls_cipher_info_from_type (const mbedtls_cipher_type_t cipher_type) |
| This function retrieves the cipher-information structure associated with the given cipher type. More...
|
|
const mbedtls_cipher_info_t * | mbedtls_cipher_info_from_values (const mbedtls_cipher_id_t cipher_id, int key_bitlen, const mbedtls_cipher_mode_t mode) |
| This function retrieves the cipher-information structure associated with the given cipher ID, key size and mode. More...
|
|
void | mbedtls_cipher_init (mbedtls_cipher_context_t *ctx) |
| This function initializes a cipher_context as NONE. More...
|
|
void | mbedtls_cipher_free (mbedtls_cipher_context_t *ctx) |
| This function frees and clears the cipher-specific context of ctx . More...
|
|
int | mbedtls_cipher_setup (mbedtls_cipher_context_t *ctx, const mbedtls_cipher_info_t *cipher_info) |
| This function initializes a cipher context for use with the given cipher primitive. More...
|
|
int | mbedtls_cipher_setkey (mbedtls_cipher_context_t *ctx, const unsigned char *key, int key_bitlen, const mbedtls_operation_t operation) |
| This function sets the key to use with the given context. More...
|
|
int | mbedtls_cipher_set_iv (mbedtls_cipher_context_t *ctx, const unsigned char *iv, size_t iv_len) |
| This function sets the initialization vector (IV) or nonce. More...
|
|
int | mbedtls_cipher_reset (mbedtls_cipher_context_t *ctx) |
| This function resets the cipher state. More...
|
|
int | mbedtls_cipher_update (mbedtls_cipher_context_t *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen) |
| The generic cipher update function. More...
|
|
int | mbedtls_cipher_finish (mbedtls_cipher_context_t *ctx, unsigned char *output, size_t *olen) |
| The generic cipher finalization function. More...
|
|
int | mbedtls_cipher_crypt (mbedtls_cipher_context_t *ctx, const unsigned char *iv, size_t iv_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen) |
| The generic all-in-one encryption/decryption function, for all ciphers except AEAD constructs. More...
|
|
This file contains an abstraction interface for use with the cipher primitives provided by the library.
It provides a common interface to all of the available cipher operations.
- Author
- Adriaan de Jong dejon.nosp@m.g@fo.nosp@m.x-it..nosp@m.com
Definition in file cipher.h.