crypto/ed25519: Remove privkey.Generate method (#2022)

The privkey.Generate method here was a custom-made method for deriving
a private key from another private key. This function is currently
not used anywhere in our codebase, and has not been reviewed enough
that it would be secure to use. This removes that method. We should
adopt the official ed25519 HD derivation once that has been standardized,
in order to fulfill this need.

closes #2000
This commit is contained in:
Dev Ojha
2018-07-23 04:35:13 -07:00
committed by Anton Kaliaev
parent e36ce6f893
commit eb7dea1b0d
2 changed files with 0 additions and 31 deletions

View File

@@ -9,16 +9,6 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
)
func TestGeneratePrivKey(t *testing.T) {
testPriv := ed25519.GenPrivKey()
testGenerate := testPriv.Generate(1)
signBytes := []byte("something to sign")
pub := testGenerate.PubKey()
sig, err := testGenerate.Sign(signBytes)
assert.NoError(t, err)
assert.True(t, pub.VerifyBytes(signBytes, sig))
}
func TestSignAndValidateEd25519(t *testing.T) {
privKey := ed25519.GenPrivKey()