Whisper v6 remove aesnonce#15578
Merged
Merged
Conversation
Member
Author
|
@gluk256 Unit tests aren't finished yet, they are part of an upcoming commit so don't press the 'accept' button before they are there. |
gluk256
approved these changes
Dec 1, 2017
fjl
reviewed
Dec 5, 2017
Member
Author
There was a problem hiding this comment.
Because the EIP-627 packet codes specifies that:
The message codes reserved for Whisper protocol: 0 - 127. Messages with unknown codes must be ignored, for forward compatibility of future versions.
Support for messages with codes 126 and 127 will be added in subsequent PRs.
Contributor
There was a problem hiding this comment.
This change to EIP was made after discussion with Robert (Parity) several months ago.
Contributor
|
@gballet please run |
Contributor
|
Travis says: |
Contributor
|
This is weird because the diff doesn't actually apply to envelope.go |
The aes nonce is now part of the payload of a symmetric message. Since there is no futher available indication whether a message is symmetric or not, functions isSymmetric and isAsymmetric have been removed and a symmetric topic match will be attempted if the filter is symmetric. Accordingly, other checks have been removed at the top level, because they can no longer be performed until it is known for a fact that the message uses symmetric encryption.
That was left out in the last commit.
There is an ongoing discussion whether this is the proper way to go, as filters implementing both sym and asym keys will see an unsuccessful attempt at an asymmetric decryption be followed by an attempt at a symmetric decription. This is inefficient in that case, which should not happen too often. The alternative is to forbid using filters with both options enabled, and will require updating unit tests.
It has been decided not to allow filters to be both for symmetric and asymmetric keys, because that's already what the API enforces.
a74db4c to
35297a8
Compare
Contributor
|
Rebased. This should be OK now. |
mariameda
pushed a commit
to NiluPlatform/go-nilu
that referenced
this pull request
Aug 23, 2018
As per EIP-627, the salt for symmetric encryption is now part of the payload. This commit does that.
This file contains hidden or 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
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.
As per EIP-627, the Salt for symmetric encryption is now part of the payload. This commit does that.