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

Forbid v1 & v2 convergent keys in Transit #85

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

cipherboy
Copy link
Member

This prohibits the usage of the nonce field entirely, removing it as an API option from Transit. Similarly in the keysutil backend, v1 & v2 keys are forbidden.

Because this completely removes nonce from the APIs, this results in OpenBao issuing a warning about the unknown parameter via the CLI, but does not fail requests. A nil value for nonce will be passed into the SDK, which will then generate a fresh value (for encryption) or use the value inferred from the ciphertext (for decryption).


Resolves: #37

@cipherboy cipherboy changed the title Forbid v1 & v2 convergent keys Forbid v1 & v2 convergent keys in Transit Feb 1, 2024
naphelps pushed a commit that referenced this pull request Feb 2, 2024
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
naphelps pushed a commit that referenced this pull request Feb 2, 2024
@naphelps naphelps added this to the Alpha milestone Feb 7, 2024
Copy link
Member

@JanMa JanMa left a comment

Choose a reason for hiding this comment

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

Lgtm 👍

@naphelps naphelps self-requested a review February 12, 2024 15:37
This prohibits the usage of the nonce field entirely, removing it as an
API option from Transit. Similarly in the keysutil backend, v1 & v2
keys are forbidden.

Because this completely removes nonce from the APIs, this results in
OpenBao issuing a warning about the unknown parameter via the CLI, but
does not fail requests. A nil value for nonce will be passed into the
SDK, which will then generate a fresh value (for encryption) or use the
value inferred from the ciphertext (for decryption).

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
Copy link
Contributor

@Gabrielopesantos Gabrielopesantos left a comment

Choose a reason for hiding this comment

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

Looks good. Curious, what makes it v1 and v2 convergent keys aren't safe but v3 is? The fact that nonces aren't under user control?

@cipherboy
Copy link
Member Author

Looks good. Curious, what makes it v1 and v2 convergent keys aren't safe but v3 is? The fact that nonces aren't under user control?

Correct. Check this out for details: https://cryptopals.com/sets/8/challenges/63.txt

@naphelps naphelps merged commit 7707e5b into openbao:main Feb 13, 2024
5 of 9 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.

Transit - drop support for pre-v0.6.2 keys
4 participants