Author

Topic: Need C/C++ code for brain wallet function: any suggestions? (Read 2275 times)

sr. member
Activity: 344
Merit: 250
That's why I asked for a sample project, not just a code snippet... It is a large and complex library, and I don't need 99% of it...

A sample project that does what (if there were one that did what you are asking for then you wouldn't be *needing* anything at all)?


Oh, that's os true!

But htanks for the CYAM, I will try to study it.
legendary
Activity: 1232
Merit: 1076
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
That's why I asked for a sample project, not just a code snippet... It is a large and complex library, and I don't need 99% of it...

A sample project that does what (if there were one that did what you are asking for then you wouldn't be *needing* anything at all)?
sr. member
Activity: 344
Merit: 250
Although it's not hard to find direct source for things like SHA256 (e.g. https://github.com/ciyam/ciyam/blob/master/src/sha256.cpp), and base58 could perhaps be taken from Bitcoin itself (https://github.com/bitcoin/bitcoin/blob/master/src/base58.h), it is going to be a bit more difficult to get the ECDSA stuff working if you are not wanting to use *any* 3rd party libraries.

It's not really that difficult to get OpenSSL integrated (CIYAM Open uses it) so if you don't mind using just the *one* 3rd party library then I would recommend using it to help you to complete your project.


That's why I asked for a sample project, not just a code snippet... It is a large and complex library, and I don't need 99% of it...
sr. member
Activity: 344
Merit: 250
I want the string, that importprivkey will be able to use Smiley
legendary
Activity: 3472
Merit: 4801
Hi,
I am looking for C/C++ code for brain wallet function.

What it should do:
Take ASCII text and produce a private key (the 51 char one, starting with "5").

it is going to be a bit more difficult to get the ECDSA stuff working if you are not wanting to use *any* 3rd party libraries.

So the important question is:

Do you just want to generate a private key based on the user chosen text, or do you want the software to also output the bitcoin address?

Generating private key only won't be too bad, but you should really consider using OpenSSL if you want your brain wallet generator to compute the bitcoin address as well.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Although it's not hard to find direct source for things like SHA256 (e.g. https://github.com/ciyam/ciyam/blob/master/src/sha256.cpp), and base58 could perhaps be taken from Bitcoin itself (https://github.com/bitcoin/bitcoin/blob/master/src/base58.h), it is going to be a bit more difficult to get the ECDSA stuff working if you are not wanting to use *any* 3rd party libraries.

It's not really that difficult to get OpenSSL integrated (CIYAM Open uses it) so if you don't mind using just the *one* 3rd party library then I would recommend using it to help you to complete your project.
sr. member
Activity: 344
Merit: 250
Hi,
I am looking for C/C++ code for brain wallet function.

What it should look like:
1. C/C++
2. No dependencies, all code should be in that function or its sub-functions. Alternatively I need a sample project for MSVC 2005 or before (I don't have licence for later versions). The reason is simple: I am not good enough with C++ to handle installation of 10 mutually dependent libraries as it usually happens in Unix Smiley

What it should do:
Take ASCII text and produce a private key (the 51 char one, starting with "5").

Technically, this functionality is in pywallet, but it uses Python-specific libraries.
Jump to: