ClpIECDomainParameters.pas 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. { *********************************************************************************** }
  2. { * CryptoLib Library * }
  3. { * Copyright (c) 2018 - 20XX Ugochukwu Mmaduekwe * }
  4. { * Github Repository <https://github.com/Xor-el> * }
  5. { * Distributed under the MIT software license, see the accompanying file LICENSE * }
  6. { * or visit http://www.opensource.org/licenses/mit-license.php. * }
  7. { * Acknowledgements: * }
  8. { * * }
  9. { * Thanks to Sphere 10 Software (http://www.sphere10.com/) for sponsoring * }
  10. { * development of this library * }
  11. { * ******************************************************************************* * }
  12. (* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *)
  13. unit ClpIECDomainParameters;
  14. {$I ..\Include\CryptoLib.inc}
  15. interface
  16. uses
  17. ClpBigInteger,
  18. ClpIECC,
  19. ClpCryptoLibTypes;
  20. type
  21. IECDomainParameters = interface(IInterface)
  22. ['{FFF479CD-D7FD-455D-B70C-00D37F8E22A8}']
  23. function GetCurve: IECCurve;
  24. function GetG: IECPoint;
  25. function GetN: TBigInteger;
  26. function GetH: TBigInteger;
  27. function GetHInv: TBigInteger;
  28. function GetSeed: TCryptoLibByteArray;
  29. property Curve: IECCurve read GetCurve;
  30. property G: IECPoint read GetG;
  31. property N: TBigInteger read GetN;
  32. property H: TBigInteger read GetH;
  33. property HInv: TBigInteger read GetHInv;
  34. property Seed: TCryptoLibByteArray read GetSeed;
  35. function Equals(const other: IECDomainParameters): Boolean;
  36. function GetHashCode(): {$IFDEF DELPHI}Int32; {$ELSE}PtrInt;
  37. {$ENDIF DELPHI}
  38. function ValidatePrivateScalar(const d: TBigInteger): TBigInteger;
  39. function ValidatePublicPoint(const q: IECPoint): IECPoint;
  40. end;
  41. implementation
  42. end.