d2i_ECPKParameters(3) OpenSSL d2i_ECPKParameters(3) NNAAMMEE d2i_ECPKParameters, i2d_ECPKParameters, d2i_ECPKParameters_bio, i2d_ECPKParameters_bio, d2i_ECPKParameters_fp, i2d_ECPKParameters_fp, ECPKParameters_print, ECPKParameters_print_fp - Functions for decoding and encoding ASN1 representations of elliptic curve entities SSYYNNOOPPSSIISS #include EC_GROUP *d2i_ECPKParameters(EC_GROUP **px, const unsigned char **in, long len); int i2d_ECPKParameters(const EC_GROUP *x, unsigned char **out); #define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) #define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) #define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) #define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ (unsigned char *)(x)) int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); DDEESSCCRRIIPPTTIIOONN The ECPKParameters encode and decode routines encode and parse the pub- lic parameters for an EECC__GGRROOUUPP structure, which represents a curve. _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) attempts to decode lleenn bytes at **iinn. If successful a pointer to the EECC__GGRROOUUPP structure is returned. If an error occurred then NNUULLLL is returned. If ppxx is not NNUULLLL then the returned structure is written to **ppxx. If **ppxx is not NNUULLLL then it is assumed that **ppxx contains a valid EECC__GGRROOUUPP structure and an attempt is made to reuse it. If the call is successful **iinn is incremented to the byte following the parsed data. _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) encodes the structure pointed to by xx into DER format. If oouutt is not NNUULLLL is writes the DER encoded data to the buf- fer at **oouutt, and increments it to point after the data just written. If the return value is negative an error occurred, otherwise it returns the length of the encoded data. If **oouutt is NNUULLLL memory will be allocated for a buffer and the encoded data written to it. In this case **oouutt is not incremented and it points to the start of the data just written. _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s___b_i_o_(_) is similar to _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) except it attempts to parse data from BIO bbpp. _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s___f_p_(_) is similar to _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) except it attempts to parse data from FILE pointer ffpp. _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s___b_i_o_(_) is similar to _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) except it writes the encoding of the structure xx to BIO bbpp and it returns 1 for success and 0 for failure. _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s___f_p_(_) is similar to _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) except it writes the encoding of the structure xx to BIO bbpp and it returns 1 for success and 0 for failure. These functions are very similar to the X509 functions described in _d_2_i___X_5_0_9(3), where further notes and examples are available. The ECPKParameters_print and ECPKParameters_print_fp functions print a human-readable output of the public parameters of the EC_GROUP to bbpp or ffpp. The output lines are indented by ooffff spaces. RREETTUURRNN VVAALLUUEESS _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_), _d_2_i___E_C_P_K_P_a_r_a_m_e_t_e_r_s___b_i_o_(_) and _d_2_i___E_C_P_K_P_a_r_a_m_e_- _t_e_r_s___f_p_(_) return a valid EECC__GGRROOUUPP structure or NNUULLLL if an error occurs. _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s_(_) returns the number of bytes successfully encoded or a negative value if an error occurs. _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s___b_i_o_(_), _i_2_d___E_C_P_K_P_a_r_a_m_e_t_e_r_s___f_p_(_), ECPKParameters_print and ECPKParameters_print_fp return 1 for success and 0 if an error occurs. SSEEEE AALLSSOO _c_r_y_p_t_o(3), _e_c(3), _E_C___G_R_O_U_P___n_e_w(3), _E_C___G_R_O_U_P___c_o_p_y(3), _E_C___P_O_I_N_T___n_e_w(3), _E_C___P_O_I_N_T___a_d_d(3), _E_C___K_E_Y___n_e_w(3), _E_C___G_F_p___s_i_m_p_l_e___m_e_t_h_o_d(3), _d_2_i___X_5_0_9(3) 1.0.2u 2019-12-20 d2i_ECPKParameters(3)