Lines Matching defs:ecdh
15 #include <openssl/ecdh.h>
160 ECDH* ecdh;
161 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
163 if (!EC_KEY_generate_key(ecdh->key_.get()))
201 ECDH* ecdh;
202 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
206 if (!ecdh->IsKeyPairValid())
211 ecdh->group_,
224 int field_size = EC_GROUP_get_degree(ecdh->group_);
230 bs->Data(), bs->ByteLength(), pub.get(), ecdh->key_.get(), nullptr))
245 ECDH* ecdh;
246 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
248 const EC_GROUP* group = EC_KEY_get0_group(ecdh->key_.get());
249 const EC_POINT* pub = EC_KEY_get0_public_key(ecdh->key_.get());
268 ECDH* ecdh;
269 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
271 const BIGNUM* b = EC_KEY_get0_private_key(ecdh->key_.get());
294 ECDH* ecdh;
295 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
308 if (!ecdh->IsKeyValidForCurve(priv)) {
313 ECKeyPointer new_key(EC_KEY_dup(ecdh->key_.get()));
330 ECPointPointer pub(EC_POINT_new(ecdh->group_));
333 if (!EC_POINT_mul(ecdh->group_, pub.get(), priv_key,
343 ecdh->key_ = std::move(new_key);
344 ecdh->group_ = EC_KEY_get0_group(ecdh->key_.get());
350 ECDH* ecdh;
351 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder());
359 ecdh->group_,
366 int r = EC_KEY_set_public_key(ecdh->key_.get(), pub.get());