omkarium / byte-aes

byte-aes is a simple wrapper around the popular aes crate. The goal is to perform Encrypt and Decrypt operations using the Advanced Encryption Standard 256 bit Algorithm conveninent to use instead of use Low level functions of the aes crate
Apache License 2.0
0 stars 1 forks source link

use PKCS#7 to avoid that zero data are unrevertable #2

Closed xmh0511 closed 8 months ago

omkarium commented 8 months ago

@xmh0511 Hi, Nice work! Thanks for your taking time and making it more integrative as a library. Surely this would break the Rufendec project a little, but I can adjust that. I have reviewed your changes on a surface level. Some changes were cosmetic (possibly could have occurred due to your code editor formatting), and some were "Nice to Have" things like the String to &str, and use of Generic From Traits, but I liked how you took your time to fix the core problem with PKCS padding

I won't go through each and every piece but I will test the overall build and get back to you. Thanks again.

xmh0511 commented 8 months ago

@omkarium Hi, I have an idea for your library. Since its version is 0.2.0, it has time to refine the design, in the current, the data is saved in the structure, however, it's not necessary, we just need to design a struct Aes256Cryptor to save the key, and that struct has encrypt and decrypt methods, that's sufficient, and under this design, we can send the cryptor to anywhere we want and then use it to en/decrypt any data.

omkarium commented 8 months ago

@xmh0511 Yeah, we can improve it. Can you create a new feature request on github issues. Also, let me know if I should publish this version to Crates.io.

xmh0511 commented 8 months ago

@omkarium I have created the new PR to refine the code, please see that PR, if you would appreciate the new version, then publish the latest one after merging the PR. Thanks.