You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
541 B

  1. package sr25519
  2. import (
  3. "github.com/tendermint/tendermint/crypto"
  4. tmjson "github.com/tendermint/tendermint/libs/json"
  5. )
  6. var _ crypto.PrivKey = PrivKey{}
  7. const (
  8. PrivKeyName = "tendermint/PrivKeySr25519"
  9. PubKeyName = "tendermint/PubKeySr25519"
  10. // SignatureSize is the size of an Edwards25519 signature. Namely the size of a compressed
  11. // Sr25519 point, and a field element. Both of which are 32 bytes.
  12. SignatureSize = 64
  13. )
  14. func init() {
  15. tmjson.RegisterType(PubKey{}, PubKeyName)
  16. tmjson.RegisterType(PrivKey{}, PrivKeyName)
  17. }