Crypto

Cryptography is a funny business; shady from the beginning, the whole business of codes and ciphers has been specifically designed to hide your intentions and move in the shadows, unnoticed. However, the art of cryptography has been changed almost beyond recognition in the last hundred years thanks to the invention of the computer, and what was once an art limited by the imagination of the nerd responsible has now turned into a question of sheer computing might. But, as always, the best way to start with this story is at the beginning…

There are two different methods of applying cryptography to a message; with a code or with a cipher. A code is a system involving replacing words with other words (‘Unleash a fox’ might mean ‘Send more ammunition’, for example), whilst a cipher involves changing individual letters and their ordering. Use of codes can generally only be limited to a few words that can be easily memorised, and/or requires endless cross-referencing with a book of known ‘translations’, as well as being relatively insecure when it comes to highly secretive information. Therefore, most modern encoding (yes, that word is still used; ‘enciphering’ sounds stupid) takes the form of employing ciphers, and has done for hundreds of years; they rely solely on the application of a simple rule, require far smaller reference manuals, and are more secure.

Early attempts at ciphers were charmingly simple; the ‘Caesar cipher’ is a classic example, famously invented and used by Julius Caesar, where each letter is replaced by the one three along from it in the alphabet (so A becomes D, B becomes E and so on). Augustus Caesar, who succeeded Julius, didn’t set much store by cryptography and used a similar system, although with only a one-place transposition (so A to B and such)- despite the fact that knowledge of the Caesar cipher was widespread, and his messages were hopelessly insecure. These ‘substitution ciphers’ suffered from a common problem; the relative frequency with which certain letters appear in the English language (E being the most common, followed by T) is well-known, so by analysing the frequency of occurring letters in a substitution-enciphered message one can work out fairly accurately what letter corresponds to which, and work out the rest from there. This problem can be partly overcome by careful phrasing of messages and using only short ones, but it’s nonetheless a problem.

Another classic method is to use a transposition cipher, which changes the order of letters- the trick lies in having a suitable ‘key’ with which to do the reordering. A classic example is to write the message in a rectangle of a size known to both encoder and recipient, writing in columns but ‘reading it off’ in rows. The recipient can then reverse the process to read the original message. This is a nice method, and it’s very hard to decipher a single message encoded this way, but if the ‘key’ (e.g. the size of the rectangle) is not changed regularly then one’s adversaries can figure it out after a while. The army of ancient Sparta used a kind of transposition cipher based on a tapered wooden rod called a skytale (pronounced skih-tah-ly), around which a strip of paper was wrapped and the message written down it, one on each turn of paper. The recipient then wrapped the paper around a skytale of identical girth and taper (the tapering prevented letters being evenly spaced, making it harder to decipher), and read the message off- again, a nice idea, but the need to make a new set of skytale’s for everyone every time the key needed changing rendered it impractical. Nonetheless, transposition ciphers are a nice idea, and the Union used them to great effect during the American Civil War.

In the last century, cryptography has developed into even more of an advanced science, and most modern ciphers are based on the concept of transposition ciphers- however, to avoid the problem of using letter frequencies to work out the key, modern ciphers use intricate and elaborate systems to change by how much the ‘value’ of the letter changes each time. The German Lorenz cipher machine used during the Second World War (and whose solving I have discussed in a previous post) involved putting the message through three wheels and electronic pickups to produce another letter; but the wheels moved on one click after each letter was typed, totally changing the internal mechanical arrangement. The only way the British cryptographers working against it could find to solve it was through brute force, designing a computer specifically to test every single possible starting position for the wheels against likely messages. This generally took them several hours to work out- but if they had had a computer as powerful as the one I am typing on, then provided it was set up in the correct manner it would have the raw power to ‘solve’ the day’s starting positions within a few minutes. Such is the power of modern computers, and against such opponents must modern cryptographers pit themselves.

