C# Class MpcLib.MpcProtocols.Bgw.ByzantineBgwProtocol

Inheritance: BgwProtocol
ファイルを表示 Open project: mahdiz/mpclib

Protected Properties

Property Type Description
BadPlayers HashSet
CallerProtocol ByzantineBgwProtocol
MyInputShares IList

Private Properties

Property Type Description
ConstructRxPolynomial IList
CreateWantedPolynomials bool
GetMultStepCoeffsForCheaters IList
GetNumberOfComplaints int
IsMultStepPolynomialLegal bool
IsMultStepShareLegal bool
IsNewPublicDataContradictOld bool
IsPolynomialLegal bool
IsPublicDataContradictPrivate bool
IsRecvShareLegal bool
ReceiveVerifications void
RemoveCheaterPlayer void
SendVerifications void
ShareSimple void
ShareSimple void
UpdateRecvShare void

Public Methods

Method Description
ByzantineBgwProtocol ( AsyncParty e, Circuit circuit, ReadOnlyCollection playerIds, Zp playerInput, StateKey stateKey ) : System
ReductionRandomizationStep ( Zp a, Zp b, Zp ab ) : Zp

Implementation according to GRR.

Run ( ) : void
RunReductionRandomization ( Zp ab ) : void

Implementation according to Ran Canetti

Protected Methods

Method Description
CompareCoordianteList ( List f_iValues, IList g_jValues ) : IList
FilterPlayers ( IList players ) : void
GetRecombinedResult ( IList recvList, int prime ) : Zp
GetVerifShareMessages ( IList zPs, int playerToVerify, bool receivedGoodPoly ) : IList>
HandleDealer ( IList shareMySecrets, Zp recvSecretShare_i ) : void
HandleNotDealer ( bool isOrigPolyLegal, IList wrongCoordinatesList, int playerToVerify, Zp recvSecretShare_i, SecretPolynomials secretPoly_i ) : void
IsSecretPolynomialsLegal ( SecretPolynomials secretPolynomial ) : bool

Checks if the received polynomials are not null, from the right size and have no null elements */

Private Methods

Method Description
ConstructRxPolynomial ( ShareDetails aSharesDetails, ShareDetails bSharesDetails, ShareDetails abSharesDetails, ShareDetails rSharesDetails ) : IList
CreateWantedPolynomials ( IList wantedPolysList, IList complaintesOnMe, IList shareMySecrets ) : bool
GetMultStepCoeffsForCheaters ( int j ) : IList
GetNumberOfComplaints ( IList complaints ) : int
IsMultStepPolynomialLegal ( MultStepVerificationPoly recvVerifcationPolynomial ) : bool
IsMultStepShareLegal ( MultStepBCaseShare recvShareFromPlayer_i, MultStepVerificationPoly recvVerifcationPolynomial ) : bool
IsNewPublicDataContradictOld ( IList oldPublicData, IList newPublicData ) : bool
IsPolynomialLegal ( IList polynomial, int polySize ) : bool
IsPublicDataContradictPrivate ( SecretPolynomials myRecvPolys, IList recvPublicPolysList, IList recvComplaintesList, Zp myRecvShare ) : bool
IsRecvShareLegal ( MultStepBCaseShare recvShareFromPlayer ) : bool
ReceiveVerifications ( List verifShares, List inputShares ) : void
RemoveCheaterPlayer ( int playerToVerify ) : void
SendVerifications ( IEnumerable recvShares ) : void
ShareSimple ( IList sharedSecrets, Stage targetStage ) : void
ShareSimple ( Zp sharedSecrets, Stage targetStage ) : void
UpdateRecvShare ( IList recvPublicPolysList, Zp recvSecretShare_i ) : void

Method Details

ByzantineBgwProtocol() public method

public ByzantineBgwProtocol ( AsyncParty e, Circuit circuit, ReadOnlyCollection playerIds, Zp playerInput, StateKey stateKey ) : System
e AsyncParty
circuit MpcLib.Common.FiniteField.Circuits.Circuit
playerIds ReadOnlyCollection
playerInput Zp
stateKey StateKey
return System

CompareCoordianteList() protected method

protected CompareCoordianteList ( List f_iValues, IList g_jValues ) : IList
f_iValues List
g_jValues IList
return IList

FilterPlayers() protected method

protected FilterPlayers ( IList players ) : void
players IList
return void

GetRecombinedResult() protected method

protected GetRecombinedResult ( IList recvList, int prime ) : Zp
recvList IList
prime int
return Zp

GetVerifShareMessages() protected method

protected GetVerifShareMessages ( IList zPs, int playerToVerify, bool receivedGoodPoly ) : IList>
zPs IList
playerToVerify int
receivedGoodPoly bool
return IList>

HandleDealer() protected method

protected HandleDealer ( IList shareMySecrets, Zp recvSecretShare_i ) : void
shareMySecrets IList
recvSecretShare_i Zp
return void

HandleNotDealer() protected method

protected HandleNotDealer ( bool isOrigPolyLegal, IList wrongCoordinatesList, int playerToVerify, Zp recvSecretShare_i, SecretPolynomials secretPoly_i ) : void
isOrigPolyLegal bool
wrongCoordinatesList IList
playerToVerify int
recvSecretShare_i Zp
secretPoly_i MpcLib.MpcProtocols.Bgw.Vss.SecretPolynomials
return void

IsSecretPolynomialsLegal() protected method

Checks if the received polynomials are not null, from the right size and have no null elements */
protected IsSecretPolynomialsLegal ( SecretPolynomials secretPolynomial ) : bool
secretPolynomial MpcLib.MpcProtocols.Bgw.Vss.SecretPolynomials
return bool

ReductionRandomizationStep() public method

Implementation according to GRR.
public ReductionRandomizationStep ( Zp a, Zp b, Zp ab ) : Zp
a Zp
b Zp
ab Zp
return Zp

Run() public method

public Run ( ) : void
return void

RunReductionRandomization() public method

Implementation according to Ran Canetti
public RunReductionRandomization ( Zp ab ) : void
ab Zp
return void

Property Details

BadPlayers protected_oe property

protected HashSet BadPlayers
return HashSet

CallerProtocol protected_oe property

protected ByzantineBgwProtocol,MpcLib.MpcProtocols.Bgw CallerProtocol
return ByzantineBgwProtocol

MyInputShares protected_oe property

Shares of my input that are calculated during the input stage.
protected IList MyInputShares
return IList