EVP Signing and Verifying

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

EVP Signing and Verifying

Thomas Dwyer III
The first signing example at https://wiki.openssl.org/index.php/EVP_Signing_and_Verifying explicitly calls both EVP_DigestInit_ex() and EVP_DigestSignInit(). Is the former really necessary? It appears that the implementation of EVP_DigestSignInit() in all versions of OpenSSL internally invokes EVP_DigestInit_ex() so I'm confused by this example. Did I miss something?


Thanks,
Tom.III

Reply | Threaded
Open this post in threaded view
|

Re: EVP Signing and Verifying

Matt Caswell-2


On 27/04/2020 20:51, Thomas Dwyer III wrote:
> The first signing example at
> https://wiki.openssl.org/index.php/EVP_Signing_and_Verifying explicitly
> calls both EVP_DigestInit_ex() and EVP_DigestSignInit(). Is the former
> really necessary? It appears that the implementation of
> EVP_DigestSignInit() in all versions of OpenSSL internally invokes
> EVP_DigestInit_ex() so I'm confused by this example. Did I miss something?

No - it's not necessary.

In fact both of those HMAC examples looked a bit more complicated to me
than they needed to be for the purposes of an example. So I've updated
the page to try and simplify things a bit and removed the double init.

Matt