crypto

package
v0.0.0-...-fcfe891 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 10 Imported by: 3

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