Skip to content

Commit

Permalink
mbedtls: fix incorrect mode in ecb encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasva committed Jun 13, 2023
1 parent 35cd5ca commit 236a804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void osdp_encrypt(uint8_t *key, uint8_t *iv, uint8_t *data, int len)
assert(len <= 16);
rc = mbedtls_aes_setkey_enc(&aes_ctx, key, 128);
assert(rc == 0);
rc = mbedtls_aes_crypt_ecb(&aes_ctx, MBEDTLS_AES_DECRYPT,
rc = mbedtls_aes_crypt_ecb(&aes_ctx, MBEDTLS_AES_ENCRYPT,
data, data);
assert(rc == 0);
}
Expand Down

0 comments on commit 236a804

Please sign in to comment.