<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PwnHome Research</title>
	<atom:link href="http://pwnhome.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pwnhome.wordpress.com</link>
	<description>Pwning your home!</description>
	<lastBuildDate>Thu, 10 Nov 2011 00:44:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pwnhome.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>PwnHome Research</title>
		<link>http://pwnhome.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pwnhome.wordpress.com/osd.xml" title="PwnHome Research" />
	<atom:link rel='hub' href='http://pwnhome.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Cost of Brute-force</title>
		<link>http://pwnhome.wordpress.com/2011/11/09/cost-of-brute-force/</link>
		<comments>http://pwnhome.wordpress.com/2011/11/09/cost-of-brute-force/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 00:44:36 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[AES]]></category>
		<category><![CDATA[Quantum]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=207</guid>
		<description><![CDATA[Over at crypto.se someone asked a question about the cost in dollars of brute-forcing a 256 bit key. In my answer, I estimated it to be about 8 octodecillion dollar ($8 * 10^57). And that is for the electricity only! Some of the answers were pretty interesting and I learned a few things. For example, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=207&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Over at <a href="http://crypto.stackexchange.com/q/1145/706" target="_blank">crypto.se</a> someone asked a question about the cost in dollars of brute-forcing a 256 bit key. In <a href="http://crypto.stackexchange.com/questions/1145/how-much-would-it-cost-in-u-s-dollars-to-brute-force-a-256-bit-key-in-a-year/1147#1147" target="_blank">my answer</a>, I estimated it to be about 8 octodecillion dollar ($8 * 10^57). And that is for the electricity only! Some of the answers were pretty interesting and I learned a few things. For example, I never knew exactly how a quantum computer would affect symmetric-key cryptography. It turns out that it would <a href="http://en.wikipedia.org/wiki/Quantum_computer#Potential" target="_blank">halve the key space</a>, which is optimal (i.e., you cannot do better). If one could do better with a quantum computer, then that would prove that the key could be brute forced in less than 2^n time. I won&#8217;t pretend to understand exactly why that is, but it is a pretty interesting result that I had wondered about for some time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=207&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/11/09/cost-of-brute-force/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP crypt() bug</title>
		<link>http://pwnhome.wordpress.com/2011/08/22/php-crypt-bug/</link>
		<comments>http://pwnhome.wordpress.com/2011/08/22/php-crypt-bug/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 02:02:24 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=197</guid>
		<description><![CDATA[A serious (and kind of funny) bug was reported in PHP crypt() today. Under certain circumstances, crypt() with an MD5 salt would only return the salt (no hash of the password). The bug was introduced on 7 Aug by rasmus. Take a look at the diff: That&#8217;s right, only one line was changed. Can you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=197&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A serious (and kind of funny) bug was reported in PHP crypt() today. Under certain circumstances, crypt() with an MD5 salt would only return the salt (no hash of the password). The bug was introduced on 7 Aug by <em>rasmus</em>.</p>
<p>Take a look at the <a href="http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/php_crypt_r.c?r1=314438&amp;r2=315218" target="_blank">diff</a>:</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/08/php_crypt_bug.png"><img class="aligncenter size-medium wp-image-198" title="php_crypt_bug" src="http://pwnhome.files.wordpress.com/2011/08/php_crypt_bug.png?w=300&#038;h=33" alt="" width="300" height="33" /></a></p>
<p>That&#8217;s right, only one line was changed. Can you spot the problem (vulnerable code on the left)?</p>
<p>Take a look at the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=strlcat" target="_blank">man page for strlcat</a>, specifically, what is the third parameter? &#8220;Unlike those functions [strncpy and strncat], strlcpy() and strlcat() take the <strong>full size of the buffer</strong> (not just the length) and guarantee to NUL-terminate the result (as long as size is larger than 0 or, in the case of strlcat(), as long as there is at least one byte free in dst).&#8221; So, line 380 in the incorrect code is saying that passwd is only one byte in length.This messes everything up which leads to:</p>
<pre>Description:
------------
If crypt() is executed with MD5 salts, the return value conists of the salt only.
DES and BLOWFISH salts work as expected.

I tested with php from openSUSE PHP5 repository

&gt; php -v
PHP 5.3.7RC6-dev (cli)
&gt; rpm -q php5
php5-5.3.6.201108112132-94.1.x86_64

Test script:
---------------
printf("MD5: %s\n", crypt('password', '$1$U7AjYB.O$'));

Expected result:
----------------
MD5: $1$U7AjYB.O$L1N7ux7twaMIMw0En8UUR1

Actual result:
--------------
MD5: $1$U7AjYB.O</pre>
<p>&nbsp;</p>
<p>So, what is the takeaway? If you look at the commit logs in svn, the bug actually started before the commit shown in the diff above. The author of that change changed a strcat to a strncat in order to &#8220;Make static analyzers happy&#8221;. The very next commit changed the strncat to strlcat with the comment &#8220;&#8230;let&#8217;s use strlcpy/strlcat instead for these static string copies&#8221;. NOTE: same author for both of those commits. So, it was a combination of trying to make a static analyzer happy and not understanding the difference between two function calls. The real kicker though is the most recent commit that fixes the bugs. It has the following commit message &#8220;If you want to remove static analyzer messages, be my guest, but please run unit tests after&#8221;. It turns out that the PHP unit tests would have found this bug, but someone didn&#8217;t run them before committing a fix to the repository. An interesting lesson in software development.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=197&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/08/22/php-crypt-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/08/php_crypt_bug.png?w=300" medium="image">
			<media:title type="html">php_crypt_bug</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (part 5, simple transceiver)</title>
		<link>http://pwnhome.wordpress.com/2011/04/26/intro-to-gnuradio-and-the-usrp-part-5-simple-transceiver/</link>
		<comments>http://pwnhome.wordpress.com/2011/04/26/intro-to-gnuradio-and-the-usrp-part-5-simple-transceiver/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 01:00:38 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=180</guid>
		<description><![CDATA[This is going to be a short and sweet lesson. You want to communicate data across two USRPs. You&#8217;ll need a transceiver. Below (and in the source repository) you&#8217;ll find the GnuRadio-Companion blocks. This is a pretty basic setup. You have two UHD blocks (a source and sink), a number of parameters to control things [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=180&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is going to be a short and sweet lesson. You want to communicate data across two USRPs. You&#8217;ll need a transceiver. Below (and in the source repository) you&#8217;ll find the GnuRadio-Companion blocks.</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/04/simple_transceiver1.png"><img class="aligncenter size-medium wp-image-182" title="simple_transceiver" src="http://pwnhome.files.wordpress.com/2011/04/simple_transceiver1.png?w=300&#038;h=235" alt="" width="300" height="235" /></a>This is a pretty basic setup. You have two UHD blocks (a source and sink), a number of parameters to control things from the command line, modulator and demodulator, etc. One thing that is different is that this graph is not complete. The message source and sink are each missing something. The nice thing is, GnuRadio-Companion will still compile this to a python file. Then you can do as we learned in <a href="http://pwnhome.wordpress.com/2011/04/19/intro-to-gnuradio-and-the-usrp-part-4/" target="_blank">part 4</a>, and modify the python code to interact with those message queues. There are, however, a few other changes you will need to make in the source. The creation of the message sink is not complete, as the constructor expects a message queue. You can easily create one (<em>self.sink_queue = gr.msg_queue()</em>).</p>
<p>There is something else about this block diagram. What are the two probes (probe avg mag^2 and probe signal)? Probes are used to allow the program to access certain information. For example. lets say you want to implement a MAC protocol (say CSMA/CA). You could use the probe signal (which is giving you access to complex to mag^2) to see the instantaneous received signal strength. This could be a good way to do the carrier sensing (something like <em>db_val = 10 * math.log10(self.raw_mag_sqrd_probe.level())</em>). If <em>db_val</em> is below threshold, then the channel is clear. Using the probe avg mag^2, you could get an estimate of the last received packet (since it is an average over the last few received samples). This would work well for an RSSI value which could be stuffed into a packet header and passed up the networking stack.</p>
<p>There are many possibilities. Given the state of the current block diagram, I&#8217;d start by writing a send_pkt and recv_pkt function for the simple_transceiver class which puts a message in the source queue or removes a message from the sink queue respectively (note, in the code above all messages must be 512 bytes in length).</p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=180&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/04/26/intro-to-gnuradio-and-the-usrp-part-5-simple-transceiver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/04/simple_transceiver1.png?w=300" medium="image">
			<media:title type="html">simple_transceiver</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (Part 4, message blocks)</title>
		<link>http://pwnhome.wordpress.com/2011/04/19/intro-to-gnuradio-and-the-usrp-part-4/</link>
		<comments>http://pwnhome.wordpress.com/2011/04/19/intro-to-gnuradio-and-the-usrp-part-4/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 22:39:18 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=173</guid>
		<description><![CDATA[This week I started playing with the message source and sink blocks within GNURadio and found them quite useful. Especially for accessing (sending and receiving) data outside of the actual GNURadio code. Below is the code, but let me explain what is going on (you can get the code from the source repository, see part [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=173&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This week I started playing with the message source and sink blocks within GNURadio and found them quite useful. Especially for accessing (sending and receiving) data outside of the actual GNURadio code. Below is the code, but let me explain what is going on (you can get the code from the source repository, see part 0). I create a top block which has a <em>message_source</em> and a <em>message_sink</em> (and a queue for each). Then I created two functions in the top block, one for sending a packet, and the other for receiving. The code should be fairly simple.</p>
<p>Then in the main portion of the code, I show how this is used. You can interact directly with the queues or by using the two functions.</p>
<pre>
from gnuradio import gr
from time import sleep

class msg_blocks(gr.top_block):

    def __init__(self):
        gr.top_block.__init__(self, 'Message Blocks Test')

        # initialize the queues
        self.sink_queue = gr.msg_queue()
        self.source_queue = gr.msg_queue()

        # initialize the blocks
        self.msg_source = gr.message_source(gr.sizeof_char, self.source_queue)
        self.msg_sink = gr.message_sink(gr.sizeof_char, self.sink_queue, False)

        self.connect((self.msg_source, 0), (self.msg_sink, 0))

    def send_pkt(self, payload):
        self.source_queue.insert_tail(gr.message_from_string(payload))

    def recv_pkt(self):
        pkt = ""

        if self.sink_queue.count():
            pkt = self.sink_queue.delete_head().to_string()

        return pkt            

if __name__=="__main__":
    tb = msg_blocks()
    tb.start()

    # operate on queues directly
    print 'operating on the queues directly'
    print 'sink queue count:', tb.sink_queue.count()

    print 'inserting:', 'a'
    tb.source_queue.insert_tail(gr.message_from_string('a'))

    sleep(1) # sleep to yield to tb thread

    print 'sink queue count:', tb.sink_queue.count()

    print 'received:', tb.sink_queue.delete_head().to_string()

    # operate using methods
    print 'operating with fuctions supplied by the top block'
    print 'sending:', 'a'*512
    tb.send_pkt('a'*512)
    sleep(1)

    print 'received:', tb.recv_pkt()
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=173&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/04/19/intro-to-gnuradio-and-the-usrp-part-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (Part 3, UHD)</title>
		<link>http://pwnhome.wordpress.com/2011/04/14/intro-to-gnuradio-and-the-usrp-part-3-uhd/</link>
		<comments>http://pwnhome.wordpress.com/2011/04/14/intro-to-gnuradio-and-the-usrp-part-3-uhd/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 20:08:47 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=169</guid>
		<description><![CDATA[UHD is the way of the future. Read about it here. Unfortunately, UHD is not in the Ubuntu packages. Furthermore, the gnuradio in Ubuntu packages does not support UHD. That said, there is a way to get it working. This script will install UHD and GNURadio from source. In my next post, I&#8217;ll be doing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=169&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>UHD is the way of the future. Read about it <a href="http://code.ettus.com/redmine/ettus/projects/uhd/wiki" target="_blank">here</a>. Unfortunately, UHD is not in the Ubuntu packages. Furthermore, the gnuradio in Ubuntu packages does not support UHD. That said, there is a way to get it working. <a href="http://www.sbrac.org/files/build-gnuradio" target="_blank">This script</a> will install UHD and GNURadio from source. In my next post, I&#8217;ll be doing an example which uses UHD, so install it!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=169&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/04/14/intro-to-gnuradio-and-the-usrp-part-3-uhd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (Part 2, Visualizing the Waves)</title>
		<link>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-2-visualizing-the-waves/</link>
		<comments>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-2-visualizing-the-waves/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 21:36:51 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>
		<category><![CDATA[FFT]]></category>
		<category><![CDATA[GNURadio]]></category>
		<category><![CDATA[USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=152</guid>
		<description><![CDATA[Ever wonder what data looks like as it propagates through space as a waveform? In this second part of my introduction to GNURadio and the USRP, we will find out. For this part, we will again build a simulated setup in gnuradio-companion. The basic setup will be as follows: source -&#62; modulator -&#62; amplifier -&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=152&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever wonder what data looks like as it propagates through space as a waveform? In this second part of my introduction to GNURadio and the USRP, we will find out. For this part, we will again build a simulated setup in gnuradio-companion. The basic setup will be as follows: source -&gt; modulator -&gt; amplifier -&gt; channel model -&gt; throttle -&gt; sink. In the picture below you can see our setup. The actual setup is fairly complicated, but instructions to download the source can be found in <a href="http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-0-code-repository/">part 0</a>.</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/block_diagram3.png"><img class="aligncenter size-medium wp-image-153" title="Block Diagram for Part 2" src="http://pwnhome.files.wordpress.com/2011/01/block_diagram3.png?w=300&#038;h=215" alt="" width="300" height="215" /></a></p>
<p>In this example I am using a random source to generate random blocks of size 512. The OFDM modulator automatically packetizes the data. The Multiply Const block will act as an amplifier, which will be controlled from the <em>mult_const</em> variable. The channel model is the same as in part 1, but I&#8217;ve added a <em>noise_voltage</em> slider to control the noise. The throttle block was added to slow things down. Last, the FFT sink is a graphical sink that plots the FFT of the signal. The FFT converts from the time domain to the frequency domain. If you want to see what things look like in the time domain, use the Scope  graphical sink.</p>
<p><strong>Running It and Experimentation</strong></p>
<p>To run the code in gnuradio-companion, just generate the python code (F5) and execute it (F6). You should get something that looks like this:</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/gui01.png"><img class="aligncenter size-medium wp-image-155" title="Default Setup" src="http://pwnhome.files.wordpress.com/2011/01/gui01.png?w=300&#038;h=183" alt="" width="300" height="183" /></a></p>
<p>This is what the random source looks like in the frequency domain. You can see the noise floor is about -30 dB and the bandwidth is about 7kHz. Using the GUI you can play with 2 variables. The noise voltage and the multiplication constant. Increasing the noise voltage should cause something like this:</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/gui02.png"><img class="aligncenter size-medium wp-image-156" title="Changing Noise Voltage" src="http://pwnhome.files.wordpress.com/2011/01/gui02.png?w=300&#038;h=183" alt="" width="300" height="183" /></a></p>
<p>As you can see, the noise floor goes up, but the level of the actual signal stays the same. This could make it hard for a decoder to be able to extract the data, we&#8217;d need to amplify the signal. That would look like this:</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/gui03.png"><img class="aligncenter size-medium wp-image-157" title="Increase Multiplier" src="http://pwnhome.files.wordpress.com/2011/01/gui03.png?w=300&#038;h=183" alt="" width="300" height="183" /></a></p>
<p>A signal like this should be much easier to decode.</p>
<p>Another interesting thing to play with is the &#8220;Occupied Tones&#8221; of the OFDM modulator. In the figure below, I&#8217;ve changed the tones from 200 to 50. You&#8217;ll need to stop the code, make the change, regenerate the python code, and run it (F7, F5, F6 are the hotkeys). What happened?</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/gui04.png"><img class="aligncenter size-medium wp-image-158" title="Decrease Occupied Tones" src="http://pwnhome.files.wordpress.com/2011/01/gui04.png?w=300&#038;h=183" alt="" width="300" height="183" /></a></p>
<p><strong>What now?</strong></p>
<p>There is a lot to understand and play with here. Here are some things to look at.</p>
<ul>
<li>Using the default parameters, what happens to the noise floor if you change the multiplier from 1 to 10? Why does this happen? (Checking Peak Hold can help you see exactly what is happening)</li>
<li>Try a few different modulators (change the Modulation Technique in the OFDM modulator, replace OFDM with something different and add a packet encoder if necessary). Does the view of signal change with different modulators?</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=152&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-2-visualizing-the-waves/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/block_diagram3.png?w=300" medium="image">
			<media:title type="html">Block Diagram for Part 2</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/gui01.png?w=300" medium="image">
			<media:title type="html">Default Setup</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/gui02.png?w=300" medium="image">
			<media:title type="html">Changing Noise Voltage</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/gui03.png?w=300" medium="image">
			<media:title type="html">Increase Multiplier</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/gui04.png?w=300" medium="image">
			<media:title type="html">Decrease Occupied Tones</media:title>
		</media:content>
	</item>
		<item>
		<title>thep: Negative Numbers</title>
		<link>http://pwnhome.wordpress.com/2011/01/29/thep-negative-numbers/</link>
		<comments>http://pwnhome.wordpress.com/2011/01/29/thep-negative-numbers/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 16:41:45 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[thep]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=146</guid>
		<description><![CDATA[I was playing around with negative numbers in thep the other day and wrote up a wiki page. Check it out.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=146&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was playing around with negative numbers in thep the other day and wrote up a wiki page. <a href="http://code.google.com/p/thep/wiki/NegativeNumbers">Check it out</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=146&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/01/29/thep-negative-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (Part 0, Code Repository)</title>
		<link>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-0-code-repository/</link>
		<comments>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-0-code-repository/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 13:19:28 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>
		<category><![CDATA[GNURadio]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=136</guid>
		<description><![CDATA[I&#8217;ve created a source code repository for the Intro to GNURadio and the USRP series of blog posts I&#8217;m doing. Check out the source at http://code.google.com/p/intro-to-gnuradio-and-usrp/ so you don&#8217;t have to worry about creating all the blocks yourself. Just go to the link above, click on the source tab, and follow the instructions to check the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=136&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a source code repository for the Intro to GNURadio and the USRP series of blog posts I&#8217;m doing. Check out the source at <a href="https://code.google.com/p/intro-to-gnuradio-and-usrp/">http://code.google.com/p/intro-to-gnuradio-and-usrp/</a> so you don&#8217;t have to worry about creating all the blocks yourself. Just go to the link above, click on the source tab, and follow the instructions to check the source out of the SVN repository.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=136&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/01/29/intro-to-gnuradio-and-the-usrp-part-0-code-repository/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro to GNURadio and the USRP (Part 1, Simple Path)</title>
		<link>http://pwnhome.wordpress.com/2011/01/19/intro-to-gnuradio-and-the-usrp-part-1/</link>
		<comments>http://pwnhome.wordpress.com/2011/01/19/intro-to-gnuradio-and-the-usrp-part-1/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 23:58:46 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[GNURadio and USRP]]></category>
		<category><![CDATA[GNURadio]]></category>
		<category><![CDATA[USRP]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=111</guid>
		<description><![CDATA[I&#8217;m starting to play with GNURadio and the USRP some. Coming from a Computer Science background, I do not have much experience with wireless communication systems. So, I thought I&#8217;d post my experiences to help others. In the first part of the series, we&#8217;ll design a very simple (simulated) communication system using gnuradio-companion (the GNURadio [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=111&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to play with <a href="http://gnuradio.org" target="_blank">GNURadio</a> and the <a href="http://www.ettus.com/order" target="_blank">USRP</a> some. Coming from a Computer Science background, I do not have much experience with wireless communication systems. So, I thought I&#8217;d post my experiences to help others. In the first part of the series, we&#8217;ll design a very simple (simulated) communication system using gnuradio-companion (the GNURadio gui).</p>
<p>From the reading I&#8217;ve been doing on wireless communication system design, things can get pretty complicated very quickly. A basic simulated setup can be created fairly easily though. This requires no special hardware (e.g. a USRP) and has allowed me to do some tinkering.</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/block_diagram2.png"><img class="aligncenter size-medium wp-image-116" title="Block Diagram" src="http://pwnhome.files.wordpress.com/2011/01/block_diagram2.png?w=300&#038;h=134" alt="" width="300" height="134" /></a></p>
<p>The above figure (click to enlarge) shows our basic setup. GNURadio works by building paths from a source to a sink with (potentially) a number of intermediate blocks. Some example sources might be a file, a TCP socket, or a USRP radio. Sinks typically have a corresponding source (e.g. File Sink, TCP Sink, USRP Sink). In this case, I&#8217;m using a TCP Source and a TCP Sink. Any combination of source and sink will work (TCP Source with USRP Sink, USRP Source with File Sink, etc).</p>
<p><strong>Simulated Setup</strong></p>
<p>From the TCP Source, we go to the Packet Encoder (found under Synchronizers in grc). The encoder adds important information such as a preample and CRC32 checksum to each packet. Since I&#8217;ve left the payload length at 0, it will use the default 512. That means all packets will be 512 bytes (not including the bits that the encoder adds). This is important since that means all info sent to the TCP source must be a multiple of 512 bytes. The data is then modulated. Modulation converts the bits into something that a radio can actually transmit (complex numbers). Notice how the &#8220;in&#8221; link of the modulator is pink and the &#8220;out&#8221; is blue. That is because it is converting bytes to complex. After modulation, your data is ready to be placed into the air (via a USRP sink). Since I am only building a simulator, however, I&#8217;ve added a Channel Model block in there (found under filters).</p>
<p>The Channel Model block will simulate a wireless channel. You can configure various parameters (noise, etc). For now, I&#8217;m just leaving that alone.</p>
<p>After the channel comes the demodulation. If we were actually using USRP radios, our transmitter would be done, and we have to start designing a receiver in a new grc file. Since this is just a simulation, I&#8217;ve just hooked the channel model&#8217;s &#8220;out&#8221; to the demodulator&#8217;s &#8220;in&#8221;. The process is then reversed (to a packet decoder, then a TCP sink). So, does it work?</p>
<p><strong>Running It</strong></p>
<p>Now the code is ready to run. Press F5 to build the python code and then F6 to run it. Since I&#8217;m using a TCP source and sink, we can connect to the proper ports to send and receive data. Before sending, make sure you connect to the sink socket so you can see the data come through. The command I use is: nc localhost 9001. To send data I then use: perl -e &#8220;print &#8216;a&#8217;x1024&#8243; | nc localhost 9000. That will send the character &#8216;a&#8217; 1024 times to port 9000. Here is the output:</p>
<p><a href="http://pwnhome.files.wordpress.com/2011/01/output01.png"><img class="aligncenter size-medium wp-image-118" title="Output" src="http://pwnhome.files.wordpress.com/2011/01/output01.png?w=300&#038;h=117" alt="" width="300" height="117" /></a></p>
<p><strong>What now?</strong></p>
<p>Even with this simple setup, there are a number of things you can play with.</p>
<ul>
<li>Change the parameters of the modulator and demodulator</li>
<li>Try out a different modulator/demodulator pair (OFDM which is used in 802.11a for example)</li>
<li>Change the noise voltage and see how high you can set it before the communications break</li>
<li>Once you break communications with noise, add an error correction block to fix it</li>
<li>Any other ideas?</li>
</ul>
<p><strong>UPDATES:</strong></p>
<ol>
<li>After looking into the OFDM modulator code that GNURadio-Companion produces, it turns out that it automatically creates a Packet Encoder block for you. So if you are trying to use OFDM, remove the Packet Encoder from the path and change the modulator to OFDM.</li>
<li>I recently compiled the grc file with the latest version of GnuRadio-Companion, and it didn&#8217;t work any more. After looking at the python code, I realized what happened. The latest version is creating the tcp source first. This blocks execution until something connects to the source. To fix this, just go into the py file and move the tcp sink creation to before the tcp source (or just use the py file from the repository).</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=111&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2011/01/19/intro-to-gnuradio-and-the-usrp-part-1/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/block_diagram2.png?w=300" medium="image">
			<media:title type="html">Block Diagram</media:title>
		</media:content>

		<media:content url="http://pwnhome.files.wordpress.com/2011/01/output01.png?w=300" medium="image">
			<media:title type="html">Output</media:title>
		</media:content>
	</item>
		<item>
		<title>thep: Users Guide</title>
		<link>http://pwnhome.wordpress.com/2010/11/14/thep-users-guide/</link>
		<comments>http://pwnhome.wordpress.com/2010/11/14/thep-users-guide/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 21:51:50 +0000</pubDate>
		<dc:creator>pwnhome</dc:creator>
				<category><![CDATA[thep]]></category>

		<guid isPermaLink="false">http://pwnhome.wordpress.com/?p=108</guid>
		<description><![CDATA[I&#8217;ve started a document on thep which I am calling a users guide. Check it out and learn how to use thep to compute on encrypted integers. thep:UserGuide In related news, DARPA is sponsoring a program called PROCEED (PROgramming Computation on EncryptEd Data). Sounds really cool and I wish I had the opportunity to get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=108&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started a document on thep which I am calling a users guide. Check it out and learn how to use thep to compute on encrypted integers. <a href="http://code.google.com/p/thep/wiki/UserGuide" target="_blank">thep:UserGuide</a></p>
<p>In related news, DARPA is sponsoring a program called <a href="http://www.darpa.mil/tcto/solicitations/BAA-10-81.html" target="_blank">PROCEED</a> (PROgramming Computation on EncryptEd Data). Sounds really cool and I wish I had the opportunity to get involved. Guess I&#8217;ll have to see. BTW, who comes up with those DARPA acronyms anyways? The PROCEED one isn&#8217;t too bad, but I&#8217;ve seen worse.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pwnhome.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pwnhome.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pwnhome.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pwnhome.wordpress.com&amp;blog=7142088&amp;post=108&amp;subd=pwnhome&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pwnhome.wordpress.com/2010/11/14/thep-users-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/93badf02333e5336d1271c81d7ead824?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pwnhome</media:title>
		</media:content>
	</item>
	</channel>
</rss>
