Manual Pages for UNIX Darwin command on man RSA_sign
MyWebUniversity

Manual Pages for UNIX Darwin command on man RSA_sign

RSAsign(3) OpenSSL RSAsign(3)

NAME

RSAsign, RSAverify - RSA signatures

SYNOPSIS

#include

int RSAsign(int type, unsigned char *m, unsigned int mlen, unsigned char *sigret, unsigned int *siglen, RSA *rsa); int RSAverify(int type, unsigned char *m, unsigned int mlen, unsigned char *sigbuf, unsigned int siglen, RSA *rsa);

DESCRIPTION

RSAsign() signs the message digest mm of size mmlleenn using the private

key rrssaa as specified in PKCS #1 v2.0. It stores the signature in ssiiggrreett

and the signature size in ssiigglleenn. ssiiggrreett must point to RSAsize(rrssaa) bytes of memory. ttyyppee denotes the message digest algorithm that was used to generate mm. It usually is one of NNIIDDsshhaa11, NNIIDDrriippeemmdd116600 and NNIIDDmmdd55; see objects(3) for details. If ttyyppee is NNIIDDmmdd55sshhaa11, an SSL signature (MD5

and SHA1 message digests with PKCS #1 padding and no algorithm

identifier) is created. RSAverify() verifies that the signature ssiiggbbuuff of size ssiigglleenn matches a given message digest mm of size mmlleenn. ttyyppee denotes the message digest algorithm that was used to generate the signature. rrssaa is the signer's public key.

RETURN VALUES

RSAsign() returns 1 on success, 0 otherwise. RSAverify() returns 1 on successful verification, 0 otherwise. The error codes can be obtained by ERRgeterror(3).

BUGS

Certain signatures with an improper algorithm identifier are accepted

for compatibility with SSLeay 0.4.5 :-)

CCOONNFFOORRMMIINNGG TTOO

SSL, PKCS #1 v2.0

SEE ALSO

ERRgeterror(3), objects(3), rsa(3), RSAprivateencrypt(3), RSApublicdecrypt(3) HISTORY RSAsign() and RSAverify() are available in all versions of SSLeay and OpenSSL.

0.9.7l 2002-09-25 RSAsign(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™