Sierpinski's shoes

Posted by Jonas Elfström Wed, 14 Nov 2007 22:50:00 GMT

There were no cross-platform windowing toolkits for Ruby so _why made one and he calls it Shoes. Not even close to 1.0, it's already yummy in a chunky kind of way and since it came from _why I simply had to try it out. Something simple.

Shoes.app :width => 1024, :height => 768 do  
  corners = [ {:x => 256, :y => 10}, {:x => 12, :y => 378}, {:x => 506, :y => 378} ]
  xpos,ypos,c = 256,10,0
  srand
  2111.times do
      c=rand(3)
      xpos += (corners[c][:x]-xpos)>>1
      ypos += (corners[c][:y]-ypos)>>1
      star xpos, ypos, 5, 10
  end
end

The result.

Posted in ,  | no comments

Hash functions

Posted by Jonas Elfström Mon, 01 Oct 2007 19:07:00 GMT

Recently I happened to see the FNV hash being mentioned. I had never heard of it before so I googled it and found the authors page but also a true gem. If you want a crash course in hash functions then I can recommend Mulvey's site.

Posted in  | no comments

Smart card with LCD

Posted by Jonas Elfström Tue, 31 Jul 2007 21:10:00 GMT

This company is presenting a smart card with built in display. I do not know the underlying protocol for making debit/credit card payments by smart card instead of using the magnetic stripe but if the protocol is sophisticated enough this could help blocking some of the known attacks of those. As Chip and SPIN points out the smart cards has some issues. One of them is that if the terminal is compromised you as a customer have no way to know that you are actually confirming the transaction you think you are while entering your pin code. If your smart card shows the amount, you could at least not be deceived into emptying your account.

Posted in  | no comments

Lightning crashes

Posted by Jonas Elfström Mon, 09 Jul 2007 21:37:00 GMT

Three weeks ago lightning struck nearby. Today my ISP finally tried to change the switch in the central even though I reported back to them that my VSDL modem worked just fine at a friend’s house only a couple of days after my connection died.

Posted in  | no comments

The Zodiac Killer Cipher

Posted by Jonas Elfström Fri, 25 May 2007 16:31:00 GMT

The Zodiac Killer was a serial killer in the late sixties and maybe early seventies. He sent a number of letters to the press, including four ciphers or cryptograms and only one of them has been solved. The killer's identity remains unknown.

Chris McCarthy has a nice page about the cipher and he also has an ASCII version of the cipher.

Here's a small Ruby hack that calculates the character frequency using the ASCII version of the cipher. Feel free to use it if you like to have a go at cracking it!

EDIT: At this page you can have a go at cracking it real-time. I am not convinced it's really a homophonic substition cipher since the frequency analysis shows that the 340 does not have a flat frequency distribution.

It would be nice to know what cryptographic literature was available for the public in northern California in the late sixties.

Posted in ,  | 2 comments

Older posts: 1 ... 3 4 5 6 7 8