<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 29, 2021 at 6:48 PM Jon Callas <<a href="mailto:jon@callas.org" target="_blank">jon@callas.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Mar 29, 2021, at 08:42, Phillip Hallam-Baker <<a href="mailto:phill@hallambaker.com" target="_blank">phill@hallambaker.com</a>> wrote:<br>
> <br>
> The simplest clean option is to write a very simple block cipher using a key derivation function to provide a schedule of XOR masks combined with n bit rotations. That would make it easy to create a permutation algorithm for an arbitrary length bit string.<br>
> <br>
<br>
What's wrong with CFB mode? There are indeed short CFB modes that let you take even one bit per block cipher iteration. Seems to me that that's not only easiest, but has security guarantees.<br>
<br>
For that matter, what's wrong with Counter Mode?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Same problem as with a stream cipher.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The problem here is to use a single key to permute 2^n identifiers so that nothing is given away from the sequences. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If we use a stream cipher (or CTR mode, CFB, GCM, etc) we are effectively XORing every value with the same mask.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Permute (0) = 0 XOR k</div>Permute (<span class="gmail_default" style="font-size:small">1</span>) = <span class="gmail_default" style="font-size:small">1</span><span class="gmail_default" style="font-size:small"></span><span class="gmail_default" style="font-size:small"></span><span class="gmail_default" style="font-size:small"></span> XOR <span class="gmail_default" style="font-size:small">k</span><br></div><div>Permute (<span class="gmail_default" style="font-size:small">2</span>) = <span class="gmail_default" style="font-size:small">2</span> XOR <span class="gmail_default" style="font-size:small">k</span></div><div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">What I want is for Permute (x) to be an unpredictable bijection and to be able to do it in 8, 16, 24, 32, 40, etc chunks.</div><div class="gmail_default" style="font-size:small"><br></div><br></div><div><div class="gmail_default" style="font-size:small"><br></div></div></div></div></div></div>