1*2175Sjp161948=pod 2*2175Sjp161948 3*2175Sjp161948=head1 NAME 4*2175Sjp161948 5*2175Sjp161948DSA_do_sign, DSA_do_verify - raw DSA signature operations 6*2175Sjp161948 7*2175Sjp161948=head1 SYNOPSIS 8*2175Sjp161948 9*2175Sjp161948 #include <openssl/dsa.h> 10*2175Sjp161948 11*2175Sjp161948 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); 12*2175Sjp161948 13*2175Sjp161948 int DSA_do_verify(const unsigned char *dgst, int dgst_len, 14*2175Sjp161948 DSA_SIG *sig, DSA *dsa); 15*2175Sjp161948 16*2175Sjp161948=head1 DESCRIPTION 17*2175Sjp161948 18*2175Sjp161948DSA_do_sign() computes a digital signature on the B<len> byte message 19*2175Sjp161948digest B<dgst> using the private key B<dsa> and returns it in a 20*2175Sjp161948newly allocated B<DSA_SIG> structure. 21*2175Sjp161948 22*2175Sjp161948L<DSA_sign_setup(3)|DSA_sign_setup(3)> may be used to precompute part 23*2175Sjp161948of the signing operation in case signature generation is 24*2175Sjp161948time-critical. 25*2175Sjp161948 26*2175Sjp161948DSA_do_verify() verifies that the signature B<sig> matches a given 27*2175Sjp161948message digest B<dgst> of size B<len>. B<dsa> is the signer's public 28*2175Sjp161948key. 29*2175Sjp161948 30*2175Sjp161948=head1 RETURN VALUES 31*2175Sjp161948 32*2175Sjp161948DSA_do_sign() returns the signature, NULL on error. DSA_do_verify() 33*2175Sjp161948returns 1 for a valid signature, 0 for an incorrect signature and -1 34*2175Sjp161948on error. The error codes can be obtained by 35*2175Sjp161948L<ERR_get_error(3)|ERR_get_error(3)>. 36*2175Sjp161948 37*2175Sjp161948=head1 SEE ALSO 38*2175Sjp161948 39*2175Sjp161948L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, 40*2175Sjp161948L<DSA_SIG_new(3)|DSA_SIG_new(3)>, 41*2175Sjp161948L<DSA_sign(3)|DSA_sign(3)> 42*2175Sjp161948 43*2175Sjp161948=head1 HISTORY 44*2175Sjp161948 45*2175Sjp161948DSA_do_sign() and DSA_do_verify() were added in OpenSSL 0.9.3. 46*2175Sjp161948 47*2175Sjp161948=cut 48