<div>Hi guys</div><div>    i want to write two programd to learn the details of ecdsa signature. </div><div>    program A read the private key from private.pem, sign a string, like "abcde1234", save the signature as sig.pem.</div><div>    program B read the public key from pub.pem, read the sig.pem, and verify the signature.</div><div>    can anybody provide me a example code?</div><div><br></div><div>    my implementation is as follow:</div><div>    1,<span style="line-height: 1.5;"> generate the ecc keys by "openssl ecparam -genkey -name secp256r1 -out private.pem" and extract the public key by "</span>openssl ec -in private.pem -out public.pem -pubout"</div><div><span style="line-height: 1.5;">    2, read the private key by "PEM_read_PrivateKey()", and sign with "ECDSA_do_sign", there is no problem. program A works well.</span></div><div><span style="line-height: 1.5;">    3, the problem is how to read the public key from public.pem ? i find PEM_read_bio_PUBKEY from app/apps.c, but i can't find the source code.  how can i verify the signature without knowing the private key?</span></div><div><span style="line-height: 1.5;">     </span></div><div><br></div>