On Sun, Oct 28, 2012 at 2:46 AM, Nokan Emiro <uzleepito / gmail.com> wrote:

> I'm sure I made a mistake but for me this script does not work.  The
> problem is that OpenSSL::PKey::EC::Point does not have a #mul
> method in it.
>
> 1.9.3-p194 :001 > require 'openssl'
>  => true
> 1.9.3-p194 :002 > key = OpenSSL::PKey::EC.new 'secp256k1'
>  => #<OpenSSL::PKey::EC:0x00000001cbb960>
> 1.9.3-p194 :003 > OpenSSL::PKey::EC::Point.new(key.group).methods.grep
> /mul/
>  => []
> 1.9.3-p194 :004 >
>
> :(
>

I ran into this same problem. #mul is only available on the absolute latest
builds of Ruby.

You might consider using my red25519 gem instead if you're simply looking
for a signature algorithm and do not specifically need ECDSA:

https://github.com/tarcieri/red25519

You can most certainly generate public keys from private ones using this
gem:

Ed25519::SigningKey.new(private_key).verify_key.to_bytes

-- 
Tony Arcieri