Lines Matching refs:dhm
51 mbedtls_dhm_context dhm; in crypto_acipher_gen_dh_key() local
56 memset(&dhm, 0, sizeof(dhm)); in crypto_acipher_gen_dh_key()
57 mbedtls_dhm_init(&dhm); in crypto_acipher_gen_dh_key()
59 dhm.G = *(mbedtls_mpi *)key->g; in crypto_acipher_gen_dh_key()
60 dhm.P = *(mbedtls_mpi *)key->p; in crypto_acipher_gen_dh_key()
62 len = mbedtls_dhm_get_len(&dhm); in crypto_acipher_gen_dh_key()
78 lmd_res = mbedtls_dhm_make_public(&dhm, (int)xbytes, buf, in crypto_acipher_gen_dh_key()
85 crypto_bignum_copy(key->x, (void *)&dhm.X); in crypto_acipher_gen_dh_key()
91 mbedtls_mpi_init(&dhm.G); in crypto_acipher_gen_dh_key()
92 mbedtls_mpi_init(&dhm.P); in crypto_acipher_gen_dh_key()
93 mbedtls_dhm_free(&dhm); in crypto_acipher_gen_dh_key()
103 mbedtls_dhm_context dhm; in crypto_acipher_dh_shared_secret() local
108 memset(&dhm, 0, sizeof(dhm)); in crypto_acipher_dh_shared_secret()
109 mbedtls_dhm_init(&dhm); in crypto_acipher_dh_shared_secret()
111 dhm.G = *(mbedtls_mpi *)private_key->g; in crypto_acipher_dh_shared_secret()
112 dhm.P = *(mbedtls_mpi *)private_key->p; in crypto_acipher_dh_shared_secret()
113 dhm.GX = *(mbedtls_mpi *)private_key->y; in crypto_acipher_dh_shared_secret()
114 dhm.X = *(mbedtls_mpi *)private_key->x; in crypto_acipher_dh_shared_secret()
115 dhm.GY = *(mbedtls_mpi *)public_key; in crypto_acipher_dh_shared_secret()
117 len = mbedtls_dhm_get_len(&dhm); in crypto_acipher_dh_shared_secret()
125 lmd_res = mbedtls_dhm_calc_secret(&dhm, buf, len, in crypto_acipher_dh_shared_secret()
137 mbedtls_mpi_init(&dhm.G); in crypto_acipher_dh_shared_secret()
138 mbedtls_mpi_init(&dhm.P); in crypto_acipher_dh_shared_secret()
139 mbedtls_mpi_init(&dhm.GX); in crypto_acipher_dh_shared_secret()
140 mbedtls_mpi_init(&dhm.X); in crypto_acipher_dh_shared_secret()
141 mbedtls_mpi_init(&dhm.GY); in crypto_acipher_dh_shared_secret()
142 mbedtls_dhm_free(&dhm); in crypto_acipher_dh_shared_secret()