diff --git a/lib/jose/jwe/alg_xc20p_kw.rb b/lib/jose/jwe/alg_xc20p_kw.rb index 5fbe030..16b8b5a 100644 --- a/lib/jose/jwe/alg_xc20p_kw.rb +++ b/lib/jose/jwe/alg_xc20p_kw.rb @@ -61,7 +61,6 @@ def key_encrypt(key, enc, decrypted_key) key = key.kty.derive_key end new_alg = JOSE::JWE::ALG_XC20P_KW.new(cipher_name, bits, iv || SecureRandom.random_bytes(24)) - derived_key = key aad = '' plain_text = decrypted_key cipher_text, new_alg.tag = JOSE.xchacha20poly1305_module().xchacha20poly1305_aead_encrypt(key, new_alg.iv, aad, plain_text)