/third_party/mbedtls/library/ |
D | cipher.c | 181 ctx->cipher_info->base->ctx_free_func(ctx->cipher_ctx); in mbedtls_cipher_free() 188 const mbedtls_cipher_info_t *cipher_info) in mbedtls_cipher_setup() argument 190 if (cipher_info == NULL) { in mbedtls_cipher_setup() 196 if (NULL == (ctx->cipher_ctx = cipher_info->base->ctx_alloc_func())) { in mbedtls_cipher_setup() 200 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup() 219 const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_setup_psa() argument 225 if (NULL == cipher_info || NULL == ctx) { in mbedtls_cipher_setup_psa() 231 alg = mbedtls_psa_translate_cipher_mode(cipher_info->mode, taglen); in mbedtls_cipher_setup_psa() 235 if (mbedtls_psa_translate_cipher_type(cipher_info->type) == 0) { in mbedtls_cipher_setup_psa() 247 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup_psa() [all …]
|
D | cmac.c | 122 block_size = ctx->cipher_info->block_size; in cmac_generate_subkeys() 180 if (ctx == NULL || ctx->cipher_info == NULL || key == NULL) { in mbedtls_cipher_cmac_starts() 189 type = ctx->cipher_info->type; in mbedtls_cipher_cmac_starts() 223 if (ctx == NULL || ctx->cipher_info == NULL || input == NULL || in mbedtls_cipher_cmac_update() 229 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_update() 292 if (ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL || in mbedtls_cipher_cmac_finish() 298 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_finish() 343 if (ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL) { in mbedtls_cipher_cmac_reset() 359 int mbedtls_cipher_cmac(const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_cmac() argument 367 if (cipher_info == NULL || key == NULL || input == NULL || output == NULL) { in mbedtls_cipher_cmac() [all …]
|
D | ssl_ticket.c | 225 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ssl_ticket_setup() local 238 cipher_info = mbedtls_cipher_info_from_type(cipher); in mbedtls_ssl_ticket_setup() 240 if (mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_GCM && in mbedtls_ssl_ticket_setup() 241 mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_CCM && in mbedtls_ssl_ticket_setup() 242 mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_CHACHAPOLY) { in mbedtls_ssl_ticket_setup() 246 key_bits = mbedtls_cipher_info_get_key_bitlen(cipher_info); in mbedtls_ssl_ticket_setup() 267 if ((ret = mbedtls_cipher_setup(&ctx->keys[0].ctx, cipher_info)) != 0) { in mbedtls_ssl_ticket_setup() 271 if ((ret = mbedtls_cipher_setup(&ctx->keys[1].ctx, cipher_info)) != 0) { in mbedtls_ssl_ticket_setup()
|
D | pkcs12.c | 149 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs12_pbe() local 157 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in mbedtls_pkcs12_pbe() 158 if (cipher_info == NULL) { in mbedtls_pkcs12_pbe() 162 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs12_pbe() 166 iv, cipher_info->iv_size)) != 0) { in mbedtls_pkcs12_pbe() 172 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs12_pbe() 182 if ((ret = mbedtls_cipher_set_iv(&cipher_ctx, iv, cipher_info->iv_size)) != 0) { in mbedtls_pkcs12_pbe()
|
D | pkcs5.c | 133 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs5_pbes2() local 177 cipher_info = mbedtls_cipher_info_from_type(cipher_alg); in mbedtls_pkcs5_pbes2() 178 if (cipher_info == NULL) { in mbedtls_pkcs5_pbes2() 186 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs5_pbes2() 189 enc_scheme_params.len != cipher_info->iv_size) { in mbedtls_pkcs5_pbes2() 203 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs5_pbes2()
|
D | psa_crypto_cipher.c | 173 const mbedtls_cipher_info_t *cipher_info = NULL; in psa_cipher_setup() local 182 cipher_info = mbedtls_cipher_info_from_psa(alg, key_type, in psa_cipher_setup() 184 if (cipher_info == NULL) { in psa_cipher_setup() 188 ret = mbedtls_cipher_setup(&operation->ctx.cipher, cipher_info); in psa_cipher_setup() 309 size_t block_size = ctx->cipher_info->block_size; in psa_cipher_update_ecb()
|
D | nist_kw.c | 69 const mbedtls_cipher_info_t *cipher_info; in mbedtls_nist_kw_setkey() local 71 cipher_info = mbedtls_cipher_info_from_values(cipher, in mbedtls_nist_kw_setkey() 74 if (cipher_info == NULL) { in mbedtls_nist_kw_setkey() 78 if (cipher_info->block_size != 16) { in mbedtls_nist_kw_setkey() 97 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_nist_kw_setkey()
|
D | ccm.c | 65 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ccm_setkey() local 67 cipher_info = mbedtls_cipher_info_from_values(cipher, keybits, in mbedtls_ccm_setkey() 69 if (cipher_info == NULL) { in mbedtls_ccm_setkey() 73 if (cipher_info->block_size != 16) { in mbedtls_ccm_setkey() 79 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_ccm_setkey()
|
D | gcm.c | 138 const mbedtls_cipher_info_t *cipher_info; in mbedtls_gcm_setkey() local 144 cipher_info = mbedtls_cipher_info_from_values(cipher, keybits, in mbedtls_gcm_setkey() 146 if (cipher_info == NULL) { in mbedtls_gcm_setkey() 150 if (cipher_info->block_size != 16) { in mbedtls_gcm_setkey() 156 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_gcm_setkey()
|
D | psa_crypto_mac.c | 184 const mbedtls_cipher_info_t *cipher_info = in cmac_setup() local 191 if (cipher_info == NULL) { in cmac_setup() 195 ret = mbedtls_cipher_setup(&operation->ctx.cmac, cipher_info); in cmac_setup()
|
D | ssl_tls13_keys.c | 924 mbedtls_cipher_info_t const *cipher_info; in mbedtls_ssl_tls13_populate_transform() local 953 cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->cipher); in mbedtls_ssl_tls13_populate_transform() 954 if (cipher_info == NULL) { in mbedtls_ssl_tls13_populate_transform() 964 cipher_info)) != 0) { in mbedtls_ssl_tls13_populate_transform() 970 cipher_info)) != 0) { in mbedtls_ssl_tls13_populate_transform() 1002 key_enc, cipher_info->key_bitlen, in mbedtls_ssl_tls13_populate_transform() 1009 key_dec, cipher_info->key_bitlen, in mbedtls_ssl_tls13_populate_transform()
|
D | psa_crypto_aead.c | 47 const mbedtls_cipher_info_t *cipher_info; in psa_aead_setup() local 54 cipher_info = mbedtls_cipher_info_from_psa(alg, in psa_aead_setup() 57 if (cipher_info == NULL) { in psa_aead_setup()
|
D | ssl_tls.c | 8246 const mbedtls_cipher_info_t *cipher_info; in ssl_tls12_populate_transform() local 8319 cipher_info = mbedtls_cipher_info_from_type((mbedtls_cipher_type_t)ciphersuite_info->cipher); in ssl_tls12_populate_transform() 8320 if (cipher_info == NULL) { in ssl_tls12_populate_transform() 8384 keylen = mbedtls_cipher_info_get_key_bitlen(cipher_info) / 8; in ssl_tls12_populate_transform() 8410 is_chachapoly = (mbedtls_cipher_info_get_mode(cipher_info) in ssl_tls12_populate_transform() 8432 size_t block_size = cipher_info->block_size; in ssl_tls12_populate_transform() 8455 transform->ivlen = cipher_info->iv_size; in ssl_tls12_populate_transform() 8580 cipher_info)) != 0) { in ssl_tls12_populate_transform() 8586 cipher_info)) != 0) { in ssl_tls12_populate_transform() 8592 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in ssl_tls12_populate_transform() [all …]
|
D | ssl_ciphersuites.c | 1932 const mbedtls_cipher_info_t * const cipher_info = in mbedtls_ssl_ciphersuite_get_cipher_key_bitlen() 1935 return mbedtls_cipher_info_get_key_bitlen(cipher_info); in mbedtls_ssl_ciphersuite_get_cipher_key_bitlen()
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_cipher.function | 311 const mbedtls_cipher_info_t *cipher_info; 327 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CBC); 328 TEST_ASSERT(NULL != cipher_info); 330 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info)); 343 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_ECB); 344 TEST_ASSERT(NULL != cipher_info); 346 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info)); 370 const mbedtls_cipher_info_t *cipher_info; 383 cipher_info = mbedtls_cipher_info_from_type(cipher_id); 384 TEST_ASSERT(NULL != cipher_info); [all …]
|
D | test_suite_cmac.function | 22 const mbedtls_cipher_info_t *cipher_info; 33 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_ECB); 34 TEST_ASSERT(mbedtls_cipher_setup(&ctx, cipher_info) == 0); 63 TEST_ASSERT(mbedtls_cipher_cmac(cipher_info, 69 TEST_ASSERT(mbedtls_cipher_cmac(cipher_info, 75 TEST_ASSERT(mbedtls_cipher_cmac(cipher_info, 104 const mbedtls_cipher_info_t *cipher_info; 112 TEST_ASSERT((cipher_info = mbedtls_cipher_info_from_type(cipher_type)) 116 TEST_ASSERT((result == mbedtls_cipher_cmac(cipher_info, key, key_size, 130 const mbedtls_cipher_info_t *cipher_info; [all …]
|
/third_party/mbedtls/include/mbedtls/ |
D | cipher.h | 317 const mbedtls_cipher_info_t *MBEDTLS_PRIVATE(cipher_info); 631 const mbedtls_cipher_info_t *cipher_info); 662 const mbedtls_cipher_info_t *cipher_info, 681 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_block_size() 685 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(block_size); in mbedtls_cipher_get_block_size() 701 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_cipher_mode() 705 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(mode); in mbedtls_cipher_get_cipher_mode() 722 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_iv_size() 730 return (int) ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(iv_size); in mbedtls_cipher_get_iv_size() 746 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_type() [all …]
|
D | cmac.h | 190 int mbedtls_cipher_cmac(const mbedtls_cipher_info_t *cipher_info,
|
/third_party/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 87 const mbedtls_cipher_info_t *cipher_info; in main() local 114 cipher_info = mbedtls_cipher_info_from_type(*list); in main() 115 mbedtls_printf(" %s\n", mbedtls_cipher_info_get_name(cipher_info)); in main() 159 cipher_info = mbedtls_cipher_info_from_string(argv[4]); in main() 160 if (cipher_info == NULL) { in main() 164 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in main() 310 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in main() 408 if (mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_GCM && in main() 459 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in main()
|
/third_party/lwip/src/apps/snmp/ |
D | snmpv3_mbedtls.c | 114 const mbedtls_cipher_info_t *cipher_info; in snmpv3_crypt() local 132 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_DES_CBC); in snmpv3_crypt() 133 if (mbedtls_cipher_setup(&ctx, cipher_info) != 0) { in snmpv3_crypt() 182 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CFB128); in snmpv3_crypt() 183 if (mbedtls_cipher_setup(&ctx, cipher_info) != 0) { in snmpv3_crypt()
|
/third_party/mbedtls/tests/src/test_helpers/ |
D | ssl_helpers.c | 1089 mbedtls_cipher_info_t const *cipher_info; in mbedtls_test_ssl_build_transforms() local 1119 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in mbedtls_test_ssl_build_transforms() 1120 CHK(cipher_info != NULL); in mbedtls_test_ssl_build_transforms() 1121 CHK(cipher_info->iv_size <= 16); in mbedtls_test_ssl_build_transforms() 1122 CHK(cipher_info->key_bitlen % 8 == 0); in mbedtls_test_ssl_build_transforms() 1125 keylen = cipher_info->key_bitlen / 8; in mbedtls_test_ssl_build_transforms() 1136 CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_enc, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1137 CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_dec, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1138 CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_enc, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1139 CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_dec, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() [all …]
|
/third_party/mbedtls/programs/ssl/ |
D | ssl_context_info.c | 561 const mbedtls_cipher_info_t *cipher_info; in print_deserialized_ssl_session() local 569 cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->cipher); in print_deserialized_ssl_session() 570 if (cipher_info == NULL) { in print_deserialized_ssl_session() 573 printf("\tcipher : %s\n", cipher_info->name); in print_deserialized_ssl_session()
|
/third_party/mbedtls/programs/test/ |
D | benchmark.c | 677 const mbedtls_cipher_info_t *cipher_info; in main() local 682 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_DES_EDE3_ECB); in main() 685 mbedtls_cipher_cmac(cipher_info, tmp, 192, buf, in main() 795 const mbedtls_cipher_info_t *cipher_info; in main() local 807 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in main() 810 mbedtls_cipher_cmac(cipher_info, tmp, keysize, in main()
|
/third_party/mbedtls/tests/scripts/ |
D | depends.py | 407 cipher_info = CipherInfo() 413 'cipher_id': ExclusiveDomain(cipher_info.base_symbols,
|
/third_party/libcoap/src/ |
D | coap_mbedtls.c | 2791 const mbedtls_cipher_info_t *cipher_info; local 2803 cipher_info = mbedtls_cipher_info_from_type(cipher_type); 2804 if (!cipher_info) { 2811 C(mbedtls_cipher_setup(ctx, cipher_info));
|