I'm implementing hashing (aka. digest) and signing in an app that uses the OpenSSL EVP API. However the API has three very similar methods, which are confusing:
Signwhich sounds like it should be used for signing, howeverEVP_SignInitis simply a#definetoEVP_DigestInitDigestwhich seems like it can only be used only for hash generation, there is no way to specify anEVP_PKEY.DigestSignwhich looks like it does both the hashing and the signing.
But the documentation recomments to use DigestSign for signing (and not the actual Sign).
I'm not a cryptography expert, so this is very confusing to me. What is the difference between them? Which one is a good choice for implementing signing?