RetroArch
Macros | Functions | Variables
cipher_wrap.c File Reference

Generic cipher wrapper for mbed TLS. More...

#include "mbedtls/config.h"
#include "mbedtls/cipher_internal.h"
#include "mbedtls/aes.h"
#include "mbedtls/arc4.h"
#include "mbedtls/camellia.h"
#include "mbedtls/des.h"
#include "mbedtls/blowfish.h"
#include "mbedtls/gcm.h"
#include "mbedtls/ccm.h"
#include "mbedtls/platform.h"
Include dependency graph for cipher_wrap.c:

Macros

#define NUM_CIPHERS   sizeof mbedtls_cipher_definitions / sizeof mbedtls_cipher_definitions[0]
 

Functions

static voidgcm_ctx_alloc (void)
 
static void gcm_ctx_free (void *ctx)
 
static voidccm_ctx_alloc (void)
 
static void ccm_ctx_free (void *ctx)
 
static int aes_crypt_ecb_wrap (void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
 
static int aes_crypt_cbc_wrap (void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int aes_crypt_cfb128_wrap (void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int aes_crypt_ctr_wrap (void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
 
static int aes_setkey_dec_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int aes_setkey_enc_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static voidaes_ctx_alloc (void)
 
static void aes_ctx_free (void *ctx)
 
static int gcm_aes_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int ccm_aes_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int camellia_crypt_ecb_wrap (void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
 
static int camellia_crypt_cbc_wrap (void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int camellia_crypt_cfb128_wrap (void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int camellia_crypt_ctr_wrap (void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
 
static int camellia_setkey_dec_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int camellia_setkey_enc_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static voidcamellia_ctx_alloc (void)
 
static void camellia_ctx_free (void *ctx)
 
static int gcm_camellia_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int ccm_camellia_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des_crypt_ecb_wrap (void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
 
static int des3_crypt_ecb_wrap (void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
 
static int des_crypt_cbc_wrap (void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int des3_crypt_cbc_wrap (void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int des_setkey_dec_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des_setkey_enc_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des3_set2key_dec_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des3_set2key_enc_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des3_set3key_dec_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static int des3_set3key_enc_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static voiddes_ctx_alloc (void)
 
static void des_ctx_free (void *ctx)
 
static voiddes3_ctx_alloc (void)
 
static void des3_ctx_free (void *ctx)
 
static int blowfish_crypt_ecb_wrap (void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
 
static int blowfish_crypt_cbc_wrap (void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int blowfish_crypt_cfb64_wrap (void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
 
static int blowfish_crypt_ctr_wrap (void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
 
static int blowfish_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static voidblowfish_ctx_alloc (void)
 
static void blowfish_ctx_free (void *ctx)
 
static int arc4_crypt_stream_wrap (void *ctx, size_t length, const unsigned char *input, unsigned char *output)
 
static int arc4_setkey_wrap (void *ctx, const unsigned char *key, unsigned int key_bitlen)
 
static voidarc4_ctx_alloc (void)
 
static void arc4_ctx_free (void *ctx)
 

Variables

static const mbedtls_cipher_base_t aes_info
 
static const mbedtls_cipher_info_t aes_128_ecb_info
 
static const mbedtls_cipher_info_t aes_192_ecb_info
 
static const mbedtls_cipher_info_t aes_256_ecb_info
 
static const mbedtls_cipher_info_t aes_128_cbc_info
 
static const mbedtls_cipher_info_t aes_192_cbc_info
 
static const mbedtls_cipher_info_t aes_256_cbc_info
 
static const mbedtls_cipher_info_t aes_128_cfb128_info
 
static const mbedtls_cipher_info_t aes_192_cfb128_info
 
static const mbedtls_cipher_info_t aes_256_cfb128_info
 
static const mbedtls_cipher_info_t aes_128_ctr_info
 
static const mbedtls_cipher_info_t aes_192_ctr_info
 
static const mbedtls_cipher_info_t aes_256_ctr_info
 
static const mbedtls_cipher_base_t gcm_aes_info
 
static const mbedtls_cipher_info_t aes_128_gcm_info
 
static const mbedtls_cipher_info_t aes_192_gcm_info
 
static const mbedtls_cipher_info_t aes_256_gcm_info
 
static const mbedtls_cipher_base_t ccm_aes_info
 
static const mbedtls_cipher_info_t aes_128_ccm_info
 
static const mbedtls_cipher_info_t aes_192_ccm_info
 
static const mbedtls_cipher_info_t aes_256_ccm_info
 
static const mbedtls_cipher_base_t camellia_info
 
static const mbedtls_cipher_info_t camellia_128_ecb_info
 
static const mbedtls_cipher_info_t camellia_192_ecb_info
 
static const mbedtls_cipher_info_t camellia_256_ecb_info
 
static const mbedtls_cipher_info_t camellia_128_cbc_info
 
static const mbedtls_cipher_info_t camellia_192_cbc_info
 
static const mbedtls_cipher_info_t camellia_256_cbc_info
 
static const mbedtls_cipher_info_t camellia_128_cfb128_info
 
static const mbedtls_cipher_info_t camellia_192_cfb128_info
 
static const mbedtls_cipher_info_t camellia_256_cfb128_info
 
static const mbedtls_cipher_info_t camellia_128_ctr_info
 
static const mbedtls_cipher_info_t camellia_192_ctr_info
 
static const mbedtls_cipher_info_t camellia_256_ctr_info
 
static const mbedtls_cipher_base_t gcm_camellia_info
 
static const mbedtls_cipher_info_t camellia_128_gcm_info
 
static const mbedtls_cipher_info_t camellia_192_gcm_info
 
static const mbedtls_cipher_info_t camellia_256_gcm_info
 
static const mbedtls_cipher_base_t ccm_camellia_info
 
static const mbedtls_cipher_info_t camellia_128_ccm_info
 
static const mbedtls_cipher_info_t camellia_192_ccm_info
 
static const mbedtls_cipher_info_t camellia_256_ccm_info
 
static const mbedtls_cipher_base_t des_info
 
static const mbedtls_cipher_info_t des_ecb_info
 
static const mbedtls_cipher_info_t des_cbc_info
 
static const mbedtls_cipher_base_t des_ede_info
 
static const mbedtls_cipher_info_t des_ede_ecb_info
 
static const mbedtls_cipher_info_t des_ede_cbc_info
 
static const mbedtls_cipher_base_t des_ede3_info
 
static const mbedtls_cipher_info_t des_ede3_ecb_info
 
static const mbedtls_cipher_info_t des_ede3_cbc_info
 
static const mbedtls_cipher_base_t blowfish_info
 
static const mbedtls_cipher_info_t blowfish_ecb_info
 
static const mbedtls_cipher_info_t blowfish_cbc_info
 
static const mbedtls_cipher_info_t blowfish_cfb64_info
 
static const mbedtls_cipher_info_t blowfish_ctr_info
 
static const mbedtls_cipher_base_t arc4_base_info
 
static const mbedtls_cipher_info_t arc4_128_info
 
const mbedtls_cipher_definition_t mbedtls_cipher_definitions []
 
int mbedtls_cipher_supported [NUM_CIPHERS]
 

Detailed Description

Generic cipher wrapper for mbed TLS.

Author
Adriaan de Jong dejon.nosp@m.g@fo.nosp@m.x-it..nosp@m.com

Copyright (C) 2006-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This file is part of mbed TLS (https://tls.mbed.org)

Macro Definition Documentation

◆ NUM_CIPHERS

#define NUM_CIPHERS   sizeof mbedtls_cipher_definitions / sizeof mbedtls_cipher_definitions[0]

Function Documentation

◆ aes_crypt_cbc_wrap()

static int aes_crypt_cbc_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ aes_crypt_cfb128_wrap()

static int aes_crypt_cfb128_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
size_t *  iv_off,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ aes_crypt_ctr_wrap()

static int aes_crypt_ctr_wrap ( void ctx,
size_t  length,
size_t *  nc_off,
unsigned char *  nonce_counter,
unsigned char *  stream_block,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ aes_crypt_ecb_wrap()

static int aes_crypt_ecb_wrap ( void ctx,
mbedtls_operation_t  operation,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ aes_ctx_alloc()

static void* aes_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ aes_ctx_free()

static void aes_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ aes_setkey_dec_wrap()

static int aes_setkey_dec_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ aes_setkey_enc_wrap()

static int aes_setkey_enc_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ arc4_crypt_stream_wrap()

static int arc4_crypt_stream_wrap ( void ctx,
size_t  length,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ arc4_ctx_alloc()

static void* arc4_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ arc4_ctx_free()

static void arc4_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ arc4_setkey_wrap()

static int arc4_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ blowfish_crypt_cbc_wrap()

static int blowfish_crypt_cbc_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ blowfish_crypt_cfb64_wrap()

static int blowfish_crypt_cfb64_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
size_t *  iv_off,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ blowfish_crypt_ctr_wrap()

static int blowfish_crypt_ctr_wrap ( void ctx,
size_t  length,
size_t *  nc_off,
unsigned char *  nonce_counter,
unsigned char *  stream_block,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ blowfish_crypt_ecb_wrap()

static int blowfish_crypt_ecb_wrap ( void ctx,
mbedtls_operation_t  operation,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ blowfish_ctx_alloc()

static void* blowfish_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ blowfish_ctx_free()

static void blowfish_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ blowfish_setkey_wrap()

static int blowfish_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ camellia_crypt_cbc_wrap()

static int camellia_crypt_cbc_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ camellia_crypt_cfb128_wrap()

static int camellia_crypt_cfb128_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
size_t *  iv_off,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ camellia_crypt_ctr_wrap()

static int camellia_crypt_ctr_wrap ( void ctx,
size_t  length,
size_t *  nc_off,
unsigned char *  nonce_counter,
unsigned char *  stream_block,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ camellia_crypt_ecb_wrap()

static int camellia_crypt_ecb_wrap ( void ctx,
mbedtls_operation_t  operation,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ camellia_ctx_alloc()

static void* camellia_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ camellia_ctx_free()

static void camellia_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ camellia_setkey_dec_wrap()

static int camellia_setkey_dec_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ camellia_setkey_enc_wrap()

static int camellia_setkey_enc_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ ccm_aes_setkey_wrap()

static int ccm_aes_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ ccm_camellia_setkey_wrap()

static int ccm_camellia_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ ccm_ctx_alloc()

static void* ccm_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ ccm_ctx_free()

static void ccm_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ des3_crypt_cbc_wrap()

static int des3_crypt_cbc_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ des3_crypt_ecb_wrap()

static int des3_crypt_ecb_wrap ( void ctx,
mbedtls_operation_t  operation,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ des3_ctx_alloc()

static void* des3_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ des3_ctx_free()

static void des3_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ des3_set2key_dec_wrap()

static int des3_set2key_dec_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ des3_set2key_enc_wrap()

static int des3_set2key_enc_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ des3_set3key_dec_wrap()

static int des3_set3key_dec_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ des3_set3key_enc_wrap()

static int des3_set3key_enc_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ des_crypt_cbc_wrap()

static int des_crypt_cbc_wrap ( void ctx,
mbedtls_operation_t  operation,
size_t  length,
unsigned char *  iv,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ des_crypt_ecb_wrap()

static int des_crypt_ecb_wrap ( void ctx,
mbedtls_operation_t  operation,
const unsigned char *  input,
unsigned char *  output 
)
static
Here is the call graph for this function:

◆ des_ctx_alloc()

static void* des_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ des_ctx_free()

static void des_ctx_free ( void ctx)
static
Here is the call graph for this function:

◆ des_setkey_dec_wrap()

static int des_setkey_dec_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ des_setkey_enc_wrap()

static int des_setkey_enc_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ gcm_aes_setkey_wrap()

static int gcm_aes_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ gcm_camellia_setkey_wrap()

static int gcm_camellia_setkey_wrap ( void ctx,
const unsigned char *  key,
unsigned int  key_bitlen 
)
static
Here is the call graph for this function:

◆ gcm_ctx_alloc()

static void* gcm_ctx_alloc ( void  )
static
Here is the call graph for this function:

◆ gcm_ctx_free()

static void gcm_ctx_free ( void ctx)
static
Here is the call graph for this function:

Variable Documentation

◆ aes_128_cbc_info

const mbedtls_cipher_info_t aes_128_cbc_info
static
Initial value:
= {
128,
"AES-128-CBC",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:132
Definition: cipher.h:83

◆ aes_128_ccm_info

const mbedtls_cipher_info_t aes_128_ccm_info
static
Initial value:
= {
128,
"AES-128-CCM",
12,
16,
}
Definition: cipher.h:121
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138
static const mbedtls_cipher_base_t ccm_aes_info
Definition: cipher_wrap.c:411

◆ aes_128_cfb128_info

const mbedtls_cipher_info_t aes_128_cfb128_info
static
Initial value:
= {
128,
"AES-128-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:133
Definition: cipher.h:86

◆ aes_128_ctr_info

const mbedtls_cipher_info_t aes_128_ctr_info
static
Initial value:
= {
128,
"AES-128-CTR",
16,
0,
16,
}
Definition: cipher.h:89
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:135

◆ aes_128_ecb_info

const mbedtls_cipher_info_t aes_128_ecb_info
static
Initial value:
= {
128,
"AES-128-ECB",
16,
0,
16,
}
Definition: cipher.h:80
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:131

◆ aes_128_gcm_info

const mbedtls_cipher_info_t aes_128_gcm_info
static
Initial value:
= {
128,
"AES-128-GCM",
12,
16,
}
Definition: cipher.h:136
Definition: cipher.h:92
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
static const mbedtls_cipher_base_t gcm_aes_info
Definition: cipher_wrap.c:348

◆ aes_192_cbc_info

const mbedtls_cipher_info_t aes_192_cbc_info
static
Initial value:
= {
192,
"AES-192-CBC",
16,
0,
16,
}
Definition: cipher.h:84
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:132

◆ aes_192_ccm_info

const mbedtls_cipher_info_t aes_192_ccm_info
static
Initial value:
= {
192,
"AES-192-CCM",
12,
16,
}
Definition: cipher.h:122
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138
static const mbedtls_cipher_base_t ccm_aes_info
Definition: cipher_wrap.c:411

◆ aes_192_cfb128_info

const mbedtls_cipher_info_t aes_192_cfb128_info
static
Initial value:
= {
192,
"AES-192-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:133
Definition: cipher.h:87

◆ aes_192_ctr_info

const mbedtls_cipher_info_t aes_192_ctr_info
static
Initial value:
= {
192,
"AES-192-CTR",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:90
Definition: cipher.h:135

◆ aes_192_ecb_info

const mbedtls_cipher_info_t aes_192_ecb_info
static
Initial value:
= {
192,
"AES-192-ECB",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:131
Definition: cipher.h:81

◆ aes_192_gcm_info

const mbedtls_cipher_info_t aes_192_gcm_info
static
Initial value:
= {
192,
"AES-192-GCM",
12,
16,
}
Definition: cipher.h:136
Definition: cipher.h:93
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
static const mbedtls_cipher_base_t gcm_aes_info
Definition: cipher_wrap.c:348

◆ aes_256_cbc_info

const mbedtls_cipher_info_t aes_256_cbc_info
static
Initial value:
= {
256,
"AES-256-CBC",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:85
Definition: cipher.h:132

◆ aes_256_ccm_info

const mbedtls_cipher_info_t aes_256_ccm_info
static
Initial value:
= {
256,
"AES-256-CCM",
12,
16,
}
Definition: cipher.h:123
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138
static const mbedtls_cipher_base_t ccm_aes_info
Definition: cipher_wrap.c:411

◆ aes_256_cfb128_info

const mbedtls_cipher_info_t aes_256_cfb128_info
static
Initial value:
= {
256,
"AES-256-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:133
Definition: cipher.h:88

◆ aes_256_ctr_info

const mbedtls_cipher_info_t aes_256_ctr_info
static
Initial value:
= {
256,
"AES-256-CTR",
16,
0,
16,
}
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:91
Definition: cipher.h:135

◆ aes_256_ecb_info

const mbedtls_cipher_info_t aes_256_ecb_info
static
Initial value:
= {
256,
"AES-256-ECB",
16,
0,
16,
}
Definition: cipher.h:82
static const mbedtls_cipher_base_t aes_info
Definition: cipher_wrap.c:181
Definition: cipher.h:131

◆ aes_256_gcm_info

const mbedtls_cipher_info_t aes_256_gcm_info
static
Initial value:
= {
256,
"AES-256-GCM",
12,
16,
}
Definition: cipher.h:136
Definition: cipher.h:94
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
static const mbedtls_cipher_base_t gcm_aes_info
Definition: cipher_wrap.c:348

◆ aes_info

const mbedtls_cipher_base_t aes_info
static
Initial value:
= {
}
static int aes_setkey_enc_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:157
static int aes_crypt_cfb128_wrap(void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:132
static void * aes_ctx_alloc(void)
Definition: cipher_wrap.c:163
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int aes_setkey_dec_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:151
static int aes_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:116
Definition: cipher.h:69
static int aes_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:123
static void aes_ctx_free(void *ctx)
Definition: cipher_wrap.c:175
static int aes_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:142

◆ arc4_128_info

const mbedtls_cipher_info_t arc4_128_info
static
Initial value:
= {
128,
"ARC4-128",
0,
0,
1,
}
Definition: cipher.h:137
Definition: cipher.h:120
static const mbedtls_cipher_base_t arc4_base_info
Definition: cipher_wrap.c:1251

◆ arc4_base_info

const mbedtls_cipher_base_t arc4_base_info
static
Initial value:
= {
}
static int arc4_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:1222
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void arc4_ctx_free(void *ctx)
Definition: cipher_wrap.c:1245
static void * arc4_ctx_alloc(void)
Definition: cipher_wrap.c:1233
static int arc4_crypt_stream_wrap(void *ctx, size_t length, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:1215
Definition: cipher.h:74

◆ blowfish_cbc_info

const mbedtls_cipher_info_t blowfish_cbc_info
static
Initial value:
= {
128,
"BLOWFISH-CBC",
8,
8,
}
Definition: cipher.h:117
static const mbedtls_cipher_base_t blowfish_info
Definition: cipher_wrap.c:1142
Definition: cipher.h:132
#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN
Definition: cipher.h:60

◆ blowfish_cfb64_info

const mbedtls_cipher_info_t blowfish_cfb64_info
static
Initial value:
= {
128,
"BLOWFISH-CFB64",
8,
8,
}
Definition: cipher.h:133
static const mbedtls_cipher_base_t blowfish_info
Definition: cipher_wrap.c:1142
#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN
Definition: cipher.h:60
Definition: cipher.h:118

◆ blowfish_ctr_info

const mbedtls_cipher_info_t blowfish_ctr_info
static
Initial value:
= {
128,
"BLOWFISH-CTR",
8,
8,
}
static const mbedtls_cipher_base_t blowfish_info
Definition: cipher_wrap.c:1142
Definition: cipher.h:135
Definition: cipher.h:119
#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN
Definition: cipher.h:60

◆ blowfish_ecb_info

const mbedtls_cipher_info_t blowfish_ecb_info
static
Initial value:
= {
128,
"BLOWFISH-ECB",
8,
8,
}
Definition: cipher.h:116
static const mbedtls_cipher_base_t blowfish_info
Definition: cipher_wrap.c:1142
Definition: cipher.h:131
#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN
Definition: cipher.h:60

◆ blowfish_info

const mbedtls_cipher_base_t blowfish_info
static
Initial value:
= {
}
static int blowfish_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:1081
static int blowfish_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:1109
static void * blowfish_ctx_alloc(void)
Definition: cipher_wrap.c:1124
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int blowfish_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:1089
static int blowfish_crypt_cfb64_wrap(void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:1099
Definition: cipher.h:73
static void blowfish_ctx_free(void *ctx)
Definition: cipher_wrap.c:1136
static int blowfish_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:1118

◆ camellia_128_cbc_info

const mbedtls_cipher_info_t camellia_128_cbc_info
static
Initial value:
= {
128,
"CAMELLIA-128-CBC",
16,
0,
16,
}
Definition: cipher.h:98
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:132

◆ camellia_128_ccm_info

const mbedtls_cipher_info_t camellia_128_ccm_info
static
Initial value:
= {
128,
"CAMELLIA-128-CCM",
12,
16,
}
static const mbedtls_cipher_base_t ccm_camellia_info
Definition: cipher_wrap.c:768
Definition: cipher.h:124
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138

◆ camellia_128_cfb128_info

const mbedtls_cipher_info_t camellia_128_cfb128_info
static
Initial value:
= {
128,
"CAMELLIA-128-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:133
Definition: cipher.h:101

◆ camellia_128_ctr_info

const mbedtls_cipher_info_t camellia_128_ctr_info
static
Initial value:
= {
128,
"CAMELLIA-128-CTR",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:104
Definition: cipher.h:135

◆ camellia_128_ecb_info

const mbedtls_cipher_info_t camellia_128_ecb_info
static
Initial value:
= {
128,
"CAMELLIA-128-ECB",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:131
Definition: cipher.h:95

◆ camellia_128_gcm_info

const mbedtls_cipher_info_t camellia_128_gcm_info
static
Initial value:
= {
128,
"CAMELLIA-128-GCM",
12,
16,
}
Definition: cipher.h:136
static const mbedtls_cipher_base_t gcm_camellia_info
Definition: cipher_wrap.c:705
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:107

◆ camellia_192_cbc_info

const mbedtls_cipher_info_t camellia_192_cbc_info
static
Initial value:
= {
192,
"CAMELLIA-192-CBC",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:99
Definition: cipher.h:132

◆ camellia_192_ccm_info

const mbedtls_cipher_info_t camellia_192_ccm_info
static
Initial value:
= {
192,
"CAMELLIA-192-CCM",
12,
16,
}
Definition: cipher.h:125
static const mbedtls_cipher_base_t ccm_camellia_info
Definition: cipher_wrap.c:768
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138

◆ camellia_192_cfb128_info

const mbedtls_cipher_info_t camellia_192_cfb128_info
static
Initial value:
= {
192,
"CAMELLIA-192-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:133
Definition: cipher.h:102

◆ camellia_192_ctr_info

const mbedtls_cipher_info_t camellia_192_ctr_info
static
Initial value:
= {
192,
"CAMELLIA-192-CTR",
16,
0,
16,
}
Definition: cipher.h:105
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:135

◆ camellia_192_ecb_info

const mbedtls_cipher_info_t camellia_192_ecb_info
static
Initial value:
= {
192,
"CAMELLIA-192-ECB",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:96
Definition: cipher.h:131

◆ camellia_192_gcm_info

const mbedtls_cipher_info_t camellia_192_gcm_info
static
Initial value:
= {
192,
"CAMELLIA-192-GCM",
12,
16,
}
Definition: cipher.h:136
static const mbedtls_cipher_base_t gcm_camellia_info
Definition: cipher_wrap.c:705
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:108

◆ camellia_256_cbc_info

const mbedtls_cipher_info_t camellia_256_cbc_info
static
Initial value:
= {
256,
"CAMELLIA-256-CBC",
16,
0,
16,
}
Definition: cipher.h:100
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:132

◆ camellia_256_ccm_info

const mbedtls_cipher_info_t camellia_256_ccm_info
static
Initial value:
= {
256,
"CAMELLIA-256-CCM",
12,
16,
}
static const mbedtls_cipher_base_t ccm_camellia_info
Definition: cipher_wrap.c:768
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59
Definition: cipher.h:138
Definition: cipher.h:126

◆ camellia_256_cfb128_info

const mbedtls_cipher_info_t camellia_256_cfb128_info
static
Initial value:
= {
256,
"CAMELLIA-256-CFB128",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:133
Definition: cipher.h:103

◆ camellia_256_ctr_info

const mbedtls_cipher_info_t camellia_256_ctr_info
static
Initial value:
= {
256,
"CAMELLIA-256-CTR",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:106
Definition: cipher.h:135

◆ camellia_256_ecb_info

const mbedtls_cipher_info_t camellia_256_ecb_info
static
Initial value:
= {
256,
"CAMELLIA-256-ECB",
16,
0,
16,
}
static const mbedtls_cipher_base_t camellia_info
Definition: cipher_wrap.c:538
Definition: cipher.h:97
Definition: cipher.h:131

◆ camellia_256_gcm_info

const mbedtls_cipher_info_t camellia_256_gcm_info
static
Initial value:
= {
256,
"CAMELLIA-256-GCM",
12,
16,
}
Definition: cipher.h:136
static const mbedtls_cipher_base_t gcm_camellia_info
Definition: cipher_wrap.c:705
Definition: cipher.h:109
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN
Definition: cipher.h:59

◆ camellia_info

const mbedtls_cipher_base_t camellia_info
static
Initial value:
= {
}
static void camellia_ctx_free(void *ctx)
Definition: cipher_wrap.c:532
static int camellia_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:478
Definition: cipher.h:72
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int camellia_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:470
static int camellia_setkey_enc_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:513
static int camellia_setkey_dec_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:507
static int camellia_crypt_cfb128_wrap(void *ctx, mbedtls_operation_t operation, size_t length, size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:488
static void * camellia_ctx_alloc(void)
Definition: cipher_wrap.c:519
static int camellia_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:498

◆ ccm_aes_info

const mbedtls_cipher_base_t ccm_aes_info
static
Initial value:
= {
}
static void ccm_ctx_free(void *ctx)
Definition: cipher_wrap.c:107
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * ccm_ctx_alloc(void)
Definition: cipher_wrap.c:97
Definition: cipher.h:69
static int ccm_aes_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:404

◆ ccm_camellia_info

const mbedtls_cipher_base_t ccm_camellia_info
static
Initial value:
= {
}
static void ccm_ctx_free(void *ctx)
Definition: cipher_wrap.c:107
static int ccm_camellia_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:761
Definition: cipher.h:72
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * ccm_ctx_alloc(void)
Definition: cipher_wrap.c:97

◆ des_cbc_info

const mbedtls_cipher_info_t des_cbc_info
static
Initial value:
= {
"DES-CBC",
8,
0,
8,
}
static const mbedtls_cipher_base_t des_info
Definition: cipher_wrap.c:944
Definition: cipher.h:159
Definition: cipher.h:111
Definition: cipher.h:132

◆ des_ecb_info

const mbedtls_cipher_info_t des_ecb_info
static
Initial value:
= {
"DES-ECB",
8,
0,
8,
}
static const mbedtls_cipher_base_t des_info
Definition: cipher_wrap.c:944
Definition: cipher.h:159
Definition: cipher.h:131
Definition: cipher.h:110

◆ des_ede3_cbc_info

const mbedtls_cipher_info_t des_ede3_cbc_info
static
Initial value:
= {
"DES-EDE3-CBC",
8,
0,
8,
}
Definition: cipher.h:163
Definition: cipher.h:115
static const mbedtls_cipher_base_t des_ede3_info
Definition: cipher_wrap.c:1034
Definition: cipher.h:132

◆ des_ede3_ecb_info

const mbedtls_cipher_info_t des_ede3_ecb_info
static
Initial value:
= {
"DES-EDE3-ECB",
8,
0,
8,
}
Definition: cipher.h:163
Definition: cipher.h:114
Definition: cipher.h:131
static const mbedtls_cipher_base_t des_ede3_info
Definition: cipher_wrap.c:1034

◆ des_ede3_info

const mbedtls_cipher_base_t des_ede3_info
static
Initial value:
= {
}
static void * des3_ctx_alloc(void)
Definition: cipher_wrap.c:926
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void des3_ctx_free(void *ctx)
Definition: cipher_wrap.c:938
static int des3_set3key_enc_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:899
static int des3_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:834
static int des3_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:851
Definition: cipher.h:71
static int des3_set3key_dec_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:891

◆ des_ede_cbc_info

const mbedtls_cipher_info_t des_ede_cbc_info
static
Initial value:
= {
"DES-EDE-CBC",
8,
0,
8,
}
Definition: cipher.h:161
Definition: cipher.h:113
static const mbedtls_cipher_base_t des_ede_info
Definition: cipher_wrap.c:989
Definition: cipher.h:132

◆ des_ede_ecb_info

const mbedtls_cipher_info_t des_ede_ecb_info
static
Initial value:
= {
"DES-EDE-ECB",
8,
0,
8,
}
Definition: cipher.h:161
static const mbedtls_cipher_base_t des_ede_info
Definition: cipher_wrap.c:989
Definition: cipher.h:112
Definition: cipher.h:131

◆ des_ede_info

const mbedtls_cipher_base_t des_ede_info
static
Initial value:
= {
}
Definition: cipher.h:70
static int des3_set2key_dec_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:875
static void * des3_ctx_alloc(void)
Definition: cipher_wrap.c:926
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int des3_set2key_enc_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:883
static void des3_ctx_free(void *ctx)
Definition: cipher_wrap.c:938
static int des3_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:834
static int des3_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:851

◆ des_info

const mbedtls_cipher_base_t des_info
static
Initial value:
= {
}
Definition: cipher.h:70
static int des_setkey_dec_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:859
static void des_ctx_free(void *ctx)
Definition: cipher_wrap.c:920
static void * des_ctx_alloc(void)
Definition: cipher_wrap.c:907
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int des_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:827
static int des_setkey_enc_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:867
static int des_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, unsigned char *iv, const unsigned char *input, unsigned char *output)
Definition: cipher_wrap.c:842

◆ gcm_aes_info

const mbedtls_cipher_base_t gcm_aes_info
static
Initial value:
= {
}
static int gcm_aes_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:341
static void gcm_ctx_free(void *ctx)
Definition: cipher_wrap.c:88
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * gcm_ctx_alloc(void)
Definition: cipher_wrap.c:78
Definition: cipher.h:69

◆ gcm_camellia_info

const mbedtls_cipher_base_t gcm_camellia_info
static
Initial value:
= {
}
static int gcm_camellia_setkey_wrap(void *ctx, const unsigned char *key, unsigned int key_bitlen)
Definition: cipher_wrap.c:698
Definition: cipher.h:72
static void gcm_ctx_free(void *ctx)
Definition: cipher_wrap.c:88
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * gcm_ctx_alloc(void)
Definition: cipher_wrap.c:78

◆ mbedtls_cipher_definitions

const mbedtls_cipher_definition_t mbedtls_cipher_definitions[]

◆ mbedtls_cipher_supported

int mbedtls_cipher_supported[NUM_CIPHERS]