Closed skelsec closed 2 years ago
or expose the mbedtls_cipher_set_padding_mode to the user.
Is probably easier.
Passing callbacks from Python to C is possible but I prefer to avoid that as much as possible.
I changed my mind. Users can use
https://pycryptodome.readthedocs.io/en/latest/src/util/util.html#crypto-util-padding-module
for padding.
I will default to NONE
.
Works for me, please let me know when the code is updated
It is done.
NOTE: Please use stackoverflow for support questions. This repository's issues are reserved for feature requests and bug reports.
I am submitting a …
Description
Currently all symmetric block ciphers default to the padding whichever one was set in mbedtls at compilation time. Because it's by default not
MBEDTLS_PADDING_NONE
the current setup excludes many usecases for the ciphers.Current behavior
As I see currently it's using
MBEDTLS_PADDING_PKCS7
.Expected behavior
Either default to
MBEDTLS_PADDING_NONE
and have the user's implement padding on their own, or expose thembedtls_cipher_set_padding_mode
to the user. (NOTE: should be applied to both encryption and decryption context a the same time)Steps to reproduce
Minimal demo of the problem
Other information