SQL encryption and ColdFusion

I know how to encrypt data using ColdFusion using AES_128. I also know how to encrypt data using MSSQL AES_128. Does anyone know if it is possible to encrypt data in ColdFusion using AES_128, and then decrypt the string in MSSQL?

I played with him a lot and did not seem to understand him.

Thanks Paul

+6
security coldfusion sql-server cryptography encryption
source share
1 answer

Yes it is possible. There is nothing in AES that makes it proprietary. However, there are many ways to implement block encryption, and most of them are incorrect. MS SQL encryptbykey () uses ECB mode and defaults to ANSI_PADDING. I would try to decrypt the message using the same key with AES in ECB mode and it will most likely work. CBC mode should be used, but this requires IV, and encryptbykey() does not accept the value IV as a parameter, so its ECB mode. (MySQL is also an ecb mode, I looked through the code. I cannot do its shame with MS SQL).

+3
source share

All Articles