Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.DSI.SecretSharing

Classes, interfaces and records

interfaceiDSIntegerCollectionItem

function GetData: iDSInteger; function GetId: Integer; function GetLargeId: iDSInteger; procedure SetData(const Value: iDSInteger); procedure SetId(const Value: Integer); procedure SetLargeId(const Value: iDSInteger); procedure Delete; procedure GetDataExp(AGenerator, AFieldModulus: iDSInteger; var AData: iDSInteger); property Data: iDSInteger read GetData write SetData; property Id: Integer read GetId write SetId; property LargeId: iDSInteger read GetLargeId write SetLargeId;

classtDSIntegerCollection

(no public members)

classtDSIntegerCollectionItem

inherits from TInterfacedObject

implements iDSIntegerCollectionItem

constructor Create(ACollection: tDSIntegerCollection); destructor Destroy; override; procedure Delete; procedure GetDataExp(aGenerator, aFieldModulus: iDSInteger; var aData: iDSInteger); property Data: iDSInteger read GetData write SetData; property Id: Integer read GetId write SetId; property LargeId: iDSInteger read GetLargeId write SetLargeId;

interfaceiDSIntegerCollection

function GetFieldModulus: iDSInteger; function GetGroupModulus: iDSInteger; function GetItemCount: Integer; function GetItems(Index: Integer): iDSIntegerCollectionItem; procedure FreeItems; function Add: iDSIntegerCollectionItem; procedure Assign(ASource: iDSIntegerCollection); procedure Clear; procedure SetFieldModulus(AValue: iDSInteger); procedure SetGroupModulus(AValue: iDSInteger); property FieldModulus: iDSInteger read GetFieldModulus; property GroupModulus: iDSInteger read GetGroupModulus; property ItemCount: Integer read GetItemCount; property Items[Index: Integer]: iDSIntegerCollectionItem read GetItems;

classtDSIntegerCollection

inherits from TInterfacedObject

implements iDSIntegerCollection

constructor Create(aLocal: Boolean = False); destructor Destroy; override; function Add: iDSIntegerCollectionItem;
Delegates to tDSIntegerCollectionItem.Create, forwarding Self, and returns its result.
procedure Assign(ASource: iDSIntegerCollection); virtual; procedure Clear; virtual; procedure SetFieldModulus(aValue: iDSInteger); procedure SetGroupModulus(aValue: iDSInteger); property FieldModulus: iDSInteger read GetFieldModulus; property GroupModulus: iDSInteger read GetGroupModulus; property ItemCount: Integer read GetItemCount; property Items[Index: Integer]: iDSIntegerCollectionItem read GetItems;

interfaceiDSPolynomial

inherits from iDSIntegerCollection

procedure AssignExp(aGenerator : iDSInteger; aSourcePolynomial: iDSPolynomial); procedure AssignExpTo(aGenerator : iDSInteger; aPolynomialExp: iDSPolynomial); procedure CreatePolynomial(aDegree : Integer; aTerm0, aFieldModulus: iDSInteger); procedure Evaluate(Index: Integer; var AValue: iDSInteger); overload; procedure Evaluate(Index: iDSInteger; var AValue: iDSInteger); overload; procedure EvaluateExp(Index: Integer; var AValue: iDSInteger); overload; procedure EvaluateExp(Index: iDSInteger; var AValue: iDSInteger); overload;

classtDSPolynomial

inherits from tDSIntegerCollection

implements iDSPolynomial

procedure AssignExp(aGenerator : iDSInteger; aSourcePolynomial: iDSPolynomial); procedure AssignExpTo(aGenerator : iDSInteger; aPolynomialExp: iDSPolynomial); procedure CreatePolynomial(aDegree : Integer; aTerm0, aFieldModulus: iDSInteger); procedure Evaluate(Index: Integer; var AValue: iDSInteger); overload; procedure Evaluate(Index: iDSInteger; var AValue: iDSInteger); overload; procedure EvaluateExp(Index: Integer; var AValue: iDSInteger); overload; procedure EvaluateExp(Index: iDSInteger; var AValue: iDSInteger); overload;

interfaceiDSSecretSharing

inherits from iDSIntegerCollection

