change the default key type to Ed25519 (#1576)
This commit is contained in:
parent
61f0605279
commit
24b27cc71b
|
@ -56,7 +56,7 @@ var DefaultPeerstore Option = func(cfg *Config) error {
|
||||||
|
|
||||||
// RandomIdentity generates a random identity. (default behaviour)
|
// RandomIdentity generates a random identity. (default behaviour)
|
||||||
var RandomIdentity = func(cfg *Config) error {
|
var RandomIdentity = func(cfg *Config) error {
|
||||||
priv, _, err := crypto.GenerateKeyPairWithReader(crypto.RSA, 2048, rand.Reader)
|
priv, _, err := crypto.GenerateEd25519Key(rand.Reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue