Sunday, February 28. 2010ICANN, you can'tI am always a little shocked to hear people defend the level of control that the American government has over the Internet through its influence of ICANN, and just as shocked to hear people’s paranoid ranting that having a UN body take on America’s role would somehow lead to massive censorship and spying taking place, as if that’s never been possible in America, and as if UN technical bodies have any history of doing that. It would be understandable if people were falling into the logical fallacy of argumentum ad ignorantiam, with an “if it ain’t broke don’t fix it” attitude, but even if we don’t know what a future UN solution might look like, we do know what American’s record of managing ICANN is, and it is not something about which you can say “it ain’t broke”. A friend of mine said that it was too stressful talking about these complicated technical and political matters early in the morning while I was driving us to catch a train, but hopefully none of my readers will be browsing my blog in that sort of situation. Anyway, below I will list some past actions of ICANN that are causes for concern, and explain why they were the result of American governmental influence. Sunday, February 28. 2010Splitting arbitrary length stringsA friend of mine was apparently inspired by my solution to the problem of finding the first 10 digit prime number in e, and told me about a seemingly similar problem he faced while trying to manipulate a text file he had created in a custom format. While some solutions from the e problem may be applicable, his data format allowed for arbitrary length strings, rather than the 10 digit limitation, which made the problem suddenly much harder. I will detail the exact problem below, as well as listing some of the methods we used to tackle it. Sunday, January 31. 2010How does cryptography work?A lot of my blog posts are seem to be about cryptography, or at least mention issues related to it, and I am aware that this may make my posts harder to understand. I am also aware that there do not appear to be any helpful introductions to cryptography out there, at least none which are accessible to the non-expert, but still give a sense of the underlying mathematics. In my mind I have often imagined that I could write such an introduction, and recently I have been motivated to do so after discussion with a school-age relative who said “Cryptography sounds really interesting”. She may not think that after she’s heard my explanation, but I hope to at least convince myself that a relatively concise explanation of cryptography, from the ground up, is possible. Sunday, January 31. 2010known_hosts and key fingerprintsIf you have used SSH at all, you are likely to have bumped into a warning message when accessing a new host for the first time. Unlike with HTTPS, there is no central list of which public keys belong to which hosts (or rather, which groups should be trusted to make those connections). If you access www.google.com over HTTPS in a browser, then your browser does the equivalent of downloading a public key from that host, and a certificate saying that this really is Google’s public key. This certificate itself has to be checked cryptographically, but it will have been created by one of the few central trusted points for handing out certificates, and your browser will be pre-loaded with a list of these trusted points. As SSH clients don’t tend to have pre-loaded lists like this, you are left to make the judgement yourself about whether a given SSH public (host) key belongs to a given host. One way to do this is by comparing the key’s fingerprint (which is presented in the warning message) with another copy of that fingerprint retrieved over a different medium, preferably a trusted one, such as in person. To give someone the information needed to check these fingerprint warnings, you might think of sending them a known_hosts file, which contains a list of hosts and cryptographic information about their public keys, but unfortunately this information isn’t stored in the same format as fingerprints. Where there’s a will, there’s a script, though, and so I detail below what can be done. Continue reading "known_hosts and key fingerprints"Thursday, December 17. 2009The Mininova verdictHaving previously discussed the verdict in the case brought against The Pirate Bay, perhaps I should not get distracted by other similar court cases, as this blog is not a running commentary on file sharing news. However, there is an important issue which I mentioned last time about where the courts will draw the line between Google and The Pirate Bay, and whether that line can stop a significant amount of copyright infringement without stopping a significant amount of legal online activity. The BREIN vs. Mininova case provides another interesting data point, testing the legal waters (despite the case being heard in a slightly different jurisdiction) which might inform other websites how they should operate to remain legal. I actually think that although the cases, and their verdicts, were similar, the Mininova case involved fewer dubious legal steps from the judge, but perhaps that’s because I have only read a Google translation of the verdict. In any case, I detail below my understanding of the trial and its consequences for operators of websites. Continue reading "The Mininova verdict"Thursday, December 17. 2009
A one-liner for finding spelling ... Posted by Hagfish
in Programming at
16:26
Comments (0) Trackbacks (0) A one-liner for finding spelling mistakes in codeI do a lot of programming, and I like writing one-liners to help me with things, so it’s perhaps not surprising that I’ve ended up writing a one-liner to help me with my programming. I should point out that the initial motivation to write this one-liner was not that I made any mistakes in the code I wrote, rather it was someone else’s code I was looking at which needed correction, but it would be hubris to assume I’m never going to make any mistakes myself, so I’m sure this script will be useful for my own code. Of course, nowadays editors will at least spell check the comments in your code for you, but it is also good to make sure your variable names don’t contain misspelled words, as that makes it harder for people (who know the correct spelling) to collaborate with you. This one-liner is rather crude and does produce a lot of noise in the output, but it is also interesting from a technical point of view, so I will discuss below how I came up with it and how it works. Continue reading "A one-liner for finding spelling mistakes in code"Monday, November 30. 200910 Years On - A British Straw Man Without the European UnionImagine you want to criticise a political institution but it’s too difficult to find any examples of bad things that institution is responsible for. One thing you might do, if you were intellectually dishonest, is imagine a make-believe future where that institution does all the things you are afraid it might do, and then imagine terrible outcomes caused by these actions. If you are not limited by reality, it can be very easy to construct nightmare scenarios that everyone can agree would be bad, and you can pin the blame on anyone or anything you like in your scenario. If you don’t like being disagreed with then this method of arguing has the added advantage that it is impossible to rebut, as your opponent would have to state what is really going to happen in the future. I am not the first person to realise that it is unfair to argue against a position using an imaginary future, in fact this has a name: the straw man fallacy. Unfortunately no one has told the TaxPayers’ Alliance this, or if someone did, they didn’t listen. Instead, the TPA have produced a series of “arguments” against the EU based on a future, fictional EU and how bad it is, and a future, fictional UK that leaves the EU and how good it is. I normally like to deal in facts, but it’s difficult to argue directly against a straw man with facts, so I thought I’d present an opposing straw man, with my own view of what the EU, and the UK outside of it, could look like in the future. Continue reading "10 Years On - A British Straw Man Without the European Union"Monday, November 30. 2009
Which Linux applications are named ... Posted by Hagfish
in Programming at
22:26
Comments (0) Trackbacks (0) Which Linux applications are named after dictionary words?Every now and then I find my mind gets caught on some seemingly trivial observation, and I end up following a chain of thought tangential to the one I was originally on, until I arrive at somewhere quite unexpected. Whereas people in former times may have been unable to travel too far down these intellectual rabbit holes, we now live in a world where Google and Wikipedia have made us seemingly omniscient, and hypertext in particular allows us to jump from one idea to the next, wherever our curiosity takes us. The secondary limit, I suppose, would be the ability to process all of this information that we amass while browsing the Web. As a programmer, though, there are certain options for information processing which are open to me but would not be readily available to non-programmers, and even if what I do with the processed information isn’t particularly ground-breaking, it can at least be the subject of a new blog post. As the title of this post suggests, my most recent such endeavour involved looking at Linux application names, and dictionary words, and below I explain what I found and how I found it. Continue reading "Which Linux applications are named after dictionary words?"Saturday, October 31. 2009Employment contracts and copyright ownershipMost professional programmers have probably found themselves considering or accepting a job where the employment contract specifies the extent to which the employee can retain ownership of the things they create. It is natural that a company would want to claim the maximum amount of ownership over what the employee creates while on “company time”, but it is also quite common for companies to claim more than this. If you are working in a “salaried” position, your company may think that they own you from the moment you sign the contract until the moment they stop paying you (and to some extent even longer). From this point of view, a company would think that any software you write, even while at home, or on the weekend, or on holiday, should belong to them. Depending on the wording, a contract can potentially lead to all sorts of strange situations, and put unreasonable burdens on the employee, but I have thought about the different problems that contracts might present and come up with some alternative wordings which could act as a compromise between the desires of companies and the freedoms of their employees. If you are an employee faced with signing a contract that you think demands too much, maybe some of the ideas below could help you get your view across or get a fairer deal. Continue reading "Employment contracts and copyright ownership"Saturday, October 31. 2009The future of the webThere is a lot of talk about supporting interfaces across many devices, so I did a bit of research about where the industry sees itself going over the next few years. In terms of cross-platform programming languages, the main contenders are JavaScript (used with the W3C approved languages that it integrates well with), ActionScript (used with Flash) and Java. While Java is a wonderful language, it is not suited to the client side of the modern web, and it is the web paradigm that I am really considering here, so I will discount Java from this discussion. That just leaves Flash versus Open Web technologies, which I had increasingly thought was a battle that had been decided in the Open Web’s favour, but occasionally people get the impression that Flash will be a viable technology into the foreseeable future, and that it is preferable to using Open Web technology. It is the relative position and future of these two platforms that I have investigated, and I detail my findings below. Continue reading "The future of the web"Wednesday, September 30. 2009Creating a dummy Debian package of kdebase-workspace-libs4+5Sometimes something unusual can happen in Debian’s archive which can stop you from installing the packages you’d like. The most likely reason is that you want to install a package you shouldn’t, but Debian is about Freedom, even the Freedom to do something stupid. I found myself in a situation where I wanted to install the Ubuntu package plasma-widget-adjustableclock which depended on a package which wasn’t in Debian (kdebase-workspace-libs4+5), or rather, existed in Debian but under a different name (libkworkspace4). To make the installation possible I ended up creating a dummy package for kdebase-workspace-libs4+5 and installing that, then trying the clock package again. Here I will explain the steps I took to solve the problem, and any issues I encountered along the way. Continue reading "Creating a dummy Debian package of kdebase-workspace-libs4+5"Wednesday, September 30. 2009
Uploading signatures from a ... Posted by Hagfish
in Programming at
21:52
Comments (0) Trackbacks (0) Uploading signatures from a keysigning partySigning people’s keys is one problem, but when people sign your key that requires its own procedure with its own set of potential issues. You will likely receive several emails, one from each person with whom you exchanged keyslips, and these emails will each include an attachment or message body that contains encrypted data for you to decrypt. The plaintext you get from decrypting should be a copy of your public key that has been signed by someone’s private key. It is this signature that you’re looking for, and GPG can extract it and add it to your key. Once you have collected the signatures, you can upload your key to a keyserver where the information about who has signed your key can be publicly stored. That’s the principle, but the steps to do all this can be quite cumbersome, so I used some console one-liners to speed some of the steps up, and I include them below with an explanation of what they do. Continue reading "Uploading signatures from a keysigning party"Monday, August 31. 2009What attacks do key signing parties make harder?It is often assumed that key signing parties make certain attacks against cryptographic identities harder, but do people who participate in those parties really understand what those attacks are and why they are made harder? For instance, some groups require that government-issued ID is used, whereas others think this is unnecessary. Or if you check someone’s ID and they give you a keyslip with someone else’s email address on (but they can intercept emails to that person), then why bother encrypting the signature on that key when you send it to them? Alternatively, if they can’t read that person’s emails, then what is the danger in sending the message unencrypted? I don’t claim to have perfect answers for these questions, but I have been thinking about them and come up with some little scenarios which I find useful for comparing the relative strength of various systems. By presenting and discussing these scenarios below, then, I may at least provide a starting point for people to develop these ideas further. Continue reading "What attacks do key signing parties make harder?"Monday, August 31. 2009Simply signing GPG keysCryptography is hard to do right, and even if it is implemented correctly, the user is often required to perform some complicated operations to make use of it. One area of cryptography which involves a great deal of activity from the user is the signing of public keys used in public key cryptography. Not only does it usually require users actually meet each other and do some sort of identity verification, it then requires quite an involved process at the computer involving retrieving keys, checking signatures, and sending emails. To automate this as much as possible, I have come up with a little script which helps me perform some GPG and email operations quickly and simply, without, I hope, reducing my security. Continue reading "Simply signing GPG keys"Friday, July 31. 2009Whitespace standardsWhen writing code, it is good to be consistent about how you use whitespace. When collaborating with others, it can actually be detrimental to your group’s productivity if there is a mix of systems, so the sensible thing is to pick a standard early on and stick with it (even if that standard only defines the on-disk format, and individual programmers use editors which present the code to them in the way that works best for them). The policies that people choose may be partly a matter of taste, but there can still be logical reasons for preferring one system over another. Even though everyone weighs different pieces of evidence differently, I am going to state the whitespace system I use for my personal projects and list its good points. Maybe it will inspire someone into agreeing with me, or at least help them to be clearer about which system they prefer and why. Continue reading "Whitespace standards" |
QuicksearchArchivesCategoriesSyndicate This BlogBlog Administration |