<div dir="ltr">I don&#39;t know.  The state of Cryptography never really recovered from when the team went through a kind of self-destruct sequence.  Do you remember?  At first we had just one package, &quot;Cryptography&quot; and we were advancing.  Then there was this big push from a few members in the team to &quot;packagify&quot; it into a bunch of tiny little packages (I don&#39;t remember why).<div>
<br></div><div>Unfortunately the dependencies didn&#39;t match the semantic boundaries and we had endless discussions about what class should belong in what package, renaming packages to accomodate their different scope, etc.</div>
<div><br></div><div>Meanwhile, &quot;customers&quot; of Cryptography were having trouble understanding the latest &quot;state&quot; of it and also loading it of course, until, after several months, the team back-tracked and went back to the single package, even though there was still some disagreement, I think, and the &quot;team&quot; sort of fizzled out.</div>
<div><br></div><div>I don&#39;t remember it too clearly -- It&#39;s all in the archives.</div><div><br></div><div>The end result was I sort of threw up my hands and used my own version of Cryptography.  I would like to get back to one good, quality version, though.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 22, 2013 at 9:10 PM, Ron Teitelbaum <span dir="ltr">&lt;<a href="mailto:ron@usmedrec.com" target="_blank">ron@usmedrec.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chris,<br>
<br>
I thought I remembered you doing something like that.  Did you post that code to Cryptography or just to KryptOn?  Didn&#39;t you do the version on Cryptography?  Sure looks to me like the current version is using the sound system.<br>

