This repository was archived by the owner on Aug 2, 2021. It is now read-only.
swarm/pss: refactoring#1222
Closed
gluk256 wants to merge 3 commits intoethersphere:masterfrom
Closed
Conversation
nolash
suggested changes
Feb 14, 2019
Contributor
nolash
left a comment
There was a problem hiding this comment.
Is all of the code in keystore.go copy from pss.go or has it been changed? Is it possible to indicate where changes have been made if not, please?
| symKeyDecryptCacheCursor int // modular cursor pointing to last used, wraps on symKeyDecryptCache array | ||
| } | ||
|
|
||
| func newKeyStore() *KeyStore { |
Contributor
There was a problem hiding this comment.
this should probably be loadKeyStore() since we plan to be able to keep it across sessions. And it should probably take filename.
| } | ||
|
|
||
| // Automatically generate a new symkey for a topic and address hint | ||
| func (p *Pss) GenerateSymmetricKey(topic Topic, address PssAddress, addToCache bool) (string, error) { |
Contributor
There was a problem hiding this comment.
Shouldn't this method also be in keystore?
| @@ -603,161 +562,26 @@ func (p *Pss) SetSymmetricKey(key []byte, topic Topic, address PssAddress, addto | |||
|
|
|||
| func (p *Pss) setSymmetricKey(key []byte, topic Topic, address PssAddress, addtocache bool, protected bool) (string, error) { | |||
Contributor
There was a problem hiding this comment.
Shouldn't this also in keystore?
| // | ||
| // Returns a symmetric key byte sequence stored in the whisper backend by its unique id | ||
| // Passes on the error value from the whisper backend | ||
| func (p *Pss) GetSymmetricKey(symkeyid string) ([]byte, error) { |
| } | ||
| } | ||
| return | ||
| return p.processSymMsg(p.w, envelope) |
Contributor
There was a problem hiding this comment.
Shouldnt we get the key from the store instead and decrypt?
nolash
suggested changes
Feb 15, 2019
nolash
approved these changes
Feb 15, 2019
zelig
approved these changes
Feb 16, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
split pss and keystore.
keystore-related code moved to a separate file.
fixes #1214