Skip to content

whisper: sym encryption message padding includes salt#15631

Merged
fjl merged 2 commits into
ethereum:masterfrom
gballet:whisper-v6-sym-padding
Dec 11, 2017
Merged

whisper: sym encryption message padding includes salt#15631
fjl merged 2 commits into
ethereum:masterfrom
gballet:whisper-v6-sym-padding

Conversation

@gballet
Copy link
Copy Markdown
Member

@gballet gballet commented Dec 8, 2017

Now that the AES salt has been moved to the payload, padding must be adjusted to hide it, lest an attacker guesses that the packet uses symmetric encryption.

@gballet gballet requested a review from gluk256 December 8, 2017 19:44
Comment thread whisper/whisperv6/message.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is true only for symmetric encryption

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If Src is nil, then it's using symmetric encryption

Copy link
Copy Markdown
Contributor

@gluk256 gluk256 Dec 9, 2017

Choose a reason for hiding this comment

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

Src is used to identify the source of the message, i.e. for digital signature. Dst is used for asymmetrc encryption. And KeySym is used for symmetric encryption. So, you can change line 127 like this:
} else if params.KeySym != nil {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well then it's very confusing. Then both sym and asym should be able to sign their messages. So it should be if and not else if

@gballet gballet force-pushed the whisper-v6-sym-padding branch from e8b755a to 3f8f954 Compare December 10, 2017 19:55
@fjl fjl merged commit e7610ea into ethereum:master Dec 11, 2017
@karalabe karalabe added this to the 1.8.0 milestone Dec 14, 2017
b00ris pushed a commit to b00ris/go-ethereum that referenced this pull request Jan 19, 2018
Now that the AES salt has been moved to the payload, padding must
be adjusted to hide it, lest an attacker guesses that the packet
uses symmetric encryption.
mariameda pushed a commit to NiluPlatform/go-nilu that referenced this pull request Aug 23, 2018
Now that the AES salt has been moved to the payload, padding must
be adjusted to hide it, lest an attacker guesses that the packet
uses symmetric encryption.
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.

4 participants