aido / picocoin

A small bitcoin client
MIT License
5 stars 0 forks source link

ecp_mul() using polarssl #3

Closed ShaliDaliHaliDa closed 9 years ago

ShaliDaliHaliDa commented 9 years ago

Your code inspired me to try ditch openssl and switch to polarSSL for my vanity bitcoin generator. However, having issues with ecp_point_read_binary() , I am trying to pass a public point like so: ecp_point_read_binary(&ecp->grp, &ecp->Q, &ppnt, sizeof(ppnt)) guess that's wrong. Any suggestions how to best multiply the private key to turn that into a bitcoin address using polarSSL?

aido commented 9 years ago

Hi ShaliDaliHaliDa,

Maybe have a look at the /lib/key.c file which contains some functions that may be useful for you.

Bear in mind that when the code was written PolarSSL did not support compressed points so the ecp_point_read_binary_compressed function was written to overcome this:

https://github.com/aido/picocoin/blob/PolarSSL/lib/key.c#L270

I believe PolarSSL still does not support compressed points.