Class Methods

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.

Instance Methods
An alias for eql?

Returns the flags set on the group.

See also asn1_flag=.

Sets flags on the group. The flag value is used to determine how to encode the group: encode explicit parameters or named curve using an OID.

The flag value can be either of:

  • EC::NAMED_CURVE

  • EC::EXPLICIT_CURVE

See the OpenSSL documentation for EC_GROUP_set_asn1_flag().

Returns the cofactor of the group.

See the OpenSSL documentation for EC_GROUP_get_cofactor()

Returns the curve name (sn).

See the OpenSSL documentation for EC_GROUP_get_curve_name()

See the OpenSSL documentation for EC_GROUP_get_degree()

Returns true if the two groups use the same curve and have the same parameters, false otherwise.

Returns the generator of the group.

See the OpenSSL documentation for EC_GROUP_get0_generator()

No documentation available

Returns the order of the group.

See the OpenSSL documentation for EC_GROUP_get_order()

Returns the form how EC::Point data is encoded as ASN.1.

See also point_conversion_form=.

Sets the form how EC::Point data is encoded as ASN.1 as defined in X9.62.

format can be one of these:

:compressed

Encoded as z||x, where z is an octet indicating which solution of the equation y is. z will be 0x02 or 0x03.

:uncompressed

Encoded as z||x||y, where z is an octet 0x04.

:hybrid

Encodes as z||x||y, where z is an octet indicating which solution of the equation y is. z will be 0x06 or 0x07.

See the OpenSSL documentation for EC_GROUP_set_point_conversion_form()

See the OpenSSL documentation for EC_GROUP_get0_seed()

See the OpenSSL documentation for EC_GROUP_set_seed()

Sets the curve parameters. generator must be an instance of EC::Point that is on the curve. order and cofactor are integers.

See the OpenSSL documentation for EC_GROUP_set_generator()

See the OpenSSL documentation for i2d_ECPKParameters_bio()

See the OpenSSL documentation for PEM_write_bio_ECPKParameters()

See the OpenSSL documentation for ECPKParameters_print()