• Home
  • Raw
  • Download

Lines Matching refs:ecdh

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