protocol

package
v0.0.0-...-83e1d0d Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const NameHashPrivate = "HashPrivate"

NameHashPrivate is the protocol identifier string

View Source
const NameHashPublic = "HashPublic"

NameHashPublic is the protocol identifier string

Variables

This section is empty.

Functions

func NewHashPrivateProtocol

func NewHashPrivateProtocol(n *onet.TreeNodeInstance) (onet.ProtocolInstance, error)

NewHashPrivateProtocol returns a HashPrivateProtocol with the necessary information and the right channels initialized

func NewHashPublicProtocol

func NewHashPublicProtocol(n *onet.TreeNodeInstance) (onet.ProtocolInstance, error)

NewHashPublicProtocol returns a HashPublicProtocol with the right channels initialized

Types

type ConodeResponse

type ConodeResponse struct {
	PublicKey     kyber.Point
	EncryptedHash []byte
	Nonce         []byte
}

ConodeResponse is a data structure used by the leader of the protocol to send the encrypted hashes and the nonces of all conodes to the client

type HashPrivate

type HashPrivate struct {
	*onet.TreeNodeInstance
	// resource's URL
	URL string
	// public keys provided by the server
	ClientPublicKeys map[string]kyber.Point
	// map of encrypted hashes received from every server
	Responses map[string]*ConodeResponse

	// the channel that indicates if we are finished or not
	Finished chan bool
	// contains filtered or unexported fields
}

HashPrivate is the core structure of the protocol, holding all the necessary information

func (*HashPrivate) Dispatch

func (h *HashPrivate) Dispatch() error

Dispatch will listen on the two channels we user

func (*HashPrivate) Start

func (h *HashPrivate) Start() error

Start is executed by the root to start the protocol, by checking that all the needed parameters have been initialized and by handling the announcement for the root itself

type HashPrivateAnnouncement

type HashPrivateAnnouncement struct {
	URL              string
	ClientPublicKeys map[string]kyber.Point
}

HashPrivateAnnouncement is sent down the tree by the leader to start a new HashPrivate protocol

type HashPrivateResponse

type HashPrivateResponse struct {
	PublicKey     kyber.Point
	EncryptedHash []byte
	Nonce         []byte
}

HashPrivateResponse contains the encrypted hash and its signature and is sent by every conode to the root

type HashPublic

type HashPublic struct {
	*onet.TreeNodeInstance
	// resource's URL
	URL string
	// nonce received from the client
	Nonce []byte
	// map of conode responses indexed by the public key of the worker
	Responses map[string]*HashPublicResponse

	// the channel that indicates if we are finished or not
	Finished chan bool
	// contains filtered or unexported fields
}

HashPublic is the core structure of the protocol, holding all the necessary information

func (*HashPublic) Dispatch

func (h *HashPublic) Dispatch() error

Dispatch will listen on the two channels we use

func (*HashPublic) Start

func (h *HashPublic) Start() error

Start is executed by the root to start the protocol, by checking that all the needed parameters have been initialized and by handling the announcement for the root itself

type HashPublicAnnouncement

type HashPublicAnnouncement struct {
	URL               string
	ClientContentHash []byte
	Nonce             []byte
}

HashPublicAnnouncement is sent down the tree by the root to propagate the hash received by the client to other conodes

type HashPublicResponse

type HashPublicResponse struct {
	PublicKey kyber.Point
	Hash      []byte
	Signature []byte
}

HashPublicResponse send by every conode to the root

Jump to

Keyboard shortcuts

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