On Wed, Nov 8, 2023 at 10:33 AM Ricardo Alex <ricardosurfmu...@gmail.com> wrote: > > This code gives me a signature r,s > > std::string signaturehex; > StringSource ss2(message, true, > new CryptoPP::SignerFilter(prng, signer, > new CryptoPP::HexEncoder( > new CryptoPP::StringSink(signaturehex)))); > > I understand that r is the x coordinate of a point R in the eliptic curve, > considering I have private key, public key r,s values of the signature and > the message signed, is it possible to find the Y coordinate of point R?
It is not the case that r = f(s) for the signature. 'r' and 's' are two calculated integers (not a point), and computed at <https://github.com/weidai11/cryptopp/blob/master/gfpcrypt.h#L315>. Typically when working with elliptic curves, the private key is an exponent, and it is an Integer. The public key is a point, and the point is a pair of integers with x and y components. For public and private keys, you can solve the y coordinate given the x coordinate. In fact, compressed points use this trick to save space. A compressed point only provides the x coordinate, if I recall correctly. Also take a look at <https://www.cryptopp.com/wiki/Elliptic_Curve_Digital_Signature_Algorithm>. In particular, see the example OpenSSL and Java. It converts between ASN.1 format and IEEE P1363 formats. OpenSSL and Java use an ASN.1/DER signature format, and Crypto++ uses IEEE P1363 format. Jeff -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8%3DbmjkzzLn8PpDUY0BX4ahwyMVWp7Yue5N5UHAb6MuBFA%40mail.gmail.com.