jruby / jruby-openssl

JRuby's OpenSSL gem
http://www.jruby.org
Other
45 stars 79 forks source link

OpenSSL::PKey::EC::Point missing `mul` method #306

Closed alextwoods closed 2 weeks ago

alextwoods commented 1 month ago

It looks like the OpenSSL::PKey::EC::Point class is missing the mul method. It does look like bouncy castle's ECPoint class does support multiply.

Steps to reproduce

require 'openssl'
group = OpenSSL::PKey::EC::Group.new('prime256v1')
new_point = group.generator.mul(2)

Expected Result

# <OpenSSL::PKey::EC::Point>

In cRuby:

require 'openssl'
group = OpenSSL::PKey::EC::Group.new('prime256v1')
new_point = group.generator.mul(2) # returns <OpenSSL::PKey::EC::Point:0x000000010dc80218 @group=#<OpenSSL::PKey::EC::Group:0x000000010dc80268>>

Actual result

 undefined method `mul' for #<OpenSSL::PKey::EC::Point:0x1f39b3ba> (NoMethodError)

Version

headius commented 4 weeks ago

Shouldn't be too hard to add with BC already implementing it.

headius commented 4 weeks ago

Ok less easy since we are not using the BC ECPoint class in this impl. I'm trying to sort it out now.