🔑 Structures for safe handling of Ed25519 keys
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
README.md
ed25519.go
ed25519_test.go
eddsa.go

README.md

eddsa

GoDoc Build Status

crypto/rsa and crypto/ecdsa provide PublicKey and PrivateKey structures which can be used to unambiguously represent RSA and ECDSA keys.

There is an implementation of Ed25519 for Go, but it provides basic functions which take pointers to fixed-length arrays. It is undesirable for code which does type-switches on interface{} values to have to assume that a value of type *[32]byte is an Ed25519 public key and a value of type *[64]byte is an Ed25519 private key.

This package wraps agl/ed25519 with a saner interface much more like crypto/rsa, crypto/ecdsa and crypto/elliptic, while still allowing you to get the public and private keys as pointers to fixed-length arrays if you need to.

It is designed to allow other curves to be implemented in future, such as Curve448. In this regard, the design of this package closely follows crypto/elliptic.

Licence

© 2015 Hugo Landau <hlandau@devever.net>  MIT License