My dot Emacs file


Recently I upgraded to Emacs 23.1, customised some options, saved them and went about my work. However, whenever I used emacs on the command line I was greeted to a greyish background that just did not look like it belonged. And the plain white background was getting a bit old fashioned. So I decided it was high time that I setup my .emacs file amongst others.

Note: There are a lot of code samples in this post, Facebook removes the style, WordPress does not, Hyves I dunno. So if you want syntax highlighting then goto the wordpress version.

Remove Gray Backgroun Colour in TTY

First thing to do is use the Options menu to set most of your options like: font (mijn is DejaVu Sans Mono at 9) use standard copy and paste commands etc. However this will also set a default background and foreground colour scheme, to fix this open ~/.emacs and remove from (custom-set-faces...: , “:background white :foreground black"

You should have something similar to:

Generated using GeSHi

;; Custom Variables
(column-number-mode t)
(cua-mode t nil (cua-base))
(scroll-bar-mode (quote right))

(show-paren-mode t)
(size-indication-mode t)
(uniquify-buffer-name-style (quote forward) nil (uniquify)))

(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 88 :width normal :foundry “unknown” :family “DejaVu Sans Mono”)))))

Misc Stuff

This is some misc stuff. The following entry shall set the default tab width, stop the splash screen from occurring, write filename into the titlebar and enable markdown mode if you have installed emacs extras i.e. i.e. emacs-goodies-el in ubuntu.

Generated using GeSHi

(defvar HOME (expand-file-name “~”))
(setq EMACS “emacs”)
(setq HOSTNAME (substring (system-name) 0 (string-match \\.” (system-name))))

(setq FULLHOSTNAME (system-name))
(setq USERNAME (getenv “USER”))

;; Stop Splash screen

(setq inhibit-splash-screen t)

;; Tab width
(setq default-tab-width 4)
(setq-default tab-width 4)

