Tuesday, March 31, 2015

Line in the sand?

So the Foxy Knoxy business is finally over - see post of 27/3/13?  Can't help feeling that the latest judgment of the Italian Court of Cassation was as much political as judicial.  A finding of guilty (which was the generally expected outcome) would have almost certainly resulted in a long drawn-out diplomatic standoff between Italy and the United States over their request for the extradition of Knox to serve her sentence in Italy, whereas if they'd gone for yet another retrial it would have brought even more ridicule and disrepute on the Italian justice system.  This way, for better or worse, the matter is at an end, and everybody has the chance to move on if they wish to take it.  Pragmatic is I think the word.

Monday, March 30, 2015

Spider's web.

We've talked before about the ownership of letters and their contents (see 1/6/14) but we now seem to have a very strange situation concerning letters where neither the writer (Prince Charles) nor the various recipients (ministers, ex-ministers and civil servants) want them published, and yet the courts have decreed that they must be. Does this mean that there is no longer any such thing as "private correspondence"?

Sunday, March 29, 2015

The one sensible man?

Anybody else think that the only person coming out of the Jeremy Clarkson business with any real credit, is the producer whom he apparently ranted at and thumped? He has consistently refused to comment on what happened, although I am sure he has been besieged by reporters looking to stir things up, and now the police have become involved, he has made it clear that he has no wish to press charges.  Shame that others have not seen fit to follow his example.

Saturday, March 28, 2015

And the answer is...

...beauty.  As the old saying goes "Beauty is in the eye of the be(e)holder".

Friday, March 27, 2015

Here's a riddle...

... Listen up - I have a bee in my hand.   What do I have in my eye?  Answer tomorrow.

Thursday, March 26, 2015

Oh dear, oh dear!

A small village in Cheshire - who clearly consider themselves somewhat upmarket - was excited when it was announced that they were getting a new superstore.  They were looking forward to a Waitrose or a Marks & Spencer.  So there were cries of dismay when they discovered that what they were actually going to get was a Netto! Ah, diddums den and all that, but...but, but, but - didn't Netto disappear a few years ago - or rather their stores were taken over by Asda?  What's going on? And it seems that they (Netto) have continued to trade in their native Denmark, and are now seeking to make a comeback in the UK in some sort of a tie-up with Sainsburys.  Well, we used to have a Netto (see 26/1/14) and it was well worth the occasional visit, so I for one would welcome them back - particularly if they are going to trade at the same low prices they charged before (I have to say though that the connection with Sainsburys makes me wonder if this will be so).  I've lost my local Lidl so here's hoping they open one close to me.

Wednesday, March 25, 2015

Well I never!

Shock horror - politician gives straight answer to straight question - and look at all the fuss it has caused!  No wonder they prefer to prevaricate.

Tuesday, March 24, 2015

Yorkshire pudd'n

Not entirely sure how I feel about the "ceremony" surrounding the reburial of the bones of King Richard III. At the weekend there was a day-long procession as his coffin was taken from from Bosworth Field to the cathedral at Leicester, which to my eye at times strayed perilously close to pantomime.  We're usually so good at dignified pageantry and yet here seem to have fallen between two stools - were we trying for a 15th century re-enactment, or a modern not-quite-state funeral? It all seemed a bit odd and I couldn't help feeling slightly uncomfortable as I watched it on television.  And I kept thinking - wouldn't it have been more appropriate to have left him where he was?  Aren't we in danger of trying to re-write history here?  What happened, happened.  It was historically interesting to have discovered his remains and established that it was in fact him, but should we perhaps have left it at that?

Monday, March 23, 2015

It's a secret (22 - and last)

PPK has one drawback - because it uses such enormously big numbers, encryption and decryption take time - particularly if all you've got is a standard desk-top computer.  And as we've already seen, time may be of the essence.  So enter Phil Zimmerman, an American who in 1991 posted a document on the internet entitled "Pretty Good Privacy".  He said - look, we've already got relatively quick "conventional" cryptography methods which are unbreakable without the key.  The problem is not passing the message, it's getting the key securely to the other side. Right then - why don't we use one of these methods to encrypt the message, and then send the key (which will be a relatively short file) by PPK?  This way we get the best of both worlds.  And this - known as PGP (for Pretty Good Privacy) - has become the cryptographic method of choice for sending secret messages over the internet. Which brings this series of posts full circle - it's all very well the Prime Minister saying that he intends to give the security services carte blanche to intercept such messages - but what use is that if they can't decipher them?

