From: Tony Arcieri Date: 2012-10-29T01:33:58+09:00 Subject: Re: OpenSSL ECDSA public key from private --047d7b66f13d7a45ca04cd211ef3 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Oct 28, 2012 at 2:46 AM, Nokan Emiro 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' > => # > 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 --047d7b66f13d7a45ca04cd211ef3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Oct 28, 2012 at 2:46 AM, Nokan Emiro <uzleepito@gmail.com&g= t; wrote:=A0
I'm sure I made a mis= take but for me this script does not work. =A0The
problem is= that=A0OpenSSL::PKey::EC::Point does not have a #mul
method in it.

1.9.3-p194 :001 > require &#= 39;openssl'
=A0=3D> true=A0
1.9.3-p194 :002 >= key =3D OpenSSL::PKey::EC.new 'secp256k1'
=A0=3D> #&l= t;OpenSSL::PKey::EC:0x00000001cbb960>=A0
1.9.3-p194 :003 > OpenSSL::PKey::EC::Point.new(key.group).methods.g= rep /mul/
=A0=3D> []=A0
1.9.3-p194 :004 >=A0

:(

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

You might consi= der using my red25519 gem instead if you're simply looking for a signat= ure algorithm and do not specifically need ECDSA:

https:= //github.com/tarcieri/red25519

You can most ce= rtainly generate public keys from private ones using this gem:

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

--
Tony Arcieri

--047d7b66f13d7a45ca04cd211ef3--