It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
<... some processes ...>
/* Convert some input arguments of "secp256k1_ecdsa_sign_recoverable" into the "secp256k1_scalar type" to be used for signing function. */
secp256k1_scalar sec, non, msg;
secp256k1_scalar_set_b32(&sec, seckey, &overflow); /* Secret-key "seckey" was converted into "&sec" */
secp256k1_scalar_set_b32(&msg, msg32, NULL); /* Hash "msg32", which was created from original message data, was converted into "&msg" */
secp256k1_scalar_set_b32(&non, nonce32, &overflow); /* Nonce data "nonce32" was converted into "&non" */
<... some processes ...>
/* make "sign" and "recid" as following*/
secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid);
/* "&r" and "&s" are ouput sign-r and sign-s. "recid" is ouput recovery id (0, 1, 2 or 3). The others are given from the input arguments of "secp256k1_ecdsa_sign_recoverable". "ctx" (secp256k1 context object) was created for signing and verification. */
<... some processes ...>
/* Combine "sign"s and "recid". It will be decomposed into "sign"s and "recid" again by higher processing, and they will be used to construct bitcoin transaction data.
secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid);
/* "signature" is ouput recoverable-signature-data ("secp256k1_ecdsa_recoverable_signature" type), which is consisting of the inputs "&r", "&s", and "recid". It is also the output of "secp256k1_ecdsa_sign_recoverable" function. */
<... some processes ...>
/* Convert some input arguments of "secp256k1_ecdsa_sign_recoverable" into the "secp256k1_scalar type" to be used for signing function. */
secp256k1_scalar sec, non, msg;
secp256k1_scalar_set_b32(&sec, seckey, &overflow); /* Secret-key "seckey" was converted into "&sec" */
secp256k1_scalar_set_b32(&msg, msg32, NULL); /* Hash "msg32", which was created from original message data, was converted into "&msg" */
secp256k1_scalar_set_b32(&non, nonce32, &overflow); /* Nonce data "nonce32" was converted into "&non" */
<... some processes ...>
/* make "sign" and "recid" as following*/
secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid);
/* "&r" and "&s" are ouput sign-r and sign-s. "recid" is ouput recovery id (0, 1, 2 or 3). The others are given from the input arguments of "secp256k1_ecdsa_sign_recoverable". "ctx" (secp256k1 context object) was created for signing and verification. */
<... some processes ...>
/* Combine "sign"s and "recid". It will be decomposed into "sign"s and "recid" again by higher processing, and they will be used to construct bitcoin transaction data.
secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid);
/* "signature" is ouput recoverable-signature-data ("secp256k1_ecdsa_recoverable_signature" type), which is consisting of the inputs "&r", "&s", and "recid". It is also the output of "secp256k1_ecdsa_sign_recoverable" function. */
/*****************************************/
/**** Step2 Added: Recover public-key ****/
/*****************************************/
int res_pubkey_recover;
static secp256k1_pubkey pubkey_buf;
res_pubkey_recover = secp256k1_ecdsa_recover(ctx, &pubkey_buf, signature, msg32);
/* "&pubkey_buf" is output recovered public key. "signature" is input, which has "sign"s and "recid". "msg32" is the hash created from original message data (given as a input argument of "secp256k1_ecdsa_sign_recoverable") */
/*****************************************/
/**** Step2 Added: Verify signed data ****/
/*****************************************/
int res_sig_conv;
static secp256k1_ecdsa_signature normal_sig_buf;
/* Convert recoverable-signature-data into normal-type-signature-data to be used for verification function.
res_sig_conv = secp256k1_ecdsa_recoverable_signature_convert(ctx, &normal_sig_buf, signature);
/* "&normal_sig_buf" is output converted signature data. "res_sig_conv" is always 1. */
/* Verification */
int res_verify;
res_verify = secp256k1_ecdsa_verify(ctx, &normal_sig_buf, msg32, &pubkey_buf);
/* "res_verify = 1" is verification success. "res_verify = 0" is verification failure. */
<... some processes ...>
/* Convert some input arguments of "secp256k1_ecdsa_sign_recoverable" into the "secp256k1_scalar type" to be used for signing function. */
secp256k1_scalar sec, non, msg;
secp256k1_scalar_set_b32(&sec, seckey, &overflow); /* Secret-key "seckey" was converted into "&sec" */
secp256k1_scalar_set_b32(&msg, msg32, NULL); /* Hash "msg32", which was created from original message data, was converted into "&msg" */
secp256k1_scalar_set_b32(&non, nonce32, &overflow); /* Nonce data "nonce32" was converted into "&non" */
<... some processes ...>
/* make "sign" and "recid" as following*/
secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid);
/* "&r" and "&s" are ouput sign-r and sign-s. "recid" is ouput recovery id (0, 1, 2 or 3). The others are given from the input arguments of "secp256k1_ecdsa_sign_recoverable". "ctx" (secp256k1 context object) was created for signing and verification. */
<... some processes ...>
/* Combine "sign"s and "recid". It will be decomposed into "sign"s and "recid" again by higher processing, and they will be used to construct bitcoin transaction data.
/**************************************/
/**** Step3 Added: Use wrong recid ****/
/**************************************/
recid = (recid == 0 ? 1 : 0); /* Intentionally use wrong recid. */
secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid);
/* "signature" is ouput recoverable-signature-data ("secp256k1_ecdsa_recoverable_signature" type), which is consisting of the inputs "&r", "&s", and "recid". It is also the output of "secp256k1_ecdsa_sign_recoverable" function. */
/*****************************************/
/**** Step2 Added: Recover public-key ****/
/*****************************************/
int res_pubkey_recover;
static secp256k1_pubkey pubkey_buf;
res_pubkey_recover = secp256k1_ecdsa_recover(ctx, &pubkey_buf, signature, msg32);
/* "&pubkey_buf" is output recovered public key. "signature" is input, which has "sign"s and "recid". "msg32" is the hash created from original message data (given as a input argument of "secp256k1_ecdsa_sign_recoverable") */
/*****************************************/
/**** Step2 Added: Verify signed data ****/
/*****************************************/
int res_sig_conv;
static secp256k1_ecdsa_signature normal_sig_buf;
/* Convert recoverable-signature-data into normal-type-signature-data to be used for verification function.
res_sig_conv = secp256k1_ecdsa_recoverable_signature_convert(ctx, &normal_sig_buf, signature);
/* "&normal_sig_buf" is output converted signature data. "res_sig_conv" is always 1. */
/* Verification */
int res_verify;
res_verify = secp256k1_ecdsa_verify(ctx, &normal_sig_buf, msg32, &pubkey_buf);
/* "res_verify = 1" is verification success. "res_verify = 0" is verification failure. */