<?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>Parallel Interface &#187; Life (the real one)</title>
	<atom:link href="http://www.paralint.com/blog/category/life-the-real-one/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paralint.com/blog</link>
	<description>Programming security in C++, Java and Python, one line at a time</description>
	<lastBuildDate>Fri, 09 Dec 2011 14:32:28 +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>Attaque mathématique des codes Bixi (vélo libre-service)</title>
		<link>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/</link>
		<comments>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:30:12 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[En français]]></category>
		<category><![CDATA[Life (the real one)]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=119</guid>
		<description><![CDATA[J&#8217;étais au centre ville aujourd&#8217;hui et j&#8217;avais affaire pas très loin. Au lieu d&#8217;utiliser le métro, j&#8217;ai loué un Bixi, vélo en libre service. J&#8217;ai été surpris de constater que les codes Bixi ne comporte que 3 chiffres, sur 5 caractères, soit 3^5=243 codes possibles. Ça semble bien peu, mais si les codes ne sont [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;étais au centre ville aujourd&#8217;hui et j&#8217;avais affaire pas très loin. Au lieu d&#8217;utiliser le métro, j&#8217;ai loué un Bixi, vélo en libre service. J&#8217;ai été surpris de constater que les codes Bixi ne comporte que 3 chiffres, sur 5 caractères, soit 3^5=243 codes possibles.</p>
<div id="attachment_120" class="wp-caption aligncenter" style="width: 427px"><img class="size-full wp-image-120" title="bixi21213" src="http://www.paralint.com/blog/wp-content/uploads/2009/06/bixi21213.jpg" alt="Billet bixi portant le code 21213" width="417" height="283" /><p class="wp-caption-text">Billet bixi portant le code 21213</p></div>
<p>Ça semble bien peu, mais si les codes ne sont utilisables qu&#8217;au point de service où ils sont émis, et pour une durée limitée, avec peut-être une détection d&#8217;attaque en force brute, on devrais pouvoir dormir tranquille&#8230;</p>
<p>Je me suis rappellé une attaque mathémaitque sur des codes de ce genre. Avec une location de 24 heures à 5$, on peut prendre et remettre le vélo plusieurs fois, histoire de tester la théorie&#8230; Bonne nouvelle, Bixi n&#8217;est pas vulnérable. Mais j&#8217;écris quand même la démarche, c&#8217;est trop rare qu&#8217;on a l&#8217;occasion d&#8217;utiliser des math pour (tenter de) contourner les règles d&#8217;un système.</p>
<p><span id="more-119"></span>La vulnérabilité apparais lorsque l&#8217;implémentation utilise une fenêtre coulissante pour vérifier les codes entrés. Cette attaque a déjà été utilisée pour <a href="http://everything2.com/index.pl?node_id=1520430">dévérouiller une porte de voiture</a> à combinaison.</p>
<p>Pour les Bixi, les chiffres du codes de dévérouillage de vélo peuvent être 1, 2 ou 3. Le dictionnaire des valeurs possibles à une taille k=3. Il faut entrer 5 chiffres, on dit que n=5. Avec ces variables, une fenêtre coulissante fonctionne comme ceci :</p>
<ol>
<li>On entre n chiffres (par exemple 12222)</li>
<li>Ce ne sera pas le bon code</li>
<li>On entre un chiffre supplémentaire, disons 3</li>
<li>Pour accomoder le chiffre supplémentaire, l&#8217;implémentation décale les chiffres déjà entrés pour faire de la place. Dans notre exemple, c&#8217;est le 1 qui disparaît à gauche à la faveur du 3 à droite.</li>
<li>L&#8217;implémentation vérifie le nouveau code dans la fenêtre, soit 22223.</li>
</ol>
<p>On réussi ainsi à tester 2 codes en ne saisissant que 6 chiffres, au lieu de 10. Et ainsi de suite, à chaque fois qu&#8217;on ajoute un seul chiffre, on se trouve à tester un nouveau code de 5 chiffres. La première étape ne sert qu&#8217;à initialiser le processus, sans affecter la complexité de l&#8217;attaque.</p>
<p>C&#8217;est une vielle idée. Un mathématicien Hollandais, Nicolaas Govert de Bruijn, a formalisé une <a href="http://en.wikipedia.org/wiki/De_Bruijn_sequence">séquence de chiffres</a> dans laquelle n&#8217;importe quelle séquence de n chiffres n&#8217;apparait qu&#8217;une seule fois. Autrement dit, si vous <a href="http://www.hakank.org/comb/debruijn.cgi?k=3&amp;n=5">générez une séquence de Bruijn avec k=3 et n=5</a> (les codes Bixi) et que vous y cherchez votre code Bixi, il n&#8217;y sera qu&#8217;une seule fois. C&#8217;est la façon la plus optimale d&#8217;attaquer un système de codes comme celui de Bruijn.</p>
<p>Voici la séquence dans l&#8217;ordre. Elle se lit de gauche à droite, de haut en bas. 1111121111311&#8230;&#8230; Le 1111 de la fin de la séquence est en fait les premiers chiffres qui se répêtent.</p>
<pre>11111 21111 31112 21112 31113 21113 31121 21121 31122 21122</pre>
<pre>31123 21123 31131 21131 31132 21132 31133 21133 31212 21212</pre>
<pre>31213 21213 31221 31222 21222 31223 21223 31231 31232 21232</pre>
<pre>31233 21233 31313 21313 31322 21322 31323 21323 31332 21332</pre>
<pre>31333 21333 32222 23222 33223 23223 33232 33233 33311 11</pre>
<p>La protection contre cette attaque est heureusement toute simple : à l&#8217;étape 2, effacer tous les chiffres et en redemander n autres. C&#8217;est ce qu&#8217;on fait les designers de Bixi. L&#8217;histoire ne dit pas s&#8217;ils connaissaient l&#8217;attaque, ou s&#8217;ils ont été chanceux&#8230; Au moins il pourrons dire qu&#8217;il m&#8217;ont fais marcher et pédaler !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>High availability for humans</title>
		<link>http://www.paralint.com/blog/2008/07/11/high-availability-for-humans/</link>
		<comments>http://www.paralint.com/blog/2008/07/11/high-availability-for-humans/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 12:30:43 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Life (the real one)]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=55</guid>
		<description><![CDATA[I noticed a new link in my GMail account (I am using gmail for your domain), showing the sessions used to connect to an account and the last time since it had activity on that session. Pretty neat, although I doubt a regular user will be able to make sense of any of that&#8230; In [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed a new link in my GMail account (I am using gmail for your domain), showing the sessions used to connect to an account and the last time since it had activity on that session.</p>
<p>Pretty neat, although I doubt a regular user will be able to make sense of any of that&#8230; In my case, it shows that from the last time I was online at home (IP 66.x.x.x) and the next time I was online at work (IP 199.x.x.x), there were only seven hours.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="2" valign="top"><strong>Recent activity:</strong></td>
</tr>
<tr>
<td colspan="2" valign="top">
<table border="1" cellspacing="0" cellpadding="4" width="97%">
<tbody>
<tr class="thead">
<td width="36%" valign="top"><strong>Access Type [ <a href="http://mail.google.com/support/bin/answer.py?ctx=%67mail&amp;answer=45938" target="activityHelp">?</a> ] </strong><br />
(Browser, mobile, POP3, etc.)</td>
<td width="24%" valign="top"><strong>IP address [ <a href="http://mail.google.com/support/bin/answer.py?ctx=%67mail&amp;answer=45938" target="activityHelp">?</a> ] </strong></td>
<td width="40%" valign="top"><strong>Date/Time</strong><br />
(Displayed in your time zone)</td>
</tr>
<tr>
<td valign="top">Browser</td>
<td valign="top">199.x.x.x *</td>
<td valign="top">8:16 am <strong>(0 minutes ago)</strong></td>
</tr>
<tr style="background-color: #c6e88c">
<td valign="top">Google Toolbar</td>
<td valign="top">66.x.x.x</td>
<td valign="top">12:41 am <strong>(7 hours ago) </strong></td>
</tr>
<tr>
<td valign="top">Browser</td>
<td valign="top">66.x.x.x</td>
<td valign="top">12:09 am (8 hours ago)</td>
</tr>
<tr>
<td valign="top">Browser</td>
<td valign="top">66.x.x.x</td>
<td valign="top">11:50 pm (8 hours ago)</td>
</tr>
<tr>
<td valign="top">Browser</td>
<td valign="top">199.x.x.x <strong>*</strong></td>
<td valign="top">Jul 10 (16 hours ago)</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" valign="top"><span class="subtext"> </span></td>
</tr>
</tbody>
</table>
<p>And yes, I took time to sleep, wake up the kids and have breakfast with them.</p>
<p>Time for coffee now !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2008/07/11/high-availability-for-humans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gathering entropy from children</title>
		<link>http://www.paralint.com/blog/2008/01/13/gathering-entropy-from-children/</link>
		<comments>http://www.paralint.com/blog/2008/01/13/gathering-entropy-from-children/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 02:53:37 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Life (the real one)]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2008/01/13/gathering-entropy-from-children/</guid>
		<description><![CDATA[Here is a trick I found that solved an old problem: How can coin flipping ever be fair if only one person chooses head or tail ? I remember Chrissy complaining about that to Jack in an episode of &#8220;Three&#8217;s Company&#8221;. Above the humour, I remember thinking about fair coin flipping back then, many years [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a trick I found that solved an old problem: How can coin flipping ever be fair if only one person chooses head or tail ?</p>
<p>I remember <a href="http://en.wikipedia.org/wiki/Chrissy_Snow" target="_blank">Chrissy</a> complaining about that to Jack in an episode of &#8220;Three&#8217;s Company&#8221;. Above the humour, I remember thinking about fair coin flipping back then, many years before I learned anything about cryptography.</p>
<p>The other day, I was asked the very same question by my daughter. Children are great entropy generators (you can tell by the mess they make of their toys). I found a way to solve the problem by having both of them part of the coin flipping. Well I don&#8217;t flip a coin. I hide it in one of my hands, behind my back. Here is how it goes:</p>
<ol>
<li>I lay out the outcome first. Something like &#8220;If you get the coin, you&#8217;re the one who take her bath first&#8221;</li>
<li>I start shuffling the coin from one hand to the other, behind my back.</li>
<li>One of them says &#8220;stop&#8221;.</li>
<li>I leave the coin in the hand it was when I was told to stop.</li>
<li>I show both hands (fists, actually) to my other kid, who gets to choose a hand.</li>
</ol>
<p>(The entropy gathering is at step 3). If she gets the coin, she knows the outcome. No more &#8220;it&#8217;s not fair&#8221; complaints <img src='http://www.paralint.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2008/01/13/gathering-entropy-from-children/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My name is Guillaume, and I want to be a hacker</title>
		<link>http://www.paralint.com/blog/2008/01/09/my-name-is-guillaume-and-i-want-to-be-a-hacker/</link>
		<comments>http://www.paralint.com/blog/2008/01/09/my-name-is-guillaume-and-i-want-to-be-a-hacker/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 04:51:46 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Life (the real one)]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2008/01/09/my-name-is-guillaume-and-i-want-to-be-a-hacker/</guid>
		<description><![CDATA[I was reading the FAQ on how to be a hacker, from Eric Raymond. I recognized in me many of the hacker traits &#8211; maybe even some of the skills. But I use a handle, ixe013. One thing for sure, I love to solve problems and build things. When I started this web site, I [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading the FAQ on <a href="http://catb.org/~esr/faqs/hacker-howto.html" target="_blank">how to be a hacker</a>, from Eric Raymond. I recognized in me many of the hacker traits &#8211; maybe even some of the skills. But I use a handle, ixe013.</p>
<p>One thing for sure, I love to solve problems and build things. When I started this web site, I pondered what license should I use for my software, or should I even publish the source at all.</p>
<p>Speaking with a friend, he asked me in pure <a href="http://en.wikipedia.org/wiki/Stephen_Covey" target="_blank">Covey</a> style : &quot;<a href="http://www.leaderu.com/cl-institute/habits/habit2.html" target="_blank">What are you doing this for ?</a>&quot;. </p>
<p>I gave it some serious thoughts. And I remembered all the times open source software helped me solve a problem or learn something. I read the list of all the software I use, most are open source. It is the way I think, and what gives me the most inner peace. I think I have the <a href="http://lifehacker.com/software/mind-hacks/stop-procrastinating-with-the-abundance-mentality-143572.php" target="_blank">abundance mentality</a> deep inside me. Any other way than open sourcing everything with the least limitations as possible seemed arrogant to me.</p>
<p>I didn&#8217;t want to be arrogant. </p>
<p>To be arrogant, people have to know you. You can build an aura around you and impose it to others. To avoid that, the easiest way I thought was to conceal my real name behind the <a href="http://fr.wikipedia.org/wiki/IXE-13" target="_blank">ixe013</a> handle. But it is silly. The time I spend concealing my identity (while <a href="http://www.schneier.com/blog/archives/2007/12/defeating_captc.html" target="_blank">voluntary leaving traces</a> all over) will be better spent trying and learning to hack.</p>
<p>No more hiding : My name is Guillaume, and I want to be a hacker.</p>
<p>2008 is going to be a big year. Not to mention the time I will spend trying to hack <img src='http://www.paralint.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2008/01/09/my-name-is-guillaume-and-i-want-to-be-a-hacker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

