I'm really going to be using php to encrypt/sign (
openssl_private_encrypt(), openssl_sign() ) I don't see any EVP functions
from php, I'm assuming I can use EVP_* to decrypt/verify these?  Is RSA just
a lower level api where as the EVP's are more for the beginner guys like me?
:)

~Shaun



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Goetz Babin-Ebell
Sent: Tuesday, November 25, 2008 11:08 AM
To: openssl-users@openssl.org
Subject: Re: sign/verify kicking my ass

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shaun wrote:
| Is there another way in C to use openssl's sign/verify/encrypt/decrypt
| without using the low-level api?  I got my test prog working, I guess
I need
| to figure out how to do a SHA1 hash of my data next.

Your friends are
* to sign:   EVP_SignInit, EVP_SignUpdate and EVP_SignFinal
* to verify: EVP_VerifyInit, EVP_VerifyUpdate and EVP_VerifyFinal
* to encrypt: EVP_EncryptInit, EVP_EncryptUpdate and EVP_EncryptFinal
* to decrypt: EVP_DecryptInit, EVP_DecryptUpdate and EVP_DecryptFinal

With your experience you really should not use the RSA_* functions
directly.

And beware: all these functions handle *binary* data, calling string
functions on data generated by them is simply wrong.


I think the RSA_sign man page should get a warning and a pointer
to the EVP interface.


Goetz

- --
DMCA: The greed of the few outweighs the freedom of the many
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJLE0d2iGqZUF3qPYRAs2ZAJ9ie6ev4bXXWQxOTdBMNCjnQzjSHgCfSxGK
tOE3jgsenLkcx4TNdNTVRXs=
=yZKz
-----END PGP SIGNATURE-----
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to