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

Encrypted message lengths are trivially leaked #4140

Closed
AaronFeickert opened this issue May 25, 2022 · 0 comments
Closed

Encrypted message lengths are trivially leaked #4140

AaronFeickert opened this issue May 25, 2022 · 0 comments

Comments

@AaronFeickert
Copy link
Collaborator

AaronFeickert commented May 25, 2022

Message encryption and decryption are performed using the ChaCha20 stream cipher. Because no padding is applied, the length of encrypted messages is trivially leaked, and is equal to the length of the resulting ciphertext. Additionally, header data like the message type is sent in the clear. An adversary may be able to infer additional information from this.

Mitigations include:

  • Fixing the length of all messages, and padding messages to this length
  • Discretizing the length of allowed messages, which may leak less information

It's important to ensure that no padding-related attacks are introduced by such mitigations.

@aviator-app aviator-app bot closed this as completed in b56c63a Aug 3, 2022
sdbondi added a commit to sdbondi/tari that referenced this issue Aug 4, 2022
* development:
  fix: wallet database encryption does not bind to field keys tari-project#4137 (tari-project#4340)
  fix: use SafePassword struct instead of String for passwords (tari-project#4320)
  feat(dan): template macro handles component state (tari-project#4380)
  fix(dht)!: add message padding for message decryption, to reduce message length leaks (fixes tari-project#4140) (tari-project#4362)
  fix(wallet): update seed words for output manager tests (tari-project#4379)
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

No branches or pull requests

1 participant