<?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/"
	>

<channel>
	<title>Circles and Crosses &#187; Uncategorized</title>
	<atom:link href="http://ox.no/posts/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://ox.no</link>
	<description>Håvard Stranden&#039;s website</description>
	<lastBuildDate>Sat, 20 Aug 2011 00:11:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Diffie-Hellman support in Node.js</title>
		<link>http://ox.no/posts/diffie-hellman-support-in-node-js</link>
		<comments>http://ox.no/posts/diffie-hellman-support-in-node-js#comments</comments>
		<pubDate>Tue, 10 May 2011 11:43:07 +0000</pubDate>
		<dc:creator>Håvard</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ox.no/?p=302</guid>
		<description><![CDATA[Yay! My patch implementing support for Diffie-Hellman key exchange in Node.js has finally been merged into the Node.js master branch. This will simplify the OpenID for Node.js codebase a lot. It will also make the OpenID association phase run a &#8230; <a href="http://ox.no/posts/diffie-hellman-support-in-node-js">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yay! My patch implementing support for Diffie-Hellman key exchange in Node.js has finally been <a href="https://github.com/joyent/node/commit/9f0b1a9bc60f70b7c5c014743eb1edd69c36db76">merged into the Node.js master branch</a>. This will simplify the <a href="https://github.com/havard/node-openid">OpenID for Node.js</a> codebase a lot. It will also make the OpenID association phase run a lot faster, since the current code does Diffie-Hellman in Javascript while the Node.js crypto version does it all in native code using OpenSSL.</p>

<p>A brief API overview:</p>

<ul>
<li><code>crypto.createDiffieHellman(prime_length)</code>

<ul>
<li>Creates a Diffie-Hellman key exchange object and generates a prime of the given bit length. The generator used is <code>2</code>.</li>
</ul></li>
<li><code>crypto.createDiffieHellman(prime, encoding='binary')</code>

<ul>
<li>Creates a Diffie-Hellman key exchange object using the supplied prime. The generator used is <code>2</code>. Encoding can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.generateKeys(encoding='binary')</code>

<ul>
<li>Generates private and public Diffie-Hellman key values, and returns the public key in the specified encoding. This key should be transferred to the other party. Encoding can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.computeSecret(other_public_key, input_encoding='binary', output_encoding=input_encoding)</code>

<ul>
<li>Computes the shared secret using <code>other_public_key</code> as the other party&#8217;s public key and returns the computed shared secret. Supplied key is interpreted using specified <code>input_encoding</code>, and secret is encoded using specified <code>output_encoding</code>. Encodings can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>. If no output encoding is given, the input encoding is used as output encoding.</li>
</ul></li>
<li><code>diffieHellman.getPrime(encoding='binary')</code>

<ul>
<li>Returns the Diffie-Hellman prime in the specified encoding, which can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.getGenerator(encoding='binary')</code>

<ul>
<li>Returns the Diffie-Hellman prime in the specified encoding, which can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.getPublicKey(encoding='binary')</code>

<ul>
<li>Returns the Diffie-Hellman public key in the specified encoding, which can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.getPrivateKey(encoding='binary')</code>

<ul>
<li>Returns the Diffie-Hellman private key in the specified encoding, which can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.setPublicKey(public_key, encoding='binary')</code>

<ul>
<li>Sets the Diffie-Hellman public key. Key encoding can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
<li><code>diffieHellman.setPrivateKey(public_key, encoding='binary')</code>

<ul>
<li>Sets the Diffie-Hellman private key. Key encoding can be <code>'binary'</code>, <code>'hex'</code>, or <code>'base64'</code>.</li>
</ul></li>
</ul>

<p><strong>NOTE</strong>: The API is still subject to change.</p>

<p>I would appreciate getting a note if you actually do something useful with it. <img src='http://ox.no/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Play around with it and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://ox.no/posts/diffie-hellman-support-in-node-js/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Software Craftsmans Bookshelf</title>
		<link>http://ox.no/posts/a-software-craftsmans-bookshelf</link>
		<comments>http://ox.no/posts/a-software-craftsmans-bookshelf#comments</comments>
		<pubDate>Thu, 06 May 2010 09:50:31 +0000</pubDate>
		<dc:creator>Håvard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ox.no/?p=108</guid>
		<description><![CDATA[A (long) while ago, Gøran Hansen tagged me and invited me to share a set of recommended books. Reorganizing my book shelves, the tag came back to mind, and I decided to name a few of the books that I &#8230; <a href="http://ox.no/posts/a-software-craftsmans-bookshelf">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A (long) while ago, <a href="http://blog.goeran.no">Gøran Hansen</a> <a href="http://blog.goeran.no/PermaLink,guid,b0df5924-fb90-4506-b2e7-1e15a5e981c6.aspx">tagged me</a> and invited me to share a set of recommended books. Reorganizing my book shelves, the tag came back to mind, and I decided to name a few of the books that I have learned from. The first three are essential, the rest are great books you should read.</p>

<ul>
<li><a href="http://amzn.com/0735619670">Code Complete: A Practical Handbook of Software Construction</a> by Steve McConnell</li>
<li><a href="http://amzn.com/0201633612">Design patterns: Elements of reusable object-oriented software</a> by Erich Gamma, Richard Helm, Ralph Johnson, and John M. Vlissides (the Gang of Four)</li>
<li><a href="http://amzn.com/020161622X">The Pragmatic Programmer: From Journeyman to Master</a> by Andrew Hunt and David Thomas</li>
<li><a href="http://amzn.com/0201835959">The Mythical Man-Month: Essays on Software Engineering</a> by Frederick P. Brooks</li>
<li><a href="http://amzn.com/0132350882">Clean Code: A Handbook of Agile Software Craftsmanship</a> by Robert C. Martin</li>
<li><a href="http://amzn.com/0201485672">Refactoring: Improving the Design of Existing Code</a> by Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ox.no/posts/a-software-craftsmans-bookshelf/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