One technique used nowadays presents a computer with a number that is simply too big for it to deal with; they are called ‘trapdoor ciphers’. The principle is relatively simple; it is far easier to find that 17 x 19 = 323 than it is to find the prime factors of 323, even with a computer, so if we upscale this business to start dealing with huge numbers a computer will whimper and hide in the corner just looking at them. If we take two prime numbers, each more than 100 digits long (this is, by the way, the source of the oft-quoted story that the CIA will pay $10,000 to anyone who finds a prime number of over 100 digits due to its intelligence value) and multiply them together, we get a vast number with only two prime factors which we shall, for now, call M. Then, we convert our message into number form (so A=01, B=02, I LIKE TRAINS=0912091105201801091419) and the resulting number is then raised to the power of a third (smaller, three digits will do) prime number. This will yield a number somewhat bigger than M, and successive lots of M are then subtracted from it until it reaches a number less than M (this is known as modulo arithmetic, and can be best visualised by example: so 19+16=35, but 19+16 (mod 24)=11, since 35-24=11). This number is then passed to the intended recipient, who can decode it relatively easily (well, so long as they have a correctly programmed computer) if they know the two prime factors of M (this business is actually known as the RSA problem, and for reasons I cannot hope to understand current mathematical thinking suggests that finding the prime factors of M is the easiest way of solving this; however, this has not yet been proven, and the matter is still open for debate). However, even if someone trying to decode the message knows M and has the most powerful computer on earth, it would take him thousands of years to find out what its prime factors are. To many, trapdoor ciphers have made cryptoanalysis (the art of breaking someone else’s codes), a dead art.

Man, there’s a ton of cool crypto stuff I haven’t even mentioned yet… screw it, this is going to be a two-parter. See you with it on Wednesday…

Advertisements

Scrum Solutions

First up- sorry I suddenly disappeared over last week. I was away, and although I’d planned to tell WordPress to publish a few for me (I have a backlog now and everything), I was unfortunately away from my computer on Saturday and could not do so. Sorry. Today I would like to follow on from last Wednesday’s post dealing with the problems faced in the modern rugby scrum, to discuss a few solutions that have been suggested for dealing with the issue, and even throw in a couple of ideas of my own. But first, I’d like to offer my thoughts to another topic that has sprung up amid the chaos of scrummaging discussions (mainly by rugby league fans): the place, value and even existence of the scrum.

As the modern game has got faster and more free-flowing, the key focus of the game of rugby union has shifted. Where once entire game plans were built around the scrum and (especially) lineout, nowadays the battle of the breakdown is the vital one, as is so ably demonstrated by the world’s current openside flanker population. Thus, the scrum is becoming less and less important as a tactical tool, and the extremists may argue that it is no more than a way to restart play. This is the exact situation that has been wholeheartedly embraced by rugby league, where lineouts are non-existent and scrums are an uncontested way of restarting play after a minor infringement. To some there is, therefore, something of a crossroads: do we as a game follow the league path of speed and fluidity at the expense of structure, or stick to our guns and keep the scrum (and set piece generally) as a core tenet of our game?

There is no denying that our modern play style, centred around fast rucks and ball-in-hand play, is certainly faster and more entertaining than its slow, sluggish predecessor, if only for the fans watching it, and has certainly helped transform rugby union into the fun, flowing spectators game we know and love today. However having said that, if we just wanted to watch players run with the ball and nothing else of any interest to happen, then we’d all just go and play rugby league, and whilst league is certainly a worthwhile sport (with, among other things, the most passionate fans of any sport on earth), there is no point trying to turn union into its clone. In any case, the extent to which league as a game has been simplified has meant that there are now hardly any infringements or stoppages to speak of and that a scrum is a very rare occurence. This is very much unlike its union cousin, and to do away with the scrum as a tool in the union code would perhaps not suit the game as well as it does in union. Thus, it is certainly worth at least trying to prevent the scrum turning into a dour affair of constant collapses and resets before everyone dies of boredom and we simply scrap the thing.

(I know I’ve probably broken my ‘no Views’ rule here, but I could go on all day about the various arguments and I’d like to get onto some solutions)

