Fixed chachapoly crypt algorithm.

It missed setkey function. So, no key was used at any moment.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-03-19 20:24:32 +01:00
parent 1c7bc18161
commit a69d06b2d9
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -284,6 +284,7 @@ int cmd_cipher_sym() {
int r = 0;
mbedtls_chachapoly_context ctx;
mbedtls_chachapoly_init(&ctx);
mbedtls_chachapoly_setkey(&ctx, kdata);
if (algo == ALGO_EXT_CIPHER_ENCRYPT) {
r = mbedtls_chachapoly_encrypt_and_tag(&ctx,
enc_len,