Blog

  • Bitcoin WoT using PGP/SKS

    There was recently a post to the sks list prompting discussion regarding the use of PGP and SKS as a distributed web of trust for an alternative currency system called “Bitcoin.” This reminds me of a project I worked on in the early ’00s with the late Jeff Fairhall and Thomas Greco.

    Anyhow, I mumbled some things on IRC about my thoughts:

    08:23 < cj> nanotube: I got your email on the sks list
    08:32 < cj> nanotube: the reason SKS keyservers work at this 
                point is because there is little interest in PGP WoT
    08:32 < cj> or PGP in general
    08:33 < cj> cjac@pki:~$ df -h /var/lib/sks
    08:33 < cj> Filesystem            Size  Used Avail Use% Mounted 
                on
    08:33 < cj> /dev/xvda2             14G  9.0G  4.2G  69% 
                /var/lib/sks
    08:34 < cj> if a major monetary system were to "piggyback" on 
                the existing network, maintenance of pub keys would 
                become unmanageable
    08:34 < cj> nanotube: read through the sks archive with an eye 
                toward database size
    08:36 < cj> there are a total of a bit more than 3M keys in the 
                db at this point.
    08:36 < cj> http://keyserver.colliertech.org:11371/pks/lookup?op=stats
    08:38 < cj> My database becomes corrupt every 3 months or so 
                and I need to re-build it.  This may just be user 
                error, and probably is.  However, I do not seem to 
                be the only one who suffers from this problem.
    08:40 < cj> Assuming that there are on average about 5 keys in 
                the db per participant, that means the 9G of key 
                data represents 600K humans.
    08:42 < cj> which is roughly 0.000085719% of the world's 
                population
    08:43 < cj> if we want to support the other 100% of the 
                population, we need to implement intelligent 
                sharding or improve the efficiency of the data store
    09:04 -!- OneFixt is now known as Guest66546
    09:06 -!- Guest66546 is now known as OneFixt
    09:08 < cj> note that operating a key server which stores 
                anything less than the full set of public keys 
                compromises the integrity of the system.  The 
                primary objective of the key server is to be a 
                complete store of the set so that there is no 
                central authority.
    09:16 < cj> from the wiki page:  "Since the web of trust node 
                keys will over time grow long with a bunch of UIDs, 
                it is likely that you may not want to use your 
                regular key for this purpose, and would probably 
                want to create a separate key. If you want to tie 
                your regular PGP identity to this key, you can 
                simply cross-sign your regular key with your web of 
                trust key."
    09:18 < cj> this assumes that there is an infinite amount of 
                storage on each SKS key server.  If everybody's key 
                will over time grow long with a bunch of UIDs", 
                then we will see a very large number of very large 
                keys.
    09:19 < cj> I recommend that bitcoin participants manage their 
                own SKS pool while developing the proof of concept. 
                This will reduce the noise caused in the public 
                pool.
    09:20 < cj> and will give the developers an understanding of 
                the implications of their design decisions
    09:22 < cj> here are some thoughts I had on the subject a 
                decade or so ago and RMS' responses:
    09:22 < cj> http://web.archive.org/web/20030812201116/http://gnubucks.com/impressions/rms.html
    
  • Business Birthday

    Today is Collier Technologies, LLC’s second birthday. The company’s been around under one name or another since about 2002 or so, initially as a sole proprietorship.

    Woot, and all that.

  • F5 opens second International Technology Center in London

    Very cool. Presided over by my friend and the VP of our group, Erik Giesa. Notably lacking is the inclusion of a picture of Steve Mitchell’s smiling face.

    The first of our ITCs is here in Seattle. We’ve got some space on our internet site dedicated to them:

    http://www.f5.com/solutions/resources/technology-center/

  • Blogging is a pain in my a$$

    The good news is that the blog has been on its best behavior and is now allowed out of my basement. If it starts misbehaving, I’ll put it back in its cage.

  • Load balancing SIP across Asterisk with BIG-IP

    Topology

    Participating hosts

    * 1x BIG-IP VE
    * 1x Debian Squeeze “Provisioning Server” serving DHCP, TFTP & DNS
    * 3x Nortel/Avaya 1120E hard phones flashed to SIP1120e04.01.13.00
    * 2x Debian Squeeze + digium asterisk packages:

    $ grep asterisk /etc/apt/sources.list
    deb http://packages.asterisk.org/deb squeeze main
    deb-src http://packages.asterisk.org/deb squeeze main
    

    DUNDi

    *CLI> module reload pbx_dundi.so
    *CLI> dundi show peers
    *CLI> dundi show mappings
    *CLI> dundi lookup 4012@extensions bypass
    *CLI> dundi set debug on
    

    SIP

    *CLI> sip show peers
    

    dialplan

    *CLI> dialplan show RegisteredDevices
    

    Work in progress

    Yesterday, I installed a trixbox virtual machine using the quick install guide hosted on the fonality site. I happened to use VMware vCenter to host the VM, but I could have done it with KVM or Xen, I’m sure. I allocated 512M of memory and this seems sufficient.

    I created two network interfaces. One for management and one for the SIP sessions.

    Created two extensions: 4242 & 4343
    http://trixbox0/admin/config.php?type=setup&display=extensions

    Edit Extension
    Display Name client0 client1
    SIP Alias client0 client1
    Extension Options
    Outbound CID 4242 4343
    Device Options
    secret password password
    Language
    Language Code en_US en_US

    Don’t forget to push the big orange “apply changes” button at the top of the web UI after you add these extensions.

    Configure databases for load sharing:

    http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-nodes-groups.html
    http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-ndbd-definition.html

    10:27 < cj> I need help getting a couple of asterisk boxes to play nice with one 
                another
    10:28 < cj> if a client0 registers on asterisk0 and client1 registers on asterisk1, I 
                want calls placed by client0 destined for client1 to make client1 ring
    10:28 < cj> what all do I need to do in order to make such a thing happen?
    10:30 < orn> cj: I'm not too familiar with trixbox, haven't used it in a long long 
                 time. I remember setting up trunks in it is harder than it has to be 
                 though =)
    10:31 < orn> but there should be some references as trixbox is very widely used
    

    TODO: configure each asterisk server to trunk with the other one:

    IAX2 Trunking Two Trixbox Servers

    The IRC folks tell me that switchvox or asterisknow might be easier to configure.

  • SJCARS blog

    The San Juan County Amateur Radio Society (SJCARS) has created a blog. I’m excited.

    http://sjcars.wordpress.com/

  • Rokey-Tobu

    A friend of mine worked at the Indian Island Fire station when I was growing up. One of the things I heard most from him was that nothing ever happened for them to respond to, what with few things on the island ever burning. The story went that they had to find things to do with their time. Much of it was spent walking around the firehouse holding the broom or playing video games, but they also set some time aside to plan for emergency situations. They perfected a maneuver and named it the “roke-tobu” after themselves (Roy, Keith, Tom & Buzz). This maneuver consisted of holding someone’s hand and patting it while assuring them that someone who has experience responding to emergencies would be there soon.

    It makes me giggle every time I think of it.

  • Taking a position at F5

    Hello readers,

    I recently finished a contract with Liquid Web helping them to build their cloud computing system. The next adventure will be with F5 as a Product Management Engineer. I’ve been hearing good things about F5 hardware since 2000 when Matt Fisher talked up the Big IP he had been using. My friends in the know tell me that they make good products that “just work” with a minimum of fuss. This will be the first time I’ll be helping to build network hardware, and it sounds like a fun project.

    So, I’ll start doing that on the 22nd of November or so. ;)

    Moo,

    C.J.

  • Debian on Sheeva Plug internal NAND flash

    After a bit of work, I got the sheeva plug working the way I wanted it to. First of all, I grabbed a spare 1G USB flash disk I had laying around and installed Debian squeeze to it by following tbm’s instructions here:

    http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html

    After debian was installed to the USB disk, I removed it from the plug and used dd on my laptop to create an image of the filesystem. I mounted the filesystem as a loopback device and created a jffs2 partition image from it after doing a bit of minor tweaking. I placed the USB disk back in the plug and booted to it. Using this intermediate filesystem and the mtd-tools package, I wrote the new jffs2 image to the NAND mtd device. I then modified the uboot environment to suit, saved, and now have a working setup.

    Detailed instructions are below.

    pre-requisites

    Connect the plug to your network with the rj-45/cat5 cable.

    Connect a USB flash drive to the plug. I used a 1G drive, but 512M should be sufficient.

    Install the ‘tftpd’ package on a machine on your network. You’ll also need screen on the machine that you use to connect to the plug’s serial terminal. I’ll assume these are the same host. You need the IP address of the tftp server. In this example, we will assume that the IP is 192.168.1.2 and that you will assign 192.168.1.200 to the plug.

    $ sudo apt-get install tftpd screen

    Place uImage, uInitrd, and uBoot in the /srv/tftp directory:

    $ sudo wget -O /srv/tftp/uImage http://www.cyrius.com/tmp/beta1/marvell/sheevaplug/uImage
    $ sudo wget -O /srv/tftp/uInitrd http://www.cyrius.com/tmp/beta1/marvell/sheevaplug/uInitrd
    $ sudo wget -O /srv/tftp/uBoot http://wp.colliertech.org/cj/wp-content/uploads/2010/09/07/uboot.bin

    Connecting to the serial console

    We are now ready to boot the plug. Note that you have to be quick with the screen command. I recommend you type it out and get ready to press the enter key. You have to interrupt the bootloader in order to enter the u-boot console. Attach the power and immediately enter the following command:

    $ screen -S sheeva /dev/ttyUSB0 cs8,ixoff,115200

    If you did this right, you should see a prompt like this:

    Marvell>>

    update uboot

    As per tbm’s instructions, you can now update the uboot if needed. Instructions for that are here:

    http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html

    I’ll put them inline here for completeness.

    Marvell>> setenv serverip 192.168.1.2 # IP of your TFTP server
    Marvell>> setenv ipaddr 192.168.1.200 # IP of the plug
    Marvell>> bubt uboot.bin
    

    be sure to answer ‘n’ to the question about env parameters.

    Now reset the device. Don’t forget to interrupt the bootloader so we can get back to the prompt:

    Marvell>> reset
    

    Let the device know that you will be running a mainline kernel and set the arcNumber:

    Marvell>> setenv mainlineLinux yes
    Marvell>> setenv arcNumber 2097
    Marvell>> saveenv
    Marvell>> reset
    

    Install Debian to the USB disk

    Interrupt the boot process once more. We are now ready to run the debian installer. I’ll leave the details as an exercise for the reader. The following should put you into the installer, which you are probably quite familiar with by now.

    NB: I will assume that you will use a single ext3 partition for the entire system. This will make it easier to build a jffs2 image out of the resultant partition on the USB disk.

    Marvell>> setenv serverip 192.168.1.2
    Marvell>> setenv ipaddr 192.168.1.147
    Marvell>> tftpboot 0x01100000 uInitrd
    Marvell>> tftpboot 0x00800000 uImage
    Marvell>> setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
    Marvell>> bootm 0x00800000 0x01100000
    

    build a jffs2 image

    Once the installation has completed, power down the plug and remove the USB disk. Put the USB disk in the machine you used to get the console on the plug and note what device the kernel assigns to it. In my case, it was given sdc, so debian is installed to /dev/sdc1. I will use these values for this example.

    If the filesystem was automatically mounted, unmount it. Create a disk image of the partition and mount it as a loopback device.

    $ sudo umount /dev/sdc1
    $ dd if=/dev/sdc1 of=/tmp/debian.img
    $ mkdir /tmp/mnt
    $ sudo mount -o loop /tmp/debian.img /tmp/mnt
    

    You can now remove the USB disk and return it to the plug.

    Modify the /etc/fstab file. The root filesystem will be /dev/mtdblock2 and of fs type jffs2. My fstab file looks like the following:

    proc            /proc           proc    defaults        0       0
    /dev/mtdblock2 /               jffs2    errors=remount-ro 0       1
    

    We can now create a jffs2 image from the mounted and altered fresh install:

    $ sudo mkfs.jffs2 -l \
      -e 0x20000 \
      -X zlib \
      --eraseblock=128KiB \
      --pad \
      --output=/tmp/rootfs.jffs2 \
      --compression-mode=priority \
      -n \
      --squash \
      -r /tmp/mnt
    

    write jffs2 to nand

    Now that we have an image to flash to the NAND, let’s boot off of the USB disk. It should now be attached to the plug. Power on the plug and use screen to get a console. Interrupt the bootloader and enter the following commands:

    Marvell>> setenv bootargs_console console=ttyS0,115200
    Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x01100000 /boot/uInitrd; ext2load usb 0:1 0x00800000 /boot/uImage'
    Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000'
    Marvell>> run bootcmd
    

    Log in as root with the credentials you configured during the install. You will need to install a few packages in order to complete the nand flash. You can then ssh to the host on which you created the jffs2 image and cat it to stdout, piping this to nandwrite:

    $ sudo apt-get install mtd-utils
    $ ssh user@192.168.1.2 cat /tmp/rootfs.jffs2 | sudo nandwrite /dev/mtd2 -p -
    

    You now have a jffs2 image on the nand.

    Configure u-boot

    One more reboot to set u-boot’s environment, and you will be done. Power down and remove the USB disk. Power on and get the serial console using screen. Break into the bootloader and enter the following commands:

    Marvell>> setenv bootargs_console console=ttyS0,115200
    Marvell>> setenv mtdpartitions mtdparts=orion_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
    Marvell>> setenv bootargs_root root=/dev/mtdblock2 rw rootfstype=jffs2
    Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
    Marvell>> saveenv
    Marvell>> reset
    

    You should now be good to go.