32 #if defined(POLARSSL_CIPHER_C)
36 #if defined(POLARSSL_AES_C)
40 #if defined(POLARSSL_CAMELLIA_C)
44 #if defined(POLARSSL_DES_C)
48 #if defined(POLARSSL_BLOWFISH_C)
54 #if defined(POLARSSL_AES_C)
56 int aes_crypt_cbc_wrap(
void *ctx,
operation_t operation,
size_t length,
57 unsigned char *iv,
const unsigned char *input,
unsigned char *output )
62 int aes_crypt_cfb128_wrap(
void *ctx,
operation_t operation,
size_t length,
63 size_t *iv_off,
unsigned char *iv,
const unsigned char *input,
unsigned char *output )
65 #if defined(POLARSSL_CIPHER_MODE_CFB)
80 int aes_crypt_ctr_wrap(
void *ctx,
size_t length,
81 size_t *nc_off,
unsigned char *nonce_counter,
unsigned char *stream_block,
82 const unsigned char *input,
unsigned char *output )
84 #if defined(POLARSSL_CIPHER_MODE_CTR)
86 stream_block, input, output );
91 ((void) nonce_counter);
92 ((void) stream_block);
100 int aes_setkey_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
105 int aes_setkey_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
110 static void * aes_ctx_alloc(
void )
115 static void aes_ctx_free(
void *ctx )
123 aes_crypt_cfb128_wrap,
161 #if defined(POLARSSL_CIPHER_MODE_CFB)
193 #if defined(POLARSSL_CIPHER_MODE_CTR)
227 #if defined(POLARSSL_CAMELLIA_C)
229 int camellia_crypt_cbc_wrap(
void *ctx,
operation_t operation,
size_t length,
230 unsigned char *iv,
const unsigned char *input,
unsigned char *output )
235 int camellia_crypt_cfb128_wrap(
void *ctx,
operation_t operation,
size_t length,
236 size_t *iv_off,
unsigned char *iv,
const unsigned char *input,
unsigned char *output )
238 #if defined(POLARSSL_CIPHER_MODE_CFB)
253 int camellia_crypt_ctr_wrap(
void *ctx,
size_t length,
254 size_t *nc_off,
unsigned char *nonce_counter,
unsigned char *stream_block,
255 const unsigned char *input,
unsigned char *output )
257 #if defined(POLARSSL_CIPHER_MODE_CTR)
259 stream_block, input, output );
264 ((void) nonce_counter);
265 ((void) stream_block);
273 int camellia_setkey_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
278 int camellia_setkey_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
283 static void * camellia_ctx_alloc(
void )
288 static void camellia_ctx_free(
void *ctx )
295 camellia_crypt_cbc_wrap,
296 camellia_crypt_cfb128_wrap,
297 camellia_crypt_ctr_wrap,
298 camellia_setkey_enc_wrap,
299 camellia_setkey_dec_wrap,
334 #if defined(POLARSSL_CIPHER_MODE_CFB)
339 "CAMELLIA-128-CFB128",
349 "CAMELLIA-192-CFB128",
359 "CAMELLIA-256-CFB128",
366 #if defined(POLARSSL_CIPHER_MODE_CTR)
400 #if defined(POLARSSL_DES_C)
402 int des_crypt_cbc_wrap(
void *ctx,
operation_t operation,
size_t length,
403 unsigned char *iv,
const unsigned char *input,
unsigned char *output )
408 int des3_crypt_cbc_wrap(
void *ctx,
operation_t operation,
size_t length,
409 unsigned char *iv,
const unsigned char *input,
unsigned char *output )
414 int des_crypt_cfb128_wrap(
void *ctx,
operation_t operation,
size_t length,
415 size_t *iv_off,
unsigned char *iv,
const unsigned char *input,
unsigned char *output )
428 int des_crypt_ctr_wrap(
void *ctx,
size_t length,
429 size_t *nc_off,
unsigned char *nonce_counter,
unsigned char *stream_block,
430 const unsigned char *input,
unsigned char *output )
435 ((void) nonce_counter);
436 ((void) stream_block);
444 int des_setkey_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
451 int des_setkey_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
458 int des3_set2key_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
465 int des3_set2key_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
472 int des3_set3key_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
479 int des3_set3key_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
486 static void * des_ctx_alloc(
void )
491 static void * des3_ctx_alloc(
void )
496 static void des_ctx_free(
void *ctx )
504 des_crypt_cfb128_wrap,
525 des_crypt_cfb128_wrap,
527 des3_set2key_enc_wrap,
528 des3_set2key_dec_wrap,
546 des_crypt_cfb128_wrap,
548 des3_set3key_enc_wrap,
549 des3_set3key_dec_wrap,
565 #if defined(POLARSSL_BLOWFISH_C)
567 int blowfish_crypt_cbc_wrap(
void *ctx,
operation_t operation,
size_t length,
568 unsigned char *iv,
const unsigned char *input,
unsigned char *output )
573 int blowfish_crypt_cfb64_wrap(
void *ctx,
operation_t operation,
size_t length,
574 size_t *iv_off,
unsigned char *iv,
const unsigned char *input,
unsigned char *output )
576 #if defined(POLARSSL_CIPHER_MODE_CFB)
591 int blowfish_crypt_ctr_wrap(
void *ctx,
size_t length,
592 size_t *nc_off,
unsigned char *nonce_counter,
unsigned char *stream_block,
593 const unsigned char *input,
unsigned char *output )
595 #if defined(POLARSSL_CIPHER_MODE_CTR)
597 stream_block, input, output );
602 ((void) nonce_counter);
603 ((void) stream_block);
611 int blowfish_setkey_dec_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
616 int blowfish_setkey_enc_wrap(
void *ctx,
const unsigned char *key,
unsigned int key_length )
621 static void * blowfish_ctx_alloc(
void )
626 static void blowfish_ctx_free(
void *ctx )
633 blowfish_crypt_cbc_wrap,
634 blowfish_crypt_cfb64_wrap,
635 blowfish_crypt_ctr_wrap,
636 blowfish_setkey_enc_wrap,
637 blowfish_setkey_dec_wrap,
652 #if defined(POLARSSL_CIPHER_MODE_CFB)
664 #if defined(POLARSSL_CIPHER_MODE_CTR)
677 #if defined(POLARSSL_CIPHER_NULL_CIPHER)
678 static void * null_ctx_alloc(
void )
684 static void null_ctx_free(
void *ctx )