Lines Matching refs:MDH
46 typedef struct MDH { struct
53 } MDH; argument
55 #define MDH_new() calloc(1,sizeof(MDH))
56 #define MDH_free(vp) {MDH *_dh = vp; dhm_free(&_dh->ctx); MP_free(_dh->p); MP_free(_dh->g); MP_free…
58 static int MDH_generate_key(MDH *dh) in MDH_generate_key()
72 static int MDH_compute_key(uint8_t *secret, size_t len, MP_t pub, MDH *dh) in MDH_compute_key()
97 typedef struct MDH { struct
103 } MDH; argument
105 #define MDH_new() calloc(1,sizeof(MDH))
106 …efine MDH_free(dh) do {MP_free(((MDH*)(dh))->p); MP_free(((MDH*)(dh))->g); MP_free(((MDH*)(dh))->p…
108 static int MDH_generate_key(MDH *dh) in MDH_generate_key()
143 static int MDH_compute_key(uint8_t *secret, size_t len, MP_t pub, MDH *dh) in MDH_compute_key()
184 #define MDH DH macro
247 static MDH *
251 MDH *dh = MDH_new(); in DHInit()
280 DHGenerateKey(MDH *dh) in DHGenerateKey()
314 DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) in DHGetPublicKey()
331 DHGetPrivateKey(MDH *dh, uint8_t *privkey, size_t nPrivkeyLen)
350 DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, in DHComputeSharedSecretKey()