# MOAR codey stuff

I turned my last post on cryptography into a two-parter because there was a fair ton of stuff that I wasn’t able to cover in that particular 1200 words that I consider to be interesting/relevant, so here the rest of it comes.  I’m not going to bother for an intro this time though, so go and read my last post (if you haven’t already’ before this one to make sure we’re all on the same level here.

We all good? OK, let’s talk about public keys.

When one encodes or decodes a cipher, you perform a slightly different process when performing each process, but each process is mathematically related to the other. For example, when encrypting a Caesar cipher you ‘add three’ to the ‘value’ of each letter, and when decrypting you subtract three; the one process is the inverse of the other. These different types of key, or parts of the overall key, are known as the encryption and decryption keys. Since the two are mathematically related, knowledge of the one allows an enemy cryptanalyst to discover the other with relative ease in most cases; thus, both keys have to be kept very secret to avoid exposure, and making the distribution of keys a dangerous business.

However, in the RSA algorithms talked about at the end of the last post the tool for its encryption (the massive number M and the power P it is raised to) are no use to a foe if he does not have the two prime factors of M needed to decrypt it (I still don’t get how that works mathematically) with any degree of ease. Thus the encryption key needed to send messages to a person secretly can be distributed freely and be known to anyone who wants to, without fear of these secret messages being decoded; incredibly useful for spy networks, since it allows multiple operatives to use the same key to send messages to someone without fear that the capture of one agent could compromise everyone else’s security. In this kind of cryptography, the key distributed publically and which anyone can access is known as the ‘public key’, whilst the secret key used to decrypt it is called the ‘private key’.

RSA algorithms are not the only methods employed in public key cryptography, but any cryptographical methods it does employ are inherently secure ones. Public and private keys have other uses too beyond secure encryption; when encrypting a message using somebody else’s public key, it is possible to add a digital ‘signature’ using your private key. The recipient of your message, upon decrypting it with their private key, can then use your public key and a special algorithm to verify your signature, confirming that the message came from you (or at least someone in possession of your private key- I still don’t know how the maths works here). You can also ‘share’ private and public keys with another person to produce a ‘shared secret’, but here my concept of what the hell is going on takes another large step back so I think I’ll leave this subject there.

Despite all its inherent security, there is one risk still associated with public-key cryptography and techniques similar to the RSA algorithm. The weak link lies in the key itself; the transferring of a private key is (mostly) only ever necessary when old lines of communication are insecure, meaning that a key can often be intercepted by a sharp enemy cryptanalyst. If he is smart, he’ll then send the key straight on to its intended recipient, meaning they are likely to carry on using it oblivious of the fact that the other side can intercept and translate every message sent to him. Therefore, it is advantageous to remove this weak link by ensuring the recipient can tell if the message has been intercepted; and here we enter the weird and wonderful world of quantum cryptography.

The name is actually a misnomer; quantum theory and effects cannot be used to encrypt secure messages, and the term refers to two ideas that are only related to cryptography. One is the theoretical possibility that future quantum computers may be able to crack the RSA problem and throw the world of cryptanalysis wide open again, whilst the other, far more practical, side of things refers to this method of confirming that a message has not bee intercepted (known as quantum key distribution, or QKD). The theory behind it is almost as hard to get your head around as the maths of the RSA algorithm, but I’ll try to explain the basics. The principle behind it concerns Heisenberg’s uncertainty principle; the idea that attempting to observe a quantum effect or system will change it in some way (just go with it). The two parties sending a message to one another communicate in two ways; one via a ‘quantum link’ with which to send the secret message, and another via an open channel (e.g. the internet). The first party (who convention dictates is called Alice) sends her message via the quantum channel, polarising each bit of quantum data in one of two types of direction (just go with it). The receiving party (traditionally called Bob) receives this polarised quantum data, but since he doesn’t know which type of polarisation Alice has uses he just picks one at random each time (just go with it). About half of the time, therefore, he’ll get the right answer. Alice then tells him over the open channel which polarisation she used for each bit (usually, for reasons of speed, this is all done automatically via computer), and Bob tells her which type of polarisation he checked for each bit. They both discard the ones where they did it a different way around, and keep the ones where they did it the same way as a shared key- thus is the key exchanged.

However, if somebody (Eve, conventionally) has been eavesdropping on this little conversation and has measured the polarisation of the quantum bits, then the polarisation of the bits will have been changed by this process (just go with it). This introduces error into Bob’s reading, some of which can just be put down to the mechanics of the process; if, however, more than p bits show an error (p is picked to be a suitable number- I couldn’t give you an example), then the line and key is presumed to be insecure and the whole process is started again. Simple, isn’t it?

# “The most honest three and a half minutes in television history”

OK, I know this should have been put up on Wednesday, but I wanted to get this one right. Anyway…

This video appeared on my Facebook feed a few days ago, and I have been unable to get it out of my head since. It is, I am told, the opening scene of a new HBO series (The Newsroom), and since HBO’s most famous product, Game of Thrones, is famously the most pirated TV show on earth, I hope they won’t mind me borrowing another three minute snippet too much.

OK, watched it? Good, now I can begin to get my thoughts off my chest.

This video is many things; to me, it is quite possibly one of the most poignant and beautiful, and in many ways is the best summary of greatness ever put to film. It is inspiring, it is blunt, it is great television. It is not, however, “The most honest three and a half minutes of television, EVER…” as claimed in its title; there are a lot of things I disagree with in it. For one thing, I’m not entirely sure on our protagonist’s reasons for saying ‘liberals lose’. If anything, the last century of our existence can be viewed as one long series of victories for liberal ideology; women have been given the vote, homosexuality has been decriminalised, racism has steadily been dying out, gender equality is advancing year by year and only the other day the British government legalised gay marriage. His viewpoint may have something to do with features of American politics that I’m missing, particularly his reference to the NEA (an organisation which I do not really understand), but even so. I’m basically happy with the next few seconds; I’ll agree that claiming to be the best country in the world based solely on rights and freedoms is not something that holds water in our modern, highly democratic world. Freedom of speech, information, press and so on are, to most eyes, prerequisites to any country wishing to have any claim to true greatness these days, rather than the scale against which such activities are judged. Not entirely sure why he’s putting so much emphasis on the idea of a free Australia and Belgium, but hey ho.

Now, blatant insults of intelligence directed towards the questioner aside, we then start to quote statistics- always a good foundation point to start from in any political discussion. I’ll presume all his statistics are correct, so plus points there, but I’m surprised that he apparently didn’t notice that one key area America does lead the world in is size of economy; China is still, much to its chagrin, in second place on that front. However, I will always stand up for the viewpoint that economy does not equal greatness, so I reckon his point still stands.

Next, we move on to insulting 20 year old college students, not too far off my own personal social demographic; as such, this is a generation I feel I can speak on with some confidence. This is, probably the biggest problem I have with anything said during this little clip; no justification is offered as to why this group is the “WORST PERIOD GENERATION PERIOD EVER PERIOD”. Plenty of reasons for this opinion have been suggested in the past by other commentators, and these may or may not be true; but making assumptions and insults about a person based solely on their date of manufacture is hardly the most noble of activities. In any case, in the age of the internet and mass media, a lot of the world’s problems, with the younger generation in particular, get somewhat exaggerated… but no Views here, bad Ix.

And here we come to the meat of the video, the long, passionate soliloquy containing all the message and poignancy of the video with suitably beautiful backing music. But, what he comes out with could still be argued back against by an equally vitriolic critic; no time frame of when America genuinely was ‘the greatest country in the world’ is ever given. Earlier, he attempted to justify non-greatness by way of statistics, but his choice of language in his ‘we sure as hell used to be great’ passage appears to hark back to the days of Revolutionary-era and Lincoln-era America, when America was lead by the ‘great men’ he refers to. But if we look at these periods of time, the statistics don’t add up anywhere near as well; America didn’t become the world-dominating superpower with the stated ‘world’s greatest economy’ it is today until after making a bucket load of money from the two World Wars (America only became, in the words of then President Calvin Coolidge, ‘the richest country in the history of the world’, during the 1920s). Back in the periods where American heroes were born, America was a relatively poor country, consisting of vast expanses of wilderness, hardline Christian motivation, an unflinching belief in democracy, and an obsession the American spirit of ‘rugged individualism’ that never really manifested itself into any super-economy until it became able to loan everyone vast sums of money to pay off war debts. And that’s not all; he makes mention of ‘making war for moral reasons’, but of the dozens of wars America has fought only two are popularly thought of as being morally motivated. These were the American War of Independence, which was declared less for moral reasons and more because the Americans didn’t like being taxed, and the American Civil War, which ended with the southern states being legally allowed to pass the ‘Jim Crow laws’ that limited black rights until the 1960s; here they hardly ‘passed laws, struck down laws for moral reasons’. Basically, there is no period of history in which his justifications for why America was once’the greatest country in the world’ actually stand up at once.

But this, to me, is the point of what he’s getting at; during his soliloquy, a historical period of greatness is never defined so much as a model and hope for greatness is presented.. Despite all his earlier quoting of statistics and ‘evidence’, they are not what makes a country great. Money, and the power that comes with it, are not defining features of greatness, but just stuff that makes doing great things possible. The soliloquy, intentionally or not, aligns itself with the Socratic idea of justice; that a just society is one in which every person concerns himself with doing their own, ideally suited, work, and does not concern himself with trying to be a busybody and doing someone else’s job for them. Exactly how he arrives at this conclusion is somewhat complex; Plato’s Republic gives the full discourse. This idea is applied to political parties during the soliloquy; defining ourselves by our political stance is a self-destructive idea, meaning all our political system ever does is bicker at itself rather than just concentrating on making the country a better place. Also mentioned is the idea of ‘beating our chest’, the kind of arrogant self-importance that further prevents us from seeking to do good in this world, and the equally destructive concept of belittling intelligence that prevents us from making the world a better, more righteous place, full of the artistic and technological breakthroughs that make our world so awesome to bring in. For, as he says so eloquently, what really makes a country great is to be right. To be just, to be fair, to mean and above all to stand for something. To not be obsessed about ourselves, or other people’s business; to have rightness and morality as the priority for the country as a whole. To lay down sacrifices and be willing to sacrifice ourselves for the greater good, to back our promises and ideals and to care, above all else, simply for what is right.

You know what, he put it better than I ever could analyse. I’m just going to straight up quote him:

“We stood up for what was right. We fought for moral reasons, we passed laws, struck down laws for moral reasons, we waged wars on poverty not poor people. We sacrificed, we cared about our neighbours, we put our money where our mouths were and we never beat our chest. We built great big things, made ungodly technological advances, explored the universe, cured diseases and we cultivated the world’s greatest artists and the world’s greatest economy. We reached for the stars, acted like men- we aspired to intelligence, we didn’t belittle it, it didn’t make us feel inferior. We didn’t identify ourselves by who we voted for in the last election and we didn’t scare so easy.”

Maybe his words don’t quite match the history; it honestly doesn’t matter. The message of that passage embodies everything that defines greatness, ideas of morality and justice and doing good by the world. That statement is not harking back to some mythical past, but a statement of hope and ambition for the future. That is beauty embodied. That is greatness.

# The Interesting Instrument

Music has been called the greatest thing that humans do; some are of the opinion that it, even if only in the form of songs sung around the campfire, it is the oldest example of human art. However, whilst a huge amount of music’s effect and impact can be put down to the way it is interpreted by our ears and brain (I once listened to a song comprised entirely of various elements of urban sound, each individually recorded by separate microphones and each made louder or softer in order to create a tune), to create new music and allow ourselves true creative freedom over the sounds we make requires us to make and play instruments of various kinds. And, of all the myriad of different musical instruments humankind has developed, honed and used to make prettyful noises down the years, perhaps none is as interesting to consider as the oldest and most conceptually abstract of the lot; the human voice.

To those of us not part of the musical fraternity, the idea of the voice being considered an instrument at all is a very odd one; it is used most of the time simply to communicate, and is thus perhaps unique among instruments in that its primary function is not musical. However, to consider a voice as merely an addition to a piece of music rather than being an instrumental part of it is to dismiss its importance to the sound of the piece, and as such it must be considered one by any composer or songwriter looking to produce something coherent. It is also an incredibly diverse tool at a musician’s disposal; capable of a large range of notes anyway in a competent singer, by combining the voices of different people one can produce a tonal range rivalled only by the piano, and making it the only instrument regularly used as the sole component of a musical entity (ie in a choir). Admittedly, not using it in conjunction with other instruments does rather limit what it can do without looking really stupid, but it is nonetheless a quite amazingly versatile musical tool.

The voice also has a huge advantage over every other instrument in that absolutely anyone can ‘play’ it; even people who self-confessedly ‘can’t sing’ may still find themselves mumbling their favourite tune in the shower or singing along with their iPod occasionally. Not only that, but it is the only instrument that does not require any tool in addition to the body in order to play, meaning it is carried with everyone absolutely everywhere, thus giving everybody listening to a piece of music a direct connection to it; they can sing, mumble, or even just hum along. Not only is this a wet dream from a marketer’s perspective, enabling word-of-mouth spread to increase its efficiency exponentially, but it also makes live music that other level more awesome (imagine a music festival without thousands of screaming fans belting out the lyrics) and just makes music that much more compelling and, indeed, human to listen to.

However, the main artistic reason for the fundamental musical importance of the voice has more to do with what it can convey- but to adequately explain this, I’m going to need to go off on a quite staggeringly over-optimistic detour as I try to explain, in under 500 words, the artistic point of music. Right, here we go…:

Music is, fundamentally, an art form, and thus (to a purist at least) can be said to exist for no purpose other than its own existence, and for making the world a better place for those of us lucky enough to be in it. However, art in all its forms is now an incredibly large field with literally millions of practitioners across the world, so just making something people find pretty doesn’t really cut it any more. This is why some extraordinarily gifted painters can draw something next to perfectly photo-realistic and make a couple of grand from it, whilst Damien Hirst can put a shark in some formaldehyde and sell it for a few million. What people are really interested in buying, especially when it comes to ‘modern’ art, is not the quality of brushwork or prettifulness of the final result (which are fairly common nowadays), but its meaning, its significance, what it is trying to convey; the story, theatre and uniqueness behind it all (far rarer commodities that, thanks to the simple economic law of supply and demand, are thus much more expensive).

(NB: This is not to say that I don’t think the kind of people who buy Tracy Emin pieces are rather gullible and easily led, and apparently have far more money than they do tangible grip on reality- but that’s a discussion for another time, and this is certainly how they would justify their purchases)

Thus, the real challenge to any artist worth his salt is to try and create a piece that has meaning, symbolism, and some form of emotion; and this applies to every artistic field, be it film, literature, paintings, videogames (yes, I am on that side of the argument) or, to try and wrench this post back on-topic, music. The true beauty and artistic skill of music, the key to what makes those songs that transcend mere music alone so special, lies in giving a song emotion and meaning, and in this function the voice is the perfect instrument. Other instruments can produce sweet, tortured strains capable of playing the heart strings like a violin, but virtue of being able to produce those tones in the form of language, capable of delivering an explicit message to redouble the effect of the emotional one, a song can take on another level of depth, meaning and artistry. A voice may not be the only way to make your song explicitly mean something, and quite often it’s not used in such an artistic capacity at all; but when it is used properly, it can be mighty, mighty effective.