<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 3, 2015 at 3:22 PM, Christian Huitema <span dir="ltr"><<a href="mailto:huitema@huitema.net" target="_blank">huitema@huitema.net</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"><span class="">> On Thu, 9/3/15, Peter Gutmann <<a href="mailto:pgut001@cs.auckland.ac.nz">pgut001@cs.auckland.ac.nz</a>> wrote:<br>
><br>
>  So for now I've left things at the ad-hoc level, checking<br>
>  for ASCII strings,</span></blockquote><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"><span class="">.....<br>
>  user "are you sure this is what's meant to be used as a<br>
>  key".<br>
<br>
</span>You could consider using machine learning. Get a good sized sample of test keys, an equal size sample of no test keys, constraint the learning enough so that it does not simply enumerate the test keys, and you would get a nice little classifier that would tell you whether to trigger the question.</blockquote><div><br></div>One important bit is how to structure this in your code.<br>Even if you have no strategy today the code stub can <br>return all-OK or randomly trigger a user check.<br><br>You do want to carve out an interface that identifies data, <br>data flow,  security policy and friends even if it is unclear<br>what to test for at this point in time.<br><br>I say this in part because a learning strategy has to remember some <br>things that might be considered secrets. <br> <br>The stub may start as a block of code that lists things to do correctly and tests <br>that each has been done.<br>Static answers get optimized by compilers and can vanish but continue<br>to establish documentation and criteria long after you move on and someone <br>else is tasked with maintaining the code.  asserts() qualify but if DEBUG is <br>never defined as true they never tell you anything.  <br>Pick a cat, any cat and ask Schrödinger</div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">  T o m    M i t c h e l l</div></div>
</div></div>