dh

package
v0.0.0-...-520ca25 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2017 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	P *big.Int // modulus
	G *big.Int // generator
}

type PrivateKey

type PrivateKey struct {
	X *big.Int
	Params
	PublicKey
}

func GenerateKey

func GenerateKey(random io.Reader, bits int, params Params) (priv *PrivateKey, err error)

func (*PrivateKey) SharedSecret

func (priv *PrivateKey) SharedSecret(pub PublicKey) *SharedSecret

type PublicKey

type PublicKey struct {
	Y *big.Int
}

type SharedSecret

type SharedSecret struct {
	ZZ *big.Int
}

Jump to

Keyboard shortcuts

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