Home
last modified time | relevance | path

Searched refs:dst (Results 1 – 25 of 37) sorted by relevance

12

/mbedtls-3.4.0/tests/suites/
Dtest_suite_des.function18 void des_encrypt_ecb( data_t * key_str, data_t * src_str, data_t * dst )
30 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 8, dst->len ) == 0 );
38 void des_decrypt_ecb( data_t * key_str, data_t * src_str, data_t * dst )
50 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 8, dst->len ) == 0 );
59 data_t * src_str, data_t * dst, int cbc_result )
73 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
74 dst->len ) == 0 );
84 data_t * src_str, data_t * dst,
99 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
100 dst->len ) == 0 );
[all …]
Dtest_suite_camellia.function48 data_t * dst, int setkey_result )
62 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 16, dst->len ) == 0 );
72 data_t * dst, int setkey_result )
86 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 16, dst->len ) == 0 );
96 data_t * src_str, data_t * dst, int cbc_result )
110 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
111 dst->len ) == 0 );
121 data_t * src_str, data_t * dst,
136 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
137 dst->len ) == 0 );
[all …]
Dtest_suite_aes.function12 data_t * dst, int setkey_result )
26 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 16, dst->len ) == 0 );
36 data_t * dst, int setkey_result )
50 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 16, dst->len ) == 0 );
60 data_t * src_str, data_t * dst,
75 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
76 src_str->len, dst->len ) == 0 );
86 data_t * src_str, data_t * dst,
100 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
101 src_str->len, dst->len ) == 0 );
[all …]
Dtest_suite_constant_time.function21 unsigned char *dst = NULL;
26 ASSERT_ALLOC( dst, len );
37 mbedtls_ct_memcpy_offset( dst, src, secret,
40 TEST_CF_PUBLIC( dst, len );
42 ASSERT_COMPARE( dst, len, src + secret, len );
46 mbedtls_free( dst );
Dtest_suite_base64.function129 void base64_encode_hex( data_t * src, char * dst, int dst_buf_size,
147 TEST_ASSERT( len == strlen( dst ) );
148 TEST_ASSERT( memcmp( dst, res, len ) == 0 );
157 void base64_decode_hex( char * src, data_t * dst, int dst_buf_size,
169 TEST_ASSERT( len == dst->len );
170 TEST_ASSERT( memcmp( dst->x, res, len ) == 0 );
181 unsigned char dst[1000] = { 0 };
184 TEST_ASSERT( mbedtls_base64_decode( dst, sizeof( dst ), &len, src->x, src->len ) == result );
188 TEST_ASSERT( memcmp( dst, dst_ref, len ) == 0 );
Dtest_suite_gcm.function193 data_t * add_str, data_t * dst,
215 ASSERT_COMPARE( output, src_str->len, dst->x, dst->len );
225 dst, tag,
378 data_t * dst,
388 iv_str, src_str, dst, tag_str,
Dtest_suite_bignum.function515 mbedtls_mpi src, dst, ref;
517 mbedtls_mpi_init( &dst );
524 TEST_ASSERT( mbedtls_test_read_mpi( &dst, dst_hex ) == 0 );
525 TEST_ASSERT( mbedtls_mpi_copy( &dst, &src ) == 0 );
526 TEST_ASSERT( sign_is_valid( &dst ) );
527 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &dst, &src ) == 0 );
530 mbedtls_mpi_free( &dst );
531 TEST_ASSERT( mbedtls_test_read_mpi( &dst, dst_hex ) == 0 );
532 TEST_ASSERT( mbedtls_mpi_safe_cond_assign( &dst, &src, 1 ) == 0 );
533 TEST_ASSERT( sign_is_valid( &dst ) );
[all …]
/mbedtls-3.4.0/scripts/mbedtls_dev/
Dasymmetric_key_data.py36 dst = {} #type: Dict[str, Dict[int, bytes]]
40 dst[private] = {}
41 dst[public] = {}
43 dst[private][size] = unhexlify(src[typ][size][0])
44 dst[public][size] = unhexlify(src[typ][size][1])
45 return dst
/mbedtls-3.4.0/library/
Dbase64.c39 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_encode() argument
62 if( ( dlen < n + 1 ) || ( NULL == dst ) ) in mbedtls_base64_encode()
70 for( i = 0, p = dst; i < n; i += 3 ) in mbedtls_base64_encode()
100 *olen = p - dst; in mbedtls_base64_encode()
109 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_decode() argument
177 if( dst == NULL || dlen < n ) in mbedtls_base64_decode()
184 for( x = 0, p = dst; i > 0; i--, src++ ) in mbedtls_base64_decode()
204 *olen = p - dst; in mbedtls_base64_decode()
Dmd.c299 int mbedtls_md_clone( mbedtls_md_context_t *dst, in mbedtls_md_clone() argument
302 if( dst == NULL || dst->md_info == NULL || in mbedtls_md_clone()
304 dst->md_info != src->md_info ) in mbedtls_md_clone()
313 mbedtls_md5_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
318 mbedtls_ripemd160_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
323 mbedtls_sha1_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
328 mbedtls_sha256_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
333 mbedtls_sha256_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
338 mbedtls_sha512_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
343 mbedtls_sha512_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone()
Dcamellia.c876 unsigned char dst[16]; in mbedtls_camellia_self_test() local
906 memcpy( dst, camellia_test_ecb_plain[i], 16 ); in mbedtls_camellia_self_test()
910 memcpy( dst, camellia_test_ecb_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
915 if( memcmp( buf, dst, 16 ) != 0 ) in mbedtls_camellia_self_test()
944 memcpy( dst, camellia_test_cbc_iv, 16 ); in mbedtls_camellia_self_test()
958 memcpy( dst, camellia_test_cbc_plain[i], 16 ); in mbedtls_camellia_self_test()
960 memcpy( iv , dst, 16 ); in mbedtls_camellia_self_test()
962 memcpy( dst, camellia_test_cbc_cipher[u][i], 16 ); in mbedtls_camellia_self_test()
967 if( memcmp( buf, dst, 16 ) != 0 ) in mbedtls_camellia_self_test()
Drsa.c1069 static int mgf_mask( unsigned char *dst, size_t dlen, unsigned char *src, in mgf_mask() argument
1105 p = dst; in mgf_mask()
1762 unsigned char *dst ) in rsa_rsassa_pkcs1_v15_encode() argument
1766 unsigned char *p = dst; in rsa_rsassa_pkcs1_v15_encode()
1862 if( p != dst + dst_len ) in rsa_rsassa_pkcs1_v15_encode()
1864 mbedtls_platform_zeroize( dst, dst_len ); in rsa_rsassa_pkcs1_v15_encode()
2210 int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src ) in mbedtls_rsa_copy() argument
2214 dst->len = src->len; in mbedtls_rsa_copy()
2216 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); in mbedtls_rsa_copy()
2217 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->E, &src->E ) ); in mbedtls_rsa_copy()
[all …]
Dssl_cache.c51 mbedtls_ssl_cache_entry **dst ) in ssl_cache_find_entry() argument
79 *dst = cur; in ssl_cache_find_entry()
126 mbedtls_ssl_cache_entry **dst ) in ssl_cache_pick_writing_slot() argument
239 *dst = cur; in ssl_cache_pick_writing_slot()
Dssl_tls.c233 int mbedtls_ssl_session_copy( mbedtls_ssl_session *dst, in mbedtls_ssl_session_copy() argument
236 mbedtls_ssl_session_free( dst ); in mbedtls_ssl_session_copy()
237 memcpy( dst, src, sizeof( mbedtls_ssl_session ) ); in mbedtls_ssl_session_copy()
239 dst->ticket = NULL; in mbedtls_ssl_session_copy()
242 dst->hostname = NULL; in mbedtls_ssl_session_copy()
253 dst->peer_cert = mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); in mbedtls_ssl_session_copy()
254 if( dst->peer_cert == NULL ) in mbedtls_ssl_session_copy()
257 mbedtls_x509_crt_init( dst->peer_cert ); in mbedtls_ssl_session_copy()
259 if( ( ret = mbedtls_x509_crt_parse_der( dst->peer_cert, src->peer_cert->raw.p, in mbedtls_ssl_session_copy()
262 mbedtls_free( dst->peer_cert ); in mbedtls_ssl_session_copy()
[all …]
Dssl_tls13_keys.c104 unsigned char *dst, size_t *dst_len ) in ssl_tls13_hkdf_encode_label() argument
111 unsigned char *p = dst; in ssl_tls13_hkdf_encode_label()
662 unsigned char *dst, in ssl_tls13_calc_finished_core() argument
716 dst, hash_len, dst_len ); in ssl_tls13_calc_finished_core()
731 unsigned char* dst, in mbedtls_ssl_tls13_calculate_verify_data() argument
781 ret = ssl_tls13_calc_finished_core( hash_alg, base_key, transcript, dst, actual_len ); in mbedtls_ssl_tls13_calculate_verify_data()
785 MBEDTLS_SSL_DEBUG_BUF( 3, "verify_data for finished message", dst, hash_len ); in mbedtls_ssl_tls13_calculate_verify_data()
Decp_curves.c4847 static inline void add64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry ) in add64() argument
4851 for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++, src++ ) in add64()
4853 *dst += c; c = ( *dst < c ); in add64()
4854 *dst += *src; c += ( *dst < *src ); in add64()
4860 static inline void carry64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry ) in carry64() argument
4863 for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++ ) in carry64()
4865 *dst += *carry; in carry64()
4866 *carry = ( *dst < *carry ); in carry64()
4952 static inline void add32( uint32_t *dst, uint32_t src, signed char *carry ) in add32() argument
4954 *dst += src; in add32()
[all …]
Dssl_tls13_keys.h665 unsigned char *dst,
/mbedtls-3.4.0/programs/test/
Dudp_proxy.c507 mbedtls_net_context *dst; member
560 mbedtls_net_context *dst = p->dst; in send_packet() local
583 if( ( ret = dispatch_data( dst, buf, p->len ) ) <= 0 ) in send_packet()
607 if( ( ret = dispatch_data( dst, buf, p->len ) ) <= 0 ) in send_packet()
615 if( ( ret = dispatch_data( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
628 if( ( ret = dispatch_data( dst, p->buf, p->len ) ) <= 0 ) in send_packet()
642 if( ( ret = dispatch_data( dst, initial_clihlo.buf, in send_packet()
706 mbedtls_net_context *dst, in handle_message() argument
727 cur.dst = dst; in handle_message()
/mbedtls-3.4.0/include/mbedtls/
Dbase64.h57 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
77 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
Dmd5.h98 void mbedtls_md5_clone( mbedtls_md5_context *dst,
Dripemd160.h74 void mbedtls_ripemd160_clone( mbedtls_ripemd160_context *dst,
Dsha1.h108 void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
Dsha256.h88 void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
Dsha512.h91 void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
Dmd.h221 int mbedtls_md_clone( mbedtls_md_context_t *dst,

12