Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

codeforall
Copy link
Contributor

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.

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.
@codeforall codeforall merged commit 50b55b7 into percona:main Apr 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants