Is padding oracle attack applicable to data stored on a DB in AES/CBC/PKCS5Padding?
Specifically I would like to be able to use Postgres with pgcrypto https://www.postgresql.org/docs/13/pgcrypto.html#id-1.11.7.34.9 (that currently not support GCM)
The idea is to achieve totally anonymized data, even in the case where an attacker obtain a dump of the db.
Currently I'm using AES/GCM/NoPadding on the application side, but having the opportunity to decrypt directly on database could be helpful.
Having the data stored in db (even with a whole dump of it) I don't see if that "client-server" behavior is applicable, and if there are other known vulnerabilities (maybe unrelated to the padding problem) that I'm not aware of .
– Fabio Bonfante May 10 '21 at 08:18As we can see the attacker needs an oracle to execute the padding oracle attack. Data on-rest or encrypted databases has no oracle. Therefore they are not vulnerable to padding oracle attacks.
Don't you see that the Database doesn't decrypt the data, the client gets the data and decrypt. If you fear that the server tries to padding oracle on the client, than this may be your least problem. – kelalaka May 10 '21 at 08:22