EttienneL5 / ESP32-AES-256-Encryption

This is a working example of the AES256 encryption method
2 stars 0 forks source link

Does the code use PKCS#5 or PKCS#7? #1

Open EgnionInnovation opened 2 months ago

EgnionInnovation commented 2 months ago

Hey, thanks for this awesome repo. I want to use PKCS#7, so I just want to make sure whether the code used #5 or #7. If it uses #5, then how to change it to #7?

Thanks in advance!

EttienneL5 commented 2 months ago

Hi, Mine is based off of the following - https://www.cryptosys.net/pki/manpki/pki_paddingschemes.html

So #5,

The current code is hardcoded for #5 padding and not #7 but they are very similar. mine just fills the last byte if its empty or has unassigned bits, i fill it. Because the two padding methods are so close i chose to use 5 but this is more than secure for any application. I use it for sending information over LoRa/HTTP API/NRF24L01 Radio and a few more. This method works great and its overkill for the device and what is required by my client.

thanks for the question