Sunday, 9th October, 2022

[Day 937]

This morning I hauled myself out of bed fairly early and made my trip down to collect the Sunday newspaper. I decided not to treat myself to my normal weekly dose of Bach and Mozart on my trusty old iPhone because instead I wanted to reflect upon a little computing project in which I had successfully engaged or rather re-engaged. I wanted to let one of my friends in the park have access to a document which I have stored securely on the web and only accessed via a password. Now passwords are normally held on a server in an encrypted form and when the user supplies a password, then this is encrypted using the same algorithm – then the two encrypted ‘hashes’ are compared and assuming a perfect match, the user is then allowed access. However, the technique that I have used for years works in a completely different but incredibly effective way. At the client end, you use a Javascript program that asks you to supply a password. Then the Javascript program looks at the (truncated) ASCII code for the first character of the password (which will generate a number between 1 and 80 – the alphanumeric characters plus some punctuation marks). Then the software takes the very first character in the file you wish to encrypt and swops it with the character calculated using the ASCII ‘positional’ number. If you think about it, no information has been gained or lost as two characters have just swopped position with each other. The program then proceeds with each succeeding character of the file you wish to encrypt swopping with the ‘positional’ character suggested by the second character of the password. If your password is 20 characters long and you file is 2000 characters long, then this means that, on average, each character in the file will have had its position swapped 200/20 which is 100 times. As you can see, you finish up with an undecipherable ‘soup’ of characters in your encrypted file – in other words, the whole file becomes its own password and vice versa. The encrypted file and associated javascript is stored like this – but when the encrypted file is run and asks you for the password, then the software ‘knows’ where the program ended and just completely reverses each of the swops that were used to encrypt the file and you end up with the original. Needless to say, you cannot afford to forget the password with this scheme but it is massively secure. I calculate that if you tried to decode this scheme using a brute force attempt to guess it and you tried 1 billion attempts per second, it would take you a million, trillion years to do it i.e. never. If you do not understand a word of this, don’t worry! A very simple analogy might be that if you had a large fish that you cut into an incredibly large number of small pieces then you could make a good fish soup. But if each piece was connected to another by an incredibly fine thread and you knew where the end was (analagous to knowing the password), then in theory all you would have do is to pull on one end and you would eventually end up with a whole fish again. It keeps my brain active thinking about such things (as well as being incredibly useful on occasion)

Meg and I walked to the park and made contact with Seasoned World Traveller to whom I offered access to my encrypted website complete with password. Then we made our way for home not tarrying too long in the park as the wind was getting a tad cool this morning. Then we treated ourselves to a dinner of roast beef (cooked yesterday in the slow cooker) and enhanced with some parsnips (parboiled and then roasted in the oven) accompanied with sprouts complemented with a bag of chestnuts I espied in the supermarket recently. We have our usual quiet Sunday afternoon preparing ourselves for a long musical evening tonight. It is the finals of the BBC ‘Young Musician of the Year‘ and the winners of each of the five categories (at a guess piano, strings, woodwind, brass and percussion) each perform a full concerto for the title. Past winners have included Sheku Kanneh-Mason (cello), Nicola Benedetti (violin) and Emma Johnson (clarinet) each of whom has gone on to make sparkling international careers for themselves.

As a politics footnote the recently sacked minister, Conor Burns, has apparently been recommended for a peerage as part of Boris Johnson’s resignation honours. It is said that Liz Truss is powerless to prevent this honour (and seat in the House of Lords), but if it were actually to arise, it wuld be an enormously sad commentary on the status and values of public life in Britain today. The Commons will resume on Tuesday and that is when I assume that some of the darker plots to unseat Liz Truss might either be shown to have some substance or just be shown up as Westminster tittle-tattle.