class OpenSSL::PKey::EC::Group
Public Class Methods
(self group) → void
(String pem_or_der_encoded) → void
(ec_method ec_method) → void
(:GFp | :GF2m ec_method, Integer bignum_p, Integer bignum_a, Integer bignum_b) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6862
def initialize: (self group) -> void
| (String pem_or_der_encoded) -> void
| (ec_method ec_method) -> void
| (:GFp | :GF2m ec_method, Integer bignum_p, Integer bignum_a, Integer bignum_b) -> void
Creates a new EC::Group object.
If the first argument is :GFp or :GF2m, creates a new curve with given parameters.
Public Instance Methods
(self other) → bool
Returns true if the two groups use the same curve and have the same parameters, false otherwise.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6686
def asn1_flag: () -> Integer
Returns the flags set on the group.
See also asn1_flag=.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6702
def asn1_flag=: (Integer) -> Integer
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:
See the OpenSSL documentation for EC_GROUP_set_asn1_flag().
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6712
def cofactor: () -> BN
Returns the cofactor of the group.
See the OpenSSL documentation for EC_GROUP_get_cofactor()
() → String
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6723
def curve_name: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6731
def degree: () -> Integer
See the OpenSSL documentation for EC_GROUP_get_degree()
(self other) → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6741
def eql?: (self other) -> bool
Returns true if the two groups use the same curve and have the same parameters, false otherwise.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6751
def generator: () -> Point?
Returns the generator of the group.
See the OpenSSL documentation for EC_GROUP_get0_generator()
(self) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6872
def initialize_copy: (self) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6761
def order: () -> BN
Returns the order of the group.
See the OpenSSL documentation for EC_GROUP_get_order()
() → point_conversion_format
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6771
def point_conversion_form: () -> point_conversion_format
Returns the form how EC::Point data is encoded as ASN.1.
See also point_conversion_form=.
(point_conversion_format format) → point_conversion_format
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6795
def point_conversion_form=: (point_conversion_format format) -> point_conversion_format
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()
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6803
def seed: () -> String?
See the OpenSSL documentation for EC_GROUP_get0_seed()
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6811
def seed=: (String seed) -> String
See the OpenSSL documentation for EC_GROUP_set_seed()
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6822
def set_generator: (Point generator, Integer order, Integer cofactor) -> self
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6830
def to_der: () -> String
See the OpenSSL documentation for i2d_ECPKParameters_bio()
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 6838
def to_pem: () -> String
See the OpenSSL documentation for PEM_write_bio_ECPKParameters()