keys

package
v0.0.0-...-b149aee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeECDSAPrivateKey

func DecodeECDSAPrivateKey(b []byte) (*ecdsa.PrivateKey, error)

func DecodeECDSAPublicKey

func DecodeECDSAPublicKey(b []byte) (*ecdsa.PublicKey, error)

func ECDSAPublicKeyToString

func ECDSAPublicKeyToString(key ecdsa.PublicKey) string

func EncodeECDSAPrivateKey

func EncodeECDSAPrivateKey(key *ecdsa.PrivateKey) ([]byte, error)

func EncodeECDSAPublicKey

func EncodeECDSAPublicKey(key *ecdsa.PublicKey) ([]byte, error)

func EqualECDSAPrivateKeys

func EqualECDSAPrivateKeys(k1, k2 *ecdsa.PrivateKey) (bool, error)

func GenerateECDSA

func GenerateECDSA() (*ecdsa.PrivateKey, error)

For now, ECDSA keys generated by Gitchain use the P-256 curve There are different opinions about what curves to use:

http://safecurves.cr.yp.to/
http://infosecurity.ch/20100926/not-every-elliptic-curve-is-the-same-trough-on-ecc-security/
http://www.hyperelliptic.org/tanja/vortraege/20130531.pdf

For now I decided to stick to one used in Bitcoin (secp256k1)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL