Home
last modified time | relevance | path

Searched refs:cipher_info (Results 1 – 21 of 21) sorted by relevance

/mbedtls-development/library/
A Dcipher.c217 if( cipher_info == NULL ) in mbedtls_cipher_setup()
225 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup()
267 ctx->cipher_info = cipher_info; in mbedtls_cipher_setup_psa()
282 if( ctx->cipher_info == NULL ) in mbedtls_cipher_setkey()
379 if( ctx->cipher_info == NULL ) in mbedtls_cipher_set_iv()
464 if( ctx->cipher_info == NULL ) in mbedtls_cipher_reset()
487 if( ctx->cipher_info == NULL ) in mbedtls_cipher_update_ad()
543 if( ctx->cipher_info == NULL ) in mbedtls_cipher_update()
965 if( ctx->cipher_info == NULL ) in mbedtls_cipher_finish()
1066 if( NULL == ctx->cipher_info || MBEDTLS_MODE_CBC != ctx->cipher_info->mode ) in mbedtls_cipher_set_padding_mode()
[all …]
A Dcmac.c128 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()
238 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_update()
309 block_size = ctx->cipher_info->block_size; in mbedtls_cipher_cmac_finish()
414 const mbedtls_cipher_info_t *cipher_info; in mbedtls_aes_cmac_prf_128() local
422 if( cipher_info == NULL ) in mbedtls_aes_cmac_prf_128()
755 const mbedtls_cipher_info_t *cipher_info; in cmac_test_subkeys() local
760 if( cipher_info == NULL ) in cmac_test_subkeys()
848 const mbedtls_cipher_info_t *cipher_info; in cmac_test_wth_cipher() local
[all …]
A Dssl_ticket.c133 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()
142 if( mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_GCM && in mbedtls_ssl_ticket_setup()
143 mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_CCM ) in mbedtls_ssl_ticket_setup()
148 if( mbedtls_cipher_info_get_key_bitlen( cipher_info ) > 8 * MAX_KEY_BYTES ) in mbedtls_ssl_ticket_setup()
153 cipher_info, TICKET_AUTH_TAG_BYTES ); in mbedtls_ssl_ticket_setup()
160 if( ( ret = mbedtls_cipher_setup( &ctx->keys[0].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup()
165 cipher_info, TICKET_AUTH_TAG_BYTES ); in mbedtls_ssl_ticket_setup()
170 if( ( ret = mbedtls_cipher_setup( &ctx->keys[1].ctx, cipher_info ) ) != 0 ) in mbedtls_ssl_ticket_setup()
A Dpkcs12.c133 const mbedtls_cipher_info_t *cipher_info; in mbedtls_pkcs12_pbe() local
137 cipher_info = mbedtls_cipher_info_from_type( cipher_type ); in mbedtls_pkcs12_pbe()
138 if( cipher_info == NULL ) in mbedtls_pkcs12_pbe()
141 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs12_pbe()
145 iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
152 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_pkcs12_pbe()
158 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
A Dssl_tls13_keys.c791 mbedtls_cipher_info_t const *cipher_info; in mbedtls_ssl_tls13_populate_transform() local
812 if( cipher_info == NULL ) in mbedtls_ssl_tls13_populate_transform()
824 cipher_info ) ) != 0 ) in mbedtls_ssl_tls13_populate_transform()
831 cipher_info ) ) != 0 ) in mbedtls_ssl_tls13_populate_transform()
944 mbedtls_cipher_info_t const *cipher_info; in mbedtls_ssl_tls13_generate_handshake_keys() local
954 keylen = cipher_info->key_bitlen >> 3; in mbedtls_ssl_tls13_generate_handshake_keys()
955 ivlen = cipher_info->iv_size; in mbedtls_ssl_tls13_generate_handshake_keys()
1135 mbedtls_cipher_info_t const *cipher_info; in mbedtls_ssl_tls13_generate_application_keys() local
1142 cipher_info = mbedtls_cipher_info_from_type( in mbedtls_ssl_tls13_generate_application_keys()
1144 keylen = cipher_info->key_bitlen / 8; in mbedtls_ssl_tls13_generate_application_keys()
[all …]
A Dpkcs5.c122 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()
A Dnist_kw.c95 const mbedtls_cipher_info_t *cipher_info; in mbedtls_nist_kw_setkey() local
97 cipher_info = mbedtls_cipher_info_from_values( cipher, in mbedtls_nist_kw_setkey()
100 if( cipher_info == NULL ) in mbedtls_nist_kw_setkey()
103 if( cipher_info->block_size != 16 ) in mbedtls_nist_kw_setkey()
120 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_nist_kw_setkey()
A Dccm.c65 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()
A Dpsa_crypto_cipher.c164 const mbedtls_cipher_info_t *cipher_info = NULL; in cipher_setup() local
173 cipher_info = mbedtls_cipher_info_from_psa( alg, key_type, in cipher_setup()
175 if( cipher_info == NULL ) in cipher_setup()
178 ret = mbedtls_cipher_setup( &operation->ctx.cipher, cipher_info ); in cipher_setup()
295 size_t block_size = ctx->cipher_info->block_size; in psa_cipher_update_ecb()
A Dgcm.c144 const mbedtls_cipher_info_t *cipher_info; in mbedtls_gcm_setkey() local
150 cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, in mbedtls_gcm_setkey()
152 if( cipher_info == NULL ) in mbedtls_gcm_setkey()
155 if( cipher_info->block_size != 16 ) in mbedtls_gcm_setkey()
160 if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) in mbedtls_gcm_setkey()
A Dpsa_crypto_aead.c50 const mbedtls_cipher_info_t *cipher_info; in psa_aead_setup() local
58 cipher_info = mbedtls_cipher_info_from_psa( alg, in psa_aead_setup()
61 if( cipher_info == NULL ) in psa_aead_setup()
A Dpsa_crypto_mac.c181 const mbedtls_cipher_info_t * cipher_info = in cmac_setup() local
188 if( cipher_info == NULL ) in cmac_setup()
191 ret = mbedtls_cipher_setup( &operation->ctx.cmac, cipher_info ); in cmac_setup()
A Dssl_tls.c693 const mbedtls_cipher_info_t *cipher_info; in ssl_tls12_populate_transform() local
739 if( cipher_info == NULL ) in ssl_tls12_populate_transform()
794 keylen = mbedtls_cipher_info_get_key_bitlen( cipher_info ) / 8; in ssl_tls12_populate_transform()
832 mbedtls_cipher_info_get_mode( cipher_info ) == MBEDTLS_MODE_CBC ) in ssl_tls12_populate_transform()
847 transform->ivlen = cipher_info->iv_size; in ssl_tls12_populate_transform()
864 + cipher_info->block_size; in ssl_tls12_populate_transform()
870 + cipher_info->block_size in ssl_tls12_populate_transform()
977 cipher_info, transform->taglen ); in ssl_tls12_populate_transform()
998 cipher_info ) ) != 0 ) in ssl_tls12_populate_transform()
1006 cipher_info, transform->taglen ); in ssl_tls12_populate_transform()
[all …]
/mbedtls-development/include/mbedtls/
A Dcipher.h324 const mbedtls_cipher_info_t *MBEDTLS_PRIVATE(cipher_info);
597 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_block_size()
616 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_cipher_mode()
619 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(mode); in mbedtls_cipher_get_cipher_mode()
636 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_iv_size()
658 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_type()
661 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(type); in mbedtls_cipher_get_type()
677 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_name()
680 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(name); in mbedtls_cipher_get_name()
697 if( ctx->MBEDTLS_PRIVATE(cipher_info) == NULL ) in mbedtls_cipher_get_key_bitlen()
[all …]
A Dcmac.h174 int mbedtls_cipher_cmac( const mbedtls_cipher_info_t *cipher_info,
/mbedtls-development/tests/suites/
A Dtest_suite_cmac.function22 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;
130 const mbedtls_cipher_info_t *cipher_info;
148 TEST_ASSERT( mbedtls_cipher_setup( &ctx, cipher_info ) == 0 );
205 const mbedtls_cipher_info_t *cipher_info;
[all …]
A Dtest_suite_cipher.function296 const mbedtls_cipher_info_t *cipher_info;
313 TEST_ASSERT( NULL != cipher_info );
329 TEST_ASSERT( NULL != cipher_info );
369 TEST_ASSERT( NULL != cipher_info );
501 TEST_ASSERT( NULL != cipher_info );
553 TEST_ASSERT( NULL != cipher_info);
633 TEST_ASSERT( NULL != cipher_info);
1064 TEST_ASSERT( NULL != cipher_info );
1078 mbedtls_cipher_info_t cipher_info;
1084 cipher_info.mode = MBEDTLS_MODE_CBC;
[all …]
A Dtest_suite_ssl.function1196 mbedtls_cipher_info_t const *cipher_info;
1218 cipher_info = mbedtls_cipher_info_from_type( cipher_type );
1219 CHK( cipher_info != NULL );
1220 CHK( cipher_info->iv_size <= 16 );
1221 CHK( cipher_info->key_bitlen % 8 == 0 );
1224 keylen = cipher_info->key_bitlen / 8;
1240 if( cipher_info->mode == MBEDTLS_MODE_CBC )
1264 if( cipher_info->mode == MBEDTLS_MODE_CBC ||
1265 cipher_info->mode == MBEDTLS_MODE_STREAM )
1301 ivlen = cipher_info->iv_size;
[all …]
/mbedtls-development/programs/aes/
A Dcrypt_and_hash.c97 const mbedtls_cipher_info_t *cipher_info; in main() local
126 cipher_info = mbedtls_cipher_info_from_type( *list ); in main()
127 mbedtls_printf( " %s\n", mbedtls_cipher_info_get_name( cipher_info ) ); in main()
177 cipher_info = mbedtls_cipher_info_from_string( argv[4] ); in main()
178 if( cipher_info == NULL ) in main()
183 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main()
314 (int) mbedtls_cipher_info_get_key_bitlen( cipher_info ), in main()
413 if( mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_GCM && in main()
455 (int) mbedtls_cipher_info_get_key_bitlen( cipher_info ), in main()
/mbedtls-development/programs/ssl/
A Dssl_context_info.c617 const mbedtls_cipher_info_t *cipher_info; in print_deserialized_ssl_session() local
623 cipher_info = mbedtls_cipher_info_from_type( ciphersuite_info->cipher ); in print_deserialized_ssl_session()
624 if( cipher_info == NULL ) in print_deserialized_ssl_session()
630 printf( "\tcipher : %s\n", cipher_info->name ); in print_deserialized_ssl_session()
/mbedtls-development/programs/test/
A Dbenchmark.c700 const mbedtls_cipher_info_t *cipher_info; in main() local
705 cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_DES_EDE3_ECB ); in main()
708 mbedtls_cipher_cmac( cipher_info, tmp, 192, buf, in main()
828 const mbedtls_cipher_info_t *cipher_info; in main() local
841 cipher_info = mbedtls_cipher_info_from_type( cipher_type ); in main()
844 mbedtls_cipher_cmac( cipher_info, tmp, keysize, in main()

Completed in 44 milliseconds