ClpIMultipliers.pas 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 ClpIMultipliers;
  14. {$I ..\Include\CryptoLib.inc}
  15. interface
  16. uses
  17. ClpBigInteger,
  18. ClpIZTauElement,
  19. ClpIECC;
  20. type
  21. IAbstractECMultiplier = interface(IECMultiplier)
  22. ['{DD63984C-7D4D-46DE-9004-20FD909C2EFB}']
  23. function MultiplyPositive(const p: IECPoint; const k: TBigInteger)
  24. : IECPoint;
  25. end;
  26. type
  27. IFixedPointCombMultiplier = interface(IAbstractECMultiplier)
  28. ['{A3345E31-4D5C-4442-9C3D-ACC7F6DA4A14}']
  29. end;
  30. type
  31. IGlvMultiplier = interface(IAbstractECMultiplier)
  32. ['{F54D54F5-F544-421B-89FC-1D8058FB8F33}']
  33. end;
  34. type
  35. IWNafL2RMultiplier = interface(IAbstractECMultiplier)
  36. ['{E2A5E4EF-C092-4F83-ACCF-0FC8731FB274}']
  37. end;
  38. type
  39. IWTauNafMultiplier = interface(IAbstractECMultiplier)
  40. ['{B71E75E5-FB6D-4A54-BE8A-820FC9A1E509}']
  41. // /**
  42. // * Multiplies an AbstractF2mPoint
  43. // * by an element <code>&#955;</code> of <code><b>Z</b>[&#964;]</code> using
  44. // * the <code>&#964;</code>-adic NAF (TNAF) method.
  45. // * @param p The AbstractF2mPoint to multiply.
  46. // * @param lambda The element <code>&#955;</code> of
  47. // * <code><b>Z</b>[&#964;]</code> of which to compute the
  48. // * <code>[&#964;]</code>-adic NAF.
  49. // * @return <code>p</code> multiplied by <code>&#955;</code>.
  50. // */
  51. function MultiplyWTnaf(const p: IAbstractF2mPoint;
  52. const lambda: IZTauElement; a, mu: ShortInt): IAbstractF2mPoint;
  53. end;
  54. implementation
  55. end.