<?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>Whatever happened to Benjamin Ragheb? &#187; keychain</title>
	<atom:link href="http://www.benzado.com/blog/tags/keychain/feed" rel="self" type="application/rss+xml" />
	<link>http://www.benzado.com/blog</link>
	<description>A professional&#039;s personal blog.</description>
	<lastBuildDate>Mon, 11 Apr 2011 18:06:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Which RSA key goes with which?</title>
		<link>http://www.benzado.com/blog/post/141/rsa-key-pairs</link>
		<comments>http://www.benzado.com/blog/post/141/rsa-key-pairs#comments</comments>
		<pubDate>Fri, 26 Dec 2008 06:31:33 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Nerdery]]></category>
		<category><![CDATA[keychain]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[RSA]]></category>

		<guid isPermaLink="false">http://www.benzado.com/blog/?p=141</guid>
		<description><![CDATA[I had a set of keys in my Mac OS X Keychain and no clue which public key and private key belonged together. This is how I figured out if a specific public key A paired with a private key B. Export public key A to file A.pem, then find its modulus: cat A.pem &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>I had a set of keys in my Mac OS X Keychain and no clue which public key and private key belonged together. This is how I figured out if a specific public key A paired with a private key B.</p>
<p>Export public key A to file A.pem, then find its modulus:</p>
<pre>cat A.pem | sed 's/RSA //' | openssl rsa -noout -modulus -pubin &gt; A.mod</pre>
<p>Export private key B to file B.p12, then find its modulus:</p>
<pre>openssl pkcs12 -nodes &lt; B.p12 | openssl rsa -noout -modulus &gt; B.mod</pre>
<p>If A.mod and B.mod are identical, the keys are a pair.</p>
<p>You could also extract a public key from the private key file, and compare the extracted public key to the exported public key. In other words:</p>
<pre>openssl pkcs12 -nodes &lt; B.p12 | openssl rsa -pubout &gt; B.pem</pre>
<p>Again, if A.pem and B.pem match, the keys are a pair.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benzado.com/blog/post/141/rsa-key-pairs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.benzado.com @ 2012-02-04 22:16:32 by W3 Total Cache -->
