microsoft / go-crypto-openssl

Go crypto backend for Linux using OpenSSL
MIT License
55 stars 14 forks source link

Disable padding detection when decrypting with AES #47

Closed qmuntal closed 1 year ago

qmuntal commented 1 year ago

This PR fix an issue affecting certain AES decryption usages, where OpenSSL incorrectly detects the data to decrypt as padded and generates an incorrect plaintext.

Found this while running golang.org/x/crypto tests using our Go toolchain with the OpenSSL backend.

I've added a couple of test to ensure we don't regress this. The new tests are in its own module to not pollute the main module dependency graph.