Skip to content

feat: check column configuration against encrypted column before decrypt#231

Merged
tobyhede merged 1 commit into
feat/proxy-eql-v2-integrationfrom
check-column-configuration-on-decrypt
May 16, 2025
Merged

feat: check column configuration against encrypted column before decrypt#231
tobyhede merged 1 commit into
feat/proxy-eql-v2-integrationfrom
check-column-configuration-on-decrypt

Conversation

@tobyhede
Copy link
Copy Markdown
Contributor

@tobyhede tobyhede commented May 15, 2025

Check the identifier in the returned ciphertext matches the identifier in the column configuration before decryption.
Returns an error if a mismatch is detected.
Helps protect against confused deputy attacks.

@tobyhede tobyhede force-pushed the check-column-configuration-on-decrypt branch 4 times, most recently from 2d9cb7c to 035981d Compare May 15, 2025 08:06
Copy link
Copy Markdown
Contributor

@coderdan coderdan left a comment

Choose a reason for hiding this comment

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

Nice. Looks good to me.
The other part of the confused deputy problem is to include the identifier in the lock context (or in the aad of the local ciphertext at least). Not sure if that's been done/carded up but would be a necessary element.

Comment thread packages/cipherstash-proxy/src/postgresql/backend.rs Outdated
Comment thread packages/cipherstash-proxy/src/postgresql/backend.rs Outdated
@tobyhede tobyhede force-pushed the check-column-configuration-on-decrypt branch from 035981d to 81cff57 Compare May 16, 2025 03:19
@tobyhede tobyhede merged commit a3a2941 into feat/proxy-eql-v2-integration May 16, 2025
@tobyhede tobyhede deleted the check-column-configuration-on-decrypt branch May 16, 2025 03:24
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.

2 participants