[fpc-pascal] Public key algo pascal only

Jy V jyv110 at gmail.com
Mon Apr 8 12:17:37 CEST 2019

On Mon, Apr 8, 2019 at 11:58 AM Santiago A. <svaa at ciberpiula.net> wrote:

> There is no simple solution for a complex problem. I don't think you will
> find anything much more simpler.

Santiago, you should reconsider, the original poster asked for
PublicKey/PrivateKey algorithm,
in ECC.pas from XMLRAD hosted at SourceForge the unit is 1K line of pure
this unit provide essential elements with 4 functions, it may give you
ideas how simple it could be while providing ECDSA256 (secp256r1) which the
de-facto high security standard as-of april 2019:

function EccMakeKey(out PublicKey: TPublicKey; out PrivateKey:
TPrivateKey): Boolean;
function EcdhSharedSecret(const PublicKey: TPublicKey; const PrivateKey:
TPrivateKey; out Secret: TEccSecretKey): Boolean;
function EcdsaSign(const PrivateKey: TPrivateKey; const Hash: TEccHash; out
Signature: TSignature): Boolean;
function EcdsaVerify(const PublicKey: TPublicKey; const Hash: TEccHash;
const Signature: TSignature): Boolean;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190408/f4d2ac0b/attachment.html>

More information about the fpc-pascal mailing list