I appreciate your work and i need your help!
I also developing a brain wallet with ruby in my spare time.
I'm stucked when trying to generate public key by using existing private key
rather then generate key pairs.
my code:
require 'openssl'
include OpenSSL
pk = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'
key = PKey::EC.new('secp256k1')
key.private_key = pk.to_i(16)
p key.public_key = PKey::EC::Point.new(key.group).mul(key.private_key) ## HERE!!
puts key.to_text
and i also tried:
PKey::EC::Point.new(key.group).mul(nil,key.private_key)
PKey::EC::Point.new(key.group).mul(BN.new('whatever'),key.private_key)
None of these one got right answer.
I have read openssl wiki but still confused.
http://wiki.openssl.org/index.php/Elliptic_Curve_CryptographyIt looks like there is no corresponding methods of mul in ruby?
Could you please tell me what should I do in order to solve my problem?