|
@@ -22,6 +22,7 @@ unit ClpGlvMultiplier;
|
|
|
interface
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
uses
|
|
|
|
|
+ ClpSetWeakRef,
|
|
|
ClpAbstractECMultiplier,
|
|
ClpAbstractECMultiplier,
|
|
|
ClpIECInterface,
|
|
ClpIECInterface,
|
|
|
ClpIGlvEndomorphism,
|
|
ClpIGlvEndomorphism,
|
|
@@ -47,6 +48,8 @@ type
|
|
|
public
|
|
public
|
|
|
constructor Create(const curve: IECCurve;
|
|
constructor Create(const curve: IECCurve;
|
|
|
const glvEndomorphism: IGlvEndomorphism);
|
|
const glvEndomorphism: IGlvEndomorphism);
|
|
|
|
|
+ destructor Destroy; override;
|
|
|
|
|
+
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
implementation
|
|
@@ -62,10 +65,16 @@ begin
|
|
|
raise EArgumentCryptoLibException.CreateRes(@SCurveUnknownGroupOrder);
|
|
raise EArgumentCryptoLibException.CreateRes(@SCurveUnknownGroupOrder);
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
- Fcurve := curve;
|
|
|
|
|
|
|
+ // Fcurve := curve;
|
|
|
|
|
+ TSetWeakRef.SetWeakReference(@Fcurve, curve);
|
|
|
FglvEndomorphism := glvEndomorphism;
|
|
FglvEndomorphism := glvEndomorphism;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
+destructor TGlvMultiplier.Destroy;
|
|
|
|
|
+begin
|
|
|
|
|
+ inherited Destroy;
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
function TGlvMultiplier.MultiplyPositive(const p: IECPoint;
|
|
function TGlvMultiplier.MultiplyPositive(const p: IECPoint;
|
|
|
const k: TBigInteger): IECPoint;
|
|
const k: TBigInteger): IECPoint;
|
|
|
var
|
|
var
|