Skip to content

Commit

Permalink
Merge pull request #121 from niklasva/mbedtls_ecb_encrypt_fix
Browse files Browse the repository at this point in the history
mbedtls: fix incorrect mode in ecb encryption
  • Loading branch information
sidcha committed Jun 13, 2023
2 parents ddd008b + 236a804 commit 88904c8
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 88904c8

Please sign in to comment.