<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for error27</title>
    <link>http://www.advogato.org/person/error27/</link>
    <description>Advogato blog for error27</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Fri, 24 May 2013 04:47:16 GMT</pubDate>
    <item>
      <pubDate>Thu, 16 Jun 2005 20:16:09 GMT</pubDate>
      <title>16 Jun 2005</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=5</guid>
      <description>I've been thinking about signing recently.  The truth is I'm a bit naive about the whole crypto scene but signing seems like an under used tech.

&lt;p&gt; For example, when you register a domain name like noodle.com they could authenticate your public key.  Then you'd set up your email server to sign all outgoing email as coming from noodle.com.  Then when the guy on the other end recieves it he's can tell if it's fake noodle.com spam.  You'd still be able to send anonymous email, but it would be detected on the other side if it was impersonating someone else.

&lt;p&gt; Single sign on sounds like a good thing too.  Someone registers your email and public key.  A web site sends you a token, and you sign it.  It checks against your public key.  Authenticated.

&lt;p&gt; In fact, it seems like passwords are a bad idea in general.  It would be better to just use signing to authenticate who you are.  That way you don't have to send your password over the wire and the server doesn't have to store your password, only your public key.

&lt;p&gt; Perhaps you would have a key server that serves public keys.  You would use a password for that so that later if you lost your private key you could reset your account.  But all the rest of the time, you wouldn't use passwords you would only sign stuff.

&lt;p&gt; I'm starting to ramble...
</description>
    </item>
    <item>
      <pubDate>Tue, 20 Jan 2004 06:03:54 GMT</pubDate>
      <title>20 Jan 2004</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=4</guid>
      <description>&lt;a href="http://advogato.org/person/mau/" &gt;mau&lt;/a&gt;: Ah...  I see.  You guys already figured out how to do that.  Anyways, it's nice to know that proper cryptographer types have dealt with the problem.

&lt;p&gt; Thanks for the link.  :)
</description>
    </item>
    <item>
      <pubDate>Mon, 19 Jan 2004 09:54:00 GMT</pubDate>
      <title>19 Jan 2004</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=3</guid>
      <description>I wrote some neat code last week for my unreleased Vantu p2p project.

&lt;p&gt; The vision is that eventually, massive databases of Creative Commons media will be created.  These databases will have an md5 hash of the best/official version of the media and p2p users will use this hash to specify that they want the official version.  

&lt;p&gt; The problem is, users can't know until the end of the download whether the md5 hash matches.

&lt;p&gt; Instead of taking the md5 hash of the whole thing, Vantu takes the md5 hash of every 4k chunk.  These hashes are grouped into pairs and we take the hash of each pair.  We take the resulting hashes, group them, hash the group.  This results in another set of hashes half the size of the first.  We repeat this until only one hash remains.  The final hash is the file signature.

&lt;p&gt; At the application level, it rarely makes sense to use 4k hashes.  An application could use 4k, 8k, 16k, 32k, or 64k etc chunks sizes.  Vantu will probably only use 64k chunks.  When the user wants to download a file the program asks the sharer for the hashes of the 64k chunks.  We can check whether these hashes are correct.  We can also check the data in each chunk as we download it.  This way if someone is sharing bogus data we can find out after the first chunk rather than waiting for the entire download to complete.

&lt;p&gt; It would be awesome if Vantu style file signatures caught on in other applications as well.

&lt;p&gt; Here is the &lt;a href="http://vantu.sourceforge.net/gen_sig.py" &gt;code&lt;/a&gt; to generate file signatures.
</description>
    </item>
    <item>
      <pubDate>Wed, 21 May 2003 07:10:20 GMT</pubDate>
      <title>21 May 2003</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=2</guid>
      <description>I have been lurking here since here since CodeCon.  Funny how a person can lose track of time...  

