<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 5, 2014 at 7:00 AM, Bill Cox <span dir="ltr"><<a href="mailto:waywardgeek@gmail.com" target="_blank">waywardgeek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>If I made no mistake (and I do make a lot), the "random" data from the Atmel ATSHA204A is highly predictable when you disable the seed update to EEPROM.  Until we understand the this predictability in their output data, I believe any "random" data from this part should not be used for crypto.<br><br></div>I generated 32 bytes of "random" data repeatedly with the Hashlet, after disabling update_seed (I set the default to false in cli_commands.c).  I ran 1MiB of this generated data through a little bit predictor I wrote, and verified that each output bit has less than 0.5 bits of entropy.<span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div><br>Bill<br></div></font></span></div>
</blockquote></div><br></div><div class="gmail_extra">To check my results, feel free do download two data files I generated using the Hashlet, containing the Atmel part:<br><br><a href="https://github.com/waywardgeek/infnoise/tree/master/hashlet_data">https://github.com/waywardgeek/infnoise/tree/master/hashlet_data</a><br><br></div><div class="gmail_extra">The "one_go" file is what I get when asking for 100,000 bytes in one call to random.  It has no simple correlations I see.  The randdata file was generated by generating 32 bytes from the hashlet over and over, without updating the EEPROM seed.  Bits in these 32 bytes are highly predictible, based on the previous several bits.<br><br></div><div class="gmail_extra">To measure this predictability, I ran it through the usual program "ent", and also a program I wrote specifically to predict the next bit based on the previous N bits.  Ent only detects a 0.1% level of non-randomness.  However, the predictor program I wrote can compress this file by more than 2X.<br><br></div><div class="gmail_extra">The predictor program is in infnoise/software/entcheck.c.  You can convert the hex output from the hashlet program to binary using hex2bin.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I am still tuning the predictor, but if I haven't goofed up, I seem to be able to compress the "random" data from the Atmel part by over 10X.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Bill<br></div></div>