<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>C question in All Things Unix</title>
<link>http://www.dslreports.com/forum/r20964802</link>
<description></description>
<language>en</language>
<pubDate>Wed, 10 Feb 2010 10:32:18 EDT</pubDate>
<lastBuildDate>Wed, 10 Feb 2010 10:32:18 EDT</lastBuildDate>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,21134084</link>
<description><![CDATA[<A HREF="/useremail/u/1582623"><b>Dr_Death</b></A> : TSI Gabe, did you have a look on nick breese POC.<br>&raquo;<A HREF="http://www.security-assessment.com/files/presentations/md5-spu-0.1.tar.gz" >www.security-assessment.com/file&middot;&middot;&middot;1.tar.gz</A><br>it include two files PPU_md5.c & SPU_md5.c<br>it may help you to reach 1.4 billion calculation a second.<br><br>there is a guy who modify john the ripper ppc version to run from spu instead of cpu, but he didnt publish it.<br>&raquo;<A HREF="http://chamewco.livejournal.com/107802.html" >chamewco.livejournal.com/107802.html</A><br><br>good luck.]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,21134084</guid>
<pubDate>Thu, 18 Sep 2008 22:02:11 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20972077</link>
<description><![CDATA[<A HREF="/useremail/u/993162"><b>TakeTheFifth</b></A> : <A HREF="http://www.security-assessment.com/files/presentations/crackstation-njb-bheu08-v2.pdf">Inspiration ?<br></a><br>Phil]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20972077</guid>
<pubDate>Mon, 18 Aug 2008 23:47:08 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20969642</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : The problem with the SPUs is that its _extremely_ slow at branching. Any jmp will cause it to stall for at least 20 cycles. So basically the whole md5 function is __inline__'d and does very simple spu_or,xor,and on 4 32-bit vectors.<br><br>So I'm trying to code a function that is as much unrolled and pipelined as possible to generate a word list.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20969642</guid>
<pubDate>Mon, 18 Aug 2008 15:51:02 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20969612</link>
<description><![CDATA[<A HREF="/useremail/u/156437"><b>dave</b></A> : <div class="bquote"><small>said by  Steve <A HREF="/useremail/u/340145"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>... that appears to violate the laws of physics.</div>The PS3 uses logic elements made from <A HREF="http://en.wikipedia.org/wiki/Thiotimoline">resublimated thiotimoline.</a>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20969612</guid>
<pubDate>Mon, 18 Aug 2008 15:46:36 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20969588</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : I'll open it up when I'm satisfied with what I have.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20969588</guid>
<pubDate>Mon, 18 Aug 2008 15:42:55 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20969467</link>
<description><![CDATA[<A HREF="/useremail/u/274243"><b>GILXA1226</b></A> : This code going to be open, or you are going to keep it closed?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20969467</guid>
<pubDate>Mon, 18 Aug 2008 15:23:22 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20969433</link>
<description><![CDATA[<A HREF="/useremail/u/782124"><b>BeesTea</b></A> : <div class="bquote"><small>said by  Steve <A HREF="/useremail/u/340145"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>For instance, many onlookers will find it hard to reconcile your difficulties with basic C casting with the notion that you've implemented some killer hashing algorithm that appears to violate the laws of physics.<br> </div>Physics schmysics!<br><small>--<br>Overpower, overcome.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20969433</guid>
<pubDate>Mon, 18 Aug 2008 15:17:48 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20967705</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : <div class="bquote"><small>said by  dave <A HREF="/useremail/u/156437"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>Just for info,  what is the length of the source string over which these hashes are generated?<br> </div>8 chars. So yes very simple.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20967705</guid>
<pubDate>Mon, 18 Aug 2008 09:53:52 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20967437</link>
<description><![CDATA[<A HREF="/useremail/u/340145"><b>Steve</b></A> : <div class="bquote"><small>said by  TSI Gabe <A HREF="/useremail/u/1427767"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>Anyway...I really don't have to prove myself. </div>No, you don't, but that won't stop us from reaching our own conclusions based on the evidence here.<br><br>For instance, many onlookers will find it hard to reconcile your difficulties with basic C casting with the notion that you've implemented some killer hashing algorithm that appears to violate the laws of physics.<br><br>But in any case, good luck.<br><br>Steve<br><small>--<br>Stephen J. Friedl | Unix Wizard | Microsoft Security MVP | Tustin, California USA | <A HREF="http://www.unixwiz.net">my web site</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20967437</guid>
<pubDate>Mon, 18 Aug 2008 08:36:23 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20967424</link>
<description><![CDATA[<A HREF="/useremail/u/156437"><b>dave</b></A> : Just for info,  what is the length of the source string over which these hashes are generated?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20967424</guid>
<pubDate>Mon, 18 Aug 2008 08:30:26 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20967388</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : Yeah well the SPUs can do 5 billion hashes per SPU but without storing them back in memory. Of course the PS3 doesn't have enough memory bandwidth to handle it. Keep in mind that the SPUs can do 4 32 bit instructions per operand.<br><br>The problem I'm having is sending all that data back to the PPU which is proving to be impossible since it would fill up the PS3's memory in a few seconds, not to mention it couldn't handle it.<br><br>So the only viable thing it can do is search for one hash or maybe 4 at a time.<br><br>Anyway...I really don't have to prove myself.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20967388</guid>
<pubDate>Mon, 18 Aug 2008 08:14:37 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20966693</link>
<description><![CDATA[<A HREF="/useremail/u/371125"><b>Tony_B</b></A> : Getting ~5 billion hashes a second per core is next to impossible with a PS3 cell processor. Generating *one* MD5 hash requires many CPU instructions (each taking many clock cycles). I will have to concur with  Steve <A HREF="/useremail/u/340145"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> on this one. You must have meant millions... ]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20966693</guid>
<pubDate>Mon, 18 Aug 2008 00:23:15 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20966650</link>
<description><![CDATA[<A HREF="/useremail/u/340145"><b>Steve</b></A> : <div class="bquote"><small>said by  TSI Gabe <A HREF="/useremail/u/1427767"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br> I've been able to reach arround 30 billion MD5 hashes per second using the 6 SPU cores on the PS3... </div>I call bullshit.<br><br>30B MD5 hashes per second over 6 cores means 5B hashes per second per core. I suppose I could believe that the PS3 could do 5B <b>CPU instructions</b> per second per core, but I don't buy that it can do 5B <b>MD5 hashes</b> (even simple ones) per second. I doubt even the memory bandwidth is sufficient for that amount of computation.<br><br>Did you mean <b>million</b>?<br><br>Steve<br><small>--<br>Stephen J. Friedl | Unix Wizard | Microsoft Security MVP | Tustin, California USA | <A HREF="http://www.unixwiz.net">my web site</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20966650</guid>
<pubDate>Mon, 18 Aug 2008 00:09:38 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20966550</link>
<description><![CDATA[<A HREF="/useremail/u/782124"><b>BeesTea</b></A> : <div class="bquote"><small>said by  TSI Gabe <A HREF="/useremail/u/1427767"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>I guess might as well get it out there.<br><br>I've been able to reach arround 30 billion MD5 hashes per second using the 6 SPU cores on the PS3...I'm trying to make it even better still..<br> </div>Thank ${diety} (or math) for salted hashes then.<br><br>What's your practical application? Cracking apache htpasswd files? <br><small>--<br>Overpower, overcome.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20966550</guid>
<pubDate>Sun, 17 Aug 2008 23:37:00 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20966139</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : No you do have access to the SPUs (only 6 out of 8 though). The hypervisor controls access to the RSX video card and hard drive which isn't great I agree.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20966139</guid>
<pubDate>Sun, 17 Aug 2008 22:00:20 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20965332</link>
<description><![CDATA[<A HREF="/useremail/u/588119"><b>netjunk</b></A> : You are not even using cell processors as Sony made sure users don't have direct access to ps3 hardware. So you shouldn't really expect too much out it. What you really need to do is to fix its firmware and then try to find a way to harness real ps3 power.  :D]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20965332</guid>
<pubDate>Sun, 17 Aug 2008 18:51:50 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964935</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : <div class="bquote"><small>said by  dave <A HREF="/useremail/u/156437"><IMG SRC="http://i.dslr.net/bb/profile.gif" ALT="See Profile" BORDER=0 WIDTH=16 HEIGHT=11></A> :</small><br><br>So this is "cracking security for fun and profit with household toys" ?<br> </div>I guess you can put it that way.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964935</guid>
<pubDate>Sun, 17 Aug 2008 17:19:55 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964932</link>
<description><![CDATA[<A HREF="/useremail/u/156437"><b>dave</b></A> : So this is "cracking security for fun and profit with household toys" ?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964932</guid>
<pubDate>Sun, 17 Aug 2008 17:19:18 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964911</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : I guess might as well get it out there.<br><br>I've been able to reach arround 30 billion MD5 hashes per second using the 6 SPU cores on the PS3...I'm trying to make it even better still..<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964911</guid>
<pubDate>Sun, 17 Aug 2008 17:13:49 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964878</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : I'm actually programming for one arch (PS3 Cell Processor to be exact) so that doesn't bother me.<br><br>It does appear to be working so thanks<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964878</guid>
<pubDate>Sun, 17 Aug 2008 17:07:02 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964872</link>
<description><![CDATA[<A HREF="/useremail/u/1070900"><b>nwrickert</b></A> : "abcd" could then be 0x61626364 or 0x64636261 depending on the byte order of the machine.  This can get tricky if you want to avoid such problems.  With copying allowed, there are library functions to avoid that problem ("htonl()" and friends).<br><small>--<br>AT&T dsl; Westell 327w modem/router; openSuSE 11.0; firefox 3.0.1</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964872</guid>
<pubDate>Sun, 17 Aug 2008 17:05:05 EDT</pubDate>
</item>

<item>
<title>Re: C question</title>
<link>http://www.dslreports.com/forum/remark,20964843</link>
<description><![CDATA[<A HREF="/useremail/u/156437"><b>dave</b></A> : This'll probably work:<br><br><tt>x = *(unsigned int*)array</tt><br><br>This is non-portable, dependent on the integer size, dependent on endianness, and may fail on architectures that require aligned integers.  There is no solution without data movement, otherwise.]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964843</guid>
<pubDate>Sun, 17 Aug 2008 16:59:16 EDT</pubDate>
</item>

<item>
<title>C question</title>
<link>http://www.dslreports.com/forum/remark,20964802</link>
<description><![CDATA[<A HREF="/useremail/u/1427767"><b>TSI Gabe</b></A> : This may be unrelated to this forum but it's the closest thing I've found.<br><br>Basically what I'm trying to do is casting an array of char into an array of unsigned integers with their ascii value. for example "aaaa" would cast to 0x61616161. And this without using memcpy and would be as much as possible O(1).<br><br>I know the answer might be simple enough...but I can't seem to figure this one out.<br><small>--<br>TSI Gabe - TekSavvy Solutions Inc.</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20964802</guid>
<pubDate>Sun, 17 Aug 2008 16:46:20 EDT</pubDate>
</item>

</channel>
</rss>