Sunday, March 22, 2015

Depends which way you look at it??

So if, as a public servant, you take money in return for divulging confidential information, you go to gaol, but the person who approached you and paid you that money walks free?  Strange...

Saturday, March 21, 2015

It's a secret (21)

So ironically we have now arrived at a situation where the ultimate cryptography method is a method which is eminently crackable, it's just that the time it would take to do that makes it unfeasible to try. And this raises an interesting point, which is that secrets have a shelf-life - a sell-by or use-by date - in other words there comes a point when a secret isn't a secret any more.  Take D-Day - perhaps the most top top-secret of the war.  And yet, by early morning on the 6th June 1944 it wasn't a secret any more - the troops were landing on the beaches.  So this is something to bear in mind when choosing an encryption method - you only need one which will hold the "enemy" up for long enough that the secret you are seeking to conceal ceases to be a secret.  Don't use your best method unless its use is justified.  One of the reasons that the geniuses of Bletchley Park managed to defeat the German Enigma machine was that, rather than using Enigma just for the most important messages, the Germans used it for everything - including mundane non-secret things like daily weather reports, which gave the decrypters a way in.  Anyway - is PPK the end of the story?  Not quite...

Friday, March 20, 2015

Ha, ha.

The past, the present and the future walk in to a bar.
  - it was a tense situation.

Thursday, March 19, 2015

It's a secret (20)

So the question is - given that there is a specific mathematical relationship between n, x and y, if you know n and y (and anyone can find this out - it's your public key) can you work out what x is?  Because if you can then obviously the system is insecure. And the surprising answer is - yes you can, and it isn't even that complicated a process.  BUT to do so, you need to find out what p and q (which you will remember are the two prime numbers we started with) are, and this involves factorising n.  Now current thinking (it tends to change as computers get more powerful) is that your "n" number should be at least some 600 digits long.  Now that's a BIG number. Something like this - 
25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784406918290641249515082189298559149176184502808489120072844992687392807287776735971418347270261896375014971824691165077613379859095700097330459748808428401797429100642458691817195118746121515172654632282216869987549182422433637259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133844143603833904414952634432190114657544454178424020924616515723350778707749817125772467962926386356373289912154831438167899885040445364023527381951378636564391212010397122822120720357
 - and you now have to find the two numbers which were multiplied together to produce that number.  Because they were prime numbers, there is only one answer. How long will this take you?  Well it's been estimated that if you could hook up all the computing power in the world and have it working 24/7 on this problem to the exclusion of everything else, you might get the answer in around 2000 years.  Yes, I did say 2000 years - which is why it's only an estimate.  Nobody's ever tried it or would dream of trying it, and therein lies the security of the system.  Have we reached the end of the story?  Not quite...

Wednesday, March 18, 2015

Where do they shop??

Three years ago now I posted about how the cost of my weekly shop had increased from around £40 to over £50 in twelve months or so, despite the official line being that inflation at that time was something like 4 - 4½%.  Well - update.  The cost of essentially the same shopping basket now hovers at just under £65.  Which works out at something like 10% a year - still way, way ahead of the "official" inflation figure. So on my last shop I took the time to note just where the biggest increases were.  Firstly meat - I used to enjoy a piece of sirloin steak which a couple of years or so ago I could pick up for £2.00 - £2.50.  And today?  Double that - so I don't buy it any more. Even pork and chicken which traditionally used to be the "cheap" meats, no longer are that cheap.  Then yoghurt.  Just a few months ago you could get a pack of four yoghurts for £1.00.  Today exactly the same product - £1.50.  Why?? Wine - you used to be able to get a bottle of basic plonk for £2.99.  Same bottle today, £4.99. Why?? Crisps - again the same bag which even a few weeks ago was on sale (and not as a special offer) at £1.00 now costs £1.50.  Why?  Ready meals - not so easy to make a direct comparison because (craftily) they keep changing the packaging, but one particular line which has remained the same and which used to be 2 for £4 is now 2 for £5.  And I keep getting told that food is getting cheaper - not my experience!!

Tuesday, March 17, 2015

It's a secret (19)

So, PPK - you start with two really (really, really) big prime numbers - call them p and q.  You multiply them together and end up with a ginormous number which we call "n".  Then, using mathematical techniques which we needn't go into here (which is just a clever way of saying - I don't really understand, so don't ask) from these three numbers - p, q and n, we derive two other smaller numbers - x and y.  We now choose one of those numbers to be our private key - let's say we choose x.  We now lock this number away and don't divulge it to another living soul.  We can now dispose of p an q and the other two numbers (n and y) now become our public key - we can broadcast these to the world at large and anybody using a particular openly-known method and these two numbers can encrypt a message.  But here's the clever part - a message encrypted using our public key can only be decrypted using our private key, so it's useless to anyone other than us.  So message passed without any key passing.  Success, yes?  But is it secure?

Monday, March 16, 2015

A lot at steak (sic)?

What are we to make of this Jeremy Clarkson business?  Is this just a case of a celebrity being carried away by his own publicity, and throwing a hissy fit (and it seems, a punch) when things don't go his way?  Or is there more to it?  If I read it correctly, the punchee - if I can call him that - has made no official complaint, and it was Clarkson who effectively reported himself to the BBC.  That seems a bit strange unless, as has been suggested, he is seeking to bring to a head a long-standing feud he has with the BBC's Director of Television.  The BBC are in an awkward situation - Top Gear is an enormously successful programme, here and abroad.  And much of its popularity is down to Clarkson and his no-nonsense, call-a-spade-a-spade approach. Dare they sack him (some 900,000 people have signed an online petition calling for his reinstatement)?  Could the show survive without him - debateable? And if they don't sack him, will this be seen as giving carte blanche to any presenter to behave as they wish?  Personally, I feel he is as much sinned against as sinning - it seems to me that for a long time there has been an "anti-Clarkson" clique in the media who have taken a delight in picking on his peccadilloes - real or imaginary - and blowing them out of all proportion. I'm not a passionate follower of Top Gear, although I do watch it from time to time, so I have no particular axe to grind -  but I wish him well.

Sunday, March 15, 2015

Days of the week

I was explaining to my youngest granddaughter why the days are called as they are. No problem with Sunday (Sun), Monday (Moon), Wednesday (Woden), Thursday (Thor), Friday (Freya) and Saturday (Saturn), but I was brought up short by Tuesday. Couldn't think who or what that is called after.  Of course, we now have Google, so it was just a couple of clicks to find that the Old English god of war was called Tiu or Tiw and Tuesday is his day.  Interesting that the Roman god of war was Mars, and in most European languages the day bears his name (Mardi, Martedi, Martes and so on). Indeed Gaelic, Welsh and Cornish also name the day after Mars (Dimairt, dydd Mawrth, dy' Meurth).  So there you are.

