/external/mbedtls/library/ |
D | cipher.c | 177 ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); in mbedtls_cipher_free() 183 const mbedtls_cipher_info_t *cipher_info ) in mbedtls_cipher_setup() argument 185 if( cipher_info == NULL ) in mbedtls_cipher_setup() 190 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) in mbedtls_cipher_setup() 193 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup() 212 const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_setup_psa() argument 218 if( NULL == cipher_info || NULL == ctx ) in mbedtls_cipher_setup_psa() 223 alg = mbedtls_psa_translate_cipher_mode( cipher_info->mode, taglen ); in mbedtls_cipher_setup_psa() 226 if( mbedtls_psa_translate_cipher_type( cipher_info->type ) == 0 ) in mbedtls_cipher_setup_psa() 236 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup_psa() [all …]
|
D | cmac.c | 128 block_size = ctx->cipher_info->block_size; in cmac_generate_subkeys() 192 if( ctx == NULL || ctx->cipher_info == NULL || key == NULL ) in mbedtls_cipher_cmac_starts() 199 type = ctx->cipher_info->type; in mbedtls_cipher_cmac_starts() 233 if( ctx == NULL || ctx->cipher_info == NULL || input == NULL || in mbedtls_cipher_cmac_update() 238 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_update() 304 if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL || in mbedtls_cipher_cmac_finish() 309 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_finish() 358 if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL ) in mbedtls_cipher_cmac_reset() 373 int mbedtls_cipher_cmac( const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_cmac() argument 381 if( cipher_info == NULL || key == NULL || input == NULL || output == NULL ) in mbedtls_cipher_cmac() [all …]
|
D | pkcs12.c | 136 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs12_pbe() local 143 cipher_info = mbedtls_cipher_info_from_type( cipher_type ); in mbedtls_pkcs12_pbe() 144 if( cipher_info == NULL ) in mbedtls_pkcs12_pbe() 147 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs12_pbe() 151 iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe() 158 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe() 164 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
|
D | ssl_ticket.c | 221 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ssl_ticket_setup() local 232 cipher_info = mbedtls_cipher_info_from_type( cipher ); in mbedtls_ssl_ticket_setup() 234 if( mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_GCM && in mbedtls_ssl_ticket_setup() 235 mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_CCM && in mbedtls_ssl_ticket_setup() 236 mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_CHACHAPOLY ) in mbedtls_ssl_ticket_setup() 241 key_bits = mbedtls_cipher_info_get_key_bitlen( cipher_info ); in mbedtls_ssl_ticket_setup() 261 if( ( ret = mbedtls_cipher_setup( &ctx->keys[0].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup() 264 if( ( ret = mbedtls_cipher_setup( &ctx->keys[1].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup()
|
D | pkcs5.c | 119 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs5_pbes2() local 161 cipher_info = mbedtls_cipher_info_from_type( cipher_alg ); in mbedtls_pkcs5_pbes2() 162 if( cipher_info == NULL ) in mbedtls_pkcs5_pbes2() 169 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs5_pbes2() 172 enc_scheme_params.len != cipher_info->iv_size ) in mbedtls_pkcs5_pbes2() 188 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs5_pbes2()
|
D | psa_crypto_cipher.c | 172 const mbedtls_cipher_info_t *cipher_info = NULL; in psa_cipher_setup() local 181 cipher_info = mbedtls_cipher_info_from_psa( alg, key_type, in psa_cipher_setup() 183 if( cipher_info == NULL ) in psa_cipher_setup() 186 ret = mbedtls_cipher_setup( &operation->ctx.cipher, cipher_info ); in psa_cipher_setup() 306 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() 77 if( cipher_info->block_size != 16 ) in mbedtls_nist_kw_setkey() 94 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() 72 if( cipher_info->block_size != 16 ) in mbedtls_ccm_setkey() 77 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_ccm_setkey()
|
/external/openthread/third_party/mbedtls/repo/library/ |
D | cipher.c | 188 ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); in mbedtls_cipher_free() 194 const mbedtls_cipher_info_t *cipher_info ) in mbedtls_cipher_setup() argument 197 if( cipher_info == NULL ) in mbedtls_cipher_setup() 202 if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) in mbedtls_cipher_setup() 205 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup() 223 const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_setup_psa() argument 229 if( NULL == cipher_info || NULL == ctx ) in mbedtls_cipher_setup_psa() 234 alg = mbedtls_psa_translate_cipher_mode( cipher_info->mode, taglen ); in mbedtls_cipher_setup_psa() 237 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 | 128 block_size = ctx->cipher_info->block_size; in cmac_generate_subkeys() 192 if( ctx == NULL || ctx->cipher_info == NULL || key == NULL ) in mbedtls_cipher_cmac_starts() 199 type = ctx->cipher_info->type; in mbedtls_cipher_cmac_starts() 233 if( ctx == NULL || ctx->cipher_info == NULL || input == NULL || in mbedtls_cipher_cmac_update() 238 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_update() 304 if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL || in mbedtls_cipher_cmac_finish() 309 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_finish() 358 if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL ) in mbedtls_cipher_cmac_reset() 373 int mbedtls_cipher_cmac( const mbedtls_cipher_info_t *cipher_info, in mbedtls_cipher_cmac() argument 381 if( cipher_info == NULL || key == NULL || input == NULL || output == NULL ) in mbedtls_cipher_cmac() [all …]
|
D | ssl_ticket.c | 133 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ssl_ticket_setup() local 140 cipher_info = mbedtls_cipher_info_from_type( cipher); in mbedtls_ssl_ticket_setup() 141 if( cipher_info == NULL ) in mbedtls_ssl_ticket_setup() 144 if( cipher_info->mode != MBEDTLS_MODE_GCM && in mbedtls_ssl_ticket_setup() 145 cipher_info->mode != MBEDTLS_MODE_CCM ) in mbedtls_ssl_ticket_setup() 150 if( cipher_info->key_bitlen > 8 * MAX_KEY_BYTES ) in mbedtls_ssl_ticket_setup() 155 cipher_info, TICKET_AUTH_TAG_BYTES ); in mbedtls_ssl_ticket_setup() 162 if( ( ret = mbedtls_cipher_setup( &ctx->keys[0].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup() 167 cipher_info, TICKET_AUTH_TAG_BYTES ); in mbedtls_ssl_ticket_setup() 172 if( ( ret = mbedtls_cipher_setup( &ctx->keys[1].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup()
|
D | pkcs12.c | 178 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs12_pbe() local 185 cipher_info = mbedtls_cipher_info_from_type( cipher_type ); in mbedtls_pkcs12_pbe() 186 if( cipher_info == NULL ) in mbedtls_pkcs12_pbe() 189 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs12_pbe() 193 iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe() 200 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe() 206 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
|
D | pkcs5.c | 122 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs5_pbes2() local 169 cipher_info = mbedtls_cipher_info_from_type( cipher_alg ); in mbedtls_pkcs5_pbes2() 170 if( cipher_info == NULL ) in mbedtls_pkcs5_pbes2() 177 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs5_pbes2() 180 enc_scheme_params.len != cipher_info->iv_size ) in mbedtls_pkcs5_pbes2() 199 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs5_pbes2()
|
D | ccm.c | 73 const mbedtls_cipher_info_t *cipher_info; in mbedtls_ccm_setkey() local 78 cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, in mbedtls_ccm_setkey() 80 if( cipher_info == NULL ) in mbedtls_ccm_setkey() 83 if( cipher_info->block_size != 16 ) in mbedtls_ccm_setkey() 88 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_ccm_setkey()
|
D | psa_crypto_cipher.c | 140 const mbedtls_cipher_info_t *cipher_info = NULL; in psa_cipher_setup() local 149 cipher_info = mbedtls_cipher_info_from_psa( alg, key_type, in psa_cipher_setup() 151 if( cipher_info == NULL ) in psa_cipher_setup() 154 ret = mbedtls_cipher_setup( &operation->ctx.cipher, cipher_info ); in psa_cipher_setup() 273 size_t block_size = ctx->cipher_info->block_size; in psa_cipher_update_ecb()
|
D | nist_kw.c | 76 const mbedtls_cipher_info_t *cipher_info; in mbedtls_nist_kw_setkey() local 78 cipher_info = mbedtls_cipher_info_from_values( cipher, in mbedtls_nist_kw_setkey() 81 if( cipher_info == NULL ) in mbedtls_nist_kw_setkey() 84 if( cipher_info->block_size != 16 ) in mbedtls_nist_kw_setkey() 101 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_nist_kw_setkey()
|
D | psa_crypto_aead.c | 84 const mbedtls_cipher_info_t *cipher_info; in psa_aead_setup() local 90 cipher_info = mbedtls_cipher_info_from_psa( alg, in psa_aead_setup() 93 if( cipher_info == NULL ) in psa_aead_setup()
|
/external/openthread/third_party/mbedtls/repo/include/mbedtls/ |
D | cipher.h | 321 const mbedtls_cipher_info_t *cipher_info; member 468 const mbedtls_cipher_info_t *cipher_info ); 493 const mbedtls_cipher_info_t *cipher_info, 509 if( ctx->cipher_info == NULL ) in mbedtls_cipher_get_block_size() 512 return ctx->cipher_info->block_size; in mbedtls_cipher_get_block_size() 528 if( ctx->cipher_info == NULL ) in mbedtls_cipher_get_cipher_mode() 531 return ctx->cipher_info->mode; in mbedtls_cipher_get_cipher_mode() 548 if( ctx->cipher_info == NULL ) in mbedtls_cipher_get_iv_size() 554 return (int) ctx->cipher_info->iv_size; in mbedtls_cipher_get_iv_size() 570 if( ctx->cipher_info == NULL ) in mbedtls_cipher_get_type() [all …]
|
/external/mbedtls/tests/suites/ |
D | test_suite_cipher.function | 329 const mbedtls_cipher_info_t *cipher_info; 345 cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_CBC ); 346 TEST_ASSERT( NULL != cipher_info ); 348 TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); 361 cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB ); 362 TEST_ASSERT( NULL != cipher_info ); 364 TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); 388 const mbedtls_cipher_info_t *cipher_info; 401 cipher_info = mbedtls_cipher_info_from_type( cipher_id ); 402 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 …]
|
/external/mbedtls/include/mbedtls/ |
D | cipher.h | 319 const mbedtls_cipher_info_t *MBEDTLS_PRIVATE(cipher_info); 625 const mbedtls_cipher_info_t *cipher_info ); 656 const mbedtls_cipher_info_t *cipher_info, size_t taglen ); 674 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_block_size() 677 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(block_size); in mbedtls_cipher_get_block_size() 693 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_cipher_mode() 696 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(mode); in mbedtls_cipher_get_cipher_mode() 713 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_iv_size() 719 return (int) ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(iv_size); in mbedtls_cipher_get_iv_size() 735 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_type() [all …]
|
/external/openthread/third_party/mbedtls/repo/tests/suites/ |
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 …]
|
D | test_suite_cipher.function | 656 const mbedtls_cipher_info_t *cipher_info; 672 cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_CBC ); 673 TEST_ASSERT( NULL != cipher_info ); 675 TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); 688 cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB ); 689 TEST_ASSERT( NULL != cipher_info ); 691 TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); 715 const mbedtls_cipher_info_t *cipher_info; 728 cipher_info = mbedtls_cipher_info_from_type( cipher_id ); 729 TEST_ASSERT( NULL != cipher_info ); [all …]
|
/external/openthread/third_party/mbedtls/repo/programs/aes/ |
D | crypt_and_hash.c | 101 const mbedtls_cipher_info_t *cipher_info; in main() local 130 cipher_info = mbedtls_cipher_info_from_type( *list ); in main() 131 mbedtls_printf( " %s\n", cipher_info->name ); in main() 181 cipher_info = mbedtls_cipher_info_from_string( argv[4] ); in main() 182 if( cipher_info == NULL ) in main() 187 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main() 353 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main() 468 if( cipher_info->mode != MBEDTLS_MODE_GCM && in main() 524 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
|
/external/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 87 const mbedtls_cipher_info_t *cipher_info; in main() local 116 cipher_info = mbedtls_cipher_info_from_type( *list ); in main() 117 mbedtls_printf( " %s\n", mbedtls_cipher_info_get_name( cipher_info ) ); in main() 166 cipher_info = mbedtls_cipher_info_from_string( argv[4] ); in main() 167 if( cipher_info == NULL ) in main() 172 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main() 340 (int) mbedtls_cipher_info_get_key_bitlen( cipher_info ), in main() 455 if( mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_GCM && in main() 513 (int) mbedtls_cipher_info_get_key_bitlen( cipher_info ), in main()
|