Lines Matching defs:key

122 ECDH::ECDH(Environment* env, Local<Object> wrap, ECKeyPointer&& key)
124 key_(std::move(key)),
131 tracker->TrackFieldWithSize("key", key_ ? kSizeOf_EC_KEY : 0);
149 ECKeyPointer key(EC_KEY_new_by_curve_name(nid));
150 if (!key)
152 "Failed to create key using named curve");
154 new ECDH(env, args.This(), std::move(key));
164 return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to generate key");
175 "Failed to allocate EC_POINT for a public key");
231 return THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Failed to compute ECDH key");
252 "Failed to get ECDH public key");
274 "Failed to get ECDH private key");
299 return THROW_ERR_OUT_OF_RANGE(env, "key is too big");
310 "Private key is not valid for specified curve.");
321 "Failed to convert BN to a private key");
336 "Failed to generate ECDH public key");
341 "Failed to set generated public key");
369 "Failed to set EC_POINT as the public key");
393 // Convert the input public key to compressed, uncompressed, or hybrid formats.
403 return THROW_ERR_OUT_OF_RANGE(env, "key is too big");
461 CHECK(args[offset + 1]->IsObject()); // public key
462 CHECK(args[offset + 2]->IsObject()); // private key
653 // Get the size of the raw key data
714 // Ensure exported key is in uncompressed point format.
715 // The temporary EC key is so we can have i2d_PUBKEY_bio() write out
758 std::shared_ptr<KeyObjectData> key,
760 ManagedEVPPKey m_pkey = key->GetAsymmetricKey();
833 if (key->GetKeyType() == kKeyTypePrivate) {
848 std::shared_ptr<KeyObjectData> key,
850 ManagedEVPPKey pkey = key->GetAsymmetricKey();
886 if (key->GetKeyType() == kKeyTypePrivate) {
947 THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key");
955 THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key");
966 THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key");
973 THROW_ERR_CRYPTO_INVALID_JWK(env, "Invalid JWK EC key");
986 std::shared_ptr<KeyObjectData> key,
988 ManagedEVPPKey m_pkey = key->GetAsymmetricKey();
1009 size_t GroupOrderSize(const ManagedEVPPKey& key) {
1010 const EC_KEY* ec = EVP_PKEY_get0_EC_KEY(key.get());