Saturday, March 14, 2015

It's a secret (18)

Computers are particularly good at one thing - number-crunching.  That is doing maths with large numbers.  And this ability has led to the ultimate in cryptography. If I ask you to multiply two numbers together and give me the answer, that's not much of a problem - even if they're big numbers, and you only have pencil and paper, it shouldn't cause you too much trouble.  But if I give you the answer and ask you to find the two numbers which were multiplied together to get that answer (this is called factorising) that's a whole different ball-game.  This is because there is no real formula for doing this.  You are thrown back on what mathematicians are pleased to call the "brute force" method - in other words trying all the various possibilities until you hit on the right one.  And clearly the bigger the number you are trying to factorise, the more possibilities there will be, and the longer it will take you.  And this forms the basis of what has become known as public-private-key cryptography (PPK). Of which, more to come.

Friday, March 13, 2015

R.I.P.

Terry Pratchett - we knew it was coming, but none the less sad for that.  Thank goodness he has left us a legacy of comic writing second to none.  Best known for his "Discworld" series, but my favourite of his is a book titled "Johnny and the Dead" about a young boy who teams up with the deceased "inhabitants" of a local cemetery to thwart the plans of a development company.  Brilliant concept, brilliantly executed and very, very funny.

Thursday, March 12, 2015

It's a secret (17)

So what can computers bring to the table?  Well for starters, they can lighten the load.  We have seen that using a series of random letters as your keystream results in a cipher which is unbreakable without the key.  But generating such a list of random letters (a one-time pad) is very time-consuming and getting such a list to your opposite number (the key distribution problem) is far from easy.  It is said that at the height of the Cold War, when the one-time pad was the cryptographic method of choice, on any given day there would be hundreds of people travelling round the world with metal cases chained to their wrists - they were couriers delivering one-time pads. Now a computer can be easily programmed to come up with a list of random numbers between 1 and 26, which can be treated as letters.  Strictly speaking, these numbers are not random but for all practical purposes can be treated as such.  To get the computer to do this, you first have to give it a starting number - called the "seed", and the point is that the same seed will always result in the same sequence of "random" numbers.  So you no longer have to spend time producing a one-time pad - you let the computer do it for you, and you no longer have to pass the whole sequence to your opposite number - you just have to give them the seed and their computer will do the rest.  But computers had much more to give...

Wednesday, March 11, 2015

Not so easy??

Here are the answers to Saturday's quiz -
1.  116 years
2.  Ecuador
3.  Sheep and horses
4.  November
5.  Squirrel fur
6.  Dogs (the bird canary gets its name from the islands - not vice versa)
7.  Albert
8.  Crimson
9.  New Zealand
10. Orange

How many did you get?

Tuesday, March 10, 2015

It's a secret (16)

So what's up with the three-pass method - why hasn't it become the procedure of choice?  Well, the first problem is in the name - it requires the message to be passed three times - A to B, B back to A and then A back to B.  If it's just you and me messing about it doesn't matter, but the use of a cipher usually implies that the matter is of some urgency (like our "get out now" message) and the delay may be unacceptable.  And then, the most common reason for ciphers to fail is human error - someone wrongly transcribing something or looking something up incorrectly, and of course the three pass method triples the possibility of this happening.  But the most crucial failing is that it is fundamentally insecure.  This seems counter-intuitive, but think about it - if someone is intercepting the communications between A and B then by comparing what is sent with what is sent back he/she has all the information necessary to work out what system is being used and what the individual keys are. Not that it would necessarily be easy to work out, but all the information is there.  So the three-pass method never really caught on.  But now cryptography was entering the age of the computer...

Monday, March 09, 2015

Give me five minutes more, only five minutes more...

This idea of giving drivers a ten minute "grace period" before being given a parking ticket seems to me to be (a) ignoring obvious human behaviour, and (b) missing the point.  Firstly all that will happen is that those who deliberately run their parking ticket to the limit will simply add ten minutes to that limit, so whatever problems which are being caused at the moment will still be caused - just ten minutes later.  And secondly, the real problem is mainly caused by asking drivers to have to guess in advance how long they are likely to want to park for.  A system whereby you pay after the event for the time you have parked is fairer and much less contentious.

Sunday, March 08, 2015

It's a secret (15)

Surprisingly there is a way of passing a message without the need to pass a key - and it's been known about for some time.  It's called the "three pass method" and goes like this - we'll use the Vigenère system as an example.  I choose a keyword - I'll use "turkey" again, but I keep this to myself. B - the person I am sending the message to also chooses a keyword - let's say "spoken" and also keeps this to themselves.  Right, let's make the message "get out now".  I now encrypt this using my keyword - turkey. If you're unsure how to do this, look back to number 10 in this series.  So this comes out as ZYK YYR GIN and this is what I send to B.  Means nothing to them of course, because they don't know my keyword, but what they do is encrypt what I sent them (ZYK YYR GIN) using their keyword - spoken.  The result is RNY ICE YXB and they send this back to me.  I now decrypt this using my keyword (turkey).  That's to say I look on the T line for the letter R and then follow that up to the top line and note that letter, then I do the same for the letter N on the U line, then Y on the R line and so on.  What I end up with is YTH YYG FDK.  I send this back to B who now decrypts this using their keyword - spoken, and ends up with GET OUT NOW.  So, message passed and I kept my keyword to myself as did B.  So where's the problem?  Is there a problem?  Watch this space.

Saturday, March 07, 2015

Quick and easy(?) quiz

Thanks to my pensioner's magazine for this -

1.  How long did the Hundred Years' War last?
2.  Which country makes Panama hats?
3.  From which animal do we get cat-gut?
4.  In which month do the Russians celebrate the October revolution?
5.  What is a camels-hair brush made of?
6.  The Canary Islands are named after which creatures?
7.  What was King George VI's first name?
8.  What colour is a purple finch?
9.  Where are Chinese gooseberries from?
10. What colour is an aircraft's black box?

Friday, March 06, 2015

It's a secret (14)

