<?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>W:Blut &#187; Blog</title>
	<atom:link href="http://www.wblut.com/topics/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wblut.com</link>
	<description>Experiments in generative graphics</description>
	<lastBuildDate>Tue, 13 Dec 2011 18:12:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>

   <image>
    <title>W:Blut</title>
    <url>http://0.gravatar.com/avatar/f53eecb68a71cc8113e72e1e53c94f7d.png?s=48</url>
    <link>http://www.wblut.com</link>
   </image>
		<item>
		<title>Signing Processing applets</title>
		<link>http://www.wblut.com/2011/12/12/signing-processing-applets/</link>
		<comments>http://www.wblut.com/2011/12/12/signing-processing-applets/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 22:25:25 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1673</guid>
		<description><![CDATA[Robustness of geometric algorithms is a prime concern in my hemesh library. It is surprising how fast the intricacies of floating-point calculations crop up and render your code fickle and buggy. It’s easy to forget that computer math is not the same as regular math. Rather, it is a discrete limited-domain simulation of real mathematics. [...]]]></description>
			<content:encoded><![CDATA[<p>Robustness of geometric algorithms is a prime concern in my hemesh library. It is surprising how fast the intricacies of floating-point calculations crop up and render your code fickle and buggy. It’s easy to forget that computer math is not the same as regular math. Rather, it is a discrete limited-domain simulation of real mathematics.</p>
<p>I’m currently adding some new plumbing to hemesh using an arbitrary precision library, <a href="http://www.apfloat.org/" title="Apfloat" class="liexternal">Apfloat</a>. because it’s a lot slower it is only called when necessary. Including it had an unexpected side-effect. Apfloat requires information about <em>your</em> system when it’s running in a browser. It needs your machine’s inherent precision.</p>
<p>However, accessing <em>your</em> computer is a big no-no for <em>my</em> code. So unless the applets are signed, they won’t run because of security restrictions. In itself, this is not really a problem, we can still share code and show each other images. But I’d rather keep sharing applets, these always include the correct libraries and often rely on unreleased alpha-level modifications of my library.</p>
<p>I can’t claim a proper understanding of Java security issues and all details about signing. But I’ve been looking around and gathered masses of raw data, info-ore. I’ve smelted it down to an ingot of usefulness. In short, this is how you sign a Processing applet without knowing what you’re doing. On a Windows machine… (don’t be too disappointed, the essentials are the same on hipster machines.)</p>
<h3>Preparations</h3>
<p>1) First locate your Java Development Kit (JDK) distribution. If you’re using Eclipse, or program in JAVA, you probably have one around somewhere. If not, Processing has it included in its <code>\java</code> subdirectory. Check out the contents of the <code>\bin</code> folder. See all those executables, we’ll be using a few of those. Let’s say you traced your JDK to <code>c:\processing\java</code>. So anywhere the text mentions <code>c:\processing\java\bin</code> substitute this with your own location.</p>
<p>2) Include the <code>\bin</code> subdirectory in your system’s PATH. Check <a href="http://www.mathworks.nl/support/solutions/en/data/1-15ZLK/index.html" class="liexternal">this</a> if you aren’t sure how, of course use <code>c:\processing\java\bin</code> instead of the Matlab example. This’ll save you a lot of typing. The executables in the bin folder can now be called from any directory.</p>
<p>3) Create a folder to store your keystore, the repository for your certificates. I’ll be using <code>c:\keystore</code>.</p>
<h3>Creating your certificate</h3>
<p>4) Open up a command prompt (press windows+r, type <code>cmd</code>). If you set up the PATH properly, you can access the commands we’ll be using anywhere. Otherwise you’ll have to call them with their full path… We’ll create a keystore and a first certificate <em>mykey</em> now. Since our keys will be self-certified only (i.e. no certifying agency will vouch for your good intentions), we’ll give them a validity of 100 years. That should be enough…<br />
<br />
<code>keytool -genkey -keystore c:\keystore\mykeystore.jks -alias mykey -validity 36500</code><br />
<br />
Since this is the first time the keystore is accessed, you’ll need to input some important info. Just choose a decent keystore password (let’s say passw0rd ;) ) and fill in the rest. After filling in your data, keytool will ask for the key password. You can keep this the same as the keystore password, just enter and finish. You now have a keystore with a single certificate <em>mykey</em> in it.</p>
<p>5) Now we’ll make the certificate self-certified. It’s up to the end-user whether or not he’ll trust your applet.<br />
<br />
<code>keytool -selfcert -keystore c:\keystore\mykeystore.jks -alias mykey</code><br />
</p>
<h3>Signing your applet</h3>
<p>6) I now have an applet I want to share and that requires signing:<code>c:\sketchbook\condel</code>. First export the applet. The <code>/applet</code> subdirectory now contains all Java archives (JAR) associated with your sketch. We’ll need to sign all of them, even if only one requires authentication.</p>
<p>7) Re-open the command window if necessary and navigate to <code>c:\sketchbook\condel\applet</code>. For every JAR run this:
<br />
<code>jarsigner -keystore c:\keystore\mykeystore.jks -storepass passw0rd -keypass passw0rd core.jar mykey</code><br />
<br />
In my case, I have <code>core.jar</code>, <code>hemesh.jar</code>, <code>apfloat.jar</code> and several others I’ll need to sign.
</p>
<p>8) Done! You can upload the applet. If somebody accesses the page she will be given the choice of trusting the applet. If yes, then the applet will run. If no, then it won’t.… I’ve created <a href="http://constructs.wblut.com/2011/12/12/condel/" title="Constrained Dealunay" class="liexternal">condel</a> this way.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2011/12/12/signing-processing-applets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A bit W:Mute</title>
		<link>http://www.wblut.com/2011/12/01/a-bit-wmute/</link>
		<comments>http://www.wblut.com/2011/12/01/a-bit-wmute/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 22:42:18 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[construct]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[just for fun]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1667</guid>
		<description><![CDATA[I started posting small scripts at constructs.wblut.com. Much like the now defunct wmute.org these are presented as is. I’m hoping that not having to write an actual post will increase the frequency of updates. We’ll see…]]></description>
			<content:encoded><![CDATA[<p>I started posting small scripts at <a href="http://constructs.wblut.com" title="constructs" class="liexternal">constructs.wblut.com</a>. Much like the now defunct wmute.org these are presented as is. I’m hoping that not having to write an actual post will increase the frequency of updates. We’ll see…</p>
<p><a href="http://constructs.wblut.com/" class="liimagelink"><img src="http://www.wblut.com/blog/wp-content/2011/12/FireShot-capture-002-W_Blut-Constructs-I-A-repository-of-Processing-constructs-constructs_wblut_com-940x416.png" alt="W:Blut Constructs I A repository of Processing constructs" title="W:Blut Constructs I A repository of Processing constructs" width="940" height="416" class="aligncenter size-large wp-image-1669" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2011/12/01/a-bit-wmute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Envy</title>
		<link>http://www.wblut.com/2011/10/20/envy/</link>
		<comments>http://www.wblut.com/2011/10/20/envy/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 17:44:20 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Inspiration]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1660</guid>
		<description><![CDATA[“We fell for an hour through a sea of luminous creatures, some a few inches in length, others a foot or two long or longer. Of the thousands we passed, many shimmered and pulsated with light, especially when startled by the passage of our tiny submersible. Out my observation port I sometimes saw a bright [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>“We fell for an hour through a sea of luminous creatures, some a few inches in length, others a foot or two long or longer. Of the thousands we passed, many shimmered and pulsated with light, especially when startled by the passage of our tiny submersible. Out my observation port I sometimes saw a bright flash as we sped downward or watched a lengthy blur of radiance curl into a smaller shape. Every so often one of the living lights, caught in an eddy, would pirouette just outside my window, a swirl of luminescence in a sea of darkness.”</p></blockquote>
<blockquote><p>The Universe Below, William J. Broad,1997</p></blockquote>
<p><img src="http://www.wblut.com/blog/wp-content/2011/10/deep-sea-glass-squid.jpg" alt="deep sea glass squid" title="deep sea glass squid" width="320" height="320" class="aligncenter size-full wp-image-1661" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2011/10/20/envy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 11/21 queries in 0.038 seconds using disk: basic

Served from: www.wblut.com @ 2012-02-05 04:54:35 -->
