kx

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGroup1

func GetGroup1() (out *big.Int)

func GetGroup14

func GetGroup14() (out *big.Int)

func GetGroup2

func GetGroup2() (out *big.Int)

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

func GetGroup

func GetGroup(gID int) (group *Group, err error)

GetGroup returns a Diffie Hellman group by its ID as defined in RFC2409 and 3526 an id of 0 will select the recommended group 14

func (*Group) ComputeKey

func (grp *Group) ComputeKey(pubkey *Key, privkey *Key) (key *Key, err error)

func (*Group) G

func (grp *Group) G() (g *big.Int)

func (*Group) GenPrivKey

func (grp *Group) GenPrivKey() (key *Key, err error)

func (*Group) P

func (grp *Group) P() (p *big.Int)

type Key

type Key struct {
	// contains filtered or unexported fields
}

func NewPubKey

func NewPubKey(b []byte) (out *Key)

func (*Key) Bytes

func (k *Key) Bytes() (out []byte)

func (*Key) IsPrivKey

func (k *Key) IsPrivKey() bool

func (*Key) String

func (k *Key) String() (out string)

Jump to

Keyboard shortcuts

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