/mbedtls-latest/library/ |
D | cipher.c | 120 const mbedtls_cipher_mode_t mode) in mbedtls_cipher_info_from_values() argument 127 def->info->mode == mode) { in mbedtls_cipher_info_from_values() 178 mbedtls_cipher_mode_t mode, size_t taglen) in mbedtls_psa_translate_cipher_mode() argument 180 switch (mode) { in mbedtls_psa_translate_cipher_mode() 280 alg = mbedtls_psa_translate_cipher_mode(((mbedtls_cipher_mode_t) cipher_info->mode), taglen); in mbedtls_cipher_setup_psa() 314 if (MBEDTLS_MODE_ECB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) && in mbedtls_cipher_setkey() 391 MBEDTLS_MODE_CFB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) || in mbedtls_cipher_setkey() 392 MBEDTLS_MODE_OFB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) || in mbedtls_cipher_setkey() 393 MBEDTLS_MODE_CTR == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode)) { in mbedtls_cipher_setkey() 470 if (MBEDTLS_MODE_GCM == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode)) { in mbedtls_cipher_set_iv() [all …]
|
D | aes.c | 1025 int mode, in mbedtls_aes_crypt_ecb() argument 1029 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_ecb() 1039 return mbedtls_aesni_crypt_ecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb() 1045 return mbedtls_aesce_crypt_ecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb() 1051 return mbedtls_padlock_xcryptecb(ctx, mode, input, output); in mbedtls_aes_crypt_ecb() 1057 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_ecb() 1073 int mode, in mbedtls_aes_crypt_cbc() argument 1082 if (mode != MBEDTLS_AES_ENCRYPT && mode != MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cbc() 1097 if (mbedtls_padlock_xcryptcbc(ctx, mode, length, iv, input, output) == 0) { in mbedtls_aes_crypt_cbc() 1109 if (mode == MBEDTLS_AES_DECRYPT) { in mbedtls_aes_crypt_cbc() [all …]
|
D | psa_crypto_cipher.c | 130 mbedtls_cipher_mode_t *mode, in mbedtls_cipher_values_from_psa() argument 147 *mode = MBEDTLS_MODE_STREAM; in mbedtls_cipher_values_from_psa() 152 *mode = MBEDTLS_MODE_CTR; in mbedtls_cipher_values_from_psa() 157 *mode = MBEDTLS_MODE_CFB; in mbedtls_cipher_values_from_psa() 162 *mode = MBEDTLS_MODE_OFB; in mbedtls_cipher_values_from_psa() 167 *mode = MBEDTLS_MODE_ECB; in mbedtls_cipher_values_from_psa() 172 *mode = MBEDTLS_MODE_CBC; in mbedtls_cipher_values_from_psa() 177 *mode = MBEDTLS_MODE_CBC; in mbedtls_cipher_values_from_psa() 182 *mode = MBEDTLS_MODE_CCM_STAR_NO_TAG; in mbedtls_cipher_values_from_psa() 187 *mode = MBEDTLS_MODE_CCM; in mbedtls_cipher_values_from_psa() [all …]
|
D | camellia.c | 454 int mode, in mbedtls_camellia_crypt_ecb() argument 460 if (mode != MBEDTLS_CAMELLIA_ENCRYPT && mode != MBEDTLS_CAMELLIA_DECRYPT) { in mbedtls_camellia_crypt_ecb() 464 ((void) mode); in mbedtls_camellia_crypt_ecb() 520 int mode, in mbedtls_camellia_crypt_cbc() argument 527 if (mode != MBEDTLS_CAMELLIA_ENCRYPT && mode != MBEDTLS_CAMELLIA_DECRYPT) { in mbedtls_camellia_crypt_cbc() 535 if (mode == MBEDTLS_CAMELLIA_DECRYPT) { in mbedtls_camellia_crypt_cbc() 538 mbedtls_camellia_crypt_ecb(ctx, mode, input, output); in mbedtls_camellia_crypt_cbc() 552 mbedtls_camellia_crypt_ecb(ctx, mode, output, output); in mbedtls_camellia_crypt_cbc() 570 int mode, in mbedtls_camellia_crypt_cfb128() argument 579 if (mode != MBEDTLS_CAMELLIA_ENCRYPT && mode != MBEDTLS_CAMELLIA_DECRYPT) { in mbedtls_camellia_crypt_cfb128() [all …]
|
D | ccm.c | 176 if (ctx->mode == MBEDTLS_CCM_STAR_ENCRYPT || ctx->mode == MBEDTLS_CCM_STAR_DECRYPT) { in ccm_calculate_first_block_if_ready() 223 int mode, in mbedtls_ccm_starts() argument 232 ctx->mode = mode; in mbedtls_ccm_starts() 401 if (ctx->mode == MBEDTLS_CCM_ENCRYPT || \ in mbedtls_ccm_update() 402 ctx->mode == MBEDTLS_CCM_STAR_ENCRYPT) { in mbedtls_ccm_update() 423 if (ctx->mode == MBEDTLS_CCM_DECRYPT || \ in mbedtls_ccm_update() 424 ctx->mode == MBEDTLS_CCM_STAR_DECRYPT) { in mbedtls_ccm_update() 512 static int ccm_auth_crypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_crypt() argument 521 if ((ret = mbedtls_ccm_starts(ctx, mode, iv, iv_len)) != 0) { in ccm_auth_crypt() 585 static int ccm_auth_decrypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_decrypt() argument [all …]
|
D | chachapoly.c | 77 ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT; in mbedtls_chachapoly_init() 91 ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT; in mbedtls_chachapoly_free() 106 mbedtls_chachapoly_mode_t mode) in mbedtls_chachapoly_starts() argument 135 ctx->mode = mode; in mbedtls_chachapoly_starts() 179 if (ctx->mode == MBEDTLS_CHACHAPOLY_ENCRYPT) { in mbedtls_chachapoly_update() 245 mbedtls_chachapoly_mode_t mode, in chachapoly_crypt_and_tag() argument 256 ret = mbedtls_chachapoly_starts(ctx, nonce, mode); in chachapoly_crypt_and_tag()
|
D | pkcs12.c | 123 int mbedtls_pkcs12_pbe_ext(mbedtls_asn1_buf *pbe_params, int mode, 132 int mbedtls_pkcs12_pbe(mbedtls_asn1_buf *pbe_params, int mode, in mbedtls_pkcs12_pbe() argument 144 return mbedtls_pkcs12_pbe_ext(pbe_params, mode, cipher_type, md_type, in mbedtls_pkcs12_pbe() 150 int mbedtls_pkcs12_pbe_ext(mbedtls_asn1_buf *pbe_params, int mode, in mbedtls_pkcs12_pbe_ext() argument 177 if (mode == MBEDTLS_PKCS12_PBE_DECRYPT) { in mbedtls_pkcs12_pbe_ext() 183 if (mode == MBEDTLS_PKCS12_PBE_ENCRYPT) { in mbedtls_pkcs12_pbe_ext() 204 (mbedtls_operation_t) mode)) != 0) { in mbedtls_pkcs12_pbe_ext() 218 if (mode == MBEDTLS_PKCS12_PBE_DECRYPT) { in mbedtls_pkcs12_pbe_ext()
|
D | pkcs5.c | 105 int mbedtls_pkcs5_pbes2_ext(const mbedtls_asn1_buf *pbe_params, int mode, 113 int mbedtls_pkcs5_pbes2(const mbedtls_asn1_buf *pbe_params, int mode, in mbedtls_pkcs5_pbes2() argument 124 return mbedtls_pkcs5_pbes2_ext(pbe_params, mode, pwd, pwdlen, data, in mbedtls_pkcs5_pbes2() 129 int mbedtls_pkcs5_pbes2_ext(const mbedtls_asn1_buf *pbe_params, int mode, in mbedtls_pkcs5_pbes2_ext() argument 202 if (mode == MBEDTLS_PKCS5_DECRYPT) { in mbedtls_pkcs5_pbes2_ext() 208 if (mode == MBEDTLS_PKCS5_ENCRYPT) { in mbedtls_pkcs5_pbes2_ext() 230 (mbedtls_operation_t) mode)) != 0) { in mbedtls_pkcs5_pbes2_ext() 247 if (mode == MBEDTLS_DECRYPT) { in mbedtls_pkcs5_pbes2_ext()
|
D | padlock.c | 58 int mode, in mbedtls_padlock_xcryptecb() argument 78 *ctrl = 0x80 | ctx->nr | ((ctx->nr + (mode^1) - 10) << 9); in mbedtls_padlock_xcryptecb() 104 int mode, in mbedtls_padlock_xcryptcbc() argument 129 *ctrl = 0x80 | ctx->nr | ((ctx->nr + (mode ^ 1) - 10) << 9); in mbedtls_padlock_xcryptcbc()
|
D | cipher_wrap.h | 79 int (*ecb_func)(void *ctx, mbedtls_operation_t mode, 84 int (*cbc_func)(void *ctx, mbedtls_operation_t mode, size_t length, 91 int (*cfb_func)(void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off, 113 int (*xts_func)(void *ctx, mbedtls_operation_t mode, size_t length,
|
D | aria.c | 513 int mode, in mbedtls_aria_crypt_cbc() argument 521 if ((mode != MBEDTLS_ARIA_ENCRYPT) && (mode != MBEDTLS_ARIA_DECRYPT)) { in mbedtls_aria_crypt_cbc() 529 if (mode == MBEDTLS_ARIA_DECRYPT) { in mbedtls_aria_crypt_cbc() 564 int mode, in mbedtls_aria_crypt_cfb128() argument 574 if ((mode != MBEDTLS_ARIA_ENCRYPT) && (mode != MBEDTLS_ARIA_DECRYPT)) { in mbedtls_aria_crypt_cfb128() 586 if (mode == MBEDTLS_ARIA_DECRYPT) { in mbedtls_aria_crypt_cfb128()
|
D | nist_kw.c | 130 mbedtls_nist_kw_mode_t mode, in mbedtls_nist_kw_wrap() argument 146 if (mode == MBEDTLS_KW_MODE_KW) { in mbedtls_nist_kw_wrap() 197 if (mode == MBEDTLS_KW_MODE_KWP in mbedtls_nist_kw_wrap() 324 mbedtls_nist_kw_mode_t mode, in mbedtls_nist_kw_unwrap() argument 338 if (mode == MBEDTLS_KW_MODE_KW) { in mbedtls_nist_kw_unwrap() 365 } else if (mode == MBEDTLS_KW_MODE_KWP) { in mbedtls_nist_kw_unwrap()
|
/mbedtls-latest/programs/psa/ |
D | key_ladder_demo.c | 524 static psa_status_t run(enum program_mode mode, in run() argument 538 if (mode == MODE_GENERATE) { in run() 552 switch (mode) { in run() 615 enum program_mode mode; in main() local 655 mode = MODE_GENERATE; in main() 657 mode = MODE_SAVE; in main() 659 mode = MODE_UNWRAP; in main() 661 mode = MODE_WRAP; in main() 668 (mode == MODE_WRAP || mode == MODE_UNWRAP)) { in main() 673 (mode == MODE_SAVE || mode == MODE_WRAP || mode == MODE_UNWRAP)) { in main() [all …]
|
/mbedtls-latest/tests/suites/ |
D | test_suite_ccm.function | 8 int mode, 27 TEST_EQUAL(0, mbedtls_ccm_starts(ctx, mode, iv->x, iv->len)); 247 void mbedtls_ccm_star_no_tag(int cipher_id, int mode, data_t *key, 257 TEST_EQUAL(0, mbedtls_ccm_starts(&ctx, mode, iv->x, iv->len)); 505 void mbedtls_ccm_skip_ad(int cipher_id, int mode, 519 TEST_EQUAL(0, mbedtls_ccm_starts(&ctx, mode, iv->x, iv->len)); 545 void mbedtls_ccm_skip_update(int cipher_id, int mode, 555 TEST_EQUAL(0, mbedtls_ccm_starts(&ctx, mode, iv->x, iv->len)); 575 void mbedtls_ccm_overflow_ad(int cipher_id, int mode, 584 TEST_EQUAL(0, mbedtls_ccm_starts(&ctx, mode, iv->x, iv->len)); [all …]
|
D | test_suite_nist_kw.function | 146 void nist_kw_plaintext_lengths(int in_len, int out_len, int mode, int res) 171 TEST_ASSERT(mbedtls_nist_kw_wrap(&ctx, mode, plaintext, in_len, 175 if (mode == MBEDTLS_KW_MODE_KWP) { 193 void nist_kw_ciphertext_lengths(int in_len, int out_len, int mode, int res) 217 unwrap_ret = mbedtls_nist_kw_unwrap(&ctx, mode, ciphertext, in_len, 237 void mbedtls_nist_kw_wrap(int cipher_id, int mode, data_t *key, data_t *msg, 252 TEST_ASSERT(mbedtls_nist_kw_wrap(&ctx, mode, msg->x, msg->len, 271 void mbedtls_nist_kw_unwrap(int cipher_id, int mode, data_t *key, data_t *msg, 286 TEST_ASSERT(mbedtls_nist_kw_unwrap(&ctx, mode, msg->x, msg->len,
|
D | test_suite_gcm.function | 8 int mode, 28 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode, 66 int mode, 80 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode, 108 int mode, 118 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode, iv->x, iv->len)); 138 int mode, 145 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode, 160 int mode = MBEDTLS_GCM_ENCRYPT; 165 TEST_EQUAL(starts_ret, mbedtls_gcm_starts(ctx, mode, iv, iv_len)); [all …]
|
/mbedtls-latest/include/mbedtls/ |
D | aes.h | 248 int mode, 296 int mode, 341 int mode, 390 int mode, 435 int mode,
|
D | camellia.h | 118 int mode, 152 int mode, 198 int mode,
|
D | gcm.h | 70 unsigned char MBEDTLS_PRIVATE(mode); /*!< The operation to perform: 167 int mode, 236 int mode,
|
D | cipher.h | 288 unsigned int MBEDTLS_PRIVATE(mode) : 4; 426 const mbedtls_cipher_mode_t mode); 462 return (mbedtls_cipher_mode_t) info->MBEDTLS_PRIVATE(mode); in mbedtls_cipher_info_get_mode() 704 return (mbedtls_cipher_mode_t) ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(mode); in mbedtls_cipher_get_cipher_mode() 845 mbedtls_cipher_padding_t mode);
|
/mbedtls-latest/programs/pkey/ |
D | key_app_writer.c | 85 int mode; /* the mode to run the application in */ member 292 opt.mode = DFL_MODE; in main() 307 opt.mode = MODE_PRIVATE; in main() 309 opt.mode = MODE_PUBLIC; in main() 341 if (opt.mode == MODE_NONE && opt.output_mode != OUTPUT_MODE_NONE) { in main() 346 if (opt.mode == MODE_PUBLIC && opt.output_mode == OUTPUT_MODE_PRIVATE) { in main() 351 if (opt.mode == MODE_PRIVATE) { in main() 411 } else if (opt.mode == MODE_PUBLIC) { in main()
|
D | key_app.c | 125 int mode; /* the mode to run the application in */ member 174 opt.mode = DFL_MODE; in main() 188 opt.mode = MODE_PRIVATE; in main() 190 opt.mode = MODE_PUBLIC; in main() 205 if (opt.mode == MODE_PRIVATE) { in main() 297 } else if (opt.mode == MODE_PUBLIC) { in main()
|
/mbedtls-latest/programs/x509/ |
D | cert_app.c | 78 int mode; /* the mode to run the application in */ member 168 opt.mode = DFL_MODE; in main() 193 opt.mode = MODE_FILE; in main() 195 opt.mode = MODE_SSL; in main() 264 if (opt.mode == MODE_FILE) { in main() 332 } else if (opt.mode == MODE_SSL) { in main()
|
/mbedtls-latest/programs/aes/ |
D | crypt_and_hash.c | 63 int mode; in main() local 125 mode = atoi(argv[1]); in main() 127 if (mode != MODE_ENCRYPT && mode != MODE_DECRYPT) { in main() 236 if (mode == MODE_ENCRYPT) { in main() 383 if (mode == MODE_DECRYPT) { in main()
|
/mbedtls-latest/scripts/ |
D | generate_driver_wrappers.py | 66 mode='w', 104 with open(file=driver_file, mode='r', encoding='UTF-8') as f: 131 with open(file=file_path, mode='r', encoding='UTF-8') as file: 145 mode='r',
|