Skip to content

Tag SecretKey export as distinct type#67

Open
mratsim wants to merge 2 commits intomasterfrom
security-improvement
Open

Tag SecretKey export as distinct type#67
mratsim wants to merge 2 commits intomasterfrom
security-improvement

Conversation

@mratsim
Copy link
Contributor

@mratsim mratsim commented Jul 24, 2020

This follows a discussion with an auditor on ED25519 in libp2p.

We need to use all measures possible to prevent leaking private keys, hence I recommend that all private keys use distinct byte.
We should also prevent toHex, == on them or for toHex output a SecretHex / SecretString.

In nim-beacon-chain this should prevent introducing private key logging by mistake:
https://github.com/status-im/nim-beacon-chain/blob/40c2714ff30c811978fcc234f438ddd473851009/beacon_chain/spec/crypto.nim#L312-L314

Even though some thoughts was given to prevent that:
https://github.com/status-im/nim-beacon-chain/blob/40c2714ff30c811978fcc234f438ddd473851009/beacon_chain/spec/crypto.nim#L186-L187

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.

1 participant