Versions in this module Expand all Collapse all v1 v1.0.0 Nov 9, 2021 Changes in this version + var ErrorBiprimalityTestFailed = errors.New(...) + var SMALL_PRIMES = [...]int64 + func NewKeyGenerationProtocol(params KeyGenerationParameters) (*KeyGenerationStage1, []*KeyGenerationMessage1, error) + type KeyGenerationMessage1 struct + From int + ShareOfTermOfP secret.Share + ShareOfTermOfQ secret.Share + ShareOfZero secret.Share + To int + type KeyGenerationMessage2 struct + From int + ShareOfN secret.Share + To int + type KeyGenerationMessage3 struct + From int + N *big.Int + TestElements []*big.Int + To int + type KeyGenerationMessage4 struct + From int + TestResponses []*big.Int + To int + type KeyGenerationMessage5 struct + From int + ShareOfTermOfB secret.Share + ShareOfTermOfL secret.Share + To int + type KeyGenerationMessage6 struct + From int + ShareOfTheta secret.Share + To int + type KeyGenerationParameters struct + BiprimalityCheckTimes int + NumProcessors int + NumberOfParticipants int + PaillierBitSize int + ParticipantIndex int + SecretSharingDegree int + SecretSharingModulus *big.Int + SecretSharingStatisticalSecurity int + func (p *KeyGenerationParameters) Validate() error + func (params *KeyGenerationParameters) MarshalJSON() ([]byte, error) + type KeyGenerationStage1 struct + MessageToSelf *KeyGenerationMessage1 + Parameters *KeyGenerationParameters + TermOfP *big.Int + TermOfQ *big.Int + func (kgs *KeyGenerationStage1) Advance(messages []*KeyGenerationMessage1) (*KeyGenerationStage2, []*KeyGenerationMessage2, error) + type KeyGenerationStage2 struct + Parameters *KeyGenerationParameters + ShareOfN secret.Share + TermOfP *big.Int + TermOfQ *big.Int + func (kgs *KeyGenerationStage2) Advance(messages []*KeyGenerationMessage2) (*KeyGenerationStage3, []*KeyGenerationMessage3, error) + type KeyGenerationStage3 struct + N *big.Int + Parameters *KeyGenerationParameters + TermOfP *big.Int + TermOfQ *big.Int + TestElements []*big.Int + func (kgs *KeyGenerationStage3) Advance(messages []*KeyGenerationMessage3) (*KeyGenerationStage4, []*KeyGenerationMessage4, error) + type KeyGenerationStage4 struct + N *big.Int + Parameters *KeyGenerationParameters + TermOfLambda *big.Int + TestResponses []*big.Int + func (kgs *KeyGenerationStage4) Advance(messages []*KeyGenerationMessage4) (*KeyGenerationStage5, []*KeyGenerationMessage5, error) + type KeyGenerationStage5 struct + MessageToSelf *KeyGenerationMessage5 + N *big.Int + Parameters *KeyGenerationParameters + TermOfB *big.Int + TermOfL *big.Int + func (kgs *KeyGenerationStage5) Advance(messages []*KeyGenerationMessage5) (*KeyGenerationStage6, []*KeyGenerationMessage6, error) + type KeyGenerationStage6 struct + Hi *big.Int + I int + MessageToSelf *KeyGenerationMessage6 + N *big.Int + Parameters *KeyGenerationParameters + func (kgs *KeyGenerationStage6) Advance(messages []*KeyGenerationMessage6) (*PrivateKeyShare, error) + type PartialDecryption struct + Ci *big.Int + I int + type PrivateKeyShare struct + FactorialOfNPart *big.Int + Hi *big.Int + ParticipantIndex int + ThetaInv *big.Int + func (sk *PrivateKeyShare) Decrypt(partials []*PartialDecryption) *big.Int + func (sk *PrivateKeyShare) PartiallyDecrypt(ct *big.Int) *PartialDecryption