So we have finally arrived at a genuinely unbreakable cipher.  Using the Vigenère square with a keystream which simply consists of a series of random letters gives a would-be decipherer nothing to go on.  But before we get too excited, we need to take a big step backwards.  A is sending a message to B and all the encryption systems we've looked at so far require one fundamental thing - B needs to know what method of encryption A has used - known as the "key".  This means that at some point A has to contact B and pass the key.  And if this contact can be intercepted then it doesn't matter how good the system being used is, once the key is known it becomes useless. This has become known as the "key distribution problem" and is the weak point of any of the systems we've looked at so far.  So the new "holy grail" of cryptographers became to come up with a system which did not require the passing of a key.  At first glance this seems a contradiction in terms, but where there's a will...

Thursday, March 05, 2015

Oh, this language of ours!

It's always been a source of confusion that the English words "flammable" and "inflammable" mean the same thing.  But these are not the only such pairs of words - you also, for example, have "habitable" and "inhabitable" and  "valuable" and "invaluable".  The confusion arises because the prefix in- most often has a negative connotation as in "inexpensive" (not expensive) but here it is simply an intensifier adding to the meaning of the word - so if there is a difference in meaning it is that "flammable" means "catches fire easily" and inflammable means "catches fire very easily".  The distinction can perhaps be best seen in "valuable" (having a high value) and "invaluable" (beyond price).

Wednesday, March 04, 2015

It's a secret (13)

So is the "Alice" cipher unbreakable?  Not entirely.  If you have reason to believe that a keyworm from some book or other publication is being used and that it is in English, then it is reasonable to assume that certain words and combinations of words will occur in it.  "And the" for example is pretty well bound to occur somewhere.  So you go through the ciphertext trying "and the" as a key over and over again to see if it produces anything sensible.  If it does then that may allow you to have a guess at what other parts of the message may be which in turn could give you more of the keystream, and so on.  And of course there are other commonly occurring combinations of words you can try.  So it's time-consuming and mind-numbing, but it can be done.  On the other hand, if the keyworm is just a random collection of letters, this won't work and this gives rise to what is known as a "one-time pad", of which more next time.

Tuesday, March 03, 2015

Random??

When is random not random? When it's an Apple playlist it seems. Apple have confessed that their "shuffle" playlists are not really random but are deliberately arranged so that, for example, the same artists do not appear twice in a row.  So they have made them less random in order to appear more random. Work that one out!

Monday, March 02, 2015

It's a secret (12)

Of course, once it was realised that a repeating keyword allowed for the possibility of breaking a Vigenère cipher, cryptographers switched to using keyworms or keystreams - that is a series of words as long as the message itself - so, no repetitions.  There's a story - I don't know how true - of a British salesman in the mid-1930s who plied his trade in Europe.  As such he visited Germany often, and the Germans were suspicious that, although they accepted he was a genuine salesman, he was also keeping his eyes open for troop movements and the disposition of aircraft and tanks and such and sending details of these things back to the UK in his daily encrypted telegrams.  They made great efforts to decipher his telegrams but with no success.  On several occasions they searched the rooms he was staying in, in the hope of finding evidence that he was in fact a spy, but found nothing significant, although a couple of times, those searching reported back that he had a copy of "Alice in Wonderland" among his things.  But they put the idea of a grown man reading a book written for children down to the well known eccentricity of the English!  In fact he was doing exacly what they thought he was doing and the book was the basis of his cipher.  Hidden in his telegram would be a series of numbers, indicating a page number, a line number and a word number, and starting at that word he would write out as much of the book as necessary over his message and then encrypt it using a Vigenère square.  His oppo in the UK of course had an identical edition of "Alice" and would simply reverse the process.  Unbreakable?  Well nearly but not quite...

Sunday, March 01, 2015

Wolf Hall

Well, I've persevered and watched the whole thing, and now I feel I am entitled to ask - why?  What was that all about?  I haven't read the books, which I understand are not an easy read. but assuming that the TV series is faithful to them, just what was the author's motive?  I though it was going to be a study in "power corrupts" showing how Thomas Cromwell developed from a basically decent, good-hearted human being into a monster prepared to do whatever was necessary to further his own ends. But it didn't really come over that way, and in any event as a study of the life of Cromwell it finished well before that life was over.  It didn't tell us anything historically which we didn't already know (but never forget the old adage - history is written by the victors). So, as a spectacle - great.  Acting - great. But what the hell was it all about?