p2p

package
v0.0.0-...-19c2005 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(s string) kyber.Scalar

Types

type EncryptionKey

type EncryptionKey interface {
	Keys
	Encrypt(msg interface{})
	Decrypt(msg interface{})
}

type Key

type Key interface {
	String() string
	Bytes() ([]byte, error)
	Hex() string
}

type Keys

type Keys interface {
	GenerateNewKeyPair()
	LoadFromDisk()
	WriteToDisk()
}

type P2PKeys

type P2PKeys interface {
	Keys
	KeyPair() p2pKeyPair
}

func NewP2PKeys

func NewP2PKeys() P2PKeys

type P2PPrivateKey

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

func (P2PPrivateKey) Bytes

func (priv P2PPrivateKey) Bytes() ([]byte, error)

func (P2PPrivateKey) Hex

func (priv P2PPrivateKey) Hex() string

func (P2PPrivateKey) Sign

func (priv P2PPrivateKey) Sign(message string) P2pSignature

func (P2PPrivateKey) String

func (priv P2PPrivateKey) String() string

type P2PPublicKey

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

func (P2PPublicKey) Bytes

func (pub P2PPublicKey) Bytes() ([]byte, error)

func (P2PPublicKey) Hex

func (pub P2PPublicKey) Hex() string

func (P2PPublicKey) String

func (pub P2PPublicKey) String() string

func (P2PPublicKey) Verify

func (pub P2PPublicKey) Verify(m string, S P2PSignature) bool

m: Message s: Signature y: Public key

type P2PSignature

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

func (P2PSignature) GetPublicKey

func (s P2PSignature) GetPublicKey(message string) kyber.Point

func (P2PSignature) GetSig

func (s P2PSignature) GetSig() P2PSignature

func (P2PSignature) String

func (S P2PSignature) String() string

type P2pSignature

type P2pSignature interface {
	GetPublicKey(message string) kyber.Point
	GetSig() P2PSignature
}

type PrivateKey

type PrivateKey Key

type PublicKey

type PublicKey Key

type SignKey

type SignKey interface {
	Keys
	Sign(msg interface{})
	VerifySignature()
}

Jump to

Keyboard shortcuts

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