ClpIDHKeyGeneratorHelper.pas 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 ClpIDHKeyGeneratorHelper;
  14. {$I ..\Include\CryptoLib.inc}
  15. interface
  16. uses
  17. ClpISecureRandom,
  18. ClpBigInteger,
  19. ClpIDHParameters;
  20. type
  21. IDHKeyGeneratorHelper = interface(IInterface)
  22. ['{D4A55B45-E354-45A8-BCB7-871D7208A855}']
  23. function CalculatePrivate(const dhParams: IDHParameters;
  24. const random: ISecureRandom): TBigInteger;
  25. function CalculatePublic(const dhParams: IDHParameters;
  26. const x: TBigInteger): TBigInteger;
  27. end;
  28. implementation
  29. end.