<br>
Thanks!<br>
<br>
Ron<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">squeak-dev-bounces@lists.squeakfoundation.org</a> [mailto:<a href="mailto:squeak-dev-">squeak-dev-</a><br>
&gt; <a href="mailto:bounces@lists.squeakfoundation.org">bounces@lists.squeakfoundation.org</a>] On Behalf Of Chris Muller<br>
&gt; Sent: Friday, November 22, 2013 4:04 PM<br>
&gt; To: Cryptography Team Development List<br>
&gt; Cc: The general-purpose Squeak developers list<br>
&gt; Subject: Re: [Cryptography Team] RE: [squeak-dev] Crypto support?<br>
&gt;<br>
&gt; (Whew, busy day today!)<br>
&gt;<br>
&gt; &gt; As for status of the Crypto team.  Not too much going on at the moment.<br>
&gt; &gt; I’m still the team leader but the group has been very quiet for some time.<br>
&gt; &gt; I haven’t had time to spend on it lately.  At some point we started<br>
&gt; &gt; working on a better random generator that takes in multiple sources of<br>
&gt; &gt; input; Fortuna based on Schneier’s book.  Never got around to<br>
&gt; &gt; finishing it.  I think Chris’s Secure Random was also based on the<br>
&gt; &gt; same model and he did a version of Fortuna but never did the proper<br>
&gt; &gt; entropy gathering.  It’s been a while so if I’m wrong please feel free to correct<br>
&gt; me.<br>
&gt;<br>
&gt; Back in 2005-2006, I spent, like, 11 months working through that entire book [1]<br>
&gt; and creating a package (KryptOn) that implemented the most important<br>
&gt; chapters from that book as strictly as I could.<br>
&gt;<br>
&gt; Fortuna, of course, was one of the starting points.  I don&#39;t know if I used<br>
&gt; &quot;proper&quot; entropy gathering, but I&#39;m satisified that it is reasonably _enough_<br>
&gt; entropy for seeding Fortuna.  Here&#39;s the method I use to generate an entropic<br>
&gt; string to seed a new Fortuna random<br>
&gt; generator:<br>
&gt;<br>
&gt; unpredictableStringsDo: aBlock<br>
&gt;      &quot;Enumerate sources of information from my environment that should be<br>
&gt; generally hard to guess.&quot;<br>
&gt;      | time |<br>
&gt;      time _ Time millisecondsToRun:<br>
&gt;           [ aBlock<br>
&gt;                value: World imageForm bits compressToByteArray ;<br>
&gt;                value: Sensor mousePoint x asString ;<br>
&gt;                value: Sensor mousePoint y asString ;<br>
&gt;                value: Time millisecondClockValue asByteArray ;<br>
&gt;                value: Date today asString ;<br>
&gt;                value: Time now asString ;<br>
&gt;                value: Display extent asString.<br>
&gt;           100 timesRepeat: [ aBlock value: UUID new ].<br>
&gt;           #(vmVersion platformName primVmPath imageName platformSubtype<br>
&gt; datedVersion lastQuitLogPosition vmStatisticsReportString imageName) collect:<br>
&gt;                [ : each |<br>
&gt;                aBlock value: (SmalltalkImage current perform: each) asByteArray ] ].<br>
&gt;      aBlock<br>
&gt;           value: time asByteArray;<br>
&gt;           &quot;maybe the pointer has moved, hit it again.&quot;<br>
&gt;           value: Sensor mousePoint asString ;<br>
&gt;           value: Time millisecondClockValue asByteArray<br>
&gt;<br>
&gt; Good luck guessing each and every one of those correctly!  Each time aBlock is<br>
&gt; valued with one of the slightly unguessable strings, it is progressively hashed<br>
&gt; after being bixXor&#39;d against the *prior* hashed value before being appended as<br>
&gt; a ByteArray to a stream of bytes, until, finally, the total ByteArray is then hashed<br>
&gt; via SHA256.  That hash value is finally used as the seed for the new Fortuna<br>
&gt; instance.<br>
&gt; The gory details below [2].<br>
&gt;<br>
&gt; There just ain&#39;t no way any hacker could/would try to guess that seed.<br>
&gt;  And I didn&#39;t even need to use Sound input.  But, as you can see, it depends on<br>
&gt; quite a few other things..<br>
&gt;<br>
&gt; So, it takes a long time to run (~ 500 ms) which is why the global #picker is<br>
&gt; initialized just once and can be used indefinitely for that image session.<br>
&gt;<br>
&gt; [1] -- <a href="http://www.amazon.com/Practical-Cryptography-Niels-" target="_blank">http://www.amazon.com/Practical-Cryptography-Niels-</a><br>
&gt; Ferguson/dp/0471223573/ref=sr_1_1?ie=UTF8&amp;qid=1385152889&amp;sr=8-<br>
&gt; 1&amp;keywords=schneier+practical+cryptography<br>
&gt;<br>
&gt; [2] -- generateKey<br>
&gt;      | unguessableBytes prior |<br>
&gt;      prior _ UUID new shuffled asInteger.<br>
&gt;      unguessableBytes _ ByteArray streamContents:<br>
&gt;           [ : stream |<br>
&gt;           self unpredictableStringsDo:<br>
&gt;                [ : each |<br>
&gt;                | current |<br>
&gt;                current _ each size &lt; 30<br>
&gt;                     ifTrue:<br>
&gt;                          [ &quot;Some of the inputs are pretty short, expand them a little, and<br>
&gt; take opportunity to inject some extra craziness.&quot;<br>
&gt;                          (each asByteArray asInteger<br>
&gt;                               raisedTo: 64<br>
&gt;                               modulo: 6773186437430423149     &quot;prime&quot;)<br>
&gt; asByteArray ]<br>
&gt;                     ifFalse: [ each ].<br>
&gt;                &quot;make each value dependent on the prior values, so the adversary is<br>
&gt; required to get every single string exactly right AND guess every the<br>
&gt; randomizations correctly.&quot;<br>
&gt;                current _ SHA1 new hashMessage: (current bitXor: prior).<br>
&gt;                stream nextPutAll: current asByteArray.<br>
&gt;                prior _ current ] ].<br>
&gt;      ^ SHA256 new hashMessage: unguessableBytes<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; There is a plugin implementation available on the croquet plugin.  See<br>
&gt; &gt; gatherEntropy: which was done by Andreas.  It uses platform specific<br>
&gt; &gt; implementations so it’s a pretty good choice.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; We really should finish this work since any real attack on security<br>
&gt; &gt; starts with bad random number generators.  (Well actually an attack at<br>
&gt; &gt; the endpoint is more likely but that’s a different email).<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; All the best,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Ron Teitelbaum<br>
&gt; &gt;<br>
&gt; &gt; Head Of Engineering<br>
&gt; &gt;<br>
&gt; &gt; 3d Immersive Collaboration Consulting<br>
&gt; &gt;<br>
&gt; &gt; <a href="mailto:ron@3dicc.com">ron@3dicc.com</a><br>
&gt; &gt;<br>
&gt; &gt; Follow Me On Twitter: @RonTeitelbaum<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://www.3dicc.com" target="_blank">www.3dicc.com</a><br>
&gt; &gt;<br>
&gt; &gt; 3d ICC on G+<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; From: <a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">squeak-dev-bounces@lists.squeakfoundation.org</a><br>
&gt; &gt; [mailto:<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">squeak-dev-bounces@lists.squeakfoundation.org</a>] On Behalf Of<br>
&gt; &gt; Nicolas Cellier<br>
&gt; &gt; Sent: Tuesday, November 19, 2013 4:43 PM<br>
&gt; &gt; To: The general-purpose Squeak developers list<br>
&gt; &gt; Subject: Re: [squeak-dev] Crypto support?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Sure that makes sense. Historically there were no such service in the<br>
&gt; &gt; System.<br>
&gt; &gt; I wanted to remind that crypto has to care that randomness comes from<br>
&gt; &gt; sufficiently random source, not just a random random source.<br>
&gt; &gt;<br>
&gt; &gt; If the contract is explicit enough (Smalltalk cryptoLevelRandom?),<br>
&gt; &gt; then it can move to the System.<br>
&gt; &gt;<br>
&gt; &gt; But would it serve other purpose than crypto?<br>
&gt; &gt;<br>
&gt; &gt; I would rather implement a CryptoRandom class part of Crypto package,<br>
&gt; &gt; either via plugin or FFI to wrap over /dev/random or equivalent...<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 2013/11/19 Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt; That&#39;s why I used the phrase &quot;better encapsulated&quot; :) I don&#39;t care<br>
&gt; &gt; particularly _where_ the randomness comes from (and on a Unix machine,<br>
&gt; &gt; /dev/random or /dev/urandom (I can&#39;t remember which) is the proper<br>
&gt; &gt; place). I just really, really don&#39;t want a Crypto package depending on<br>
&gt; &gt; a Sound package. So if System supplied a hook that declared &quot;get your<br>
&gt; &gt; randomness here&quot;, and the base image _happened_ to connect that to<br>
&gt; &gt; one&#39;s mic, that would be OK. But the direct dependency is bonkers.<br>
&gt; &gt;<br>
&gt; &gt; frank<br>
&gt; &gt;<br>
&gt; &gt; On 19 November 2013 21:27, Nicolas Cellier<br>
&gt; &gt;<br>
&gt; &gt; &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; &gt;&gt; It&#39;s because crypto must not rely on pseudo random generated numbers,<br>
&gt; &gt;&gt; they are considered too easy to crack.<br>
&gt; &gt;&gt; I guess that sound input was seen as a universal way to get some<br>
&gt; &gt;&gt; hardware noise...<br>
&gt; &gt;&gt; Nowadays, shouldn&#39;t it be something like /dev/random?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; 2013/11/19 Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Does anyone know the current state of play of the crypto team?<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; We have a DSA implementation in &quot;System-Digital Signatures&quot; that<br>
&gt; &gt;&gt;&gt; should belong in a package called &quot;Crypto-Something&quot;, but if the<br>
&gt; &gt;&gt;&gt; other stuff was better I&#39;d rather delete this and use the proper stuff.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Also, we need a better encapsulated source of randomness than<br>
&gt; &gt;&gt;&gt; &quot;SoundService default randomBitsFromSoundInput: 512&quot; because crypto<br>
&gt; &gt;&gt;&gt; shouldn&#39;t depend on a sound package. I don&#39;t care if something<br>
&gt; &gt;&gt;&gt; _plugs that in_, but the direct reference is suboptimal.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; frank<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Cryptography mailing list<br>
&gt; &gt; <a href="mailto:Cryptography@lists.squeakfoundation.org">Cryptography@lists.squeakfoundation.org</a><br>
&gt; &gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptograph" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptograph</a><br>
&gt; &gt; y<br>
&gt; &gt;<br>
&gt;<br>
<br>
<br>
</blockquote></div><br></div>