<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I honestly believe that the various contexts should be reusable.<div class="">Without this, the recent provider additions will impose a significant overhead.</div><div class=""><br class=""></div><div class="">Pauli<br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">-- <br class="">Dr Paul Dale | Distinguished Architect | Cryptographic Foundations <br class="">Phone +61 7 3031 7217<br class="">Oracle Australia</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 18 Jun 2020, at 4:27 pm, Richard Levitte <<a href="mailto:levitte@openssl.org" class="">levitte@openssl.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I think 16k was enough to demonstrate that the timing difference<br class="">becomes more marginal the larger the amount of data to encrypt in the<br class="">same session is.<br class=""><br class="">This makes me think that we might want to rethink the reset functions,<br class="">i.e. the likes of EVP_CIPHER_CTX_reset()...  could we change that<br class="">function to become a call down to provider code?  We do allow that for<br class="">the non-provider back-ends, they can implement a 'cleanup' function.<br class="">Right now, EVP_CIPHER_CTX_reset() just calls the provider's function<br class="">to free its operation context, which forces us to re-initialize<br class="">everything with a restarted session, i.e. pass the key anew, etc etc<br class="">etc.<br class=""><br class="">Cheers,<br class="">Richard<br class=""><br class="">On Thu, 18 Jun 2020 06:50:45 +0200,<br class="">Hal Murray wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">How does it look for large input?  As in many kilobytes or megabytes?<br class=""></blockquote><br class="">16K is all I was willing to wait for.  Timing for really long blocks turns <br class="">into a memory test.  The right unit is ns/byte.  If that's an interesting <br class="">case, I'll hack some code to do longer blocks.<br class=""></blockquote>pp> <br class=""><blockquote type="cite" class="">1.1.1g<br class="">     AES-128  16 48 16    225   0.225  475ac1c053379e7dbd4ce80b87d2178e<br class="">     AES-128  16 1024 16   1682   1.682  159d6d5c13f35d37c72efc5f6dbf40ad<br class="">     AES-128  16 16384 16  24566  24.566  581f7b133ad6f3697f33c3f836fdb6e6<br class=""><br class="">3.0.0 alpha3<br class="">     AES-128  16 48 16    496   0.496  475ac1c053379e7dbd4ce80b87d2178e<br class="">     AES-128  16 1024 16   1953   1.953  159d6d5c13f35d37c72efc5f6dbf40ad<br class="">     AES-128  16 16384 16  24820  24.820  581f7b133ad6f3697f33c3f836fdb6e6<br class=""><br class="">-----------<br class=""><br class="">3.0.0 alpha3:<br class="">CMAC<br class="">     AES-128  16 16384 16  25270  25.270  581f7b133ad6f3697f33c3f836fdb6e6<br class="">PKEY<br class="">     AES-128  16 16384 16  24839  24.839  581f7b133ad6f3697f33c3f836fdb6e6<br class="">EVP_MAC<br class="">     AES-128  16 16384 16  25462  25.462  581f7b133ad6f3697f33c3f836fdb6e6<br class="">EVP_MAC with Preload cipher and key<br class="">     AES-128  16 16384 16  24567  24.567  581f7b133ad6f3697f33c3f836fdb6e6<br class=""><br class=""><br class=""><br class="">-- <br class="">These are my opinions.  I hate spam.<br class=""><br class=""><br class=""><br class=""></blockquote>-- <br class="">Richard Levitte         <a href="mailto:levitte@openssl.org" class="">levitte@openssl.org</a><br class="">OpenSSL Project         <a href="http://www.openssl.org/~levitte/" class="">http://www.openssl.org/~levitte/</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>