<?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"
	>
<channel>
	<title>Comments on: Java RSA Encryption: An example</title>
	<atom:link href="http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/</link>
	<description>programmer, student, boyfriend, dreamer, in love, photographer</description>
	<pubDate>Fri, 21 Nov 2008 17:23:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: nbe</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1322</link>
		<dc:creator>nbe</dc:creator>
		<pubDate>Fri, 16 May 2008 17:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1322</guid>
		<description>I am new to the Java security coding. I wanted to send sealed object from one site and read it from the other. How could I keep the generated keys on the two sites. is there a way that i can use private key as a string i am providing on my own.

regards</description>
		<content:encoded><![CDATA[<p>I am new to the Java security coding. I wanted to send sealed object from one site and read it from the other. How could I keep the generated keys on the two sites. is there a way that i can use private key as a string i am providing on my own.</p>
<p>regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mic</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1255</link>
		<dc:creator>Mic</dc:creator>
		<pubDate>Thu, 01 May 2008 10:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1255</guid>
		<description>I used this approach for encrypting files:
http://www-users.york.ac.uk/~mal503/lore/pkencryption.htm

It uses RSA to encrypt an AES shared key which is then used to encrypt the files. Not sure if it's the best way of doing things, but it works ;)</description>
		<content:encoded><![CDATA[<p>I used this approach for encrypting files:<br />
<a href="http://www-users.york.ac.uk/~mal503/lore/pkencryption.htm" rel="nofollow">http://www-users.york.ac.uk/~mal503/lore/pkencryption.htm</a></p>
<p>It uses RSA to encrypt an AES shared key which is then used to encrypt the files. Not sure if it&#8217;s the best way of doing things, but it works <img src='http://andreas.louca.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cp</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1249</link>
		<dc:creator>cp</dc:creator>
		<pubDate>Wed, 30 Apr 2008 19:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1249</guid>
		<description>File, mpravo sigxaritira oti kalutero gia to mellon...</description>
		<content:encoded><![CDATA[<p>File, mpravo sigxaritira oti kalutero gia to mellon&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Louca</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1123</link>
		<dc:creator>Andreas Louca</dc:creator>
		<pubDate>Tue, 08 Apr 2008 21:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1123</guid>
		<description>Well, SealedObject is not designed to be used in encrypting files. It can be used to encrypt a String with the contents of a file, but bear in mind that the RSA Encryption has the size limitation you mentioned. You can always use a symmetric Cipher to encrypt objects longer than that.

If you want to encrypt a file however, Java provides &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/CipherOutputStream.html" rel="nofollow"&gt;CipherOutputStream&lt;/a&gt; for writing and &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/CipherInputStream.html" rel="nofollow"&gt;CipherInputStream&lt;/a&gt; for reading encrypted data from Streams that can be either File or network streams. 

CipherOutputStream class takes as parameters an OutputStream (with the destination file) and Cipher (like the above) and encrypts the output before writing to the file.

CipherInputStream can be used to read that file, providing that the same Cipher algorithm and key is used.</description>
		<content:encoded><![CDATA[<p>Well, SealedObject is not designed to be used in encrypting files. It can be used to encrypt a String with the contents of a file, but bear in mind that the RSA Encryption has the size limitation you mentioned. You can always use a symmetric Cipher to encrypt objects longer than that.</p>
<p>If you want to encrypt a file however, Java provides <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/CipherOutputStream.html" rel="nofollow">CipherOutputStream</a> for writing and <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/crypto/CipherInputStream.html" rel="nofollow">CipherInputStream</a> for reading encrypted data from Streams that can be either File or network streams. </p>
<p>CipherOutputStream class takes as parameters an OutputStream (with the destination file) and Cipher (like the above) and encrypts the output before writing to the file.</p>
<p>CipherInputStream can be used to read that file, providing that the same Cipher algorithm and key is used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soul_krasty</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1121</link>
		<dc:creator>soul_krasty</dc:creator>
		<pubDate>Tue, 08 Apr 2008 08:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1121</guid>
		<description>how about is i want to encrypt a file..i have read some article saying that RSA can't encrypt file that are more than 117 bytes. can you explain more on sealobject being used with encrypting small file.</description>
		<content:encoded><![CDATA[<p>how about is i want to encrypt a file..i have read some article saying that RSA can&#8217;t encrypt file that are more than 117 bytes. can you explain more on sealobject being used with encrypting small file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Louca</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1104</link>
		<dc:creator>Andreas Louca</dc:creator>
		<pubDate>Sat, 05 Apr 2008 21:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1104</guid>
		<description>Object "test" in that line, is a SealedObject instance, which is identical to "myEncyptedMessage". Supposedly you'd have myEncyptedMessage transported over RMI to the server.</description>
		<content:encoded><![CDATA[<p>Object &#8220;test&#8221; in that line, is a SealedObject instance, which is identical to &#8220;myEncyptedMessage&#8221;. Supposedly you&#8217;d have myEncyptedMessage transported over RMI to the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saurabh phadke</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1102</link>
		<dc:creator>saurabh phadke</dc:creator>
		<pubDate>Sat, 05 Apr 2008 18:54:17 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1102</guid>
		<description>what is the data type of test used in statement String)test.getObject(myEncyptedMessage);
  Object or string</description>
		<content:encoded><![CDATA[<p>what is the data type of test used in statement String)test.getObject(myEncyptedMessage);<br />
  Object or string</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Louca</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1053</link>
		<dc:creator>Andreas Louca</dc:creator>
		<pubDate>Tue, 25 Mar 2008 06:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1053</guid>
		<description>Object test is a SealedObject that got transfered to the server, using RMI. 

When I upload the tutorial about asymmetric/symmetric keys it would employ RMI in order to be more clear how this technique works.</description>
		<content:encoded><![CDATA[<p>Object test is a SealedObject that got transfered to the server, using RMI. </p>
<p>When I upload the tutorial about asymmetric/symmetric keys it would employ RMI in order to be more clear how this technique works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yogesh</title>
		<link>http://andreas.louca.org/2008/03/20/java-rsa-encryption-an-example/#comment-1045</link>
		<dc:creator>Yogesh</dc:creator>
		<pubDate>Sat, 22 Mar 2008 19:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://andreas.louca.org/?p=34#comment-1045</guid>
		<description>What is test ((String)test.getObject(myEncyptedMessage);) over here ?</description>
		<content:encoded><![CDATA[<p>What is test ((String)test.getObject(myEncyptedMessage);) over here ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
