EVP Signing and Verifying

From OpenSSLWiki
Revision as of 01:03, 8 February 2015 by Jwalton (talk | contribs) (→‎Downloads)
Jump to navigationJump to search

There are two APIs available to perform sign and verify operations. The first are the older EVP_Sign* and EVP_Verify* functions; and the second are the newer and more flexible EVP_DigestSign* and EVP_DigestVerify* functions. Though the APIs are similar, new applications should use the EVP_DigestSign* and EVP_DigestVerify* functions.

The examples below use the new EVP_DigestSign* and EVP_DigestVerify* functions to demonstarte signing and verification. The first example uses an HMAC, and the second example uses RSA key pairs. Additionally, the code for the example is available for download.


Refer to Manual:EVP_DigestVerifyInit(3) and Manual:EVP_VerifyInit(3) for further information on the verify functions.


Downloads

t-hmac.c.tar.gz - sample program to sign and verify a string using an HMAC with the EVP_DigestSign* and EVP_DigestVerify* functions.

t-rsa.c.tar.gz - sample program to sign and verify a string using RSA with the EVP_DigestSign* and EVP_DigestVerify* functions.

See also