-
Notifications
You must be signed in to change notification settings - Fork 19
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
Change key gen algo #113
Change key gen algo #113
Conversation
cli.go
Outdated
if err != nil { | ||
logger.Fatalf("Failed to request PID from RPC server, err: %v", rpcAddr, err) | ||
} | ||
logger.Debugf("rpcclient:ShowPID: result=%v", res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it will be more appropriate to print the result to the stdout
logger.Debugf("rpcclient:ShowPID: result=%v", res) | |
peerIDStr := marshalToJSONString(res.PID) | |
fmt.Println(peerIDStr) |
pb/rpc/rpc.proto
Outdated
message RPCShowPIDRequest { | ||
} | ||
message RPCShowPIDResponse { | ||
string PID = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind follow the convention to use
string PID = 1; | |
string peerID = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What was wrong?
Fix #100
(RSA provided by Go Crypto package prevents deterministic key generation, see: https://github.com/golang/go/blob/6269dcdc24d74379d8a609ce886149811020b2cc/src/crypto/rsa/rsa.go#L223)
How was it fixed?
Was instead trying to remove
seed
all at once but found that ECDSA provided can do deterministic key generation.Cute Animal Picture