&lt;p&gt; &lt;a href="http://smatch.sf.net" &gt;Smatch&lt;/a&gt; development is progressing slowly but surely.  I have been playing with Apache source as part of a larger project.  Here is a break down of some of the pointer uses in Apache.


&lt;p&gt; There are 43108 pointer dereferences in the Apache source code.  That is counting dereferences in macros once for each time the macro is used.  It only counts code used in my compile, not all Apache source.

&lt;p&gt; &lt;pre&gt;
  Count Type of pointer     Explanation
  15225 parm_decl           *parameter (arrays are passed as pointers)
  12020 var_decl            *foo
  10466 plus_expr           *foo = bar; foo[2];
   1923 postincrement_expr  *foo++
   1604 component_ref       *foo.bar
    692 call_expr           get_foo()-&amp;gt;bar
    461 addr_expr           pointers to a string constant mostly.
    398 indirect_ref        **foo
    120 cond_expr           *(foo?foo:bar)
     80 minus_expr          foo[a - b - c]
     71 preincrement_expr   *++foo
     25 predecrement_expr   *--foo
      9 array_ref           *foo[a]
      6 postdecrement_expr  *foo--
      4 va_arg_expr         *(va_arg(foo, int *))
      4 modify_expr         *(foo = get_bar())
&lt;/pre&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 2 Jan 2003 08:06:22 GMT</pubDate>
      <title>2 Jan 2003</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=1</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=1</guid>
      <description>Today I put up a page on the &lt;a href="http://smatch.sf.net" &gt;smatch.sf.net&lt;/a&gt; site to record bugs found by the smatch source checker.  It's a pretty decent start.  There are quite a few bugs listed so far.
&lt;p&gt;
The most fun script is the one that checks for &lt;a href="http://localhost/cgi-bin/index.py?page=bug_list&amp;session=&amp;script=UnreachedCode&amp;kernel=all" 
&gt;UnreachedCode.&lt;/a&gt;  These bugs are mostly harmless things like not printing out debug messages.  This check shows that no matter how smart people are, the little things can still trip everyone up.
&lt;p&gt;
One thing that I expected to cause bugs was confusing "=" with "==".  There are quite a few places where kernel hackers use "if (variable = variable){ ..." or "if (variable = constant) {..." (because of macros), but I didn't find any bugs.
&lt;p&gt;
I've already moderated most of the check results except &lt;a
href="http://localhost/cgi-bin/index.py?page=bug_list&amp;session=&amp;script=SpinlockUndefined&amp;kernel=all"
&gt;SpinlockUndefined&lt;/a&gt;.  Unfortunately because of a bug in smatch.pm, I couldn't print a start line for each bug so reading it is more difficult.  The basic premise is that you should always know whether a lock is held or not.
&lt;pre&gt;
spin_lock(&amp;amp;foo);
if (bar) {
        spin_unlock(&amp;amp;foo);
}
&amp;lt;--- Error because you don't know whether &amp;amp;foo is 
     held or not
&lt;/pre&gt;
From glancing through the results it looks like there are a lot of false positives.  My guess is that there are probably only 10 real bugs out of the list of 100.
</description>
    </item>
    <item>
      <pubDate>Wed, 6 Nov 2002 06:45:19 GMT</pubDate>
      <title>6 Nov 2002</title>
      <link>http://www.advogato.org/person/error27/diary.html?start=0</link>
      <guid>http://www.advogato.org/person/error27/diary.html?start=0</guid>
      <description>I've been offline for a couple months.

&lt;p&gt; When you're offline you have no motivation to program anything.  Except that I actually did start writing a peer to peer file share program based on a paper I wrote in College.  Once I have that in a releaseable state I'll put it on sourceforge.

&lt;p&gt; Now that I'm online again, I have become motivated to continue work on &lt;a href="http://smatch.sf.net" &gt;Smatch&lt;/a&gt;.  That takes most of my free programming time...  



</description>
    </item>
  </channel>
</rss>
