Post
Topic
Board Development & Technical Discussion
Re: HTTP bootstrapping ?
by
adulau
on 26/12/2010, 13:37:20 UTC
To have a full-blown Bitcoin client in shell scripting might be a bit difficult especially with the cryptographic aspect required (except if everything could be called from command line using OpenSSL...) but nothing is impossible.

Is it possible to use ECDSA with openssl ?  I've looked for this in the openssl manual page, but I haven't found anything apart from DSA and RSA.  Anyway indeed most of the parts of the program would be called with command line programs, especially cryptographic stuffs.

I think so to generate an EC key:
Code:
openssl ecparam -out ec_key.pem -name sect571k1  -genkey

and for signing something like this:
Code:
openssl dgst -sha1 -sign ec_key.pem -out filetobesigned.txt.signed filetobesigned.txt

and to verify the signature:
Code:
openssl dgst -sha1 -prverify ec_key.pem -signature filetobesigned.txt.signed filetobesigned.txt

But I don't know the exact elliptic curves used by Bitcoin. You can get the one supported
by OpenSSL by doing an:
Code:
openssl ecparam -list_curves

Is there a table of the EC properties used by Bitcoin somewhere? I suppose the easiest is
to read the source code...

My reply (being out of scope of the HTTP bootstrapping) should be under your new post
about the implementation of a Bitcoin client in shell scripting (http://bitcointalk.org/index.php?topic=2461.0).


Hope this helps a little bit,


(PS.  you don't have to put a whole pipe in a same line.  The '|' character can end a line.)

I know but I suppose this shows my laziness when doing a paste into the forum ;-)