<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den fre 12 aug. 2022 02:43Phillip Hallam-Baker <<a href="mailto:hallam@gmail.com">hallam@gmail.com</a>> skrev:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div dir="ltr">
<div></div>
<div>
<div dir="ltr"></div>
<h2 style="margin:16px 0px 4px;font-family:"Sofia Pro",Arial,Helvetica,sans-serif;font-weight:700;line-height:27px;text-align:center">
</h2>
<div dir="ltr">
<p style="margin:0px;font-size:25.8px;line-height:normal">
<span style="font-family:UICTFontTextStyleEmphasizedBody;font-size:17pt">Was at Jasper Van Woudenberg’s BlackHat talk on side channels. Had some thunks.</span></p>
<p style="margin:0px;font-size:25.8px;line-height:normal">
<span style="font-family:UICTFontTextStyleEmphasizedBody;font-size:17pt"><br>
</span></p>
</div>
<div dir="ltr"><br>
</div>
<div>According to the traditional threat model, the IV used to initialize a block cipher mode is not sensitive and is passed in clear text.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I don’t do this in the Mesh, I generate the IV and the Key from a KDF using different tags. This was not done for a security reason, it just avoided an additional set of data. The reason for doing this was to prevent reuse of the IV. Every data
 sequence that is encrypted is encrypted using parameters derived from the primary key by means of a unique salt.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">But now consider the effect of using KDF generation of the IV and OCB mode so that the plaintext data being encrypted is tweaked before going into the block cipher. This has the effect of masking the plaintext before it is input to the block,
 provided that the IV is secret.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">This would limit the scope for side channel exploits but not eliminate them. An attacker could still work on the key derivation schedule, but that is kinda hard because it is a one-off. Another possibility would be to work back from the output.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Perhaps if we designed a mode with integrated masking???</div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Encryption modes hiding the nonce has already been proposed. </div><div dir="auto"><br></div><div dir="auto"><a href="https://dl.acm.org/doi/abs/10.1007/978-3-030-26948-7_9">https://dl.acm.org/doi/abs/10.1007/978-3-030-26948-7_9</a><br></div><div dir="auto"><br></div><div dir="auto"></div></div>