ecc

package
v0.0.0-...-bbfb1e9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDH

type ECDH struct {
	X      *big.Int
	Y      *big.Int
	D      []byte
	Public []byte
	// contains filtered or unexported fields
}

func NewECDH

func NewECDH(c elliptic.Curve) *ECDH

func (*ECDH) GenerateKeys

func (e *ECDH) GenerateKeys() error

Set up keys for an instance of ECDH

func (ECDH) GenerateSharedSecret

func (e ECDH) GenerateSharedSecret(x, y *big.Int) ([]byte, error)

Generate a shared secret key based in Public points and it owns secret bytes

func (ECDH) GetPublicKey

func (e ECDH) GetPublicKey() []byte

Return an buffer array with a Public Key

func (*ECDH) SetPrivateKey

func (e *ECDH) SetPrivateKey(data string)

type PublicKey

type PublicKey struct {
	X, Y *big.Int
	Arr  []byte
	// contains filtered or unexported fields
}

Public shared

func NewPuclicKey

func NewPuclicKey(c elliptic.Curve, info []byte) *PublicKey

func (*PublicKey) Parse

func (p *PublicKey) Parse()

Jump to

Keyboard shortcuts

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