Hi,

Could anybody please tell me how can I generate a public key from
a private one with OpenSSL (or any other lib/gem) in Ruby?  What I'm
trying to do is something like this:

irb(main):001:0> *require 'openssl'*
  => true

irb(main):002:0> *key = OpenSSL::PKey::EC.new 'secp256k1'*
  => #<OpenSSL::PKey::EC:0x7f685ae68420>

irb(main):003:0> *key.private_key = .......*
  => ........

irb(main):004:0> *key.public_key?*
  => false

irb(main):005:0> *key.public_key*
  => nil


Setting the private_key works fine, but I need to calculate the public_key
too.
I'm sure there's a way to ask the key object to calculate the corresponding
public key, I just don't know how.

u.