diff --git a/src/crypto/public_key/elliptic/ecdh.js b/src/crypto/public_key/elliptic/ecdh.js index 80a51a10..66ee9598 100644 --- a/src/crypto/public_key/elliptic/ecdh.js +++ b/src/crypto/public_key/elliptic/ecdh.js @@ -96,7 +96,7 @@ async function genPublicEphemeralKey(oid, cipher_algo, hash_algo, Q, fingerprint * @async */ async function encrypt(oid, cipher_algo, hash_algo, m, Q, fingerprint) { - const key = await genPublicEphemeralKey(oid, cipher_algo, hash_algo, Q, fingerprint); + const { V, Z } = await genPublicEphemeralKey(oid, cipher_algo, hash_algo, Q, fingerprint); const C = aes_kw.wrap(key.Z, m.toString()); return { V: key.V,