EVP_MAX_BLOCK_LENGTH Macro for upgrading application from openssl 1.0.2 to openssl 3.0

Matt Caswell matt at openssl.org
Wed Aug 11 08:46:29 UTC 2021

On 11/08/2021 08:16, Paramashivaiah, Sunil wrote:
> Hi All,
> In our application we are using  MD5_CBLOCK, SHA_CBLOCK, SHA256_CBLOCK, 
> SHA512_CBLOCK macros which are deprecated in openssl 3.0.
>                We are trying upgrade our application from using openssl 
> 1.0.2 to openssl 3.0.
>               Can we use EVP_MAX_BLOCK_LENGTH to replace all these 
> macros. Please suggest.

No, these things are not equivalent. EVP_MAX_BLOCK_LENGTH is referring 
to the block size for ciphers. Why do you need the block size for the 

You can query the block size for a given digest at runtime using 


> Thanks and Regards,
> Sunil
> Notice: This e-mail together with any attachments may contain 
> information of Ribbon Communications Inc. and its Affiliates that is 
> confidential and/or proprietary for the sole use of the intended 
> recipient. Any review, disclosure, reliance or distribution by others or 
> forwarding without express permission is strictly prohibited. If you are 
> not the intended recipient, please notify the sender immediately and 
> then delete all copies, including any attachments.

More information about the openssl-users mailing list