Home
last modified time | relevance | path

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

12

/mbedtls-3.5.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.function68 data_t *dst, int setkey_result)
81 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0);
91 data_t *dst, int setkey_result)
104 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0);
114 data_t *src_str, data_t *dst,
129 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x,
130 src_str->len, dst->len) == 0);
140 data_t *src_str, data_t *dst,
154 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x,
155 src_str->len, dst->len) == 0);
[all …]
Dtest_suite_base64.function126 void base64_encode_hex(data_t *src, char *dst, int dst_buf_size,
143 TEST_ASSERT(len == strlen(dst));
144 TEST_ASSERT(memcmp(dst, res, len) == 0);
153 void base64_decode_hex(char *src, data_t *dst, int dst_buf_size,
164 TEST_ASSERT(len == dst->len);
165 TEST_ASSERT(memcmp(dst->x, res, len) == 0);
176 unsigned char dst[1000] = { 0 };
179 TEST_ASSERT(mbedtls_base64_decode(dst, sizeof(dst), &len, src->x, src->len) == result);
182 TEST_ASSERT(memcmp(dst, dst_ref, len) == 0);
Dtest_suite_constant_time.function123 unsigned char *dst = NULL;
128 ASSERT_ALLOC(dst, len);
138 mbedtls_ct_memcpy_offset(dst, src, secret,
141 TEST_CF_PUBLIC(dst, len);
143 ASSERT_COMPARE(dst, len, src + secret, len);
147 mbedtls_free(dst);
Dtest_suite_gcm.function192 data_t *add_str, data_t *dst,
215 ASSERT_COMPARE(output, src_str->len, dst->x, dst->len);
223 dst, tag,
381 data_t *dst,
391 iv_str, src_str, dst, tag_str,
Dtest_suite_bignum.function468 mbedtls_mpi src, dst, ref;
470 mbedtls_mpi_init(&dst);
477 TEST_ASSERT(mbedtls_test_read_mpi(&dst, dst_hex) == 0);
478 TEST_ASSERT(mbedtls_mpi_copy(&dst, &src) == 0);
479 TEST_ASSERT(sign_is_valid(&dst));
480 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&dst, &src) == 0);
483 mbedtls_mpi_free(&dst);
484 TEST_ASSERT(mbedtls_test_read_mpi(&dst, dst_hex) == 0);
485 TEST_ASSERT(mbedtls_mpi_safe_cond_assign(&dst, &src, 1) == 0);
486 TEST_ASSERT(sign_is_valid(&dst));
[all …]
/mbedtls-3.5.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.5.0/library/
Dbase64.c39 int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_encode() argument
60 if ((dlen < n + 1) || (NULL == dst)) { in mbedtls_base64_encode()
67 for (i = 0, p = dst; i < n; i += 3) { in mbedtls_base64_encode()
97 *olen = p - dst; in mbedtls_base64_encode()
106 int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_decode() argument
176 if (dst == NULL || dlen < n) { in mbedtls_base64_decode()
182 for (x = 0, p = dst; i > 0; i--, src++) { in mbedtls_base64_decode()
206 *olen = p - dst; in mbedtls_base64_decode()
Dmd.c301 int mbedtls_md_clone(mbedtls_md_context_t *dst, in mbedtls_md_clone() argument
304 if (dst == NULL || dst->md_info == NULL || in mbedtls_md_clone()
306 dst->md_info != src->md_info) { in mbedtls_md_clone()
311 if (src->engine != dst->engine) { in mbedtls_md_clone()
320 psa_status_t status = psa_hash_clone(src->md_ctx, dst->md_ctx); in mbedtls_md_clone()
328 mbedtls_md5_clone(dst->md_ctx, src->md_ctx); in mbedtls_md_clone()
333 mbedtls_ripemd160_clone(dst->md_ctx, src->md_ctx); in mbedtls_md_clone()
338 mbedtls_sha1_clone(dst->md_ctx, src->md_ctx); in mbedtls_md_clone()
343 mbedtls_sha256_clone(dst->md_ctx, src->md_ctx); in mbedtls_md_clone()
348 mbedtls_sha256_clone(dst->md_ctx, src->md_ctx); in mbedtls_md_clone()
[all …]
Dcamellia.c878 unsigned char dst[16]; in mbedtls_camellia_self_test() local
909 memcpy(dst, camellia_test_ecb_plain[i], 16); in mbedtls_camellia_self_test()
913 memcpy(dst, camellia_test_ecb_cipher[u][i], 16); in mbedtls_camellia_self_test()
918 if (memcmp(buf, dst, 16) != 0) { in mbedtls_camellia_self_test()
949 memcpy(dst, camellia_test_cbc_iv, 16); in mbedtls_camellia_self_test()
963 memcpy(dst, camellia_test_cbc_plain[i], 16); in mbedtls_camellia_self_test()
965 memcpy(iv, dst, 16); in mbedtls_camellia_self_test()
967 memcpy(dst, camellia_test_cbc_cipher[u][i], 16); in mbedtls_camellia_self_test()
972 if (memcmp(buf, dst, 16) != 0) { in mbedtls_camellia_self_test()
Drsa.c1084 static int mgf_mask(unsigned char *dst, size_t dlen, unsigned char *src, in mgf_mask() argument
1122 p = dst; in mgf_mask()
1822 unsigned char *dst) in rsa_rsassa_pkcs1_v15_encode() argument
1826 unsigned char *p = dst; in rsa_rsassa_pkcs1_v15_encode()
1925 if (p != dst + dst_len) { in rsa_rsassa_pkcs1_v15_encode()
1926 mbedtls_platform_zeroize(dst, dst_len); in rsa_rsassa_pkcs1_v15_encode()
2286 int mbedtls_rsa_copy(mbedtls_rsa_context *dst, const mbedtls_rsa_context *src) in mbedtls_rsa_copy() argument
2290 dst->len = src->len; in mbedtls_rsa_copy()
2292 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&dst->N, &src->N)); in mbedtls_rsa_copy()
2293 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
77 *dst = cur; in ssl_cache_find_entry()
145 mbedtls_ssl_cache_entry **dst) in ssl_cache_pick_writing_slot() argument
253 *dst = cur; in ssl_cache_pick_writing_slot()
Dssl_tls13_keys.c108 unsigned char *dst, size_t *dst_len) in ssl_tls13_hkdf_encode_label() argument
115 unsigned char *p = dst; in ssl_tls13_hkdf_encode_label()
697 unsigned char *dst, in ssl_tls13_calc_finished_core() argument
752 dst, hash_len, dst_len); in ssl_tls13_calc_finished_core()
768 unsigned char *dst, in mbedtls_ssl_tls13_calculate_verify_data() argument
813 ret = ssl_tls13_calc_finished_core(hash_alg, base_key, transcript, dst, actual_len); in mbedtls_ssl_tls13_calculate_verify_data()
818 MBEDTLS_SSL_DEBUG_BUF(3, "verify_data for finished message", dst, hash_len); in mbedtls_ssl_tls13_calculate_verify_data()
Dssl_tls.c236 int mbedtls_ssl_session_copy(mbedtls_ssl_session *dst, in mbedtls_ssl_session_copy() argument
239 mbedtls_ssl_session_free(dst); in mbedtls_ssl_session_copy()
240 memcpy(dst, src, sizeof(mbedtls_ssl_session)); in mbedtls_ssl_session_copy()
242 dst->ticket = NULL; in mbedtls_ssl_session_copy()
245 dst->hostname = NULL; in mbedtls_ssl_session_copy()
255 dst->peer_cert = mbedtls_calloc(1, sizeof(mbedtls_x509_crt)); in mbedtls_ssl_session_copy()
256 if (dst->peer_cert == NULL) { in mbedtls_ssl_session_copy()
260 mbedtls_x509_crt_init(dst->peer_cert); in mbedtls_ssl_session_copy()
262 if ((ret = mbedtls_x509_crt_parse_der(dst->peer_cert, src->peer_cert->raw.p, in mbedtls_ssl_session_copy()
264 mbedtls_free(dst->peer_cert); in mbedtls_ssl_session_copy()
[all …]
Decp_curves.c4873 static inline void add64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry) in add64() argument
4877 for (i = 0; i < 8 / sizeof(mbedtls_mpi_uint); i++, dst++, src++) { in add64()
4878 *dst += c; c = (*dst < c); in add64()
4879 *dst += *src; c += (*dst < *src); in add64()
4885 static inline void carry64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry) in carry64() argument
4888 for (i = 0; i < 8 / sizeof(mbedtls_mpi_uint); i++, dst++) { in carry64()
4889 *dst += *carry; in carry64()
4890 *carry = (*dst < *carry); in carry64()
5248 static inline void add32(uint32_t *dst, uint32_t src, signed char *carry) in add32() argument
5250 *dst += src; in add32()
[all …]
Dssl_tls13_keys.h593 unsigned char *dst,
/mbedtls-3.5.0/programs/test/
Dudp_proxy.c491 mbedtls_net_context *dst; member
546 mbedtls_net_context *dst = p->dst; in send_packet() local
567 if ((ret = dispatch_data(dst, buf, p->len)) <= 0) { in send_packet()
586 if ((ret = dispatch_data(dst, buf, p->len)) <= 0) { in send_packet()
593 if ((ret = dispatch_data(dst, p->buf, p->len)) <= 0) { in send_packet()
604 if ((ret = dispatch_data(dst, p->buf, p->len)) <= 0) { in send_packet()
616 if ((ret = dispatch_data(dst, initial_clihlo.buf, in send_packet()
680 mbedtls_net_context *dst, in handle_message() argument
700 cur.dst = dst; in handle_message()
/mbedtls-3.5.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,
Dripemd160.h73 void mbedtls_ripemd160_clone(mbedtls_ripemd160_context *dst,
Dmd5.h97 void mbedtls_md5_clone(mbedtls_md5_context *dst,
Dsha1.h107 void mbedtls_sha1_clone(mbedtls_sha1_context *dst,
Dsha256.h87 void mbedtls_sha256_clone(mbedtls_sha256_context *dst,
Dsha512.h90 void mbedtls_sha512_clone(mbedtls_sha512_context *dst,
Dmd.h299 int mbedtls_md_clone(mbedtls_md_context_t *dst,

12