<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for SecurityWire Blog</title>
	<atom:link href="http://blog.securitywire.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.securitywire.com</link>
	<description>Computer and Network Security, Penetration Testing, Vulnerability Research, Cryptography and more!</description>
	<lastBuildDate>Wed, 20 Jan 2010 20:44:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Randomizing your MAC addresses on boot with macchanger by haakneus</title>
		<link>http://blog.securitywire.com/2009/09/20/randomizing-your-mac-addresses-on-boot-with-macchanger/comment-page-1/#comment-727</link>
		<dc:creator>haakneus</dc:creator>
		<pubDate>Wed, 20 Jan 2010 20:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=92#comment-727</guid>
		<description>Hi, I used your script and it works great, thank you for posting. There is only one nasty thing. I&#039;ve a wlan0 wireless network adapter in my system. After a reboot the wlan0 gets an random mac. BUT... after a airmon-ng start wlan0, the now made mon0 interface has the original hard-coded mac of the wlan0 interface. eaks.... there goes my privacy... off course you can fix this with the macchanger tool, but it does not work by it self with monitoring virtual network adapters. Cheers! Haakneus</description>
		<content:encoded><![CDATA[<p>Hi, I used your script and it works great, thank you for posting. There is only one nasty thing. I&#8217;ve a wlan0 wireless network adapter in my system. After a reboot the wlan0 gets an random mac. BUT&#8230; after a airmon-ng start wlan0, the now made mon0 interface has the original hard-coded mac of the wlan0 interface. eaks&#8230;. there goes my privacy&#8230; off course you can fix this with the macchanger tool, but it does not work by it self with monitoring virtual network adapters. Cheers! Haakneus</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Storing sensitive information using public key encryption in PHP by localcents</title>
		<link>http://blog.securitywire.com/2009/07/17/rsa-public-key-encryption-in-php/comment-page-1/#comment-725</link>
		<dc:creator>localcents</dc:creator>
		<pubDate>Thu, 14 Jan 2010 04:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=1#comment-725</guid>
		<description>Personally, I find phpseclib&#039;s Crypt_RSA better:

http://phpseclib.sourceforge.net/

It&#039;s supposed to support PKCS#1 v2.1 whereas OpenSSL only supports PKCS#1 v1.5.  As such, where OpenSSL doesn&#039;t support multi-prime RSA or OAEP padding, phpseclib does.</description>
		<content:encoded><![CDATA[<p>Personally, I find phpseclib&#8217;s Crypt_RSA better:</p>
<p><a href="http://phpseclib.sourceforge.net/" rel="nofollow">http://phpseclib.sourceforge.net/</a></p>
<p>It&#8217;s supposed to support PKCS#1 v2.1 whereas OpenSSL only supports PKCS#1 v1.5.  As such, where OpenSSL doesn&#8217;t support multi-prime RSA or OAEP padding, phpseclib does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Having Fun with SSLStrip by ThaMainMan</title>
		<link>http://blog.securitywire.com/2009/11/25/having-fun-with-sslstrip/comment-page-1/#comment-694</link>
		<dc:creator>ThaMainMan</dc:creator>
		<pubDate>Thu, 03 Dec 2009 15:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=99#comment-694</guid>
		<description>Awesome... It worked for me on the live distro only, I have a VM where I installed BT to the HD and I was getting permission errors trying to do step 2 but on the live distro it worked like a charm!!</description>
		<content:encoded><![CDATA[<p>Awesome&#8230; It worked for me on the live distro only, I have a VM where I installed BT to the HD and I was getting permission errors trying to do step 2 but on the live distro it worked like a charm!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Storing sensitive information using public key encryption in PHP by cchamberland</title>
		<link>http://blog.securitywire.com/2009/07/17/rsa-public-key-encryption-in-php/comment-page-1/#comment-46</link>
		<dc:creator>cchamberland</dc:creator>
		<pubDate>Thu, 10 Sep 2009 03:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=1#comment-46</guid>
		<description>Your decrypt is fine, however your problem is that you have reversed your base64 encoding and encryption in your encrypt function. First, you need to encrypt then base64 encode in your encrypt function; that should fix your problem. Let me know if that doesn&#039;t work, i may have sobered up by the time you read this lol :)</description>
		<content:encoded><![CDATA[<p>Your decrypt is fine, however your problem is that you have reversed your base64 encoding and encryption in your encrypt function. First, you need to encrypt then base64 encode in your encrypt function; that should fix your problem. Let me know if that doesn&#8217;t work, i may have sobered up by the time you read this lol <img src='http://blog.securitywire.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Storing sensitive information using public key encryption in PHP by adriaan</title>
		<link>http://blog.securitywire.com/2009/07/17/rsa-public-key-encryption-in-php/comment-page-1/#comment-45</link>
		<dc:creator>adriaan</dc:creator>
		<pubDate>Wed, 09 Sep 2009 03:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=1#comment-45</guid>
		<description>I created the following code:

############################################

function EnCrypt($dataStr) {
		$cert = &quot;public.pem&quot;;
		$fp = fopen($cert,&quot;r&quot;);
		$pub_key = fread($fp,8192);
		fclose($fp);
		$publickey = openssl_pkey_get_public ($pub_key); 
		openssl_public_encrypt($dataStr, $output, $publickey);
		return $output;
	}
	
	function DeCrypt($dataStr) {
		$cert = &quot;private.pem&quot;;
		$pass = &quot;?????????&quot;;
		$fp = fopen($cert,&quot;r&quot;);
		$priv_key = fread($fp,8192);
		fclose($fp);
		$privatekey = openssl_pkey_get_private ($priv_key, $pass);
		openssl_private_decrypt($dataStr, $output, $privatekey);
		return $output;
	}
############################################
This works.

But when I add the base64, so I can save the encrypted data to a database, my result from DeCrypt is an empty string.

here is the code that doesnt work:
############################################
function EnCrypt($dataStr) {
		$cert = &quot;public.pem&quot;;
		$fp = fopen($cert,&quot;r&quot;);
		$pub_key = fread($fp,8192);
		fclose($fp);
		$publickey = openssl_pkey_get_public ($pub_key); 
		openssl_public_encrypt(base64_encode($dataStr), $output, $publickey);
		return $output;
	}
	
	function DeCrypt($dataStr) {
		$cert = &quot;private.pem&quot;;
		$pass = &quot;4dr144r0n&quot;;
		$fp = fopen($cert,&quot;r&quot;);
		$priv_key = fread($fp,8192);
		fclose($fp);
		$privatekey = openssl_pkey_get_private ($priv_key, $pass);
		openssl_private_decrypt(base64_decode($dataStr), $output, $privatekey);
		return $output;
	}
############################################

What am I doing wrong?</description>
		<content:encoded><![CDATA[<p>I created the following code:</p>
<p>############################################</p>
<p>function EnCrypt($dataStr) {<br />
		$cert = &#8220;public.pem&#8221;;<br />
		$fp = fopen($cert,&#8221;r&#8221;);<br />
		$pub_key = fread($fp,8192);<br />
		fclose($fp);<br />
		$publickey = openssl_pkey_get_public ($pub_key);<br />
		openssl_public_encrypt($dataStr, $output, $publickey);<br />
		return $output;<br />
	}</p>
<p>	function DeCrypt($dataStr) {<br />
		$cert = &#8220;private.pem&#8221;;<br />
		$pass = &#8220;?????????&#8221;;<br />
		$fp = fopen($cert,&#8221;r&#8221;);<br />
		$priv_key = fread($fp,8192);<br />
		fclose($fp);<br />
		$privatekey = openssl_pkey_get_private ($priv_key, $pass);<br />
		openssl_private_decrypt($dataStr, $output, $privatekey);<br />
		return $output;<br />
	}<br />
############################################<br />
This works.</p>
<p>But when I add the base64, so I can save the encrypted data to a database, my result from DeCrypt is an empty string.</p>
<p>here is the code that doesnt work:<br />
############################################<br />
function EnCrypt($dataStr) {<br />
		$cert = &#8220;public.pem&#8221;;<br />
		$fp = fopen($cert,&#8221;r&#8221;);<br />
		$pub_key = fread($fp,8192);<br />
		fclose($fp);<br />
		$publickey = openssl_pkey_get_public ($pub_key);<br />
		openssl_public_encrypt(base64_encode($dataStr), $output, $publickey);<br />
		return $output;<br />
	}</p>
<p>	function DeCrypt($dataStr) {<br />
		$cert = &#8220;private.pem&#8221;;<br />
		$pass = &#8220;4dr144r0n&#8221;;<br />
		$fp = fopen($cert,&#8221;r&#8221;);<br />
		$priv_key = fread($fp,8192);<br />
		fclose($fp);<br />
		$privatekey = openssl_pkey_get_private ($priv_key, $pass);<br />
		openssl_private_decrypt(base64_decode($dataStr), $output, $privatekey);<br />
		return $output;<br />
	}<br />
############################################</p>
<p>What am I doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Storing sensitive information using public key encryption in PHP by C Chamberland</title>
		<link>http://blog.securitywire.com/2009/07/17/rsa-public-key-encryption-in-php/comment-page-1/#comment-3</link>
		<dc:creator>C Chamberland</dc:creator>
		<pubDate>Wed, 22 Jul 2009 19:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=1#comment-3</guid>
		<description>I found this helpful, and the decrypting a little difficult at first. There were no good examples on decrypting so here&#039;s my input. I had base64 encoded my data to store in my database, hence the &quot;Base64_decode&quot; on my $dataStr:

###################################################################
function DeCrypt($dataStr) { 
	
		  $cert = &quot;private.pem&quot;; 
		  $pass = &quot;passphrase&quot;;
		  
		 $fp=fopen($cert,&quot;r&quot;);
		 $priv_key=fread($fp,8192);
		 fclose($fp); 
		 $res = openssl_get_privatekey($priv_key,$pass);
		       
                 openssl_private_decrypt(base64_decode($dataStr),$newsource,$res);
		 return $newsource;
    
} 
####################################################################</description>
		<content:encoded><![CDATA[<p>I found this helpful, and the decrypting a little difficult at first. There were no good examples on decrypting so here&#8217;s my input. I had base64 encoded my data to store in my database, hence the &#8220;Base64_decode&#8221; on my $dataStr:</p>
<p>###################################################################<br />
function DeCrypt($dataStr) { </p>
<p>		  $cert = &#8220;private.pem&#8221;;<br />
		  $pass = &#8220;passphrase&#8221;;</p>
<p>		 $fp=fopen($cert,&#8221;r&#8221;);<br />
		 $priv_key=fread($fp,8192);<br />
		 fclose($fp);<br />
		 $res = openssl_get_privatekey($priv_key,$pass);</p>
<p>                 openssl_private_decrypt(base64_decode($dataStr),$newsource,$res);<br />
		 return $newsource;</p>
<p>}<br />
####################################################################</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Storing sensitive information using public key encryption in PHP by Twitted by cioa</title>
		<link>http://blog.securitywire.com/2009/07/17/rsa-public-key-encryption-in-php/comment-page-1/#comment-2</link>
		<dc:creator>Twitted by cioa</dc:creator>
		<pubDate>Sat, 18 Jul 2009 21:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.securitywire.com/?p=1#comment-2</guid>
		<description>[...] This post was Twitted by cioa [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was Twitted by cioa [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