The main problem with the modern scrum according to the IRB concerns the engage procedure- arguing (as do many other people) that trying to restrain eight athletes straining to let rip their strength is a tough task for even the stoutest front rower, they have this year changed the engage procedure to omit the ‘pause’ instruction from the ‘crouch, touch, pause, engage’ sequence. Originally included to both help the early players structure their engagement (thus ensuring they didn’t have to spend too much time bent down too far) and to ensure the referee had control over the engagement, they are now arguing that it has no place in the modern game and that it is time to see what effect getting rid of it will have (they have also replaced the ‘engage’ instruction with ‘set’ to reduce confusion about which syllable to engage on).

Whether this will work or not is a matter of some debate. It’s certainly a nice idea- speaking as a forward myself, I can attest that giving the scrum time to wind itself up is perhaps not the best way to ensure they come together in a safe, controlled fashion. However, what this does do is place a lot of onus on the referee to get his timing right. If the ‘crouch, touch, set’ procedure is said too quickly, it can be guaranteed that one team will not have prepared themselves properly and the whole engagement will be a complete mess. Say it too slowly, and both sides will have got themselves all wound up and we’ll be back to square one again. I suppose we’ll all find out how well it works come the new season (although I do advise giving teams time to settle back in- I expect to see a lot of packs waiting for a split second on the ‘set’ instruction as they wait for the fourth command they are so used to)

Other solutions have also been put forward. Many advocate a new law demanding gripping areas on the shirts of front row players to ensure they have something to get hold of on modern, skintight shirts, although the implementation of such a law would undoubtedly be both expensive and rather chaotic for all concerned, which is presumably why the IRB didn’t go for it. With the increasing use and importance of the Television Match Official (TMO) in international matches, there are a few suggesting that both they and the line judge should be granted extra responsibilities at scrum time to ensure the referee’s attention is not distracted, but it is understandable that referees do not want to be patronised by and become over-reliant on a hardly universally present system where the official in question is wholly dependent on whether the TV crews think that the front row binding will make a good shot.

However, whilst these ideas may help to prevent the scrum collapsing, with regards to the scrum’s place in the modern game they are little more than papering over the cracks. On their own, they will not change the way the game is played and will certainly not magically bring the scrum back to centre stage in the professional game.

For that to happen though, things may have to change quite radically. We must remember that the scrum as an invention is over 150 years old and was made for a game that has since changed beyond all recognition, so it could well be time that it began to reflect that. It’s all well and good playing the running game of today, but if the scrum starts to become little more than a restart then it has lost all its value. However, it is also true that if it is allowed to simply become a complete lottery, then the advantage for the team putting the ball in is lost and everyone just gets frustrated with it.

An answer could be (to pick an example idea) to turn the scrum into a more slippery affair, capable of moving back and forth far more easily than it can at the moment, almost more like a maul than anything else. This would almost certainly require radical changes regarding the structure and engagement of it- perhaps we should say that any number of players (between, say, three and ten) can take part in a scrum, in the same way as happens at lineouts, thereby introducing a tactical element to the setup and meaning that some sneaky trickery and preplanned plays could turn an opposition scrum on its head. Perhaps the laws on how the players are allowed to bind up should be relaxed, forcing teams to choose between a more powerful pushing setup and a looser one allowing for faster attacking & defending responses. Perhaps a law should be trialled demanding that if two teams engaged correctly, but the scrum collapsed because one side went lower than the other then the free kick would be awarded to the ‘lower’ side, thus placing a greater onus on technique over sheer power and turning the balance of the scrum on its head. Would any of these work? Maybe not, but they’re ideas.

I, obviously, do not have all the definitive answers, and I couldn’t say I’m a definite advocate of any of the ideas I voiced above (especially the last one, now I think how ridiculously impractical it would be to manage). But it is at least worth thinking about how much the game has evolved since the scrum’s invention, and whether it’s time for it to catch up.