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.
Integer base58decode(string input)
{
int parse;
Integer key;
for(int i = 0; i < input.length(); i++)
{
parse = 0;
while(true)
{
if(input[i] == b58[parse])
{
key = (key + parse)*58;
break;
}
else
parse++;
}
}
key = key/58;
return key;
}
string base58encode(Integer plain, int zeros)
{
string adr;
Integer remainder, temp;
while(plain != 0)
{
plain.Divide(remainder, temp, plain, 58);
plain = temp;
adr = b58[remainder.ConvertToLong()] + adr;
}
while(zeros)
{
adr = "1" + adr;
zeros--;
}
return adr;
}
#include
#include
// CryptoPP includes
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace CryptoPP;
string b58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
byte odd[] = {0x03};
byte eve[] = {0x02};
AutoSeededRandomPool prng;
ECDSA::PrivateKey Priv;
ECDSA::PublicKey Pub;
bool loop(byte* goal);
string digest2hex(byte* digest, int len);
byte* str2hexarr(char* in, int len);
byte* step(string raw);
string base58encode(Integer plain, int zeros);
Integer base58decode(string input);
string process(string raw);
int
main()
{
Integer loops;
byte goal[] = {0x01};
while(loop(goal) == false && loops < 800)
{
loops++;
cout << "\r" << std::dec << loops;
}
}
bool
loop(byte* goal)
{
string temp;
byte x[32];
Priv.Initialize( prng, CryptoPP::ASN1::secp256k1());
Priv.MakePublicKey(Pub);
SHA256 crunchy;
if(Pub.GetPublicElement().y.IsEven() == 0)
crunchy.Update(odd, 1);
else
crunchy.Update(eve, 1);
Pub.GetPublicElement().x.Encode(x, 32);
crunchy.Update(x,32);
byte digestA[32];
crunchy.Final(digestA);
byte digestB[20];
RIPEMD160().CalculateDigest(digestB, digestA, 32);
if(digestB[0] == goal[0])
{
cout << endl << std::hex << Priv.GetPrivateExponent();
return true;
}
else
return false;
}
string
digest2hex(byte* digest, int len)
{
string output;
HexEncoder encoder;
StringSink *SS = new StringSink(output);
encoder.Attach(SS);
encoder.Put(digest,len);
encoder.MessageEnd();
return output;
}
byte*
str2hexarr(char* in, int len)
{
for(int i = 0; in[i]; i++)
in[i] = toupper(in[i]);
byte part2[len/2];
unsigned int i, t, hn, ln;
for (t = 0,i = 0; i < len; i+=2,++t)
{
hn = in[i] > '9' ? in[i] - 'A' + 10 : in[i] - '0';
ln = in[i+1] > '9' ? in[i+1] - 'A' + 10 : in[i+1] - '0';
part2[t] = (hn << 4 ) | ln;
}
return part2;
}
byte*
step(string raw)
{
SHA256 hash;
RIPEMD160 more_hash;
byte digest[SHA256::DIGESTSIZE];
byte digest2[RIPEMD160::DIGESTSIZE];
hash.CalculateDigest(digest,(const byte *)raw.c_str(),raw.size());
more_hash.CalculateDigest(digest2, digest, SHA256::DIGESTSIZE);
Integer d = Integer(digest2, RIPEMD160::DIGESTSIZE+4);
cout << endl << std::hex << d;
cout << endl << base58encode(d, 0);
return digest2;
}
string
base58encode(Integer plain, int zeros)
{
string adr;
Integer remainder, temp;
while(plain != 0)
{
plain.Divide(remainder, temp, plain, 58);
plain = temp;
adr = b58[remainder.ConvertToLong()] + adr;
}
while(zeros)
{
adr = "1" + adr;
zeros--;
}
return adr;
}
Integer
base58decode(string input)
{
int parse;
Integer key;
for(int i = 0; i < input.length(); i++)
{
parse = 0;
while(true)
{
if(input[i] == b58[parse])
{
key = (key + parse)*58;
break;
}
else
parse++;
}
}
key = key/58;
return key;
}
string
process(string raw)
{
SHA256 hash;
RIPEMD160 more_hash;
byte digest[SHA256::DIGESTSIZE];
byte digest2[RIPEMD160::DIGESTSIZE];
byte digest2_mod[RIPEMD160::DIGESTSIZE+5];
hash.CalculateDigest(digest,(const byte *)raw.c_str(),raw.size());
more_hash.CalculateDigest(digest2, digest, SHA256::DIGESTSIZE);
digest2_mod[0]=0x00;
for(int i = 0; i<= RIPEMD160::DIGESTSIZE; i++)
digest2_mod[i+1] = digest2[i];
hash.CalculateDigest(digest,digest2_mod,RIPEMD160::DIGESTSIZE+1);
hash.CalculateDigest(digest,digest,SHA256::DIGESTSIZE);
for(int i = 0; i< 4; i++)
digest2_mod[i+RIPEMD160::DIGESTSIZE+1] = digest[i];
Integer out = Integer(digest2_mod, RIPEMD160::DIGESTSIZE+5);
int lead;
for(lead = 0; digest2_mod[lead] == 0; lead++);
string ret = base58encode(out, lead);
return ret;
}