RSA_sign_ASN1_OCTET_STRING 3 2003-07-24 0.9.9-dev OpenSSL

NAME

RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
    RSA *rsa);


 int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
    RSA *rsa);

DESCRIPTION

_R_S_A___s_i_g_n___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) signs the octet string mm of size mm__lleenn using the private key rrssaa represented in DER using PKCS #1 padding. It stores the signature in ssiiggrreett and the signature size in ssiigglleenn. ssiiggrreett must point to RRSSAA__ssiizzee((rrssaa)) bytes of memory.

dduummmmyy is ignored.

The random number generator must be seeded prior to calling _R_S_A___s_i_g_n___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_).

_R_S_A___v_e_r_i_f_y___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) verifies that the signature ssiiggbbuuff of size ssiigglleenn is the DER representation of a given octet string mm of size mm__lleenn. dduummmmyy is ignored. rrssaa is the signer's public key.

RETURN VALUES

_R_S_A___s_i_g_n___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) returns 1 on success, 0 otherwise. _R_S_A___v_e_r_i_f_y___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) returns 1 on successful verification, 0 otherwise.

The error codes can be obtained by _E_R_R___g_e_t___e_r_r_o_r(3).

BUGS

These functions serve no recognizable purpose.

SEE ALSO

_E_R_R___g_e_t___e_r_r_o_r(3), _o_b_j_e_c_t_s(3), _o_p_e_n_s_s_l___r_a_n_d(3), _o_p_e_n_s_s_l___r_s_a(3), _R_S_A___s_i_g_n(3), _R_S_A___v_e_r_i_f_y(3)

HISTORY

_R_S_A___s_i_g_n___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) and _R_S_A___v_e_r_i_f_y___A_S_N_1___O_C_T_E_T___S_T_R_I_N_G_(_) were added in SSLeay 0.8.