Correct ietf_decrypt

EQC Found a bug where parameters
where incorrectly passed. The CT
test suite passed, but randomized
tests found an error.
This commit is contained in:
Jesper Louis Andersen 2020-02-03 14:57:42 +01:00
parent fc943a19c7
commit 8ed8663dfe

View File

@ -93,7 +93,7 @@ enacl_crypto_aead_chacha20poly1305_ietf_decrypt(ErlNifEnv *env, int argc,
goto bad_arg;
if (!enif_inspect_binary(env, argv[2], &nonce))
goto bad_arg;
if (!enif_inspect_binary(env, argv[3], &message))
if (!enif_inspect_binary(env, argv[3], &key))
goto bad_arg;
if (ciphertext.size < crypto_aead_chacha20poly1305_ietf_ABYTES)