Hallo everyone, Could anybody help to extract r and s integers from a ecdsa signature? The code from the example is: ECDSA<ECP, SHA256>::Signer signer; signer.AccessKey().Initialize( prng, ASN1::secp256k1() ); string message = "Do or do not. There is no try."; // Determine maximum size, allocate a string with the maximum size size_t siglen = signer.MaxSignatureLength(); string signature(siglen, 0x00); // Sign, and trim signature to actual size siglen = signer.SignMessage( prng, (const byte*)&message[0], message.size(), (byte*)&signature[0] ); signature.resize(siglen);
Moreover, the final signature shouldn't be 64 bytes always (32 for r, 32 for s)? I tried to get the first 32 bytes for r and the next for s, but it is not the same length for all messages. Thank you! -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- 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/f2836dc7-fdd0-49f5-b7bc-e3a5e9246683n%40googlegroups.com.