mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
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:
parent
1c7bc18161
commit
a69d06b2d9
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue