<?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>PCR&#039;s notepad &#187; cryptography</title>
	<atom:link href="http://notepad.patheticcockroach.com/category/cryptography/feed/" rel="self" type="application/rss+xml" />
	<link>http://notepad.patheticcockroach.com</link>
	<description>The area in patheticcockroach.com where the EEG isn&#039;t isoelectric</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:11:36 +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>Installing Freenet on Ubuntu server (command line)</title>
		<link>http://notepad.patheticcockroach.com/2519/installing-freenet-on-ubuntu-server-command-line/</link>
		<comments>http://notepad.patheticcockroach.com/2519/installing-freenet-on-ubuntu-server-command-line/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 17:00:10 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[cryptography]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2519</guid>
		<description><![CDATA[After the Tor command line installation guide, it&#8217;s only logical to carry on with Freenet It&#8217;s a bit sad how both those projects lack of crystal clear command line instructions, as, once again, they would likely benefit the most from users running them on dedicated servers, i.e. most often on GUI-less machines. This guide was [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://notepad.patheticcockroach.com/2487/installing-and-controlling-a-tor-relay-on-linux-via-command-line-only/">Tor command line installation guide</a>, it&#8217;s only logical to carry on with <a href="http://freenetproject.org">Freenet</a> <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  It&#8217;s a bit sad how both those projects lack of crystal clear command line instructions, as, once again, they would likely benefit the most from users running them on dedicated servers, i.e. most often on GUI-less machines. This guide was made for Ubuntu, but should be remarkably similar on other Linux distributions, apart from the package manager (yum vs apt-get, I guess).</p>
<h2>Installing Java</h2>
<p>The main turn off with Freenet for me is that it&#8217;s written in Java. Once you&#8217;ve installed it you&#8217;ll see for yourself how CPU-intensive it actually is &#8211; much more than Tor (which on the opposite isn&#8217;t too demanding). Anyway, installing Java is now a bit trickier than before, because Oracle got their reference implementation <a href="https://help.ubuntu.com/community/Java">removed from official distribution repositories</a>, but OpenJDK works just as well so that&#8217;s what we&#8217;ll pick.<br />
<code>apt-get install openjdk-6-jdk</code><br />
(that will be about 170 MiB of stuff to install)</p>
<h2>Installing Freenet</h2>
<p>Even though the headless server instructions <a href="http://freenetproject.org/download.html">there</a> are a bit scary, I found them quite sufficient. It&#8217;s not that complicated to install after all (also, maybe after getting warmed up by Tor&#8217;s installation I&#8217;m a little biased, too <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), so I&#8217;ll just list the commands you need to type (obviously, edit the pathes), and they should be pretty self-explanatory:<br />
<code>cd /where/you/want/to/install/it<br />
mkdir someFolder<br />
cd someFolder<br />
wget https://downloads.freenetproject.org/alpha/installer/freenet07.tar.gz --no-check-certificate<br />
tar xzf freenet07.tar.gz</code><br />
Now we need to create a user for Freenet, give it a password and assign them the freenet folder:<br />
<code>useradd someUserName<br />
passwd someUserName<br />
[enter the password twice]<br />
chown someUserName freenet -R</code></p>
<h2>First Freenet launch, configuration</h2>
<p>Connect to the machine where you just installed Freenet as this someUserName, go to the freenet folder and run <em>run.sh</em>:<br />
<code>cd /where/you/want/to/install/it/someFolder/freenet<br />
./run.sh</code><br />
FYI (actually, more for my personal archives ^^), here&#8217;s the output:</p>
<pre>Enabling the auto-update feature
Detecting tcp-ports availability...
Downloading update.sh
Downloading wrapper_Linux.zip
Downloading freenet-stable-latest.jar
Downloading freenet-ext.jar
Downloading the JSTUN plugin
Downloading the UPnP plugin
Downloading seednodes.fref
Installing cron job to start Freenet on reboot...
Installed cron job.
Starting Freenet 0.7...
Please visit http://127.0.0.1:8888/ to configure your node
Finished</pre>
<p>Now, you need to connect to http://127.0.0.1:8888 to configure Freenet. If, as is likely since you&#8217;re reading this tutorial on console-based installation, it&#8217;s not on the same computer as where you are now, you have 2 options:<br />
- follow <a href="http://freenetproject.org/faq.html#fproxy-lan">this</a> to allow external IPs (preferably, just a specific one: yours <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) to connect to your Freenet node<br />
- create an SSH tunnel to your machine (see <a href="http://notepad.patheticcockroach.com/369/tips-to-freedom-on-a-restricted-computer-environment/">the second half of this old post</a>), and then when your browser is configured to use it (NB: don&#8217;t forget to remove &#8220;127.0.0.1&#8243; from the exclusion list, in Firefox called &#8220;no proxy for&#8221;), going to http://127.0.0.1:8888 will actually go to your server.</p>
<p>Well, that&#8217;s pretty much it, now just configure it from the GUI as you wish. Here are a few hints, though:</p>
<ul>
<li>You should increase the RAM available to Freenet. By default it&#8217;s 128, it would be a good idea to at least double it. Actually 512 MiB would be even nicer. Note that you&#8217;ll have to restart Freenet in order for the change to be applied. The RAM can also be configured manually in <em>wrapper.conf</em>:<br />
<code>wrapper.java.initmemory=60<br />
wrapper.java.maxmemory=512</code></li>
<li>You&#8217;ll probably want to review input and output bandwidth settings (although you already had the opportunity to do so during the first launch wizard)</li>
<li>You&#8217;ll want to increase the datastore size (this helps the network) and the client cache (this helps you <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), because during the first launch wizard you aren&#8217;t really given much choice for some reason&#8230; Respectively 50GiB and 25GiB could be fine for instance, although of course you can increase that much more. Note however that whenever you change those settings Freenet will rebuild its database, which means it will be somewhat slower for a while.</li>
<li>Finally, it&#8217;s probably a good idea to install some social plugins such as WebOfTrust and Freetalk (both are official plugins), which will give you access to discussion boards. Other plugins of interest: Sone (kind of a social network), Library (search engine), Freenet Search (search engine too).</li>
</ul>
<h2>Bonus: solving the &#8220;There isn&#8217;t enough entropy available on your system&#8230; Freenet won&#8217;t start until it can gather enough.&#8221; error</h2>
<p>Freenet seems to have massive needs for entropy, and if you happen to run out of it, it might take some time to spontaneously replenish. A quick way to boost this is to generate lots of disk access. I saw the suggestion of <a href="http://www.mail-archive.com/devl@freenetproject.org/msg19942.html">running <code>find / >/dev/null</code></a>, but it didn&#8217;t help a lot for me, maybe because my HD isn&#8217;t that filled. What worked great was to either copy a big directory, or even simpler, to download some large file, like: <code>wget ftp://ftp.free.fr/mirrors/ftp.ubuntu.com/dvd/current/precise-dvd-amd64.iso</code></p>
<h2>Bonus 2: restarting/stopping the node without using the web GUI</h2>
<p>The ./run.sh script can be run with arguments, such as <code>./run.sh restart</code> or <code>./run.sh stop</code></p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2519/installing-freenet-on-ubuntu-server-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and controlling a Tor relay on Linux via command line only</title>
		<link>http://notepad.patheticcockroach.com/2487/installing-and-controlling-a-tor-relay-on-linux-via-command-line-only/</link>
		<comments>http://notepad.patheticcockroach.com/2487/installing-and-controlling-a-tor-relay-on-linux-via-command-line-only/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 14:28:36 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[cryptography]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=2487</guid>
		<description><![CDATA[Tor say they are always looking for more people to run nodes for their network, yet oddly enough they don&#8217;t provide really simple/straightforward instructions to get a relay working without their GUI, which would be the method of choice for server owners. It is however not too complicated, and here&#8217;s a tutorial that should give [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.torproject.org">Tor</a> say they are always looking for more people to run nodes for their network, yet oddly enough they don&#8217;t provide really simple/straightforward instructions to get a relay working without their GUI, which would be the method of choice for server owners. It is however not too complicated, and here&#8217;s a tutorial that should give enough details for people not willing to think at every step. I used Ubuntu 11.10, for other distributions I guess the main differences will be in the way to deal with the package manager.</p>
<h2>Dealing with package manager stuff</h2>
<p>The first step is to configure the package manager to use Tor&#8217;s repository, because distribution repositories are, as you know, always outdated. On this part, the <a href="https://www.torproject.org/docs/debian.html.en">Tor project documentation (for Ubuntu and Debian)</a> is good enough (NB: <a href="https://www.torproject.org/docs/rpms.html.en">here is the page for Fedora / CentOS / SUSE</a>). Basically:<br />
<code>nano /etc/apt/sources.list</code><br />
and at the bottom, add (for Ubuntu 11.10):<br />
<code>deb http://deb.torproject.org/torproject.org oneiric main</code><br />
You can now proceed to installation:<br />
<code>apt-get install tor tor-geoipdb</code></p>
<h2>Editing the configuration file (torrc)</h2>
<p>Installing Tor this way also starts it, but the default configuration is not to relay any traffic. We now need to configure is as a relay. The configuration file to edit is usually, as mentioned <a href="https://www.torproject.org/docs/faq.html.en#torrc">there</a>, /etc/tor/torrc:<br />
<code>nano /etc/tor/torrc</code><br />
In this file, the settings you&#8217;ll want to look at are:</p>
<ul>
<li>uncomment <code>Log notice file /var/log/tor/notices.log</code> if you want to avoid a notice in ARM (see below for what ARM is)</li>
<li>uncomment <code>ControlPort 9051</code> so that ARM can be used to control and monitor Tor</li>
<li>uncomment <code>ORPort</code> and (optionally but recommended, I guess) change its value to some random available port. That&#8217;s the port that will be used by other nodes to connect to yours</li>
<li>optionally uncomment <code>Nickname</code> and give a name to your node</li>
<li>set <code>RelayBandwidthRate</code> and <code>RelayBandwidthBurst</code>. Those are the maximum bandwidth that can be used by Tor constantly and in burst, respectively. For instance:
<pre>RelayBandwidthRate 5000 KB  # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 7000 KB # But allow bursts up to 200KB/s (1600Kbps)</pre>
<p>Beware those values are in Bytes, not bits.</li>
<li>if you have a traffic quota (and don&#8217;t want to blow it), you&#8217;ll want to configure <code>AccountingMax</code> and <code>AccountingStart</code></li>
<li>optionally, you can put your name and (spam protected) e-mail, or even your GPG fingerprint, in <code>ContactInfo</code>. According to the comments it can be used to contact you in case your node goes wild or something.</li>
<li>optionally, you can also configure <code>DirPort</code> to mirror directory information on this port.</li>
<li>finally, the most important part: choose whether you want to be just a relay or an exit node. To be just a relay, set:<br />
<code>ExitPolicy reject *:*</code><br />
To be an exit node, you can either leave at is, or replace the default exit policy (in order to do the later, do read the instructions carefully). Note that being an exit can bring you <a href="https://www.torproject.org/docs/faq-abuse.html#TypicalAbuses">trouble</a> because there&#8217;s always a risk of abuse, so at least do check your country&#8217;s law, the law of your host&#8217;s country, and your host&#8217;s TOS. But I guess you&#8217;re already aware of that anyway.</li>
</ul>
<p>Additionally, if you want to remotely use your node to enter the Tor network to surf yourself, well, I suppose it can be configured using <code>SocksPort</code>, <code>SocksListenAddress</code>, <code>SocksPolicy accept</code> and <code>SocksPolicy reject</code>, but I haven&#8217;t figured out how to do that yet :/</p>
<h2>ARM: a terminal-friendly GUI</h2>
<p>Last step, let&#8217;s install a nice piece of helper software called <a href="http://www.atagar.com/arm/">ARM</a> (for &#8220;anonymizing relay monitor&#8221;), which is basically a nice console-based GUI to monitor and have some control over Tor. On Ubuntu 11.10 it&#8217;s as simple as:<br />
<code>apt-get install tor-arm</code></p>
<p>In order to use ARM, you&#8217;ll have to enable Tor control port first. You already entered it in the configuration file (if you followed the guide properly, at least), so we just need to apply the configuration:<br />
<code>/etc/init.d/tor reload</code></p>
<p>Now you can just type <code>arm</code> to launch ARM and view some neat information about your node, like the traffic graph, inbound and outbound nodes, etc.</p>
<h2>Bonus: what&#8217;s a stable node, what&#8217;s a guard node?</h2>
<p>A little bonus, because that&#8217;s something that puzzled me for a while: on some <a href="http://notepad.patheticcockroach.com/2500/lists-of-tor-nodes">Tor node listings</a>, you can see that servers have flags, notably some servers are flagged as &#8220;guard&#8221; and some are flagged as &#8220;stable&#8221;. If you&#8217;re curious about what it means, here it is, right from the <a href="https://gitweb.torproject.org/torspec.git/blob_plain/HEAD:/dir-spec.txt">specification</a>:</p>
<pre>"Guard" -- A router is a possible 'Guard' if its Weighted Fractional
Uptime is at least the median for "familiar" active routers, and if
its bandwidth is at least median or at least 250KB/s.

	To calculate weighted fractional uptime, compute the fraction
	of time that the router is up in any given day, weighting so that
	downtime and uptime in the past counts less.

	A node is 'familiar' if 1/8 of all active nodes have appeared more
	recently than it, OR it has been around for a few weeks.

"Stable" -- A router is 'Stable' if it is active, and either its Weighted
MTBF is at least the median for known active routers or its Weighted MTBF
corresponds to at least 7 days. Routers are never called Stable if they are
running a version of Tor known to drop circuits stupidly.  (0.1.1.10-alpha
through 0.1.1.16-rc are stupid this way.)

	To calculate weighted MTBF, compute the weighted mean of the lengths
	of all intervals when the router was observed to be up, weighting
	intervals by $\alpha^n$, where $n$ is the amount of time that has
	passed since the interval ended, and $\alpha$ is chosen so that
	measurements over approximately one month old no longer influence the
	weighted MTBF much.

	[XXXX what happens when we have less than 4 days of MTBF info.]</pre>
<p>Sources (other than those already mentioned in the text):</p>
<ul>
<li><a href="https://help.ubuntu.com/community/Tor">Tor &#8211; Community Ubuntu Documentation</a></li>
<li><a href="https://lists.torproject.org/pipermail/tor-relays/2011-February/000302.html">Ubuntu howto for CLI install of Tor relay?</a></li>
<li><a href="https://lists.torproject.org/pipermail/tor-relays/2010-December/000238.html">Torstatus: What does stable server mean?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/2487/installing-and-controlling-a-tor-relay-on-linux-via-command-line-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to &#8220;decrypt&#8221; DLC files</title>
		<link>http://notepad.patheticcockroach.com/428/how-to-decrypt-dlc-files/</link>
		<comments>http://notepad.patheticcockroach.com/428/how-to-decrypt-dlc-files/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 11:35:42 +0000</pubDate>
		<dc:creator>David Dernoncourt</dc:creator>
				<category><![CDATA[cryptography]]></category>

		<guid isPermaLink="false">http://notepad.patheticcockroach.com/?p=428</guid>
		<description><![CDATA[(If you&#8217;re in a hurry, see at the very end for a quick list of all useful software and video tutorials) JDownloader is an open source download manager, primarily aimed at downloading from captcha-protected download sites (RapidShare, Megaupload, Hotfile, Netload&#8230;) but supporting also any &#8220;normal&#8221; download (like a picture from photobucket, or actually any file [...]]]></description>
			<content:encoded><![CDATA[<p>(If you&#8217;re in a hurry, see at the very end for a quick list of all useful software and video tutorials)</p>
<p>JDownloader is an open source download manager, primarily aimed at downloading from captcha-protected download sites (RapidShare, Megaupload, Hotfile, Netload&#8230;) but supporting also any &#8220;normal&#8221; download (like a picture from photobucket, or actually any file from any server).<br />
Although claiming to be open source (and actually, it&#8217;s currently under the GNU <acronym title="General Public License">GPL</acronym>), parts of it are close source. Notably because they rely on an undisclosed encryption algorithm for their encrypted links list files. I&#8217;ve never understood the point of making those lists undecipherable, particularly since anyone is able to open such a list with JDowloader and to grab the files. Only they won&#8217;t be able to easily get the location of those files.<br />
Anyway, there are several easy ways to find the links inside a DLC:</p>
<ol>
<li>The always-working method: JDownloader will never be able to prevent you from using this method, as this would require the complicity of hosters. Basically, this method involves to simply spy your own connection and record what URLs are retrieved by JDownloader. When you load a DLC links list, JDownloader will check if the files are online. With any packet sniffer you can list those links. A more detailed short video tutorial was posted on <a href="http://www.kood.org/sala-dlc/">sala source</a>. Just in case this goes offline (as other DLC decrypters have), I mirrored their video on Megaupload there [http://www.megaupload.com/?d=TJ85M6AX] (tip: if you want to save download wait time, don&#8217;t download it yet but rather watch it live on megavideo [http://www.megavideo.com/?d=TJ85M6AX]) and their toolkit too [http://www.megaupload.com/?d=BRTD1GNI].</li>
<li>The easier method, but probably not working with recent DLC files (JDownloader tend to change their encryption method regularly to avoid decrypters): a decrypter made by Seba. It was originally posted <a href="http://www.filestube.com/source.html?url=http://djdan19.blogspot.com/2009/05/dlc-decrypter-07.html">on a BlogSpot blog</a> but eventually disappeared. But thanks to <a href="http://www.filestube.com/c65cd33e51dc4bc303e9,g/DLC-Decrypter-0-7-By-Seba.html">FilesTube</a> I still managed to find it and I uploaded it here [http://www.megaupload.com/?d=26FVJVN1]. It was created around May 2009, so it should work with DLC files created before this date, and possibly during some time after. I didn&#8217;t test it with current DLC files.</li>
</ol>
<p>For a short summary:</p>
<ul>
<li>DLC Decrypter version 0.7 (May 2009) by Seba (broken link, used to point to http://www.megaupload.com/?d=26FVJVN1)</li>
<li>Video tutorial [http://www.megaupload.com/?d=TJ85M6AX] that (normally should) always works, and the tools [http://www.megaupload.com/?d=BRTD1GNI] that go with it</li>
</ul>
<h2>Update (2011-03-27): online DLC decrypter</h2>
<p>As you can see from the comments, every now and then some DLC decryption sites pop up then go. Well, I think I&#8217;ve found a pretty &#8220;stable&#8221; one, or at least one which has been maintained for around 9 months now. I just tested it, and it works for the moment. It&#8217;s a bit slow, so I wouldn&#8217;t be too surprised if their inner workings were just like the &#8220;always working&#8221; method I described above: run jDownloader and analyze its network traffic! (which would mean a very high probability of remaining online as long as the owner wishes to) Or of course maybe it just means they&#8217;re on a slow server, eh&#8230; <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  The site is <a href="http://dcrypt.it">dcrypt.it</a></p>
<h2>Update (2011-04-17): offline DLC/CCF/RSDF decrypter</h2>
<p>As you can see from the comments, the decrypter &#8220;by Seba&#8221; is actually developed by a company which still updates it. The current version seems to be 1.7.0.0 (the one in Seba&#8217;s pack is only 0.7) so it&#8217;s probably worth the upgrade&#8230; if you manage to run the installer (it failed to install on my Windows 7 x64, which is why I&#8217;m not exactly sure of the current version number). Their website: <a href="http://containerex.info/">containerex.info</a></p>
<h2>Update (2011-10-27): another online decrypter</h2>
<p><a href="http://linkdecrypter.com/">linkdecrypter.com </a>offers pretty much the same functions as dcrypt.it, so those 2 are pretty much interchangeable should one of them be temporarily unavailable.</p>
<h2>Update (2012-01-31): files stolen by the FBI</h2>
<p>As you most likely know, Megaupload was <a href="http://notepad.patheticcockroach.com/2616/oops-the-fbi-stole-my-files/">shut down by the FBI</a> without any prior notice. Some files I linked to were hosted there without any backup&#8230; so, broken links now I guess <img src='http://notepad.patheticcockroach.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  On the plus side, the online tools as well as the self-hosted containerex.info work just as well (better indeed) as the things I hosted on Megaupload. As a memorial (and maybe in case there&#8217;s a way to get those files back), I&#8217;m leaving the original MU URLs in plain-text next to the former links.</p>
]]></content:encoded>
			<wfw:commentRss>http://notepad.patheticcockroach.com/428/how-to-decrypt-dlc-files/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

