nknorg / nkn-client-js

[Deprecated, use nkn-sdk-js instead] JavaScript implementation of NKN client
https://www.nkn.org
Apache License 2.0
55 stars 19 forks source link

Migrate to Ed25519 key pair #40

Closed yilunzhang closed 5 years ago

yilunzhang commented 5 years ago

Migrate from ECDSA key pair to Ed25519 key pair. Note that this is a breaking change:

  1. All previous key pair will become invalid
  2. Instead of using privateKey to initialized a client, it will now use a seed (also 32 bytes) to initialized a client due to the way Ed25519 works. The seed should be a cryptographically secure random number if generated, and should be kept as safe as private key since private key can be generated from it (but not the opposite).