<?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>Beware the Jabberwolk</title>
	<atom:link href="http://tommd.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tommd.wordpress.com</link>
	<description>Jabber about Haskell, Xen, Linux</description>
	<lastBuildDate>Mon, 29 Apr 2013 23:15:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tommd.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Beware the Jabberwolk</title>
		<link>http://tommd.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tommd.wordpress.com/osd.xml" title="Beware the Jabberwolk" />
	<atom:link rel='hub' href='http://tommd.wordpress.com/?pushpress=hub'/>
		<item>
		<title>The Jabberwolk has moved</title>
		<link>http://tommd.wordpress.com/2013/04/29/the-jabberwolk-has-moved/</link>
		<comments>http://tommd.wordpress.com/2013/04/29/the-jabberwolk-has-moved/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 23:15:12 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=184</guid>
		<description><![CDATA[I&#8217;ve moved my blog to tommd.github.io which currently includes my exploration of image processing as well as a run-down of commsec-keyexchange.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=184&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve moved my blog to tommd.github.io which currently includes my exploration of image processing as well as a run-down of commsec-keyexchange.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=184&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2013/04/29/the-jabberwolk-has-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>Clean and reinstall those GHC packages!</title>
		<link>http://tommd.wordpress.com/2011/11/18/clean-and-reinstall-those-ghc-packages/</link>
		<comments>http://tommd.wordpress.com/2011/11/18/clean-and-reinstall-those-ghc-packages/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 03:12:21 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/2011/11/18/clean-and-reinstall-those-ghc-packages/</guid>
		<description><![CDATA[For those of you who are as lazy as me about fixing and reinstalling broken GHC packages, I&#8217;ve ripped off the well-known and loved ghc-pkg-clean script and made it recursive.  No promises of termination:   function ghc-pkg-supercleaner() {     b="0"     for p in `ghc-pkg check $* 2&#62;&#38;1  &#124; grep problems &#124; awk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=178&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div>For those of you who are as lazy as me about fixing and reinstalling broken GHC packages, I&#8217;ve ripped off the well-known and loved ghc-pkg-clean script and made it recursive.  No promises of termination:</div>
<div> </div>
<pre>
function ghc-pkg-supercleaner() {
    b="0"
    for p in `ghc-pkg check $* 2&gt;&amp;1  | grep problems | awk '{print $6}' | sed -e 's/:$//'`
    do
        echo unregistering $p; ghc-pkg $* unregister $p;
        cabal install $p; b="1"
    done
    if [ $b == "1" ];
      then ghc-pkg-supercleaner
    fi
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=178&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2011/11/18/clean-and-reinstall-those-ghc-packages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>HacPDX II &#8211; More Hacking!</title>
		<link>http://tommd.wordpress.com/2011/07/07/hacpdx-ii-more-hacking/</link>
		<comments>http://tommd.wordpress.com/2011/07/07/hacpdx-ii-more-hacking/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 04:50:25 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=160</guid>
		<description><![CDATA[HacPDX II is set for July 22-24, 2011 (Friday &#8211; Sunday)! Be sure to register or else, exactly like HacPDX 1, you might not get network access. I hope to spend most of my time working on Hackage (see here and here) with other interested Haskellers both locally and via IRC (#hacpdx on freenode). Still, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=160&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.haskell.org/haskellwiki/HacPDX-II" title="HacPDX-II">HacPDX II</a> is set for July 22-24, 2011 (Friday &#8211; Sunday)!  Be sure to <a href="http://www.haskell.org/haskellwiki/HacPDX-II/Registration" title="HacPDX-II Reistration">register</a> or else, exactly like HacPDX 1, you might not get network access.</p>
<p>I hope to spend most of my time working on Hackage (see <a href="http://hackage.haskell.org/trac/hackage/wiki/HackageDB/2.0/Switchover" title="Hackage Switchover">here</a> and <a href="http://hackage.haskell.org/trac/hackage/wiki/HackageDB/2.0" title="hackage 2.0 todo">here</a>) with other interested Haskellers both locally and via IRC (#hacpdx on freenode).  Still, I might sqeeze in some time for my seemingly never-complete side projects&#8230; we&#8217;ll see!</p>
<p>Hope to see you there!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=160&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2011/07/07/hacpdx-ii-more-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>Crypto-API, MonadCryptoRandom, DRBG</title>
		<link>http://tommd.wordpress.com/2010/11/02/crypto-api-monadcryptorandom-drbg/</link>
		<comments>http://tommd.wordpress.com/2010/11/02/crypto-api-monadcryptorandom-drbg/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 18:04:07 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=155</guid>
		<description><![CDATA[Announcing a new version of crypto-api and the first release of both DRBG and MonadCryptoRandom. Links can be found at the end of the e-mail along with acknowledgments. Crypto-API Crypto-api, a generic interface for cryptographic algorithms, has hit version 0.2. Notable additions include: If you use cryptographic operations then crypto-api is here to give you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=155&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Announcing a new version of crypto-api and the first release of both<br />
DRBG and MonadCryptoRandom.  Links can be found at the end of the e-mail<br />
along with acknowledgments.</p>
<h2> Crypto-API </h2>
<p>Crypto-api, a generic interface for cryptographic algorithms, has hit<br />
version 0.2.  Notable additions include:</p>
<p>If you use cryptographic operations then crypto-api is here to give you<br />
an easy implementation and algorithm independent interface.</p>
<ul>
<li> The &#8220;OS-independent&#8221; random source (System.Crypto.Random) now works on<br />
Windows. (thanks Stuart Dootson)</p>
<li> No more MonoLocalBinds or ScopedTypeVariables, GHC &lt; 6.12 should now<br />
work.</p>
<li> No more &#8220;instance Monad Either&#8221; what-so-ever.  It got in the way other<br />
other instances more than being helpful.</p>
<li> The order of arguments are swapped in CryptoRandomGen so it fits<br />
standard convention.</p>
<li> Build deps updated so GHC-7 works (Paulo Tanimoto)
</ul>
<p>If you maintain block ciphers, hashes, asymmetric ciphers, stream<br />
ciphers, or random number generators then I encourage you to make an<br />
instance for the matching Crypto-API class.  Also, make use of the<br />
testing infrastructure provided if possible.  AES, SHA*, and Twofish<br />
have lots of known-answer tests and a simple module for parsing NIST<br />
test files is also included.</p>
<h2> MonadCryptoRandom </h2>
<p>Much like MonadRandom, this has a class for random value generation<br />
(CRandom), a class for monadic operation (MonadCryptoRandom), a<br />
transformer (CRandT), and instances to make all this useful.  The main<br />
difference between MonadCryptoRandom from MonadRandom is the use of<br />
CryptoRandomGen instead of RandomGen and the possibility for failure by<br />
way of MonadError.</p>
<h2> DRBG </h2>
<p>DRBG, a cryptographically secure pseudo random number generator based on<br />
the NIST SP 800-90 standard, is now on hackage.  This uses the<br />
crypto-api CryptoMonadRandom class and cryptohash &gt;= 0.6.1.</p>
<h2> pureMD5 </h2>
<p>Incidently, pureMD5&#8242;s deps have been bumped to use the new crypto-api.</p>
<h2> Future Work </h2>
<p>Once we have a cryptocipher like package with BlockCipher instance for<br />
AES, I imagine DRBG will include cipher-based bit generators.  Aside<br />
from that, more testing is certainly an order.</p>
<h2> Disclaimer </h2>
<p>Just so there&#8217;s no confusion about my part in all this.</p>
<ol>
<li> Crypto-API: I started discussion and hacked up the code for this interface (and that&#8217;s all it is, an interface for algorithm producers and algorithm consumers to meet in the middle)
<li> MonadCryptoRandom: This is just a rip-off of the motivating idea behind MonadRandom but it allows failure.  I tried to match even the names as closely as was sensible (CRand instead of Rand, etc).
<li> DRBG: Its a translation of a NIST spec.  I never thought I&#8217;d do translator work, but here I am doing English to Haskell transcription.
</ol>
<h2> Links </h2>
<p>Crypto-API<br />
Hackage: <a href="http://hackage.haskell.org/package/crypto-api" rel="nofollow">http://hackage.haskell.org/package/crypto-api</a><br />
Home: <a href="http://trac.haskell.org/crypto-api/wiki" rel="nofollow">http://trac.haskell.org/crypto-api/wiki</a></p>
<p>DRBG<br />
Hackage: <a href="http://hackage.haskell.org/package/DRBG" rel="nofollow">http://hackage.haskell.org/package/DRBG</a><br />
Home: None, will share home and bug tracker with crypto-api</p>
<p>MonadCryptoRandom<br />
Hackage: <a href="http://hackage.haskell.org/package/monadcryptorandom" rel="nofollow">http://hackage.haskell.org/package/monadcryptorandom</a><br />
Home: None, will share home and bug tracker with crypto-api</p>
<p>Thanks go to Vincent Hanquez for his cryptohash package including<br />
crypto-api instances, Stuart Dootson for getting the Windows code in<br />
System.Crypto.Random working, Paulo Tanimoto for pointing out/patching<br />
an issue with GHC-7</p>
<p>Ben Boeckel &#8211; I haven&#8217;t forgot about your patch but it seems<br />
cabal/hackage rejects such a .cabal file.  I&#8217;ll have to investigate or<br />
talk to Duncan.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=155&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/11/02/crypto-api-monadcryptorandom-drbg/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>Convex Hulls with GPS + GPX + HXT</title>
		<link>http://tommd.wordpress.com/2010/10/22/convex-hulls-with-gps-gpx-hxt/</link>
		<comments>http://tommd.wordpress.com/2010/10/22/convex-hulls-with-gps-gpx-hxt/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 00:18:55 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=150</guid>
		<description><![CDATA[GPS, a toy library for basic Latitude/Longitude based calculations, has just received a small face lift. I now leverage the GPX library and its classes/data types of Lat, Lon, and Time so GPS no longer needs to declare Latitude, Longitude, Coordinate, or Location. In addition to the old addVector, restLocations, heading and divideArea functions GPS [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=150&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>GPS, a toy library for basic Latitude/Longitude based calculations, has just received a small face lift.  I now leverage the GPX library and its classes/data types of Lat, Lon, and Time so GPS no longer needs to declare Latitude, Longitude, Coordinate, or Location.</p>
<p>In addition to the old <em>addVector, restLocations, heading and divideArea</em> functions GPS now also includes a <em>convexHull</em> function.  Here&#8217;s how to get a convex hull from a gpx trace produced by a logger:</p>
<pre>
import Text.XML.HXT.Arrow
import Data.GPS
import Data.Geo.GPX
import System.Environment
import Control.Monad

main = do
        fs &lt;- getArgs
        g &gt;&gt; xpickleDocument xpickle [(a_indent, v_1)] "convexHull.gpx")
        return ()

</pre>
<p>And comparing the traces this looks right.<br />
<a href="http://tommd.files.wordpress.com/2010/10/convexhullmaine.jpg"><img src="http://tommd.files.wordpress.com/2010/10/convexhullmaine.jpg?w=480" alt="" title="ConvexHullMaine"   class="aligncenter size-full wp-image-151" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=150&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/10/22/convex-hulls-with-gps-gpx-hxt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>

		<media:content url="http://tommd.files.wordpress.com/2010/10/convexhullmaine.jpg" medium="image">
			<media:title type="html">ConvexHullMaine</media:title>
		</media:content>
	</item>
		<item>
		<title>Crypto-API Released</title>
		<link>http://tommd.wordpress.com/2010/09/07/crypto-api-released/</link>
		<comments>http://tommd.wordpress.com/2010/09/07/crypto-api-released/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 20:24:57 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[crypto-api]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=135</guid>
		<description><![CDATA[Crypto-API (hackage, haddock) 0.0.0.1 is now on Hackage. Crypto-API is a generic interface for cryptographic operations, platform independent quality Entropy, property tests and known-answer tests (KATs) for common algorithms, and a basic benchmark infrastructure. Maintainers of hash and cipher implementations are encouraged to add instances for the classes defined in Crypto.Classes. Crypto users are similarly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=135&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Crypto-API (<a href="http://hackage.haskell.org/package/crypto-api">hackage</a>, <a href="http://web.cecs.pdx.edu/~dubuisst/crypto-api-0.0.0.1/html/index.html">haddock</a>) 0.0.0.1 is now on Hackage.  </p>
<p>Crypto-API is a generic interface for cryptographic operations, platform independent quality Entropy, property tests and known-answer tests (KATs) for common algorithms, and a basic benchmark infrastructure.  Maintainers of hash and cipher implementations are encouraged to add instances for the classes defined in Crypto.Classes.  Crypto users are similarly encouraged to use the interfaces defined in the Classes module.</p>
<p>Previous blogs on crypto-api have <a href="http://tommd.wordpress.com/2010/08/23/a-haskell-api-for-cryptographic-algorithms/">discussed its design</a> and the <a href="http://tommd.wordpress.com/2010/09/02/a-better-foundation-for-random-values-in-haskell/">RNG interface</a>.  These were to aid design discussion, so note the code there won&#8217;t work without minor changes.</p>
<h3>Example: Hashes</h3>
<p>An example class instance:</p>
<pre>
 instance Hash MD5Context MD5Digest where
        outputLength = Tagged 128
        blockLength  = Tagged 512
        initialCtx   = md5InitialContext
        updateCtx    = md5Update
        finalize     = md5Finalize
</pre>
<p>The hash user can remain agnostic about which type of hash is used:</p>
<pre>
 authMessage :: Hash ctx dgst =&gt; B.ByteString -&gt; MacKey -&gt; dgst -&gt; Bool
 authMessage msg k = (==) (hmac' k msg)

 hashFile :: Hash c d =&gt; FilePath -&gt; IO d
 hashFile = liftM hash L.readFile
</pre>
<h3>Example: Block Cipher</h3>
<p>Users of block cipher instances probably want to use Crypto.Modes:</p>
<pre>
 import Crypto.Classes
 import Crypto.Modes (cbc)
 import Data.Serialize (encode)

 cipherMsgAppendIV :: (BlockCipher k) =&gt; k -&gt; B.ByteString -&gt; IO B.ByteString,
 cipherMsgAppendIV msg = do
     iv &lt;- getIVIO
     return $ B.append (encode iv) (cbc k iv msg)
</pre>
<h3>Example RNG</h3>
<p>Its easy to get a DRBG (aka PRNG) that can be used for generating seed material for keys, building asymmetric keys, obtaining initialization vectors, nonces, or many other uses.  See <a href="http://web.cecs.pdx.edu/~dubuisst/crypto-api-0.0.0.1/html/Crypto-Random.html">Crypto.Random</a> (which users <a href="http://web.cecs.pdx.edu/~dubuisst/crypto-api-0.0.0.1/html/System-Crypto-Random.html">System.Crypto.Random</a> for entropy):</p>
<pre>
newGenIO :: CryptoRandomGen g =&gt; IO g
genBytes :: (CryptoRandomGen g) =&gt; g -&gt; ByteLength -&gt; Either GenError (ByteString, g)
getIV :: (CryptoRandomGen g, BlockCipher k) =&gt; g -&gt; Either GenError (IV k, g)
buildKeyPair :: CryptoRandomGen g =&gt; g -&gt; BitLength -&gt; Maybe ((p, p), g)
</pre>
<h3>Tests</h3>
<p>A quick peek in the <a href="http://web.cecs.pdx.edu/~dubuisst/crypto-api-0.0.0.1/html/Test-Crypto.html">Test.Crypto</a> module will show you that testing is decent (particularly for AES) and getting better all the time.</p>
<p>Given a BlockCipher instance the entire test code for an AES implementation is:</p>
<pre>
-- Omitting hack-job instances for SimpleAES in this snippet
 main = do
         ts &lt;- makeAESTests (AESKey $ B.replicate 16 0)
         runTests ts
</pre>
<p>This automatically reads in hundreds of NIST Known Answer Tests (KATs) and checks the implementation.  A lesser infrastructure exists for testing Hashes.  Cipher property tests are still needed.</p>
<h3>Example: Benchmarking</h3>
<p>As with tests, <a href="http://web.cecs.pdx.edu/~dubuisst/crypto-api-0.0.0.1/html/Benchmark-Crypto.html">benchmarking</a> is quite simple:</p>
<pre>
 import Data.Digest.Pure.MD5
 import Benchmark.Crypto
 import Criterion.Main

 main = defaultMain [benchmarkHash (undefined :: MD5Digest) "pureMD5"]
</pre>
<h3>Closing</h3>
<p>So please, if you maintain a hash, cipher, or other cryptographic primitive please add instances for the crypto-api classes.  If you need these primitives then consider using the crypto-api interfaces, allowing you to remain algorithm and implementation agnostic in all your low level code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=135&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/09/07/crypto-api-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>A Better Foundation for Random Values in Haskell</title>
		<link>http://tommd.wordpress.com/2010/09/02/a-better-foundation-for-random-values-in-haskell/</link>
		<comments>http://tommd.wordpress.com/2010/09/02/a-better-foundation-for-random-values-in-haskell/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 19:48:24 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[crypto-api]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=127</guid>
		<description><![CDATA[RandomGen &#8211; The Old Solution Mathematicians talk about random bits and many programmers talk about streams of random bytes (ex: /dev/urandom, block cipher counter RNGs), so its a bit odd that Haskell adopted the RandomGen class, which only generates random Ints. Several aspects of RandomGen that are non-ideal include: Only generates Ints (Ints need to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=127&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>RandomGen &#8211; The Old Solution</h2>
<p>Mathematicians talk about random bits and many programmers talk about streams of random bytes (ex: /dev/urandom, block cipher counter RNGs), so its a bit odd that Haskell adopted the <a href="http://hackage.haskell.org/packages/archive/random/1.0.0.2/doc/html/System-Random.html">RandomGen</a> class, which only generates random Ints.  Several aspects of RandomGen that are non-ideal include:</p>
<ul>
<li> Only generates Ints (Ints need to be coerced to obtain other types)
<li> By virtue of packaging it is often paired with StdGen, a sub-par generator
<li> Mandates a &#8216;split&#8217; operation, which is non-sense or unsafe for some generators (as BOS pointed out in a comment on my last post)
<li> Doesn&#8217;t allow for generator failure (too much output without a reseed) &#8211; this is important for cryptographically secure RNGs
<li> Doesn&#8217;t allow any method for additional entropy to be included upon request for new data (used at least in NIST SP 800-90 and there are obvious default implementations for all other generators)
</ul>
<h2>Building Something Better</h2>
<p>For these reasons I have been convinced that building the new <a href="http://tommd.wordpress.com/2010/08/23/a-haskell-api-for-cryptographic-algorithms/">crypto-api</a> package on RandomGen would be a mistake.  I&#8217;ve thus expanded the scope of crypto-api to include a decent RandomGenerator class.  The proposal below is slightly more complex than the old RandomGen, but I consider it more honest (doesn&#8217;t hide error conditions / necessitate exceptions).</p>
<pre>
class RandomGenerator g where
        -- |Instantiate a new random bit generator
        newGen :: B.ByteString -&gt; Either GenError g

        -- |Length of input entropy necessary to instantiate or reseed a generator
        genSeedLen :: Tagged g Int

        -- |Obtain random data using a generator
        genBytes        :: g -&gt; Int -&gt; Either GenError (B.ByteString, g)

        -- |'genBytesAI g i entropy' generates 'i' random bytes and use the
        -- additional input 'entropy' in the generation of the requested data.
        genBytesAI      :: g -&gt; Int -&gt; B.ByteString -&gt; Either GenError (B.ByteString, g)
        genBytesAI g len entropy =
                ... default implementation ...

        -- |reseed a random number generator
        reseed          :: g -&gt; B.ByteString -&gt; Either GenError g
</pre>
<p>Compared to the old RandomGen class we have:</p>
<ol>
<li> Random data comes in Bytestrings.  RandomGen only gave Ints (what is that?  29 bits?  32 bits?  64? argh!), and depended on another class (Random) to build other values.  We can still have a &#8216;Random&#8217; class built for RandomGenerator &#8211; should we have that in this module?
<li> Constructing and reseeding generators is now part of the class.
<li> Splitting the PRNG is now a separate class (not shown)
<li> Generators can accept additional input (genBytesAI).  Most generators probably won&#8217;t use this, so there is a reasonable default implementation (fmap (xor additionalInput) genBytes).
<li> The possibility to fail &#8211; this is not new!  Even in the old RandomGen class the underlying PRNGs can fail (the PRNG has hit its period and needs a reseed to avoid repeating the sequence), but RandomGen gave no failure mechanism.  I feel justified in forcing all PRNGs to use the same set of error messages because many errors are common to all generators (ex: ReseedRequred) and the action necessary to fix such errors is generalized too.<br />
<h2>In Closing</h2>
<p>The full <a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/Random.hs">Data.Crypto.Random</a> module is online and I welcome comments, complaints and patches.  This is the class I intend to force users of the Crypto API block cipher <a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/Modes.hs">modes</a> and <a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/Classes.hs">Asymmetric Cipher</a> instances to use, so it&#8217;s important to get right!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=127&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/09/02/a-better-foundation-for-random-values-in-haskell/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>A Haskell API for Cryptographic Algorithms</title>
		<link>http://tommd.wordpress.com/2010/08/23/a-haskell-api-for-cryptographic-algorithms/</link>
		<comments>http://tommd.wordpress.com/2010/08/23/a-haskell-api-for-cryptographic-algorithms/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 16:34:50 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=114</guid>
		<description><![CDATA[Haskell has a moderate history and collection of cryptographically related libraries. For simple hashes and short-message encryption the Crypto library filled many needs. Higher-performing needs for SHA2 and MD5 were supported by pureMD5 and SHA. Gradually the AES, SimpleAES, TwoFish, RSA, ECC, and cryptohash packages appeared, most providing FFI to C implementations, which seemed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=114&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Haskell has a moderate history and collection of cryptographically related libraries. For simple hashes and short-message encryption the <a href="http://hackage.haskell.org/package/Crypto">Crypto</a> library filled many needs. Higher-performing needs for SHA2 and MD5 were supported by <a href="http://hackage.haskell.org/package/pureMD5">pureMD5</a> and <a href="http://hackage.haskell.org/package/SHA">SHA</a>.  Gradually the <a href="http://hackage.haskell.org/package/AES">AES</a>, <a href="http://hackage.haskell.org/package/SimpleAES">SimpleAES</a>, <a href="http://hackage.haskell.org/package/Twofish">TwoFish</a>, <a href="http://hackage.haskell.org/package/RSA">RSA</a>, <a href="http://hackage.haskell.org/package/hecc">ECC</a>, and <a href="http://hackage.haskell.org/package/cryptohash">cryptohash</a> packages appeared, most providing FFI to C implementations, which seemed to solve most users needs for individual low-level algorithms.  Unfortunately, none of these gives developers a uniform interface with which to access any of a class of algorithms.  To fill this gap I&#8217;ve been discussing / developing the <a href="http://community.haskell.org/~tommd/crypto/">crypto-api</a> package.</p>
<p>Crypto-API is an interface to four classes of algorithms plus related helper functions. The <a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/Classes.hs">four classes</a> include hashes, block ciphers, stream cipher, and asymmetric cipher while related modules includes <a href="http://community.haskell.org/~tommd/crypto/Test/Crypto.hs">testing</a>, <a href="http://community.haskell.org/~tommd/crypto/Benchmark/Crypto.hs">benchmarking</a>, <a href="http://community.haskell.org/~tommd/crypto/System/Crypto/Random.hs">platform-independent rng</a>, <a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/Modes.hs">cipher modes</a>, and hash based message authentication codes (<a href="http://community.haskell.org/~tommd/crypto/Data/Crypto/HMAC.hs">hmac</a>).</p>
<p>NOTE: Crypto-API isn&#8217;t on Hackage yet, but will be soon.  This post is intended to facilitate discussion and motivate package maintainers to write instances.</p>
<h2>Hashes</h2>
<p>The BlockCipher and Hash classes are the most stable.  The interface for Hash is:</p>
<pre>
class (Binary d, Serialize d, Eq d, Ord d) =&gt; Hash ctx d | d -&gt; ctx, ctx -&gt; d where
    outputLength  :: Tagged d BitLength         -- ^ The size of the digest when encoded
    blockLength   :: Tagged d BitLength         -- ^ The size of data operated on in each round of the digest computation
    initialCtx    :: ctx                        -- ^ An initial context, provided with the first call to 'updateCtx'
    updateCtx     :: ctx -&gt; B.ByteString -&gt; ctx -- ^ Used to update a context, repeatedly called until all data is exhausted
                                                                         --   must operate correctly for imputs of n*blockLength bytes for n `elem` [0..]
    finalize      :: ctx -&gt; B.ByteString -&gt; d   -- ^ Finializing a context, plus any message data less than the block size, into a digest
</pre>
<p>That is, the hash algorithm developer only needs to build the most basic definition of a hash including initial context, update routine, and finalize.  It is the responsibility of the higher level routine to obey certain semantics, such as only providing bytestrings that are a multiple of the block length to the update function.  Users don&#8217;t need to know any of this &#8211; all they should care about is:</p>
<pre>
hash :: (Hash ctx d) =&gt; L.ByteString -&gt; d
hash' :: (Hash ctx d) =&gt; B.ByteString -&gt; d
</pre>
<p>&#8230; hashing strict or lazy bytestrings.</p>
<pre>
hashFunc :: Hash c d =&gt; d -&gt; (L.ByteString -&gt; d)
hashFunc' :: Hash c d =&gt; d -&gt; (B.ByteString -&gt; d)
</pre>
<p>&#8230; obtaining the function that produced a digest.</p>
<pre>
hmac :: Hash c d =&gt; B.ByteString -&gt; L.ByteString -&gt; d
hmac' :: (Hash c d) =&gt; B.ByteString -&gt; B.ByteString -&gt; d
</pre>
<p>&#8230; or computing an HMAC of a key + message.</p>
<p>I&#8217;d call this a simple interface and one that satisfies the majority of users.  There was a <a href="http://thread.gmane.org/gmane.comp.lang.haskell.cafe/77342/focus=13323">comment</a> about including &#8216;hash&#8217; and associates in the class interface so FFI implementations could override the default for performance reasons. A few optimizations closed the gap significantly which is why these functions remain separate so far.  The gap could probably be closed further if ByteString.Lazy would read in chunks of a size modulo 1024 bits (instead of 32KB &#8211; 8 bytes, which is a piddly multiple of 64).</p>
<p>Hash instances were made for <a href="http://community.haskell.org/~tommd/DRBG/Test/KAT.hs">cryptohash</a> and <a href="http://community.haskell.org/~tommd/pureMD5/">pureMD5</a>. So far consumers include <a href="http://community.haskell.org/~tommd/DRBG">DRBG</a> and the algorithm specific tests.</p>
<h2>Block Ciphers</h2>
<p>The BlockCipher class is:</p>
<pre>
class (Binary k, Serialize k) =&gt; BlockCipher k where
    blockSize     :: Tagged k BitLength
    encryptBlock  :: k -&gt; B.ByteString -&gt; B.ByteString
    decryptBlock  :: k -&gt; B.ByteString -&gt; B.ByteString
    buildKey      :: B.ByteString -&gt; Maybe k
    keyLength     :: k -&gt; BitLength       -- ^ keyLength may inspect its argument to return the length
</pre>
<p>Again, this is intended to capture the essence of block ciphers.  Also, a smart constructor &#8216;buildKey&#8217; is provided so the implementation can weed out weak keys.  A non-ideal instance for SimpleAES (see appendix to this blog) was made so I could <a href="http://community.haskell.org/~tommd/misc/aes.hs">run benchmarks</a> and <a href="http://community.haskell.org/~tommd/misc/aesTest.hs">mode tests</a>.  Crypto-API includes an extensive test framework for AES + modes which is built around parsing <a href="http://csrc.nist.gov/groups/STM/cavp/index.html">NIST KAT</a> files. Note the modes are not finished, not optimized, and only ECB CBC and OFB are tested (I&#8217;ve been programming during cocktail hour&#8230;).</p>
<p>I&#8217;ve yet to include modes as overridable routines of BlockCipher (see above cited comment). This is partly due to a lack of evidence showing a (very likely) performance gain that generalized routines can&#8217;t match.  Once I see that evidence then I&#8217;ll be more likely to make the change.</p>
<p>As with hashes, most users won&#8217;t use the class interface but rather the higher level functions provided by Modes.hs (getIV, cbc, unCbc, etc).</p>
<h2>RNG</h2>
<p>The platform independent RNG is backed by urandom on *nix and the WinCrypt API on windows. My thinking here is any user of /dev/random (on *nix) must be so concerned about security they are carefully controlling most aspects of the platform, thus the non-portability of directly reading /dev/random is inconsequential; e.g. there&#8217;s no need to bother with a library to access /dev/random.</p>
<p>The interface: (untested on Windows! If you care about windows please test and debug!)</p>
<pre>
getEntropy :: ByteLength -&gt; IO B.ByteString
openHandle :: IO CryptHandle
hGetEntropy :: CryptHandle -&gt; Int -&gt; IO B.ByteString
closeHandle :: CryptHandle -&gt; IO ()
</pre>
<p>If you rarely need quality entropy (ex: just for a quality seed to a PRNG) then use &#8216;getEntropy&#8217;.  Frequent users can amortize some handle opening costs by explictly managing their resources and calling the other three functions.</p>
<h2>Stream Ciphers</h2>
<p>Stream ciphers are assumed to be much like a block cipher in 1-bit CFB mode:</p>
<pre>
class (Binary k, Serialize k) =&gt; StreamCipher k iv | k -&gt; iv where
    buildStreamKey        :: B.ByteString -&gt; Maybe k
    encryptStream         :: k -&gt; iv -&gt; B.ByteString -&gt; (B.ByteString, iv)
    decryptStream         :: k -&gt; iv -&gt; B.ByteString -&gt; (B.ByteString, iv)
    streamKeyLength       :: k -&gt; BitLength
</pre>
<p>A simple instance would be:</p>
<pre>
data Xor = Xor B.ByteString

instance Bin.Binary Xor where
    get = undefined
    put = undefined

instance Ser.Serialize Xor where
    get = undefined
    put = undefined

instance StreamCipher Xor Int where
    buildStreamKey = Just . Xor
    encryptStream (Xor k) iv msg = (ct, (B.length msg + iv) `rem` B.length k)
      where
      ct = B.pack $ zipWith xor (B.unpack msg) (drop iv $ cycle $ B.unpack k)
    decryptStream = encryptStream
    streamKeyLength (Xor k) = 8 * (B.length k)
</pre>
<h2>Asymmetric Ciphers</h2>
<p>The asymmetric cipher instance currently doesn&#8217;t fit any of the available algorithms as it is generalized over random generators.  It also is the most likely to change &#8211; there are<br />
things I&#8217;d change about it right now, but its best to leave the more irk-some aspects to motivate some of you readers to contribute / comment ;-)</p>
<pre>
class (Binary p, Serialize p) =&gt; AsymCipher p where
    generateKeypair :: RandomGen g =&gt; g -&gt; BitLength -&gt; Maybe ((p,p),g)
    encryptAsym     :: p -&gt; B.ByteString -&gt; B.ByteString
    decryptAsym     :: p -&gt; B.ByteString -&gt; B.ByteString
    asymKeyLength       :: p -&gt; BitLength
</pre>
<h2>In Closing</h2>
<p>1) If you use or develop cryptographic algorithms then join the discussion. I might not use your input but I will carefully consider all comments.  Discussion has lead to substantial changes already (thanks guys!).  I&#8217;m particularly keen on input from stream or asymmetric cipher users.</p>
<p>2) If you maintain any crypto packages then please update to include the correct crypto-api instances.  If your package is a block cipher then make sure you&#8217;re exporting a pure interface in addition to particular modes.</p>
<p>3) If you use Windows then please help shore up the System.Crypto.Random module &#8211; I know it needs work!</p>
<p>4) If you use crypto packages please don&#8217;t make an instance or only do so to submit them upstream!  Instance belong with the algorithm implementation!</p>
<p>5) Everyone else who wants to help feel free to write modes (XTS, GCM, CTR, etc), make fixes &amp; optimizations, add tests (cipher properties, known answer tests), fix ByteString.Lazy.Internal.defaultChunkSize or export hGetContentsN, and add Data.Crypto.Padding (ex: pkcs5).  If none of that interests you but the general topic of cryptography in Haskell does then consider working to improve hecc, add TLS or digest-auth to HappStack, write an IPSec implementation, make a pfkey2 package, improve GHC optimization of the algorithms, or make more fitting primitives!</p>
<h3>Appendix on SimpleAES:</h3>
<p>SimpleAES exported sufficient constructs with which to build an instance but it isn&#8217;t very clean.  The main issues are:<br />
1) Building a key can throw exceptions (when it should use Maybe or Either) and the result of key expansion (a costly operation in AES) isn&#8217;t stored but recomputed each time.<br />
2) A properly sized IV is required even for ECB mode &#8211; which doesn&#8217;t actually use an IV.  Worse, the &#8220;encryptMsg&#8217;&#8221; function will actually expand the size of data even when using ECB mode.<br />
3) The key isn&#8217;t it&#8217;s own type, which is a good practice in addition to being needed to make an instance. This ties back to the smart constructor concept of #1.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=114&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/08/23/a-haskell-api-for-cryptographic-algorithms/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>How Far is my Morning Run</title>
		<link>http://tommd.wordpress.com/2010/05/27/how-far-is-my-morning-run/</link>
		<comments>http://tommd.wordpress.com/2010/05/27/how-far-is-my-morning-run/#comments</comments>
		<pubDate>Thu, 27 May 2010 19:45:24 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=109</guid>
		<description><![CDATA[I always assumed my run was about 5k, but being out of shape it felt more like 7km.  Eventually this bugged me enough that I spent a whole ten minutes at a coffee shop to learn the GPX library and make a program that converts my GPX traces (I carry a GPS logger on jogs) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=109&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I always assumed my run was about 5k, but being out of shape it felt more like 7km.  Eventually this bugged me enough that I spent a whole ten minutes at a coffee shop to learn the GPX library and make a program that converts my GPX traces (I carry a GPS logger on jogs) to a distance.  Thank you hackage, thank you Tony.</p>
<pre style="padding-left:30px;">
module Main where

import Data.Geo.GPX
import Data.GPS
import Control.Monad
import System.Environment (getArgs)


main = do
 file &lt;- liftM head getArgs
 run &lt;- readGpxFile file
 let cs = map (degreePairToDMS. latlon) . trkpts . head . trksegs . head . trks . head $ run
     pairs = zip cs (drop 1 cs)
     dist = sum (map (uncurry distance) pairs)
 print dist
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=109&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/05/27/how-far-is-my-morning-run/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>
	</item>
		<item>
		<title>Introductions</title>
		<link>http://tommd.wordpress.com/2010/01/26/introductions/</link>
		<comments>http://tommd.wordpress.com/2010/01/26/introductions/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 06:30:14 +0000</pubDate>
		<dc:creator>tommd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tommd.wordpress.com/?p=101</guid>
		<description><![CDATA[Some introductions are an order.  Megan, meet the world.  World, meet Megan.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=101&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Some introductions are an order.  Megan, meet the world.  World, meet Megan.
<a href='http://tommd.wordpress.com/2010/01/26/introductions/img_0036/' title='img_0036'><img data-liked='0' data-reblogged='0' data-attachment-id="102" data-orig-file="http://tommd.files.wordpress.com/2010/01/img_0036.jpg" data-orig-size="2048,1536" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;4&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon PowerShot S30&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1264407096&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;14.71875&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0.016666666666667&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="img_0036" data-image-description="" data-medium-file="http://tommd.files.wordpress.com/2010/01/img_0036.jpg?w=300" data-large-file="http://tommd.files.wordpress.com/2010/01/img_0036.jpg?w=480" width="150" height="112" src="http://tommd.files.wordpress.com/2010/01/img_0036.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="img_0036" /></a>
<a href='http://tommd.wordpress.com/2010/01/26/introductions/img_0032/' title='Megan Side Profile'><img data-liked='0' data-reblogged='0' data-attachment-id="103" data-orig-file="http://tommd.files.wordpress.com/2010/01/img_0032.jpg" data-orig-size="2048,1536" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.8&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon PowerShot S30&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1264405240&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;7.09375&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0.125&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Megan Side Profile" data-image-description="&lt;p&gt;A side profile of Megan on her second day&lt;/p&gt;
" data-medium-file="http://tommd.files.wordpress.com/2010/01/img_0032.jpg?w=300" data-large-file="http://tommd.files.wordpress.com/2010/01/img_0032.jpg?w=480" width="150" height="112" src="http://tommd.files.wordpress.com/2010/01/img_0032.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="A side profile of Megan on her second day" /></a>
</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tommd.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tommd.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tommd.wordpress.com&#038;blog=3236650&#038;post=101&#038;subd=tommd&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tommd.wordpress.com/2010/01/26/introductions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/786f224adbe0784cdf7d0f15476061fe?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tommd</media:title>
		</media:content>

		<media:content url="http://tommd.files.wordpress.com/2010/01/img_0036.jpg?w=150" medium="image">
			<media:title type="html">img_0036</media:title>
		</media:content>
	</item>
	</channel>
</rss>
