<div><br></div><div> On Monday, March 22, 2021 10:48 AM, Phillip Hallam-Baker <phill@hallambaker.com> wrote:<br></div><div> <br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><div style="font-size:small">What I am looking at is ways to tune a cipher so that I can use frequent rekeying<br></div><div style="font-size:small">of the symmetric key to avoid the need to go through an expensive public key<br></div><div style="font-size:small"> agreement.<br></div></div></div></div></div></blockquote><div><br></div><div>Public key agreement is expensive?<br></div><div><br></div><div>On my desktop, it costs a couple of microseconds to generate a fresh shared<br></div><div>symmetric secret from a an unshared ristretto25519 scalar and a shared<br></div><div>ristretto25519 elliptic point.<br></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><div style="font-size:small">OCB can be configured so it can be used in the same manner as ECB<br></div><div style="font-size:small"> (i.e. random lookup) but with a performance penalty for each 'seek' <br></div><div style="font-size:small">operation. And you can't do authentication of course.<br></div></div></div></div></div></blockquote><div><br></div><div>I am using ChaCha20 with continual random seek and authentication, no <br></div><div>noticeable performance penalty, though I have not really tested for performance.<br></div><div><br></div><div>It looks to me that the standard entry point to the libsodium library does a random<br></div><div>seek every time it decrypts and authenticates a sequence of bytes, whether it<br></div><div>needs to do so or not, though I have not verified this.  I have verified that it does<br></div><div> a random seek every sixty four bytes when decrypting a sequence of more than<br></div><div>sixty four bytes, that it does the same thing as it would do for a completely<br></div><div>new key, nonce, and byte offset, every sixty four bytes, which is why I have not<br></div><div>bothered to verify the other two issues.<br></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div style="font-size:small"><br></div><div style="font-size:small"><br></div><div style="font-size:small">Phill<br></div><div style="font-size:small"><br></div></div></div></div></blockquote><div><br></div>