Lines Matching defs:pub_key
85 freezero(ecx_key->pub_key, ecx_key->pub_key_len);
86 ecx_key->pub_key = NULL;
104 uint8_t *pub_key = NULL, *priv_key = NULL;
109 if ((pub_key = calloc(1, ecx_key->key_len)) == NULL)
116 ED25519_keypair(pub_key, priv_key);
119 X25519_keypair(pub_key, priv_key);
129 ecx_key->pub_key = pub_key;
131 pub_key = NULL;
136 freezero(pub_key, ecx_key->key_len);
146 uint8_t *pub_key = NULL;
154 if ((pub_key = calloc(1, ecx_key->key_len)) == NULL)
159 ED25519_public_from_private(pub_key, priv_key);
162 X25519_public_from_private(pub_key, priv_key);
172 ecx_key->pub_key = pub_key;
174 pub_key = NULL;
177 freezero(pub_key, ecx_key->key_len);
183 ecx_key_set_pub(struct ecx_key_st *ecx_key, const uint8_t *pub_key,
193 CBS_init(&cbs, pub_key, pub_key_len);
194 if (!CBS_stow(&cbs, &ecx_key->pub_key, &ecx_key->pub_key_len))
247 uint8_t *pub_key = NULL;
264 CBS_init(&cbs, ecx_key->pub_key, ecx_key->pub_key_len);
265 if (!CBS_stow(&cbs, &pub_key, &pub_key_len))
269 pub_key, pub_key_len))
272 pub_key = NULL;
278 free(pub_key);
286 if (pkey1->pkey.ecx == NULL || pkey1->pkey.ecx->pub_key == NULL)
288 if (pkey2->pkey.ecx == NULL || pkey2->pkey.ecx->pub_key == NULL)
293 return timingsafe_memcmp(pkey1->pkey.ecx->pub_key, pkey2->pkey.ecx->pub_key,
342 if (ecx_key == NULL || ecx_key->pub_key == NULL)
350 if (!ecx_buf_print(bio, ecx_key->pub_key, ecx_key->pub_key_len, indent))
466 if (!ecx_buf_print(bio, ecx_key->pub_key, ecx_key->pub_key_len, indent))
705 if (ecx_key == NULL || ecx_key->pub_key == NULL)
708 CBS_init(&cbs, ecx_key->pub_key, ecx_key->pub_key_len);
763 if (!X25519(out_key, ecx_key->priv_key, ecx_peer_key->pub_key))
841 if (ecx_key->priv_key == NULL || ecx_key->pub_key == NULL)
844 if (!ED25519_sign(out_sig, message, message_len, ecx_key->pub_key,
863 if (ecx_key == NULL || ecx_key->pub_key == NULL)
868 return ED25519_verify(message, message_len, sig, ecx_key->pub_key);