/mbedtls/library/ |
A D | cipher.c | 248 if (cipher_info == NULL) { in mbedtls_cipher_setup() 261 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup() 296 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup_psa() 310 if (ctx->cipher_info == NULL) { in mbedtls_cipher_setkey() 418 if (ctx->cipher_info == NULL) { in mbedtls_cipher_set_iv() 513 if (ctx->cipher_info == NULL) { in mbedtls_cipher_reset() 534 if (ctx->cipher_info == NULL) { in mbedtls_cipher_update_ad() 585 if (ctx->cipher_info == NULL) { in mbedtls_cipher_update() 1014 if (ctx->cipher_info == NULL) { in mbedtls_cipher_finish() 1122 if (NULL == ctx->cipher_info || in mbedtls_cipher_set_padding_mode() [all …]
|
A D | cmac.c | 163 if (ctx == NULL || ctx->cipher_info == NULL || key == NULL) { in mbedtls_cipher_cmac_starts() 172 type = mbedtls_cipher_info_get_type(ctx->cipher_info); in mbedtls_cipher_cmac_starts() 361 if ((ret = mbedtls_cipher_setup(&ctx, cipher_info)) != 0) { in mbedtls_cipher_cmac() 392 const mbedtls_cipher_info_t *cipher_info; in mbedtls_aes_cmac_prf_128() local 401 if (cipher_info == NULL) { in mbedtls_aes_cmac_prf_128() 740 const mbedtls_cipher_info_t *cipher_info; in cmac_test_subkeys() local 744 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in cmac_test_subkeys() 745 if (cipher_info == NULL) { in cmac_test_subkeys() 834 const mbedtls_cipher_info_t *cipher_info; in cmac_test_wth_cipher() local 838 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in cmac_test_wth_cipher() [all …]
|
A D | pkcs12.c | 160 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs12_pbe_ext() local 170 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in mbedtls_pkcs12_pbe_ext() 171 if (cipher_info == NULL) { in mbedtls_pkcs12_pbe_ext() 175 keylen = (int) mbedtls_cipher_info_get_key_bitlen(cipher_info) / 8; in mbedtls_pkcs12_pbe_ext() 184 padlen = cipher_info->block_size - (len % cipher_info->block_size); in mbedtls_pkcs12_pbe_ext() 190 iv_len = mbedtls_cipher_info_get_iv_size(cipher_info); in mbedtls_pkcs12_pbe_ext() 199 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs12_pbe_ext()
|
A D | pkcs5.c | 141 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs5_pbes2_ext() local 186 cipher_info = mbedtls_cipher_info_from_type(cipher_alg); in mbedtls_pkcs5_pbes2_ext() 187 if (cipher_info == NULL) { in mbedtls_pkcs5_pbes2_ext() 195 keylen = (int) mbedtls_cipher_info_get_key_bitlen(cipher_info) / 8; in mbedtls_pkcs5_pbes2_ext() 198 enc_scheme_params.len != mbedtls_cipher_info_get_iv_size(cipher_info)) { in mbedtls_pkcs5_pbes2_ext() 209 padlen = cipher_info->block_size - (datalen % cipher_info->block_size); in mbedtls_pkcs5_pbes2_ext() 225 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in mbedtls_pkcs5_pbes2_ext()
|
A D | ssl_ticket.c | 226 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ssl_ticket_setup() local 239 cipher_info = mbedtls_cipher_info_from_type(cipher); in mbedtls_ssl_ticket_setup() 241 if (mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_GCM && in mbedtls_ssl_ticket_setup() 242 mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_CCM && in mbedtls_ssl_ticket_setup() 243 mbedtls_cipher_info_get_mode(cipher_info) != MBEDTLS_MODE_CHACHAPOLY) { in mbedtls_ssl_ticket_setup() 247 key_bits = mbedtls_cipher_info_get_key_bitlen(cipher_info); in mbedtls_ssl_ticket_setup() 268 if ((ret = mbedtls_cipher_setup(&ctx->keys[0].ctx, cipher_info)) != 0) { in mbedtls_ssl_ticket_setup() 272 if ((ret = mbedtls_cipher_setup(&ctx->keys[1].ctx, cipher_info)) != 0) { in mbedtls_ssl_ticket_setup()
|
A D | nist_kw.c | 58 const mbedtls_cipher_info_t *cipher_info; in mbedtls_nist_kw_setkey() local 60 cipher_info = mbedtls_cipher_info_from_values(cipher, in mbedtls_nist_kw_setkey() 63 if (cipher_info == NULL) { in mbedtls_nist_kw_setkey() 67 if (mbedtls_cipher_info_get_block_size(cipher_info) != 16) { in mbedtls_nist_kw_setkey() 86 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_nist_kw_setkey()
|
A D | psa_crypto_cipher.c | 291 const mbedtls_cipher_info_t *cipher_info = NULL; in psa_cipher_setup() local 300 cipher_info = mbedtls_cipher_info_from_psa(alg, key_type, in psa_cipher_setup() 302 if (cipher_info == NULL) { in psa_cipher_setup() 306 ret = mbedtls_cipher_setup(&operation->ctx.cipher, cipher_info); in psa_cipher_setup() 427 size_t block_size = mbedtls_cipher_info_get_block_size(ctx->cipher_info); in psa_cipher_update_ecb()
|
A D | ccm.c | 70 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ccm_setkey() local 72 cipher_info = mbedtls_cipher_info_from_values(cipher, keybits, in mbedtls_ccm_setkey() 74 if (cipher_info == NULL) { in mbedtls_ccm_setkey() 78 if (mbedtls_cipher_info_get_block_size(cipher_info) != 16) { in mbedtls_ccm_setkey() 84 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_ccm_setkey()
|
A D | psa_crypto_mac.c | 173 const mbedtls_cipher_info_t *cipher_info = in cmac_setup() local 180 if (cipher_info == NULL) { in cmac_setup() 184 ret = mbedtls_cipher_setup(&operation->ctx.cmac, cipher_info); in cmac_setup()
|
A D | ssl_tls13_keys.c | 932 mbedtls_cipher_info_t const *cipher_info; in mbedtls_ssl_tls13_populate_transform() local 961 cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->cipher); in mbedtls_ssl_tls13_populate_transform() 962 if (cipher_info == NULL) { in mbedtls_ssl_tls13_populate_transform() 972 cipher_info)) != 0) { in mbedtls_ssl_tls13_populate_transform() 978 cipher_info)) != 0) { in mbedtls_ssl_tls13_populate_transform() 1010 key_enc, (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in mbedtls_ssl_tls13_populate_transform() 1017 key_dec, (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in mbedtls_ssl_tls13_populate_transform()
|
A D | gcm.c | 184 const mbedtls_cipher_info_t *cipher_info; in mbedtls_gcm_setkey() local 186 cipher_info = mbedtls_cipher_info_from_values(cipher, keybits, in mbedtls_gcm_setkey() 188 if (cipher_info == NULL) { in mbedtls_gcm_setkey() 192 if (mbedtls_cipher_info_get_block_size(cipher_info) != 16) { in mbedtls_gcm_setkey() 198 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_gcm_setkey()
|
A D | ssl_tls.c | 8813 const mbedtls_cipher_info_t *cipher_info; in ssl_tls12_populate_transform() local 8879 if (cipher_info == NULL) { in ssl_tls12_populate_transform() 8943 keylen = mbedtls_cipher_info_get_key_bitlen(cipher_info) / 8; in ssl_tls12_populate_transform() 8967 is_chachapoly = (mbedtls_cipher_info_get_mode(cipher_info) in ssl_tls12_populate_transform() 8989 size_t block_size = mbedtls_cipher_info_get_block_size(cipher_info); in ssl_tls12_populate_transform() 9012 transform->ivlen = mbedtls_cipher_info_get_iv_size(cipher_info); in ssl_tls12_populate_transform() 9137 cipher_info)) != 0) { in ssl_tls12_populate_transform() 9143 cipher_info)) != 0) { in ssl_tls12_populate_transform() 9149 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in ssl_tls12_populate_transform() 9156 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in ssl_tls12_populate_transform() [all …]
|
A D | ssl_ciphersuites.c | 1921 const mbedtls_cipher_info_t * const cipher_info = in mbedtls_ssl_ciphersuite_get_cipher_key_bitlen() 1924 return mbedtls_cipher_info_get_key_bitlen(cipher_info); in mbedtls_ssl_ciphersuite_get_cipher_key_bitlen()
|
/mbedtls/tests/suites/ |
A D | test_suite_cipher.function | 335 TEST_ASSERT(NULL != cipher_info); 351 TEST_ASSERT(NULL != cipher_info); 391 TEST_ASSERT(NULL != cipher_info); 529 TEST_ASSERT(NULL != cipher_info); 586 TEST_ASSERT(NULL != cipher_info); 686 TEST_ASSERT(NULL != cipher_info); 1140 TEST_ASSERT(NULL != cipher_info); 1154 mbedtls_cipher_info_t cipher_info; 1160 cipher_info.mode = MBEDTLS_MODE_CBC; 1161 ctx.cipher_info = &cipher_info; [all …]
|
A D | test_suite_cmac.function | 22 const mbedtls_cipher_info_t *cipher_info; 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; 115 TEST_LE_U(mbedtls_cipher_info_get_block_size(cipher_info), 118 TEST_LE_U(mbedtls_cipher_info_get_block_size(cipher_info), 136 const mbedtls_cipher_info_t *cipher_info; 154 TEST_ASSERT(mbedtls_cipher_setup(&ctx, cipher_info) == 0); [all …]
|
/mbedtls/include/mbedtls/ |
A D | cipher.h | 318 const mbedtls_cipher_info_t *MBEDTLS_PRIVATE(cipher_info); 632 const mbedtls_cipher_info_t *cipher_info); 681 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_block_size() 700 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_cipher_mode() 720 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_iv_size() 743 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_type() 762 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_name() 766 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(name); in mbedtls_cipher_get_name() 781 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_key_bitlen() 785 return (int) ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(key_bitlen) << in mbedtls_cipher_get_key_bitlen() [all …]
|
A D | cmac.h | 197 int mbedtls_cipher_cmac(const mbedtls_cipher_info_t *cipher_info,
|
/mbedtls/programs/aes/ |
A D | crypt_and_hash.c | 75 const mbedtls_cipher_info_t *cipher_info; in main() local 105 cipher_info = mbedtls_cipher_info_from_type(*list); in main() 106 const char *name = mbedtls_cipher_info_get_name(cipher_info); in main() 109 mbedtls_printf(" %s\n", mbedtls_cipher_info_get_name(cipher_info)); in main() 154 cipher_info = mbedtls_cipher_info_from_string(argv[4]); in main() 155 if (cipher_info == NULL) { in main() 159 if ((ret = mbedtls_cipher_setup(&cipher_ctx, cipher_info)) != 0) { in main() 308 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in main() 406 cipher_mode = mbedtls_cipher_info_get_mode(cipher_info); in main() 460 (int) mbedtls_cipher_info_get_key_bitlen(cipher_info), in main()
|
/mbedtls/programs/ssl/ |
A D | ssl_context_info.c | 556 const mbedtls_cipher_info_t *cipher_info; in print_deserialized_ssl_session() local 557 cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->MBEDTLS_PRIVATE(cipher)); in print_deserialized_ssl_session() 558 if (cipher_info == NULL) { in print_deserialized_ssl_session() 561 printf("\tcipher : %s\n", mbedtls_cipher_info_get_name(cipher_info)); in print_deserialized_ssl_session()
|
/mbedtls/programs/test/ |
A D | benchmark.c | 705 const mbedtls_cipher_info_t *cipher_info; in main() local 710 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_DES_EDE3_ECB); in main() 713 mbedtls_cipher_cmac(cipher_info, tmp, 192, buf, in main() 887 const mbedtls_cipher_info_t *cipher_info; in main() local 899 cipher_info = mbedtls_cipher_info_from_type(cipher_type); in main() 902 mbedtls_cipher_cmac(cipher_info, tmp, keysize, in main()
|
/mbedtls/tests/src/test_helpers/ |
A D | ssl_helpers.c | 1268 mbedtls_cipher_info_t const *cipher_info; in mbedtls_test_ssl_build_transforms() local 1303 cipher_info = mbedtls_cipher_info_from_type((mbedtls_cipher_type_t) cipher_type); in mbedtls_test_ssl_build_transforms() 1304 CHK(cipher_info != NULL); in mbedtls_test_ssl_build_transforms() 1305 CHK(mbedtls_cipher_info_get_iv_size(cipher_info) <= 16); in mbedtls_test_ssl_build_transforms() 1306 CHK(mbedtls_cipher_info_get_key_bitlen(cipher_info) % 8 == 0); in mbedtls_test_ssl_build_transforms() 1309 CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_enc, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1310 CHK(mbedtls_cipher_setup(&t_in->cipher_ctx_dec, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1311 CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_enc, cipher_info) == 0); in mbedtls_test_ssl_build_transforms() 1312 CHK(mbedtls_cipher_setup(&t_out->cipher_ctx_dec, cipher_info) == 0); in mbedtls_test_ssl_build_transforms()
|
/mbedtls/tests/scripts/ |
A D | depends.py | 399 cipher_info = CipherInfo() 405 'cipher_id': ExclusiveDomain(cipher_info.base_symbols,
|
/mbedtls/ |
A D | ChangeLog | 1322 * Add functions to get the IV and block size from cipher_info structs.
|