<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 3, 2015 at 11:35 AM, Irene Knapp <span dir="ltr"><<a href="mailto:ireneista@gmail.com" target="_blank">ireneista@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-size:19.7999992370605px;line-height:23.7600002288818px">Surely, what you are describing is a lightweight tool that either generates LLVM bitcode, or hooks into the LLVM backends at a slightly lower level than that to output particular instructions when that's what you really, really want - but I suspect its hinting system already makes that unnecessary for this use-case.  LLVM bitcode is precisely this "mostly concrete assembly" concept that you're describing.</span></div></blockquote><div><br></div><div>The problem with using LLVM in this context is robust cryptographic implementations need to follow a very specific set of rules to avoid cache timing attacks, and LLVM is not designed to follow these rules:</div><div><br></div><div><a href="https://cryptocoding.net/index.php/Coding_rules">https://cryptocoding.net/index.php/Coding_rules</a></div><div><br></div><div>LLVM has not been designed to support the generation of constant time code and is instead rather eager to do things like insert branches in otherwise branch free code if it thinks the code can be better optimized. </div></div><div><br></div>-- <br><div class="gmail_signature">Tony Arcieri<br></div>
</div></div>