0
votes

I'm using MySQL v5.7.17.

I'm trying to decrypt data I encrypted via Ruby using the aes-256-gcm algorithm.

So far I have this:

SELECT AES_DECRYPT(UNHEX(@encrypted_account_number), @key, @encrypted_account_number_iv);

Which would work, however is returning NULL because the encryption mode is does not match with what I used to encrypt. I did some research and apparently MySQL does not support aes-256-gcm.

Is that true? If so, is there any way around it?

BTW - this is the command I'm using to switch between encryption modes:

SET @@session.block_encryption_mode = 'aes-256-ctr';

Thanks a lot!

1

1 Answers

0
votes

mysql currently does not support ctr and ctr based modes like gcm, so I fear you will have to do this outside of your dbms.

http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_block_encryption_mode