You could replace the allocator used with some more performant or lightweight one. See the CRYPTO_set_mem_functions() call. There is IMO no other alternative. Tomas Mraz, OpenSSL On Thu, 2023-05-18 at 17:11 +0530, sushma s wrote: > Thanks Tomas. > Are there any alternatives we can explore - Dynamic allocation has a > huge impact.... > > On Thu, May 18, 2023 at 5:03 PM Tomas Mraz <tomas@xxxxxxxxxxx> wrote: > > No, this is no longer possible. The contexts are completely > > internal > > structures and thus it is not possible to declare them on stack. > > > > Tomas Mraz, OpenSSL > > > > On Thu, 2023-05-18 at 16:09 +0530, sushma s wrote: > > > In OpenSSL 1.0, we could stack allocate EVP_MD_CTX. > > > > > > Now this is replaced with 'EVP_MD_CTX_new' which needs to be > > > dynamically allocated. > > > > > > Are there any alternatives to 'EVP_MD_CTX_new' which enables us > > > to > > > continue to do a stack allocation for the digest routines. > > > > > > NOTE: we have some constraints wrt dynamic allocation in our > > > work. > > > > > > Thanks. > > -- Tomáš Mráz, OpenSSL