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

Rijndael encryption service: Possible data corruption when using rotating encryption keys v3.3.x #3010

Merged
merged 2 commits into from Oct 21, 2015

Conversation

ramonsmits
Copy link
Member

Summary

We have discovered a scenario with the current implementation of property encryption that might lead to data corruption (this is NOT a security issue).

The issue affects all versions of NServiceBus that have the Rijndael encryption service when multiple encryption keys are used.

Along with fixing this bug, we are also taking this opportunity to improve the capability of the property encryption feature.

Issues

Changes

In this patch release, we addressed these issues:

  • When encrypted messages are sent the endpoint includes a key identification in the message header. The receiver will use this header to select the correct key for decryption.
  • The similarity check is removed to prevent false positives.

How to know if you might be affected

You might be affected if you use Rijndael message property encryption and have multiple keys configured at the same time, or you change your encryption keys over time.

The probability of data corruption increases for failed messages that remain in the error queue when the security key changes. When an old message is retried, get decrypted with the newer key first. If this attempt succeeds, then the decrypted data will get corrupted.

Upgrade guidance

The Encryption key identifiers upgrade
document describes:

  • Upgrade steps
  • Compatibility
  • Configuration changes
  • Generating new keys
  • Locating possible corrupted data

Documentation

Background

Every time some value is encrypted we make use of a new random initialization vector (IV). It can happen that an IV in combination with a piece of data can be successfully decrypted with an incorrect key, resulting in corrupted data. In such a case there is no way of knowing if data is corrupt or not.

Connects to Particular/PlatformDevelopment#423

Fixes: #3017 #3018

@ramonsmits ramonsmits self-assigned this Oct 15, 2015
@ramonsmits ramonsmits added this to the 3.3.17 milestone Oct 15, 2015
@ramonsmits ramonsmits force-pushed the hotfix-3.3.17 branch 2 times, most recently from ef2c3e2 to 853b172 Compare October 16, 2015 15:16
@ramonsmits ramonsmits changed the title Hotfix 3.3.17 Rijndael encryption service: Possible data corruption when using rotating encryption keys v3.3.x Oct 16, 2015
@ramonsmits ramonsmits force-pushed the hotfix-3.3.17 branch 4 times, most recently from f5a9aec to 8b704bb Compare October 19, 2015 13:29
@ramonsmits ramonsmits merged commit 78cee67 into support-3.3 Oct 21, 2015
@ramonsmits ramonsmits added the Bug label Oct 21, 2015
@ramonsmits ramonsmits deleted the hotfix-3.3.17 branch November 30, 2015 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant