Search
  • Michael Curzan

A Story About Encryption...

In March of 2015, beloved author Terry Pratchett, creator of the Discworld series, passed away. It is now just over five years later, and I have come up with a post to honor the anniversary of his passing. Here is an idea I came up with for the perfect Discworld novel. I could never write it. Terry Pratchett could have, but not me. I can only describe it. Perhaps someone will write it, but it will never be as if Terry Pratchett had written it, only half as good. Don't worry if you do not know very much about Discworld. I will try to explain it.


It begins with a typical late-in-the-series Discworld novel setting. The Clacks are running at full capacity (Clacks are a network of semaphore towers which send information along the network by means of turning lights on and off, and they are very fast, like a mechanical 19th century style internet), and everything seems to be normal. However, there is currently one huge flaw with the Clacks. The messages are in plain text. Even important ones are in plain text. The top secret ones are encoded, but only in a simple Caesar cipher or such (it would be referred to as a General Tacticus cipher on DW, after the equivalent of Julius Caesar in the novels). Hearing this, a gang of three bad guys decide to assassinate Lord Vetinari, ruler and stability-bringer of the large city of Ankh-Morpork, by eavesdropping on the Clacks network, due to the lack of any good encryption so that they can just pluck the messages right out of the air. They eavesdrop by setting up a smaller dummy Clacks tower between two big ones so that from either side it looks like the next tower along in the network because of perspective. This is based on a scene from the novel “Going Postal” in which the characters of the Smoking GNU threesome did something like this.


Of course, the three bad guys in this story aren’t the Smoking GNU, but are more like a parody of the trio from The Princess Bride. One of them is the only evil one, who is thin and really smart, but in a twisted way. Another is a Brindisian (in-universe equivalent of Italian, so sort of Spanish, which is what this character is going for here) or Quirmian (in-universe French, so also sort of Spanish) sword fighter whose only purpose in life is to avenge his father’s death at the hands of a (possibly oddly fingered) nobleman, and this revenge-driven fellow is actually a decent guy but he agreed to join the trio because he had been convinced that killing Vetinari would somehow resolve his revenge and anger subplot. Finally, we have a large tough-looking guy, possibly Klatchian (in-universe Arabic or Turkish), who is actually really good and a big softy, but he was also tricked into joining the assassination plot by the evil leader.


This trio starts sneakily tapping into the flow of Clacks messages, by their perspective trick and also by stealing the recording drums from the Clacks towers themselves (these Clacks tower drums record the messages that have been passed through in an entire day, but stealing them is quite difficult so this is only a secondary method of eavesdropping). The trio are able to decode any messages that are cryptic, because the ciphers are so simple. Then they plan various assassination attempts on Vetinari due to knowing where he is and what he is going to do, but they always fail so far, either because they missed an important detail and it fails because of that, or because the two good guys in the trio accidentally mess it up because of their comical bumbling nature, or because the law enforcement is able to save Vetinari’s life, although they still cannot catch the actual perpetrators. Or just because it is necessary for them to not succeed in killing Vetinari so soon, so that the story has a chance to get somewhere afterwards.


The Ankh-Morpork City Watch now knows that some people are trying to kill Vetinari, and given some suspicious behavior reported by Clacks operators, they suspect it is because the Clacks are not well encoded at all, and some bad guys are trying to read the messages and find out secrets to kill Vetinari. As this is the first time the lack of codes has been a serious threat, the Clacks network decides to step up their game by requiring all messages to be in code, even though it will make it more expensive (at first they decide to simply patrol the entire network to check for any potential eavesdroppers, but as the network spans hundreds and hundreds of miles, and is growing every day, this is soon totally impossible). However, the codes are still rather easy to crack, as the trio have discovered how to crack substitution ciphers from an old Klatchian scroll (written by a parody of the pioneering medieval Arabic code-breaker, Al-Kindi), and there are a few other ciphers that are widely known and even a child could learn it and crack it, like swapping every other letter, so those are no challenge either. As the assassinations attempts keep coming, luckily always being failures even still, Moist von Lipwig, a reformed con-man who is in charge of several businesses in Ankh-Morpork, decides to step in and help invent a new cipher that is unbreakable. So this turns into a Lipwig story, with him as the main character.


Lipwig enlists the help of Leonard of Quirm (a parody of Leonardo da Vinci), who quickly invents an equivalent of the Vignere or whatever cipher. This makes Clack messages even more costly, but it completely stops the trio’s efforts -- until they invent the clever way to break it without knowing the keyword first (this is a DW story, so advancements and inventions that in real life would have taken dozens or hundreds of years to figure out can be done in weeks or at most months, because story). Assassination attempts keep coming, and Moist von Lipwig scrambles to find a better cipher. He notices that in general, keeping messages short makes them nearly impossible to crack, and so Leonard of Quirm thinks about this and says that there is a theoretical perfect cipher: an adaptation of the currently most difficult cipher, but which has the keyword be a random nonsense “word” that is as long as the message itself. This is the truly unbreakable One time pad cipher, but it is very impractical as using it requires a book full of random keywords. So Moist von Lipwig looks for a more practical, if less secure, option.


He decides that maybe if he uses a machine to encode something, it could be as complicated as it needs to be, and be better and faster than any older “by hand” cipher. Leonard of Quirm remembers that he actually built such a machine years ago (an earlier DW novel mentions this so-called “E.N.I.G.M.A. machine” in fact), but forgot about it because it never had a practical use -- until now. And thus the era of mechanized codes begins, with Enigmas being mass-produced and used for Clacks messages. This ramps up the price even more, but it is the only way to be safe. Also, every Clacks station has to have a complicated code book in order to use the Enigmas, so that the settings of the machine on any particular day could be known by all. Distributing these code books and keeping them from being stolen is even harder than using the Enigma machines, but that doesn’t matter because it works! The eavesdropping trio are now completely stuck once again.


However, the evil one and the sword fighting revenge-driven one start to get some ideas on how to possibly attack this cipher. It involves a seriously complicated thinking machine, though, and no human could do it “by hand”. Therefore, they go to great and risky lengths to hack into HEX, a magical computer at the Unseen University wizard school and magic research facility, in order to use it to run the program that they have devised to crack the Enigma code. They do this by hooking HEX up to a stolen Enigma machine, and adding light bulbs and tiny magical demons and stuff and math and spells to it in order to turn it from a code-making machine into a code-cracking machine. After many weeks of effort (let’s be honest, even in the sped-up timeline of DW innovation, three -- no, actually just two -- guys trying to crack an equivalent of the Enigma code would take no less than “many weeks” of hard work), they finally succeed in their project, and they can finally read intercepted Clacks messages again. However, at the same time, the big tough softy character has figured out that if they can steal an Enigma machine to help break the code, why not just steal a code book? It would be a lot less trouble, so he does, and right as the other two have finished their “hard way” of solving it, they are completely face-palming and shocked to see that the third guy in their group has cheated and found an “easy way”. So, the conclusion is, that they found a way to break the enigma cipher, and they keep breaking the codes and trying to kill Vetinari whenever they find some information that would help them with that goal.


Faced with the Enigma codes actually being cracked, Moist von Lipwig and the others who support the Clacks network’s security decide that the only way to fight them is to use a great feature of the Enigma concept -- it can be made more and more and more complicated if eavesdroppers figure out a way to crack it when it is simpler. They add extra cipher wheels to the machines, extra plug board wires, and extra convoluted rules as to what to do to encode something, and they also have to distribute larger and larger code books when they do this, and keep them secure against theft, especially now that some have actually been stolen and used as keys to help break the ciphers. However, over the coming months, the trio of eavesdroppers improve on their HEX-hijacking methods and to an extent their stealing methods, and they are soon able to break every update to the Enigma codes. Eventually, this whole cryptological arms race has gone too far, and von Lipwig decides to search for some other way. However, it seems hopeless.


Then one of Lipwig’s old buddies at the Ankh-Morpork Post Office where he used to work, notices something about how the stamps or addresses on the letters and envelopes are used, or how the keys are used to lock up the mail rooms, and he has a breakthrough. He tells Lipwig about this realization, and Lipwig eventually plays around with it and spins it into a foolproof method for using padlocks to send a package without any possibility of it being unlocked or opened. He tries to turn it into a cipher, but he cannot because the unavoidable Last On First Off rule of encryption prevents it from working smoothly.


However, after a bit more thinking, he eventually gets the idea for Public-key Cryptography. Everyone has a public and private key, etc etc etc, and it is totally secure because the math involved is totally unbreakable. Well, unbreakable by any means so far known to mankind. Wizards at Unseen University have actually determined that even using hundreds of HEX’s running since the dawn of time, it would still not be breakable. However, they have also determined a way to actually break it -- but everyone is safe from that way because it is very tricky and it relies heavily on “Bloody quantums”, i.e. a Quantum Computer, which even the most adventurous wizards are afraid of, and certainly the precious few people who would possibly be able to understand it well enough to crack the Public key cipher system, would not be evil enough to do so for real. So the encryption arms race is finally over, and the winner is cryptological security.


This is at the end of the novel. The innovative story is at an end. But the trio of eavesdroppers are still trying to assassinate Vetinari, and they have not yet been caught, although the City Watch are certainly hot on their trail by now after so many assassination attempts made by them. Having been stopped by the unbreakable Public key system, they can no longer eavesdrop, and they are now stuck as to how to get a way to assassinate Vetinari. So they resort to a more direct method of eavesdropping. Instead of trying to hack the Clacks, they bug a meeting room in the Patrician’s Palace. However, when the resulting dialog they are able to record doesn’t reveal anything of value, because of course Vetinari would be more careful than that, the trio decide that there is one more course of action available to them. They pull off a difficult robbery in attempts to obtain Lord Vetinari’s private key, so that they can read his Clacks messages, and so that they can know where he is going and how to try to kill him. This works and they set up one last chance to kill Vetinari.


However, because the City Watch are already on to them, they must set it up so that even if they are caught, they will at least have succeeded. They know this might be their very last attempt ever, so they spend all their effort to make sure it cannot go wrong. Eventually, they have set up a scheme that will be sure to kill the Patrician, as long as all three of them work together and make no mistakes. The leader of the trio is confident that it will be a million-to-one chance that it will go wrong.


However, during the previous parts of the book, the two good guys of the trio have been going through their own emotional journeys. For example, the revenge guy has repeatedly seen a man who looks like the person who killed his father, and is also likely of the same noble rank as the killer. Meanwhile, the big softy has been seeing a possible resolution to his character arc as well.


Everything, naturally, comes together on the night of the assassination attempt, with the City Watch and Moist von Lipwig successfully tracking down the eavesdroppers and knowing about their assassination attempt they are about to perform, and knowing about their stealing of the Patrician’s private key. Also, the revenge guy’s nemesis is there as well, as is the resolution to the big softy’s story arc. It all comes crashing together, as both the revenge guy and the big softy realize that they have been duped by the evil guy, and that killing Vetinari will not actually solve their problems, it will just bury them and make them worse. So they both decide to bail out on the mission at the last minute, as they both actually like Vetinari, and they can then go resolve their character arcs on their own, properly, and not by an assassination attempt on the Patrician. This causes the elaborate assassination plot to fail, sparing Vetinari’s life and leading to the revenge guy finally getting his revenge, and the big softy’s story arc finally being resolved as well.


Also, the evil guy gets captured by the City Watch after the other two members of his trio, who have gotten internal resolution by now, joined the Watch and turned on the evil guy, after seeing him for who he really is now. Everything is put back to normal, the Clacks are at an affordable price again compared to the price of them during the Enigma phase, and communications across the world are now totally secure. At the end of the novel, Vetinari and the evil guy are seen in the Patrician’s Palace, with Vetinari pulling a Princess Bride poison scene mind game, to which the evil guy dies and meets his fate. The End.



147 views

©2019 by Michael Curzan. Proudly created with Wix.com