;; Write filename into titlebar.
(setq frame-title-format `(,EMACS “[“USERNAME “@” HOSTNAME “]: “

(buffer-file-name “%f” (dired-directory dired-directory  “%b”))))

;; Add Markdown mode

(autoload ‘markdown-mode “markdown-mode.el” “Major mode for editing Markdown files” t)
(setq auto-mode-alist (cons(\\.mdt” . markdown-mode) auto-mode-alist))

A coloured Emacs

If you have installed the color-theme package for emacs (i.e. emacs-goodies-el in ubuntu) then you can get some nice themes going. I currently use color-theme-gnome2 for graphical emacs and color-theme-tty-dark when in TTY mode i.e. in a terminal. However gnome2 doesn’t look well when run in the terminal as does tty-dark and vice-versa. The code below ensures that each theme is used when required. A full list of themes can be found be the following command:

M-x color-theme-select

The lisp code is:

Generated using GeSHi

;; Add colour theme stuff
(require ‘color-theme)
;; hook: test win sys and rerun color-theme
(defun test-win-sys(frame)
(let ((color-theme-is-global nil))

(select-frame frame)
(if (window-system frame)(color-theme-gnome2)(color-theme-tty-dark))))

;; hook on after-make-frame-functions
(add-hook ‘after-make-frame-functions ‘test-win-sys)

;; default coloue schemes start
(let ((color-theme-is-global nil))

(if (window-system)(color-theme-gnome2)(color-theme-tty-dark)))


[4] The Internet

My Web Services Installation


As part of a research project I have gotten to finally play with web services again. For which I have to use the following:

The instructions bellow are to install on Ubuntu 9.04, yes I still need to upgrade to Karmic but that is for another day.

Step 1: Install Java (Optional)

Cannot really remember how I installed OpenJDK, but if I remember its just:

$ sudo apt-get install openjdk-6-jre openjdk-6-jdk

Step 2: Tomcat 6

To install Tomcat 6:

$ sudo apt-get install tomcat6-admin tomcat6-common tomcat6-user tomcat6-examples tomcat6-docs


Generated using GeSHi

<role rolename=“manager”/>
<role rolename=“admin”/>
<user username=“admin” password=“helloworld” roles=“manager,admin”/>

To you your /etc/tomcat/tomcat-users.xml file and voila that is tomcat up and running and accessible from http://localhost:8080 . If not you may need to do:

$ sudo /etc/init.d/tomcat start

Step 3: Metro 2.0

Obtain Metro 2.0 from here and move the webservices-*.jar files into /usr/share/tomcat6/lib/ . You may also want to add both webservices-api.jar and jsr173_api.jar to /usr/lib/jvm/default-java/jre/lib/endorsed . This will ensure that the default jvm, utilises the latest api and thus is in the default classpath. If not ensure that you classpath at least includes the jars placed in /usr/share/tomcat6/lib/ earlier.

Note: Metro 2.0 does contain a Tomcat6 installer but, I haven’t used it as my steps were developed before it came out.

References Used


Privacy in the Cloud: Ephemerising your Data


This post is the first in a series that I would like to call Privacy in the Cloud. My aim is to look at various techniques and technologies that can be used to not only protect our data being stored in the Cloud, but to also  inform us of that protection. I shall also look at the notion of privacy from the view points of the entities involved i.e. service provider and service requester, in terms of legal obligations and ramifications, and the societal aspects. Other topics will be introduced and addressed once I have thought of them…

Destroying Data

One of the interesting problems that can arise in the Cloud is that of data availability, where data is reliably available on the cloud. Another, related and just as important notion is that of data unavailability, where data is made unrecoverable after a set period. This is important for information that is sensitive and transitory in nature. Recall the messages (or instructions) in the popular television series Inspector Gadget and Mission Impossible:

This message will self destruct in 40 seconds.

In such messages the aim is to reduce number of copies that can be made and also stop access to that data after a set period of time has elapsed.

The obvious solution is to use encryption in which the data is encrypted and the keys used are deleted after a certain period of time. Note normal erasure methods i.e. deletion and repeated rewrites of the data on disk, are not enough as the data can still be recovered via special techniques, obfuscation of the data is needed. The crux of the problem regarding any cryptographic system is that of key management. Recently I have read the Sun Micro-systems technical report SMLI TR-2005-140 in which Radia Perlman introduced the idea of the Ephemeriser as a means to provide self-destructing data. This has been part of recent reading for a course I am undertaking.

In this post I shall introduce the idea of the Ephemeriser , subsequent posts shall look at a variant of the Ephemeriser called Timed-Ephemeriser and other data destroying methods such as Vanish.

The Ephemeriser

In the Ephemeriser System there are three entities:

  1. Alice — the data generator
  2. Bob — the data consumer, who can also be Alice herself, and
  3. Eve — the Ephemeriser that provides key management

The aim of the Eve (an external server) is to create and advertise a series of Public Key and expiration time pairs. These keys shall be used to encrypt the ephemeral (transitory) data and that after the expiration time the Secret Key is then destroyed. Once Alice has selected and encrypted her data using the key, she then sends the message to Bob. In order for Bob to access the data he collaborates with Eve.

The message passing can be summarised as follows:Ephemeriser Message Sequence

In order to ensure the proper destruction of data and also the unwanted copying of the data, Perlman assumes that the software involved (especially in relation to Bob) does not have the ability to copy the decrypted data or hold it in stable storage for use later on.

In the tech. report Perlman provides two implementations of Ephemeriser, one using Triple Encryption using Public Key Encryption and another more efficient implementation that uses blind encryption. In this posting only the Triple Encryption variant shall be described.

Implementation Using Triple Encryption

Each entity has their own long term encryption and encryption key pairs. Eve will advertise a triple that consists of a public key, Key ID and expiration time. The Key ID is used to identify the corresponding secret key that is stored by Eve.

Please note that the notation used to denote asymmetric encryption goes against the grain of the standard, but this is the notation used in the report itself.


In order to encrypt the message m, Alice:

  1. Encrypts M using a secret per message key S
  2. Chooses an ephemeral secret T, that will act as an integrity check
    and link between the message encryption key and the ephemeral key.
  3. Selects an expiration date, thus obtains a suitable ephemeral key from Eve.
  4. The key S shall be triply encrypted using the Public Key of Bob,
    the Ephemeral Key and finally the ephemeral secret T
  5. Produces a message authentication code of the message encryption key S that has been double encrypted using the public key of bob and the ephemeral key, that has been concatenated to the ephemeral key using a keyed hash function using the ephemeral secret T as the key.

Finally Alice sends to Bob the following:


which is the encrypted ephemeral secret T, the protected per-message key S, the encrypted message M, the Key ID of the ephemeral key, the ephemeral key and the message authentication code.


The decryption itself consists of three stages the initial decryption of the data by Bob, the use of Eve to remove the ephemeral protection and finally the actual access to the data by Bob.

Bob’s First Task

On receipt of Alice’s message Bob will:

  1. Obtains the ephemeral secret T.
  2. Obtain the protected per-message key using T.
  3. Verifies the produced per-message key through calculation of a message authentication code and comparison against the sent one.
  4. Then Bob chooses a per-message key J to secure communication between himself and Eve.
  5. Encrypts this key with the ephemeral key sent by Alice.
  6. Encrypts the protected per-message key using J.

Finally Bob sends to Eve the following:


which is the key id, the protected per-message key J and the protected per-message key S.

Eve’s Task

On receipt of Bob’s message Eve:

  1. Selects the decryption key corresponding to the ephemeral key ID sent.
  2. Obtains the per-message key J.
  3. Using J obtains the protected per-message key S used.
  4. Decrypts the protected per-message key S using the secret ephemeral key, so that it is now only protected by Bob’s public key.

Finally Eve re-encrypts the protected per-message key S using J and sends this back to Bob, hence the final message is:


Bob’s Second Task

Thus on receipt of Eve’s message, Bob:

  1. Decrypts the protected per-message key S using J.
  2. Obtains S by decrypting the previous result using his secret key.

Once Bob has obtained S he can then obtain the message M.

Letter from Gordon Brown regarding Alan Turing


For those who haven’t seen or read it yet, here is a letter from Gordon Brown the current prime minister of the United Kingdoms of England, Scotland, Wales and Northern Ireland to those who signed the petition requesting a formal apology from the british government regarding the harrowing subjugation of Alan Turing over his homosexuality in the 1950’s.

2009 has been a year of deep reflection – a chance for
Britain, as a nation, to commemorate the profound debts we owe to those who
came before. A unique combination of anniversaries and events have stirred
in us that sense of pride and gratitude which characterise the British
experience. Earlier this year I stood with Presidents Sarkozy and Obama to
honour the service and the sacrifice of the heroes who stormed the beaches
of Normandy 65 years ago. And just last week, we marked the 70 years which
have passed since the British government declared its willingness to take
up arms against Fascism and declared the outbreak of World War Two. So I am
both pleased and proud that, thanks to a coalition of computer scientists,
historians and LGBT activists, we have this year a chance to mark and
celebrate another contribution to Britain’s fight against the darkness of
dictatorship; that of code-breaker Alan Turing.

Turing was a quite brilliant mathematician, most famous for his work on
breaking the German Enigma codes. It is no exaggeration to say that,
without his outstanding contribution, the history of World War Two could
well have been very different. He truly was one of those individuals we can
point to whose unique contribution helped to turn the tide of war. The debt
of gratitude he is owed makes it all the more horrifying, therefore, that
he was treated so inhumanely. In 1952, he was convicted of ‘gross
indecency’ – in effect, tried for being gay. His sentence – and he
was faced with the miserable choice of this or prison – was chemical
castration by a series of injections of female hormones. He took his own
life just two years later.

Thousands of people have come together to demand justice for Alan Turing
and recognition of the appalling way he was treated. While Turing was dealt
with under the law of the time and we can’t put the clock back, his
treatment was of course utterly unfair and I am pleased to have the chance
to say how deeply sorry I and we all are for what happened to him. Alan and
the many thousands of other gay men who were convicted as he was convicted
under homophobic laws were treated terribly. Over the years millions more
lived in fear of conviction.

I am proud that those days are gone and that in the last 12 years this
government has done so much to make life fairer and more equal for our LGBT
community. This recognition of Alan’s status as one of Britain’s most
famous victims of homophobia is another step towards equality and long

But even more than that, Alan deserves recognition for his contribution to
humankind. For those of us born after 1945, into a Europe which is united,
democratic and at peace, it is hard to imagine that our continent was once
the theatre of mankind’s darkest hour. It is difficult to believe that in
living memory, people could become so consumed by hate – by
anti-Semitism, by homophobia, by xenophobia and other murderous prejudices
– that the gas chambers and crematoria became a piece of the European
landscape as surely as the galleries and universities and concert halls
which had marked out the European civilisation for hundreds of years. It is
thanks to men and women who were totally committed to fighting fascism,
people like Alan Turing, that the horrors of the Holocaust and of total war
are part of Europe’s history and not Europe’s present.

So on behalf of the British government, and all those who live freely
thanks to Alan’s work I am very proud to say: we’re sorry, you deserved
so much better.

Gordon Brown

If you would like to help preserve Alan Turing’s memory for future
generations, please donate here:

Petition information –

Is this email suspicious?


Today I received the following email on my TU/e account. Can anyone see why I do not trust it??

Dear E-mail Account User,

This is to inform you that we have temporarily limited all access to your email sensitive account features, in order to restore your full account access, you are to reply to this email immediately with your E-mail account Username/ID here: (___________) and password here: (___________)

Due to much junk/spam emails you receive daily, we are currently upgrading all our email accounts spam filter to limit all unsolicited/junk emails for security reasons and to upgrade our new and improved E-mail account features and to ensure you do not experience service interruption.

You must reply to this email immediately and enter both your user name and password in the space provided to enable us upgrade your E-mail Account properly.

A confirmtion link will be send to you for the Re-Activation of your e-mail Account, as soon as we received your response and you are to Click on the “Confirm E-mail” link on your mail Account box and then enter this confirmation number: 1265-6778-8250-8393-5727

Your failure to provide your e-mail account login details will lead to a temporarly disabled of your e-mail account or we will immediately deactivate your e-mail account from our database.

Thanks For Your Understanding.

Technical Support Team

Also note that the following addresses were associated with the email:

QuickQuide: Adding LNCS Springer Style to Ubuntu LaTeX install


For all you LNCS and LaTeX users here is a quick guide to adding the LNCS LaTeX package to your local Texlive install. This will remove the need for adding the actual lncs.cls file to your LaTeX document directory.

This quickguide has been based upon the information from the posts found here and here.

Currently I am running Ubuntu 9.04 ‘Jaunty Jackalope’ and my LaTeX install is the latest one from TeXlive. I do not use the version as found in the Ubuntu repositories as they are a little bit out-of-date (just like a frigging proper install of Firefox 3.5, who wants Shiretako) and there are more packages available such as TODO.

Here are the steps:

  1. If you have not done so install the latest version of TeXlive.
  2. Obtain the LNCS styles from Springer.
  3. Place the contents of into /usr/local/texlive/2008/texmf-dist/tex/latex/lncs
  4. finally run $ sudo texhash , If you have any problems running texhash then this command might be better:

$ sudo bash -c 'export PATH=/usr/local/texlive/2008/bin/i386-linux:$PATH;texhash'

And thats it. Enjoy!!

One Social Networking Site to Rule them All


Please note this is kinda of a rant on the state of on-line social networking data sharing thing.

Social Networking is everywhere!, its important, intrinsic and relevant now to modern society. Everywhere its Facebook this, Orkut that, Hyves too. However there is a problem, one simple little problem and its todo with your identity.

I have recently been cleaning up my Google Profile, my single page on the web where I declaring who I am and what I am connected to.  I have been updating the sites that I have a login on such as WordPress, Facebook, Google Reader etc and removing outdated ones such as Photobucket and Youtube (even livejournal). This primarily spurred on by my recent decision to join Hyves a social networking site that is popular in the Netherlands. Once I had joined and twittered it, a friend twittered back with the following (or close as):

Why don’t you just build an app to automatically share content between the two to stop you having to update them both separatly.

Which is when I realised the obvious, I have to update both individually from now on unless there is some app to do it for me. Is there? well I dunno, but what we are seeing these days are a series of semi-integration apps. Like the Twitter & with Facebook that allow us to send tweets (micro blogs) to all three at the same time. The new Facebook Connect ID system which had the added bonus of when I recently signed into Digg it found my friends who were also on Digg. My ability to integrate my blog and RSS feed with Facebook and Hyves. However the integration is not complete. Yes when I tweet and someone comments on Facebook, even though they may have twitter or those comments are not propograted to all those services. Similarly the formatting for the blogs is not carried across. Taking inspiration from Tolkiens famous little poem:

Three Rings for the Elven-kings under the sky,
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.

What we need is:

One Social Networking Site to Rule them All, One Site to find them,
One Site to bring them all and in the ether bind them,
In THE CLOUD where the information lies

Looking at it more pragmatically what we need to see is full integration apps, so that when someone comments on my status in Facebook or Hyves or Orkut that has been uploaded via Twitter and posted on the comment is updated on all the sites that the person has profiles on. Also a common set of profile information i.e. an open standard, needs to be defined in every social networking site in order for the information to be propogated from one site to another without me having to do it manually.

In reality the foundation for this is already here with things like OAuth, Facebook Connect, OpenID, OpenSocial and Facebook API. The most promising one being Facebook Connect with their four features stated in their originating blog post for the system from last year of:

  1. Trusted Authentication
  2. Real Identity
  3. Friends Access
  4. Dynamic Privacy

Not to forget the many other sites that are offering API’s to their data. Unfortunately it appears to be a case of Goliath versus Goliath versus Goliath with all sides trying to win what is essentially a battle of mind sets, just like the Cold Ware was about in the 50’s. 60’s and 70’s.  At the end of the day both sides are technically correct, with there modus operandi yet just like the hippies of the 60’s:

Why can’t we all learn to live together in peace and harmony?

Or more pragmatically why can’t they agree to a common subset of API calls for the core data nd allow this to be shared. It shouldn’t be the case that I am only restricted to one site. Maybe this is happening I just dunno, maybe this blog post is late to the game and the stuff is already here, but if its why can’t I connect my Hyves to my Facebook and let the data be shared. Or see full integration between Twitter and Facebook or Hyves and Twitter.