Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 183) sorted by relevance

12345678

/mbedtls-3.5.0/library/
Decdh.c42 const mbedtls_ecdh_context *ctx) in mbedtls_ecdh_grp_id() argument
45 return ctx->grp.id; in mbedtls_ecdh_grp_id()
47 return ctx->grp_id; in mbedtls_ecdh_grp_id()
146 static void ecdh_init_internal(mbedtls_ecdh_context_mbed *ctx) in ecdh_init_internal() argument
148 mbedtls_ecp_group_init(&ctx->grp); in ecdh_init_internal()
149 mbedtls_mpi_init(&ctx->d); in ecdh_init_internal()
150 mbedtls_ecp_point_init(&ctx->Q); in ecdh_init_internal()
151 mbedtls_ecp_point_init(&ctx->Qp); in ecdh_init_internal()
152 mbedtls_mpi_init(&ctx->z); in ecdh_init_internal()
155 mbedtls_ecp_restart_init(&ctx->rs); in ecdh_init_internal()
[all …]
Dccm.c54 void mbedtls_ccm_init(mbedtls_ccm_context *ctx) in mbedtls_ccm_init() argument
56 memset(ctx, 0, sizeof(mbedtls_ccm_context)); in mbedtls_ccm_init()
59 int mbedtls_ccm_setkey(mbedtls_ccm_context *ctx, in mbedtls_ccm_setkey() argument
77 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_ccm_setkey()
79 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_ccm_setkey()
83 if ((ret = mbedtls_cipher_setkey(&ctx->cipher_ctx, key, keybits, in mbedtls_ccm_setkey()
94 void mbedtls_ccm_free(mbedtls_ccm_context *ctx) in mbedtls_ccm_free() argument
96 if (ctx == NULL) { in mbedtls_ccm_free()
99 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_ccm_free()
100 mbedtls_platform_zeroize(ctx, sizeof(mbedtls_ccm_context)); in mbedtls_ccm_free()
[all …]
Dcipher.c141 void mbedtls_cipher_init(mbedtls_cipher_context_t *ctx) in mbedtls_cipher_init() argument
143 memset(ctx, 0, sizeof(mbedtls_cipher_context_t)); in mbedtls_cipher_init()
146 void mbedtls_cipher_free(mbedtls_cipher_context_t *ctx) in mbedtls_cipher_free() argument
148 if (ctx == NULL) { in mbedtls_cipher_free()
153 if (ctx->psa_enabled == 1) { in mbedtls_cipher_free()
154 if (ctx->cipher_ctx != NULL) { in mbedtls_cipher_free()
156 (mbedtls_cipher_context_psa *) ctx->cipher_ctx; in mbedtls_cipher_free()
167 mbedtls_platform_zeroize(ctx, sizeof(mbedtls_cipher_context_t)); in mbedtls_cipher_free()
173 if (ctx->cmac_ctx) { in mbedtls_cipher_free()
174 mbedtls_platform_zeroize(ctx->cmac_ctx, in mbedtls_cipher_free()
[all …]
Dgcm.c54 void mbedtls_gcm_init(mbedtls_gcm_context *ctx) in mbedtls_gcm_init() argument
56 memset(ctx, 0, sizeof(mbedtls_gcm_context)); in mbedtls_gcm_init()
67 static int gcm_gen_table(mbedtls_gcm_context *ctx) in gcm_gen_table() argument
76 if ((ret = mbedtls_cipher_update(&ctx->cipher_ctx, h, 16, h, &olen)) != 0) { in gcm_gen_table()
90 ctx->HL[8] = vl; in gcm_gen_table()
91 ctx->HH[8] = vh; in gcm_gen_table()
107 ctx->HH[0] = 0; in gcm_gen_table()
108 ctx->HL[0] = 0; in gcm_gen_table()
115 ctx->HL[i] = vl; in gcm_gen_table()
116 ctx->HH[i] = vh; in gcm_gen_table()
[all …]
Ddhm.c110 void mbedtls_dhm_init(mbedtls_dhm_context *ctx) in mbedtls_dhm_init() argument
112 memset(ctx, 0, sizeof(mbedtls_dhm_context)); in mbedtls_dhm_init()
115 size_t mbedtls_dhm_get_bitlen(const mbedtls_dhm_context *ctx) in mbedtls_dhm_get_bitlen() argument
117 return mbedtls_mpi_bitlen(&ctx->P); in mbedtls_dhm_get_bitlen()
120 size_t mbedtls_dhm_get_len(const mbedtls_dhm_context *ctx) in mbedtls_dhm_get_len() argument
122 return mbedtls_mpi_size(&ctx->P); in mbedtls_dhm_get_len()
125 int mbedtls_dhm_get_value(const mbedtls_dhm_context *ctx, in mbedtls_dhm_get_value() argument
132 src = &ctx->P; in mbedtls_dhm_get_value()
135 src = &ctx->G; in mbedtls_dhm_get_value()
138 src = &ctx->X; in mbedtls_dhm_get_value()
[all …]
Dhmac_drbg.c45 void mbedtls_hmac_drbg_init(mbedtls_hmac_drbg_context *ctx) in mbedtls_hmac_drbg_init() argument
47 memset(ctx, 0, sizeof(mbedtls_hmac_drbg_context)); in mbedtls_hmac_drbg_init()
49 ctx->reseed_interval = MBEDTLS_HMAC_DRBG_RESEED_INTERVAL; in mbedtls_hmac_drbg_init()
55 int mbedtls_hmac_drbg_update(mbedtls_hmac_drbg_context *ctx, in mbedtls_hmac_drbg_update() argument
59 size_t md_len = mbedtls_md_get_size(ctx->md_ctx.md_info); in mbedtls_hmac_drbg_update()
67 if ((ret = mbedtls_md_hmac_reset(&ctx->md_ctx)) != 0) { in mbedtls_hmac_drbg_update()
70 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
71 ctx->V, md_len)) != 0) { in mbedtls_hmac_drbg_update()
74 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
79 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
[all …]
Dmd.c229 void mbedtls_md_init(mbedtls_md_context_t *ctx) in mbedtls_md_init() argument
232 memset(ctx, 0, sizeof(mbedtls_md_context_t)); in mbedtls_md_init()
235 void mbedtls_md_free(mbedtls_md_context_t *ctx) in mbedtls_md_free() argument
237 if (ctx == NULL || ctx->md_info == NULL) { in mbedtls_md_free()
241 if (ctx->md_ctx != NULL) { in mbedtls_md_free()
243 if (ctx->engine == MBEDTLS_MD_ENGINE_PSA) { in mbedtls_md_free()
244 psa_hash_abort(ctx->md_ctx); in mbedtls_md_free()
247 switch (ctx->md_info->type) { in mbedtls_md_free()
250 mbedtls_md5_free(ctx->md_ctx); in mbedtls_md_free()
255 mbedtls_ripemd160_free(ctx->md_ctx); in mbedtls_md_free()
[all …]
Dlms.c230 void mbedtls_lms_public_init(mbedtls_lms_public_t *ctx) in mbedtls_lms_public_init() argument
232 memset(ctx, 0, sizeof(*ctx)); in mbedtls_lms_public_init()
235 void mbedtls_lms_public_free(mbedtls_lms_public_t *ctx) in mbedtls_lms_public_free() argument
237 mbedtls_platform_zeroize(ctx, sizeof(*ctx)); in mbedtls_lms_public_free()
240 int mbedtls_lms_import_public_key(mbedtls_lms_public_t *ctx, in mbedtls_lms_import_public_key() argument
251 ctx->params.type = type; in mbedtls_lms_import_public_key()
253 if (key_size != MBEDTLS_LMS_PUBLIC_KEY_LEN(ctx->params.type)) { in mbedtls_lms_import_public_key()
262 ctx->params.otstype = otstype; in mbedtls_lms_import_public_key()
264 memcpy(ctx->params.I_key_identifier, in mbedtls_lms_import_public_key()
267 memcpy(ctx->T_1_pub_key, key + PUBLIC_KEY_ROOT_NODE_OFFSET, in mbedtls_lms_import_public_key()
[all …]
Drsa.c73 int mbedtls_rsa_import(mbedtls_rsa_context *ctx, in mbedtls_rsa_import() argument
80 if ((N != NULL && (ret = mbedtls_mpi_copy(&ctx->N, N)) != 0) || in mbedtls_rsa_import()
81 (P != NULL && (ret = mbedtls_mpi_copy(&ctx->P, P)) != 0) || in mbedtls_rsa_import()
82 (Q != NULL && (ret = mbedtls_mpi_copy(&ctx->Q, Q)) != 0) || in mbedtls_rsa_import()
83 (D != NULL && (ret = mbedtls_mpi_copy(&ctx->D, D)) != 0) || in mbedtls_rsa_import()
84 (E != NULL && (ret = mbedtls_mpi_copy(&ctx->E, E)) != 0)) { in mbedtls_rsa_import()
89 ctx->len = mbedtls_mpi_size(&ctx->N); in mbedtls_rsa_import()
95 int mbedtls_rsa_import_raw(mbedtls_rsa_context *ctx, in mbedtls_rsa_import_raw() argument
105 MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&ctx->N, N, N_len)); in mbedtls_rsa_import_raw()
106 ctx->len = mbedtls_mpi_size(&ctx->N); in mbedtls_rsa_import_raw()
[all …]
Dchachapoly.c45 static int chachapoly_pad_aad(mbedtls_chachapoly_context *ctx) in chachapoly_pad_aad() argument
47 uint32_t partial_block_len = (uint32_t) (ctx->aad_len % 16U); in chachapoly_pad_aad()
56 return mbedtls_poly1305_update(&ctx->poly1305_ctx, in chachapoly_pad_aad()
66 static int chachapoly_pad_ciphertext(mbedtls_chachapoly_context *ctx) in chachapoly_pad_ciphertext() argument
68 uint32_t partial_block_len = (uint32_t) (ctx->ciphertext_len % 16U); in chachapoly_pad_ciphertext()
76 return mbedtls_poly1305_update(&ctx->poly1305_ctx, in chachapoly_pad_ciphertext()
81 void mbedtls_chachapoly_init(mbedtls_chachapoly_context *ctx) in mbedtls_chachapoly_init() argument
83 mbedtls_chacha20_init(&ctx->chacha20_ctx); in mbedtls_chachapoly_init()
84 mbedtls_poly1305_init(&ctx->poly1305_ctx); in mbedtls_chachapoly_init()
85 ctx->aad_len = 0U; in mbedtls_chachapoly_init()
[all …]
Dentropy.c42 void mbedtls_entropy_init(mbedtls_entropy_context *ctx) in mbedtls_entropy_init() argument
44 ctx->source_count = 0; in mbedtls_entropy_init()
45 memset(ctx->source, 0, sizeof(ctx->source)); in mbedtls_entropy_init()
48 mbedtls_mutex_init(&ctx->mutex); in mbedtls_entropy_init()
51 ctx->accumulator_started = 0; in mbedtls_entropy_init()
53 mbedtls_sha512_init(&ctx->accumulator); in mbedtls_entropy_init()
55 mbedtls_sha256_init(&ctx->accumulator); in mbedtls_entropy_init()
63 mbedtls_entropy_add_source(ctx, mbedtls_platform_entropy_poll, NULL, in mbedtls_entropy_init()
68 mbedtls_entropy_add_source(ctx, mbedtls_hardware_poll, NULL, in mbedtls_entropy_init()
73 mbedtls_entropy_add_source(ctx, mbedtls_nv_seed_poll, NULL, in mbedtls_entropy_init()
[all …]
Dctr_drbg.c44 void mbedtls_ctr_drbg_init(mbedtls_ctr_drbg_context *ctx) in mbedtls_ctr_drbg_init() argument
46 memset(ctx, 0, sizeof(mbedtls_ctr_drbg_context)); in mbedtls_ctr_drbg_init()
47 mbedtls_aes_init(&ctx->aes_ctx); in mbedtls_ctr_drbg_init()
50 ctx->reseed_counter = -1; in mbedtls_ctr_drbg_init()
52 ctx->reseed_interval = MBEDTLS_CTR_DRBG_RESEED_INTERVAL; in mbedtls_ctr_drbg_init()
59 void mbedtls_ctr_drbg_free(mbedtls_ctr_drbg_context *ctx) in mbedtls_ctr_drbg_free() argument
61 if (ctx == NULL) { in mbedtls_ctr_drbg_free()
67 if (ctx->f_entropy != NULL) { in mbedtls_ctr_drbg_free()
68 mbedtls_mutex_free(&ctx->mutex); in mbedtls_ctr_drbg_free()
71 mbedtls_aes_free(&ctx->aes_ctx); in mbedtls_ctr_drbg_free()
[all …]
Dssl_ticket.c42 void mbedtls_ssl_ticket_init(mbedtls_ssl_ticket_context *ctx) in mbedtls_ssl_ticket_init() argument
44 memset(ctx, 0, sizeof(mbedtls_ssl_ticket_context)); in mbedtls_ssl_ticket_init()
47 mbedtls_mutex_init(&ctx->mutex); in mbedtls_ssl_ticket_init()
70 static int ssl_ticket_gen_key(mbedtls_ssl_ticket_context *ctx, in ssl_ticket_gen_key() argument
75 mbedtls_ssl_ticket_key *key = ctx->keys + index; in ssl_ticket_gen_key()
85 if ((ret = ctx->f_rng(ctx->p_rng, key->name, sizeof(key->name))) != 0) { in ssl_ticket_gen_key()
89 if ((ret = ctx->f_rng(ctx->p_rng, buf, sizeof(buf))) != 0) { in ssl_ticket_gen_key()
106 ret = mbedtls_cipher_setkey(&key->ctx, buf, in ssl_ticket_gen_key()
107 mbedtls_cipher_get_key_bitlen(&key->ctx), in ssl_ticket_gen_key()
120 static int ssl_ticket_update_keys(mbedtls_ssl_ticket_context *ctx) in ssl_ticket_update_keys() argument
[all …]
Dpoly1305.c76 static void poly1305_process(mbedtls_poly1305_context *ctx, in poly1305_process() argument
88 r0 = ctx->r[0]; in poly1305_process()
89 r1 = ctx->r[1]; in poly1305_process()
90 r2 = ctx->r[2]; in poly1305_process()
91 r3 = ctx->r[3]; in poly1305_process()
97 acc0 = ctx->acc[0]; in poly1305_process()
98 acc1 = ctx->acc[1]; in poly1305_process()
99 acc2 = ctx->acc[2]; in poly1305_process()
100 acc3 = ctx->acc[3]; in poly1305_process()
101 acc4 = ctx->acc[4]; in poly1305_process()
[all …]
Dpk.c59 void mbedtls_pk_init(mbedtls_pk_context *ctx) in mbedtls_pk_init() argument
61 ctx->pk_info = NULL; in mbedtls_pk_init()
62 ctx->pk_ctx = NULL; in mbedtls_pk_init()
68 void mbedtls_pk_free(mbedtls_pk_context *ctx) in mbedtls_pk_free() argument
70 if (ctx == NULL) { in mbedtls_pk_free()
74 if (ctx->pk_info != NULL) { in mbedtls_pk_free()
75 ctx->pk_info->ctx_free_func(ctx->pk_ctx); in mbedtls_pk_free()
78 mbedtls_platform_zeroize(ctx, sizeof(mbedtls_pk_context)); in mbedtls_pk_free()
85 void mbedtls_pk_restart_init(mbedtls_pk_restart_ctx *ctx) in mbedtls_pk_restart_init() argument
87 ctx->pk_info = NULL; in mbedtls_pk_restart_init()
[all …]
Dcipher_wrap.c77 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_gcm_context)); in gcm_ctx_alloc() local
79 if (ctx != NULL) { in gcm_ctx_alloc()
80 mbedtls_gcm_init((mbedtls_gcm_context *) ctx); in gcm_ctx_alloc()
83 return ctx; in gcm_ctx_alloc()
86 static void gcm_ctx_free(void *ctx) in gcm_ctx_free() argument
88 mbedtls_gcm_free(ctx); in gcm_ctx_free()
89 mbedtls_free(ctx); in gcm_ctx_free()
97 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_ccm_context)); in ccm_ctx_alloc() local
99 if (ctx != NULL) { in ccm_ctx_alloc()
100 mbedtls_ccm_init((mbedtls_ccm_context *) ctx); in ccm_ctx_alloc()
[all …]
Dchacha20.c155 void mbedtls_chacha20_init(mbedtls_chacha20_context *ctx) in mbedtls_chacha20_init() argument
157 mbedtls_platform_zeroize(ctx->state, sizeof(ctx->state)); in mbedtls_chacha20_init()
158 mbedtls_platform_zeroize(ctx->keystream8, sizeof(ctx->keystream8)); in mbedtls_chacha20_init()
161 ctx->keystream_bytes_used = CHACHA20_BLOCK_SIZE_BYTES; in mbedtls_chacha20_init()
164 void mbedtls_chacha20_free(mbedtls_chacha20_context *ctx) in mbedtls_chacha20_free() argument
166 if (ctx != NULL) { in mbedtls_chacha20_free()
167 mbedtls_platform_zeroize(ctx, sizeof(mbedtls_chacha20_context)); in mbedtls_chacha20_free()
171 int mbedtls_chacha20_setkey(mbedtls_chacha20_context *ctx, in mbedtls_chacha20_setkey() argument
175 ctx->state[0] = 0x61707865; in mbedtls_chacha20_setkey()
176 ctx->state[1] = 0x3320646e; in mbedtls_chacha20_setkey()
[all …]
Dpsa_crypto_hash.c44 mbedtls_md5_free(&operation->ctx.md5); in mbedtls_psa_hash_abort()
49 mbedtls_ripemd160_free(&operation->ctx.ripemd160); in mbedtls_psa_hash_abort()
54 mbedtls_sha1_free(&operation->ctx.sha1); in mbedtls_psa_hash_abort()
59 mbedtls_sha256_free(&operation->ctx.sha256); in mbedtls_psa_hash_abort()
64 mbedtls_sha256_free(&operation->ctx.sha256); in mbedtls_psa_hash_abort()
69 mbedtls_sha512_free(&operation->ctx.sha512); in mbedtls_psa_hash_abort()
74 mbedtls_sha512_free(&operation->ctx.sha512); in mbedtls_psa_hash_abort()
98 mbedtls_md5_init(&operation->ctx.md5); in mbedtls_psa_hash_setup()
99 ret = mbedtls_md5_starts(&operation->ctx.md5); in mbedtls_psa_hash_setup()
104 mbedtls_ripemd160_init(&operation->ctx.ripemd160); in mbedtls_psa_hash_setup()
[all …]
Dx509write_crt.c51 void mbedtls_x509write_crt_init(mbedtls_x509write_cert *ctx) in mbedtls_x509write_crt_init() argument
53 memset(ctx, 0, sizeof(mbedtls_x509write_cert)); in mbedtls_x509write_crt_init()
55 ctx->version = MBEDTLS_X509_CRT_VERSION_3; in mbedtls_x509write_crt_init()
58 void mbedtls_x509write_crt_free(mbedtls_x509write_cert *ctx) in mbedtls_x509write_crt_free() argument
60 mbedtls_asn1_free_named_data_list(&ctx->subject); in mbedtls_x509write_crt_free()
61 mbedtls_asn1_free_named_data_list(&ctx->issuer); in mbedtls_x509write_crt_free()
62 mbedtls_asn1_free_named_data_list(&ctx->extensions); in mbedtls_x509write_crt_free()
64 mbedtls_platform_zeroize(ctx, sizeof(mbedtls_x509write_cert)); in mbedtls_x509write_crt_free()
67 void mbedtls_x509write_crt_set_version(mbedtls_x509write_cert *ctx, in mbedtls_x509write_crt_set_version() argument
70 ctx->version = version; in mbedtls_x509write_crt_set_version()
[all …]
Decjpake.c59 #define ID_MINE (ecjpake_id[ctx->role])
60 #define ID_PEER (ecjpake_id[1 - ctx->role])
87 void mbedtls_ecjpake_init(mbedtls_ecjpake_context *ctx) in mbedtls_ecjpake_init() argument
89 ctx->md_type = MBEDTLS_MD_NONE; in mbedtls_ecjpake_init()
90 mbedtls_ecp_group_init(&ctx->grp); in mbedtls_ecjpake_init()
91 ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED; in mbedtls_ecjpake_init()
93 mbedtls_ecp_point_init(&ctx->Xm1); in mbedtls_ecjpake_init()
94 mbedtls_ecp_point_init(&ctx->Xm2); in mbedtls_ecjpake_init()
95 mbedtls_ecp_point_init(&ctx->Xp1); in mbedtls_ecjpake_init()
96 mbedtls_ecp_point_init(&ctx->Xp2); in mbedtls_ecjpake_init()
[all …]
Dlmots.c417 void mbedtls_lmots_public_init(mbedtls_lmots_public_t *ctx) in mbedtls_lmots_public_init() argument
419 memset(ctx, 0, sizeof(*ctx)); in mbedtls_lmots_public_init()
422 void mbedtls_lmots_public_free(mbedtls_lmots_public_t *ctx) in mbedtls_lmots_public_free() argument
424 mbedtls_platform_zeroize(ctx, sizeof(*ctx)); in mbedtls_lmots_public_free()
427 int mbedtls_lmots_import_public_key(mbedtls_lmots_public_t *ctx, in mbedtls_lmots_import_public_key() argument
434 ctx->params.type = in mbedtls_lmots_import_public_key()
438 if (key_len != MBEDTLS_LMOTS_PUBLIC_KEY_LEN(ctx->params.type)) { in mbedtls_lmots_import_public_key()
442 memcpy(ctx->params.I_key_identifier, in mbedtls_lmots_import_public_key()
446 memcpy(ctx->params.q_leaf_identifier, in mbedtls_lmots_import_public_key()
450 memcpy(ctx->public_key, in mbedtls_lmots_import_public_key()
[all …]
/mbedtls-3.5.0/tests/suites/
Dtest_suite_pkcs1_v21.function17 mbedtls_rsa_context ctx;
27 mbedtls_rsa_init(&ctx);
28 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx,
32 TEST_EQUAL(mbedtls_rsa_get_padding_mode(&ctx), MBEDTLS_RSA_PKCS_V21);
33 TEST_EQUAL(mbedtls_rsa_get_md_alg(&ctx), hash);
37 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, NULL, NULL, NULL, &E) == 0);
38 TEST_ASSERT(mbedtls_rsa_get_len(&ctx) == (size_t) ((mod + 7) / 8));
39 TEST_ASSERT(mbedtls_rsa_check_pubkey(&ctx) == 0);
44 TEST_ASSERT(mbedtls_rsa_pkcs1_encrypt(&ctx,
50 ASSERT_COMPARE(output, ctx.len, result_str->x, result_str->len);
[all …]
Dtest_suite_gcm.function7 static int check_multipart(mbedtls_gcm_context *ctx,
28 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode,
30 TEST_EQUAL(0, mbedtls_gcm_update_ad(ctx, add->x, n1_add));
31 TEST_EQUAL(0, mbedtls_gcm_update_ad(ctx, add->x + n1_add, n2_add));
38 TEST_EQUAL(0, mbedtls_gcm_update(ctx, input->x, n1, output, n1, &olen));
46 TEST_EQUAL(0, mbedtls_gcm_update(ctx, input->x + n1, n2, output, n2, &olen));
53 TEST_EQUAL(0, mbedtls_gcm_finish(ctx, NULL, 0, &olen, output, tag->len));
65 static void check_cipher_with_empty_ad(mbedtls_gcm_context *ctx,
80 TEST_EQUAL(0, mbedtls_gcm_starts(ctx, mode,
84 TEST_EQUAL(0, mbedtls_gcm_update_ad(ctx, NULL, 0));
[all …]
/mbedtls-3.5.0/3rdparty/everest/library/
Deverest.c35 int mbedtls_everest_setup( mbedtls_ecdh_context_everest *ctx, int grp_id ) in mbedtls_everest_setup() argument
39 mbedtls_x25519_init( &ctx->ctx ); in mbedtls_everest_setup()
43 void mbedtls_everest_free( mbedtls_ecdh_context_everest *ctx ) in mbedtls_everest_free() argument
45 mbedtls_x25519_free( &ctx->ctx ); in mbedtls_everest_free()
48 int mbedtls_everest_make_params( mbedtls_ecdh_context_everest *ctx, size_t *olen, in mbedtls_everest_make_params() argument
53 mbedtls_x25519_context *x25519_ctx = &ctx->ctx; in mbedtls_everest_make_params()
57 int mbedtls_everest_read_params( mbedtls_ecdh_context_everest *ctx, in mbedtls_everest_read_params() argument
61 mbedtls_x25519_context *x25519_ctx = &ctx->ctx; in mbedtls_everest_read_params()
65 int mbedtls_everest_get_params( mbedtls_ecdh_context_everest *ctx, in mbedtls_everest_get_params() argument
69 mbedtls_x25519_context *x25519_ctx = &ctx->ctx; in mbedtls_everest_get_params()
[all …]
/mbedtls-3.5.0/include/mbedtls/
Dcipher.h590 void mbedtls_cipher_init(mbedtls_cipher_context_t *ctx);
601 void mbedtls_cipher_free(mbedtls_cipher_context_t *ctx);
630 int mbedtls_cipher_setup(mbedtls_cipher_context_t *ctx,
661 int MBEDTLS_DEPRECATED mbedtls_cipher_setup_psa(mbedtls_cipher_context_t *ctx,
678 const mbedtls_cipher_context_t *ctx) in mbedtls_cipher_get_block_size() argument
680 MBEDTLS_INTERNAL_VALIDATE_RET(ctx != NULL, 0); in mbedtls_cipher_get_block_size()
681 if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) { in mbedtls_cipher_get_block_size()
685 return ctx->MBEDTLS_PRIVATE(cipher_info)->MBEDTLS_PRIVATE(block_size); in mbedtls_cipher_get_block_size()
698 const mbedtls_cipher_context_t *ctx) in mbedtls_cipher_get_cipher_mode() argument
700 MBEDTLS_INTERNAL_VALIDATE_RET(ctx != NULL, MBEDTLS_MODE_NONE); in mbedtls_cipher_get_cipher_mode()
[all …]

12345678