Percona-Lab / pg_tde

MIT License
107 stars 19 forks source link

Fix issue-153: Server crash and database corruption #165

Closed codeforall closed 6 months ago

codeforall commented 6 months ago

We can't use the Tuple CID as an IV because it changes when the tuple is deleted. If we have a trigger function that needs the deleted tuple, it will get the wrong IV when decrypting. This happens because the CID used to encrypt the tuple (during INSERT/UPDATE) is different from the CID passed to the decryption function (during delete).

To fix this, we need to stop using the CID for IV calculation.