function GetThreshold: Integer; function GetPolynomial: iDSPolynomial; procedure SetThreshold(const Value: Integer); function CreateSharing(AShareCount, AThreshold: Integer; ASecret, AFieldModulus: iDSInteger; AGenerator: iDSInteger = nil; APolynomialExp: iDSPolynomial = nil; AIds: iDSIntegerCollection = nil): Boolean;
Call CreateSharing to create a Shamir secret sharing of ASecret. The Items array will be filled with the AShareCount shares. Each share will be Items[i].Data := P(Items[i].Id), where P is a random polynomial of degree AThreshold in the field defined by AFieldModulus. To recreate ASecret one will need at least AThreshold + 1 shares.
function CreateZeroSharing(AShareCount, AThreshold: Integer; AFieldModulus: iDSInteger; AGenerator: iDSInteger = nil; APolynomialExp: iDSPolynomial = nil; AIds: iDSIntegerCollection = nil): Boolean;
Call CreateZeroSharing to create a Shamir sharing of the value zero. Zero sharings are used in different protocols for masking actual shares. If <a1,..,an> is a sharing of a and <z1,..,zn> is a sharing of zero, then <a1+z1,..,an+zn> will be another sharing of a.
procedure DeleteId(AId: Integer); procedure DeleteIndex(AIndex: Integer); function FindId(AId: Integer): Integer; overload; function FindId(ALargeId: iDSInteger): Integer; overload; function RecreatePolynomial: Boolean; function RecreateSecret(var ASecret: iDSInteger): Boolean;
Call RecreateSecret to recreate a shared secret from at least AThreshold + 1 shares present in the Items array.
function RecreateSecretExp(var ASecret: iDSInteger): Boolean;
Call RecreateSecretExp to recreate the discrete exponential value of a shared secret from at least AThreshold+1 expontential shares present in the Items array. If <a1,..,an> is a sharing of a in the field AGroupModulus, and Items contains the values <g^a1,..,g^an> in the field AFieldModulus, then g^a mod AFieldModulus will be returned as ASecret.
property Threshold: Integer read GetThreshold write SetThreshold; property Polynomial: iDSPolynomial read GetPolynomial;

classtDSSecretSharing

inherits from tDSIntegerCollection

implements iDSSecretSharing

procedure Assign(ASource: iDSIntegerCollection); override; function CreateSharing(aShareCount, aThreshold : Integer; aSecret, aFieldModulus : iDSInteger; aGenerator : iDSInteger = nil; aPolynomialExp: iDSPolynomial = nil; aIds : iDSIntegerCollection = nil) : Boolean; function CreateZeroSharing(aShareCount, aThreshold : Integer; aFieldModulus : iDSInteger; aGenerator : iDSInteger = nil; aPolynomialExp: iDSPolynomial = nil; aIds : iDSIntegerCollection = nil) : Boolean; procedure DeleteId(AId: Integer); procedure DeleteIndex(AIndex: Integer); function FindId(AId: Integer): Integer; overload; function FindId(ALargeId: iDSInteger): Integer; overload; function RecreateSecret(var aSecret: iDSInteger): Boolean; function RecreatePolynomial: Boolean; function RecreateSecretExp(var aSecret: iDSInteger): Boolean; property Threshold: Integer read GetThreshold write SetThreshold; property Polynomial: iDSPolynomial read GetPolynomial;

interfaceiDSSecretSharingSender

function GetLocalID: iDSInteger; function GetRemoteIDCount: Integer; function GetRemoteIDs(Index: Integer): iDSInteger; procedure SetLocalID(Value: iDSInteger); function AddRemoteID(Value: iDSInteger): Integer; function IndexOfRemoteID(Value: iDSInteger): Integer; property LocalID: iDSInteger read GetLocalID write SetLocalID; property RemoteIDCount: Integer read GetRemoteIDCount; property RemoteIDs[Index: Integer]: iDSInteger read GetRemoteIDs;

interfaceiDSJointUncondSecureRSSSender

function SendSigmaRho(ARemoteId: iDSInteger; ASigma, ARho: iDSInteger): Boolean; function BroadcastA(AA: iDSIntegerCollection): Boolean; function BroadcastComplaintA(ARemoteID: iDSInteger): Boolean; function BroadcastSigmaRho(ARemoteID: iDSInteger; ASigma, ARho: iDSInteger): Boolean;

interfaceiDSJointUncondSecureRSSReceiver

procedure RecvSigmaRho(ASenderID, ARemoteID: iDSInteger; ASigma, ARho: iDSInteger); procedure RecvA(ASenderID: iDSInteger; AA: iDSIntegerCollection); procedure RecvComplaintA(ASenderID, ARemoteID: iDSInteger);

interfaceiDSJointExpRSSSender

inherits from iDSJointUncondSecureRSSSender

function BroadcastY(AY: iDSIntegerCollection): Boolean; function BroadcastComplaintY(ARemoteID, ASigma, ARho: iDSInteger): Boolean; function BroadcastSigma(ARemoteID, ASigma: iDSInteger): Boolean;

interfaceiDSJointExpRSSReceiver

inherits from iDSJointUncondSecureRSSReceiver

procedure RecvY(ASenderID: iDSInteger; AY: iDSIntegerCollection); procedure RecvComplaintY(ASenderID, ARemoteID, ASigma, ARho: iDSInteger); procedure RecvSigma(ASenderID, ARemoteID, ASigma: iDSInteger);

interfaceiDSSecretSharingPeer

procedure SetParams(AParams: IFFSystemParams; AH: iDSInteger; AThreshold: Integer); procedure GeneratePrivKey; procedure FinishGeneratePrivKey; procedure GeneratePublKey; procedure FinishGeneratePublKey(var AY: iDSInteger);

classtDSSecretSharingPeer

constructor Create(aLocal: Boolean = False); destructor Destroy; override; procedure SetParams(aParams: iFFSystemParams; aH: iDSInteger; aThreshold: Integer); procedure GeneratePrivKey; procedure FinishGeneratePrivKey; procedure GeneratePublKey; procedure FinishGeneratePublKey(var aY: iDSInteger); property SecretSharingSender: iDSSecretSharingSender read FSecretSharingSender write SetSecretSharingSender;