crypto

package
v0.0.0-...-377997a Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FOLD int = 16
View Source
const KEYP int = 13
View Source
const N int = 16

Variables

This section is empty.

Functions

func CreateStream

CreateStream initializes a new Shannon-encrypted PacketStream connection from the specified keys and plain connection

func Powm

func Powm(base, exp, modulus *big.Int) *big.Int

func RandomVec

func RandomVec(count int) []byte

Types

type PrivateKeys

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

func GenerateKeys

func GenerateKeys() PrivateKeys

func GenerateKeysFromPrivate

func GenerateKeysFromPrivate(private *big.Int, nonce []byte) PrivateKeys

func (*PrivateKeys) AddRemoteKey

func (p *PrivateKeys) AddRemoteKey(remote []byte, clientPacket []byte, serverPacket []byte) SharedKeys

func (*PrivateKeys) ClientNonce

func (p *PrivateKeys) ClientNonce() []byte

func (*PrivateKeys) Prime

func (p *PrivateKeys) Prime() *big.Int

func (*PrivateKeys) PrivateKey

func (p *PrivateKeys) PrivateKey() *big.Int

func (*PrivateKeys) PubKey

func (p *PrivateKeys) PubKey() []byte

func (*PrivateKeys) SharedKey

func (p *PrivateKeys) SharedKey(publicKey string) []byte

type SharedKeys

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

func (*SharedKeys) Challenge

func (s *SharedKeys) Challenge() []byte

Jump to

Keyboard shortcuts

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