<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 8, 2019 at 11:58 AM Santiago A. <<a href="mailto:svaa@ciberpiula.net">svaa@ciberpiula.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is no simple solution for a complex problem. I don't think you will find anything much more simpler.<br></blockquote><div><br></div><div>Santiago, you should reconsider, the original poster asked for PublicKey/PrivateKey algorithm,</div><div>in ECC.pas from XMLRAD hosted at SourceForge the unit is 1K line of pure pascal,</div><div>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: <br></div><div><br></div><div>function EccMakeKey(out PublicKey: TPublicKey; out PrivateKey: TPrivateKey): Boolean;<br>function EcdhSharedSecret(const PublicKey: TPublicKey; const PrivateKey: TPrivateKey; out Secret: TEccSecretKey): Boolean;<br>function EcdsaSign(const PrivateKey: TPrivateKey; const Hash: TEccHash; out Signature: TSignature): Boolean;<br>function EcdsaVerify(const PublicKey: TPublicKey; const Hash: TEccHash; const Signature: TSignature): Boolean;<br></div><br></div></div></div>