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

Also use the CommandID in tuple IVs #119

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Feb 19, 2024

Currently tupple iv calculatino is based only on the CTID, which means that when postgres reuses the same address, it also reuses the same IV. This makes our encryption theoretically weaker, in case of some unlikely but not impossible attack scenarios.

As an improvement this commit also adds the command id into the calculation. As the (ctid, cid) pair will be basically always unique, this solves the problem.

Fixes #112

Currently tupple iv calculatino is based only on the CTID, which
means that when postgres reuses the same address, it also reuses
the same IV. This makes our encryption theoretically weaker, in
case of some unlikely but not impossible attack scenarios.

As an improvement this commit also adds the command id into the
calculation. As the (ctid, cid) pair will be basically always
unique, this solves the problem.

Fixes percona#112
Copy link
Collaborator

@codeforall codeforall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codeforall codeforall merged commit 87d1329 into percona:main Feb 27, 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
Development

Successfully merging this pull request may close these issues.

Repeated use of AES-CTR on the same block is vulnerable to a chosen-plaintext attack
3 participants