jvss

package
v0.0.0-...-53feb6c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2016 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

JVSS provides a threshold signing scheme based on Shamir's joint verifiable secret sharing algorithm and Schnorr signatures. The protocl runs in two phases. During the protocol setup a long-term shared secret is establised between all participants. Afterwards, any of the members can request a signature, which triggers the creation of another, short-term shared secret. Each member then sends its partial signature to the requester which finally puts everything together to get the final Schnorr signature. To verify a given Schnorr signature a member still has to be able to access the long-term shared secret from which that particular signature was created.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJVSS

func NewJVSS(node *sda.TreeNodeInstance) (sda.ProtocolInstance, error)

NewJVSS creates a new JVSS protocol instance and returns it.

func NewSimulation

func NewSimulation(config string) (sda.Simulation, error)

NewSimulation creates a JVSS simulation

Types

type JVSS

type JVSS struct {
	*sda.TreeNodeInstance // The SDA TreeNode
	// contains filtered or unexported fields
}

JVSS is the main protocol struct and implements the sda.ProtocolInstance interface.

func (*JVSS) Sign

func (jv *JVSS) Sign(msg []byte) (*poly.SchnorrSig, error)

Sign starts a new signing request amongst the JVSS group and returns a Schnorr signature on success.

func (*JVSS) Start

func (jv *JVSS) Start() error

Start initiates the JVSS protocol by setting up a long-term shared secret which can be used later on by the JVSS group to sign and verify messages.

func (*JVSS) Verify

func (jv *JVSS) Verify(msg []byte, sig *poly.SchnorrSig) error

Verify verifies the given message against the given Schnorr signature. Returns nil if the signature is valid and an error otherwise.

type SID

type SID string

Type of shared secret identifiers

const (
	LTSS SID = "LTSS"
	STSS SID = "STSS"
)

Identifiers for long- and short-term shared secrets.

type SecConfMsg

type SecConfMsg struct {
	Src int
	SID SID
}

SecConfMsg are used to confirm to other peers that we have finished setting up the shared secret.

type SecInitMsg

type SecInitMsg struct {
	Src  int
	SID  SID
	Deal []byte
}

SecInitMsg are used to initialise new shared secrets both long- and short-term.

type Secret

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

Secret contains all information for long- and short-term shared secrets.

type SigReqMsg

type SigReqMsg struct {
	Src int
	SID SID
	Msg []byte
}

SigReqMsg are used to send signing requests.

type SigRespMsg

type SigRespMsg struct {
	Src int
	SID SID
	Sig *poly.SchnorrPartialSig
}

SigRespMsg are used to reply to signing requests.

type Simulation

type Simulation struct {
	sda.SimulationBFTree
	Verify bool
}

Simulation implements a JVSS simulation

func (*Simulation) Run

func (jvs *Simulation) Run(config *sda.SimulationConfig) error

Run initiates a JVSS simulation

func (*Simulation) Setup

func (jvs *Simulation) Setup(dir string, hosts []string) (*sda.SimulationConfig, error)

Setup configures a JVSS simulation

type WSecConfMsg

type WSecConfMsg struct {
	*sda.TreeNode
	SecConfMsg
}

WSecConfMsg is a SDA-wrapper around SecConfMsg.

type WSecInitMsg

type WSecInitMsg struct {
	*sda.TreeNode
	SecInitMsg
}

WSecInitMsg is a SDA-wrapper around SecInitMsg.

type WSigReqMsg

type WSigReqMsg struct {
	*sda.TreeNode
	SigReqMsg
}

WSigReqMsg is a SDA-wrapper around SigReqMsg.

type WSigRespMsg

type WSigRespMsg struct {
	*sda.TreeNode
	SigRespMsg
}

WSigRespMsg is a SDA-wrapper around SigRespMsg.

Jump to

Keyboard shortcuts

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