Class: OpenSSL::PKey::EC::Group
| Relationships & Source Files | |
| Namespace Children | |
| 
       Exceptions: 
      
     | |
| Inherits: | Object | 
| Defined in: | ext/openssl/ossl_pkey_ec.c | 
Class Method Summary
- 
    
      .new(ec_group)  
    
    constructor
    
Creates a new
Groupobject. 
Instance Attribute Summary
- 
    
      #asn1_flag  ⇒ Integer 
    
    rw
    
Returns the flags set on the group.
 - 
    
      #asn1_flag=(flags)  
    
    rw
    
Sets flags on the group.
 - 
    
      #point_conversion_form  ⇒ Symbol 
    
    rw
    
Returns the form how Point data is encoded as ASN.1.
 - 
    
      #point_conversion_form=(form)  
    
    rw
    
Sets the form how Point data is encoded as ASN.1 as defined in X9.62.
 - 
    
      #seed  ⇒ String? 
    
    rw
    
See the ::OpenSSL documentation for EC_GROUP_get0_seed().
 - 
    
      #seed=(seed)  ⇒ seed 
    
    rw
    
See the ::OpenSSL documentation for EC_GROUP_set_seed().
 
Instance Method Summary
- 
    
      #==(group2)  ⇒ Boolean 
      (also: #eql?)
    
    
Returns true if the two groups use the same curve and have the same parameters, false otherwise.
 - 
    
      #get_cofactor  ⇒ cofactor_bn 
    
    
Returns the cofactor of the group.
 - 
    
      #curve_name  ⇒ String 
    
    
Returns the curve name (sn).
 - 
    
      #degree  ⇒ Integer 
    
    
See the ::OpenSSL documentation for EC_GROUP_get_degree().
 - 
    
      #eql?(group2)  ⇒ Boolean 
    
    
Alias for #==.
 - 
    
      #generator  ⇒ ec_point 
    
    
Returns the generator of the group.
 - 
    
      #get_order  ⇒ order_bn 
    
    
Returns the order of the group.
 - 
    
      #set_generator(generator, order, cofactor)  ⇒ self 
    
    
Sets the curve parameters.
 
Constructor Details
    
      .new(ec_group)  
      .new(pem_or_der_encoded)  
      .new(ec_method)  
      .new(:GFp, bignum_p, bignum_a, bignum_b)  
      .new(:GF2m, bignum_p, bignum_a, bignum_b)  
    
  
Creates a new 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 Attribute Details
#asn1_flag ⇒ Integer (rw)
Returns the flags set on the group.
See also #asn1_flag=.
#asn1_flag=(flags) (rw)
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().
    #point_conversion_form  ⇒ Symbol  (rw)  
Returns the form how Point data is encoded as ASN.1.
See also #point_conversion_form=.
#point_conversion_form=(form) (rw)
Sets the form how 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()
    #seed  ⇒ String?  (rw)  
See the ::OpenSSL documentation for EC_GROUP_get0_seed()
#seed=(seed) ⇒ seed (rw)
See the ::OpenSSL documentation for EC_GROUP_set_seed()
Instance Method Details
    
      #eql?(group2)  ⇒ Boolean 
      #==(group2)  ⇒ Boolean 
    
    Also known as: #eql?
  
Boolean 
      #==(group2)  ⇒ Boolean 
    Returns true if the two groups use the same curve and have the same parameters, false otherwise.
    #get_cofactor  ⇒ cofactor_bn   
Returns the cofactor of the group.
See the ::OpenSSL documentation for EC_GROUP_get_cofactor()
    #curve_name  ⇒ String   
Returns the curve name (sn).
See the ::OpenSSL documentation for EC_GROUP_get_curve_name()
#degree ⇒ Integer
See the ::OpenSSL documentation for EC_GROUP_get_degree()
    
      #eql?(group2)  ⇒ Boolean 
      #==(group2)  ⇒ Boolean 
    
  
Boolean 
      #==(group2)  ⇒ Boolean 
    Alias for #==.
    #generator  ⇒ ec_point   
Returns the generator of the group.
See the ::OpenSSL documentation for EC_GROUP_get0_generator()
    #get_order  ⇒ order_bn   
Returns the order of the group.
See the ::OpenSSL documentation for EC_GROUP_get_order()
    #set_generator(generator, order, cofactor)  ⇒ self   
Sets the curve parameters. #generator must be an instance of Point that is on the curve. #order and #cofactor are integers.
See the ::OpenSSL documentation for EC_GROUP_set_generator()