-
Notifications
You must be signed in to change notification settings - Fork 221
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
WIP: Validate before dedup #3450
Closed
Impala123
wants to merge
12
commits into
tari-project:development
from
Impala123:validate_before_dedup
Closed
WIP: Validate before dedup #3450
Impala123
wants to merge
12
commits into
tari-project:development
from
Impala123:validate_before_dedup
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nice - looking good. I've tested with the There are two more items to call this done (they can go in a subsequent PR if preferred):
|
aviator-app bot
pushed a commit
that referenced
this pull request
Oct 18, 2021
Description --- - reorders the DHT messaging layers to validate the message before entering the dedup store. - adds the origin_mac to the dedup hash This PR was written by @Impala123, I finished off a rust integration test Motivation and Context --- From original PR: #3450 > With the current order of layers, a malicious node could tamper with a message which would then be discarded by the > validation layer. However the dedup cache currently stores this before it is discarded by validate. Thus any un-tampered > version of the same message would no longer be processed. A valid origin mac means the message comes from the possessor of the private key and has not been altered. The valid origin mac bytes are included in the dedup hash preimage so that the origin of the message (if any) is tied to the dedup entry. Previously, an attacker could craft a message `A'` that had no/different valid origin MAC but the same body and cause a subsequent message `A` to not to be discarded as a duplicate. How Has This Been Tested? --- Rust integration test memorynet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Reorder the layers to do validate / decrypt before dedup.
Motivation and Context
With the current order of layers, a malicious node could tamper with a message which would then be discarded by the validation layer. However the dedup cache currently stores this before it is discarded by validate. Thus any un-tampered version of the same message would no longer be processed.
How Has This Been Tested?
WIP, compiles but test fails, presumably because of the mockup message being invalid