C# 클래스 MpcLib.SecretSharing.ShamirSharing

Implemenets the threshold secret sharing scheme based on Adi Shamir's method.
파일 보기 프로젝트 열기: mahdiz/mpclib 1 사용 예제들

공개 메소드들

메소드 설명
CalculateRandomShare ( Zp myShare, IList polyUpdate ) : Zp

The i-th user gets a Qj(i) List from users, each user j calculated Qj(i) - the j element in the List

CheckSharedSecrets ( Zp secret, int numberOfPlayers, int polynomDeg, int prime ) : bool
DetailedShare ( Zp secret, int numPlayers, int polynomDeg ) : ShareDetails

Evaluates the shared secrets of secret with polynom of degree t and numberOfPlayers players.

GetRandomizedShares ( int numPlayers, int polynomDeg, int prime ) : IList

Creates a random poynomial Qj(x), for the j player, and creates a list of elements, such that the i-th element is Qj(i)

GetRandomizedSharesByzantineCase ( int numPlayers, int polynomDeg, int prime ) : IList

Creates a random poynomial Qj(x) ,for the j player,and creates a list of elements, such that the i-th element is Qj(i)

PrimitiveShare ( Zp secret, int numPlayers, int polynomDeg ) : IList
Recombine ( IList sharedSecrets, int polynomDeg, int prime ) : Zp
Recombine ( IList sharedSecrets, int polyDeg, int prime, bool usePrimitiveRecombine ) : Zp

Recombines (interpolate) the secret from secret shares.

Share ( Zp secret, int numPlayers, int polyDeg ) : IList

Calculates the shares of a secret with polynomial of degree t and numPlayers players.

Share ( Zp secret, int numPlayers, int polyDeg, IList &coeffs ) : IList

Calculates the shares of a secret with polynomial of degree t and numPlayers players. The method also returns the array of coefficients of the polynomial.

SimpleRecombine ( IList sharedSecrets, int polyDeg, int prime ) : Zp

비공개 메소드들

메소드 설명
Share ( Zp secret, int numPlayers, int polynomDeg, bool usePrimitiveShare, IList &coeffs ) : IList

Evaluates the shares of secret with polynomial of degree 'polynomDeg' and 'numPlayers' players.

TruncateVector ( Zp vector, int toSize ) : Zp[]

메소드 상세

CalculateRandomShare() 공개 정적인 메소드

The i-th user gets a Qj(i) List from users, each user j calculated Qj(i) - the j element in the List
public static CalculateRandomShare ( Zp myShare, IList polyUpdate ) : Zp
myShare Zp
polyUpdate IList
리턴 Zp

CheckSharedSecrets() 공개 정적인 메소드

public static CheckSharedSecrets ( Zp secret, int numberOfPlayers, int polynomDeg, int prime ) : bool
secret Zp
numberOfPlayers int
polynomDeg int
prime int
리턴 bool

DetailedShare() 공개 정적인 메소드

Evaluates the shared secrets of secret with polynom of degree t and numberOfPlayers players.
public static DetailedShare ( Zp secret, int numPlayers, int polynomDeg ) : ShareDetails
secret Zp
numPlayers int
polynomDeg int
리턴 ShareDetails

GetRandomizedShares() 공개 정적인 메소드

Creates a random poynomial Qj(x), for the j player, and creates a list of elements, such that the i-th element is Qj(i)
public static GetRandomizedShares ( int numPlayers, int polynomDeg, int prime ) : IList
numPlayers int
polynomDeg int
prime int
리턴 IList

GetRandomizedSharesByzantineCase() 공개 정적인 메소드

Creates a random poynomial Qj(x) ,for the j player,and creates a list of elements, such that the i-th element is Qj(i)
public static GetRandomizedSharesByzantineCase ( int numPlayers, int polynomDeg, int prime ) : IList
numPlayers int
polynomDeg int
prime int
리턴 IList

PrimitiveShare() 공개 정적인 메소드

public static PrimitiveShare ( Zp secret, int numPlayers, int polynomDeg ) : IList
secret Zp
numPlayers int
polynomDeg int
리턴 IList

Recombine() 공개 정적인 메소드

public static Recombine ( IList sharedSecrets, int polynomDeg, int prime ) : Zp
sharedSecrets IList
polynomDeg int
prime int
리턴 Zp

Recombine() 공개 정적인 메소드

Recombines (interpolate) the secret from secret shares.
public static Recombine ( IList sharedSecrets, int polyDeg, int prime, bool usePrimitiveRecombine ) : Zp
sharedSecrets IList
polyDeg int
prime int
usePrimitiveRecombine bool
리턴 Zp

Share() 공개 정적인 메소드

Calculates the shares of a secret with polynomial of degree t and numPlayers players.
public static Share ( Zp secret, int numPlayers, int polyDeg ) : IList
secret Zp
numPlayers int
polyDeg int
리턴 IList

Share() 공개 정적인 메소드

Calculates the shares of a secret with polynomial of degree t and numPlayers players. The method also returns the array of coefficients of the polynomial.
public static Share ( Zp secret, int numPlayers, int polyDeg, IList &coeffs ) : IList
secret Zp
numPlayers int
polyDeg int
coeffs IList
리턴 IList

SimpleRecombine() 공개 정적인 메소드

public static SimpleRecombine ( IList sharedSecrets, int polyDeg, int prime ) : Zp
sharedSecrets IList
polyDeg int
prime int
리턴 Zp