Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

OpenSSL::PKey::EC::Group.new

OpenSSL::PKey::EC::Group.new(ec_group)
OpenSSL::PKey::EC::Group.new(pem_or_der_encoded)
OpenSSL::PKey::EC::Group.new(ec_method)
OpenSSL::PKey::EC::Group.new(:GFp, bignum_p, bignum_a, bignum_b)
OpenSSL::PKey::EC::Group.new(:GF2m, bignum_p, bignum_a, bignum_b)

Creates a new EC::Group object.

ec_method is a symbol that represents an EC_METHOD. Currently the following are supported:

  • :GFp_simple

  • :GFp_mont

  • :GFp_nist

  • :GF2m_simple

If the first argument is :GFp or :GF2m, creates a new curve with given parameters.

See also #== #asn1_flag also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1