#BookStudies ### The Code Book - Review [[The Code Book - Review]] ### TCB Pg. ix - The Linguistic Alchemists > The desire for secrecy has meant that nations have operated code-making departments, responsible for ensuring the security of communications by inventing and implementing the best possible codes. At the same time, enemy codebreakers have attempted to break these codes, and steal secrets. Codebreakers are linguistic alchemists, a mystical tribe attempting to conjure sensible words out of meaningless symbols. The history of codes and ciphers is the story of the centuries-old battle between codemakers and codebreakers, an intellectual arms race that has had a dramatic impact on the course of history. I think this has everything to do with the thoughts from [[Areas/Reading/Books_Bk/Books/The Pattern On The Stone/The Pattern on the Stone - Daniel Hillis|The Pattern on the Stone - Daniel Hillis]]. Especially when paired with the second law of quantum complexity. [[2nd Law - Expansive Complexity]] ### TCB Pg. xi The Impact of Cryptography > Although cryptography is now having a major impact on civilian activities, it should be noted that military cryptography remains an important subject. It has been said that the First World War was the chemists' war, because mustard gas and chlorine were employed for the first time, and that the Second World War was the physicists' war, because the atom bomb was detonated. Similarly, it has been argued that the Third World War would be the mathematician's war, because mathematicians will have control over the next great weapon of war - information. Mathematicians have been responsible for developing the codes that are currently used to protect military information. Not surprisingly, mathematicians are also at the forefront of the battle to break these codes. "I don't know what World War 3 will be fought with, but World War 4 will be fought with sticks and stones." - summation of a quote from Einstein. It'll be funny to see what our mathematics will conjure in the next great war. Hopefully magic. [[TCB Pg. xi The Impact of Cryptography]] ### TCB Pg. 3 - A Brief History of Codes > Some of the earliest accounts of secret writing date back to Herodotus, 'the father of history' according to the Roman philosopher and statesman Cicero. In *The Histories*, Herodotus chronicled the conflicts between Greece and Persia in the fifth century BC, which he viewed as a confrontation between freedom and slavery, between the independent Greek states and the oppressive Persians. According to Herodotus, it was the art of secret writing that saved Greece from being conquered by Xerxes, King of Kings, the despotic leader of the Persians. Skipping a few paragraphs: > Herodotus wrote: > As the danger of discovery was great, there was only one way in which he could contrive to get the message through: this was by scraping the wax off a pair of wooden folding tablets, writing on the wood underneath what Xerxes intended to do, and then covering the message over with wax again. In this way the tablets, being apparently blank, would cause no trouble with the guards along the road. When the message reach its destination, no one was able to guess the secret, until, as I understand, Cleomenes' daughter Gorgo, who was the wife of Leonides, divined and told the others that if they scraped the wood off, they would find something written on the wood underneath. This was done; the message was revealed and read, and afterwords passed on to the other Greeks. It would be cool to reference this somewhere along the line. ### TCB Pg. 8 - The Spartan Scytale ![[Scytale.jpg]] Definitely want to make a walking sticks with this in mind. I want to utilize this and a Hebrew pigpen to make a pretty strong cipher. [[TCB Pg. 8 - The Spartan Scytale]] ### TCB Pg. 20-21 - Cryptanalyzing a Ciphertext ![[IMG_6752.jpg]] > However, we can begin by focusing attention on the only three letters hat appear more than thirty times in the ciphertext, namely O, X and P. > It is fairly safe to assume that the commonest letters in the ciphertext probably represent the commonest letters in the English alphabet, bur not necessarily in the right order. In other words, we cannot be sure that: > o= e, X = t, and P = a, > but we can make the tentative assumption that: ![[IMG_6753.jpg]] [[TCB Pg. 20-21 - Cryptanalyzing a Ciphertext]] ### TCB Pg. 26-27 - Evidence for Ancient Hebrew Ciphers > Medieval monks were intrigued by the fact that the Old Testament contained deliberate and obvious examples of cryptography. For example, the Old Testament includes pieces of text encrypted with abash, a traditional form of Hebrew substitution cipher. Atbash involves taking each letter, noting the number of places it is from the beginning of the alphabet, and replacing it with a letter that is an equal number of places from the end of the alphabet. In English this would mean that a at the beginning of the alphabet, is replaced by Z, at the end of the alphabet, b is replaced by Y, and so on. The term atbash itself hints at the substitution it describes, because it consists of the first letter of the Hebrew alphabet, aleph, followed by the last letter taw, and then there is the second letter, beth, followed by the second to last letter shin. An example of atbash appears in Jeremiah 25: 26 and 51: 41, where 'Babel is replaced by the word 'Sheshach'; the first letter of Babel is beth, the second letter of the Hebrew alphabet, and this is replaced by shin, the second-to-last letter; the second letter of Babel is also beth, and so it too is replaced by shin; and the last letter of Babel is lamed, the twelfth letter of the Hebrew alphabet, and this is replaced by kaph, the twelfth-to-last letter. > Atbash and other similar Biblical ciphers were probably intended only to add mystery, rather than to conceal meaning, but they were enough to spark an interest in serious cryptography. European monks began to rediscover old substitution ciphers, they invented new ones, and, in due course, they helped to reintroduce cryptography into Western civilisation The first known European book to describe the use of cryptography was written in the thirteenth century by the English Franciscan monk and polymath Roger Bacon. *Epistle on the Secret Works of Art and the Nullity of Magic* included seven methods for keeping messages secret, and cautioned: > 'A man is crazy who writes a secret in any other way than one which will conceal it from the vulgar.' - Roger Bacon This is a section I will most likely return to often. ### TCB Pg. 29 - Gibberish as a Strate > One of the simplest improvements to the security of the monoalphabetic substitution cipher was the introduction of nulls, symbols or letters that were not substitutes. for actual letters, merely blanks that represented nothing. For example, one could substitute each plain letter with a number between 1 and 99, which would leave 73 numbers that represent nothing, and these could be randomly sprinkled throughout the ciphertext with varying frequencies. > > The nulls would pose no problem to the intended recipient, who would know that they were to be ignored. However, the nulls would baffle an enemy interceptor because they would confuse an attack by frequency analysis. An equally simple development was that cryptographers would sometimes deliberately misspell words before encrypting the message. > > Thys haz thi ifekkt off diztaughting thi ballans off frikwenseas - making it harder for the cryptanalyst to apply frequency analysis. > > However, the intended recipient, who knows the key, can unscramble the message and then deal with the bad, but not unintelligible, spelling.gy I'll return to this when I work on my token saving method of using typoglycemia in order to make Tribrary a little more functional. [[TCB Pg. 29 - Gibberish as a Strate]] ### TCB Pg. 29-30 - Symbols as Code > Another attempt to shore up the monoalphabetic substitution cipher involved the introduction of codewords. The term code has a very broad meaning in everyday language, and it is often used to describe any method for communicating in secret. However, as mentioned in the Introduction, it actually has a very specific meaning, and applies only to a certain form of substitution. So far we have concentrated on the idea ofa substitution cipher, whereby each letter is replaced by a difterent leer. number or symbol. However, it is also possible to have substitution at a much higher level, whereby each word is represented by another word or symbol - this would be a code. ![[IMG_6759.jpg]] > Technically, a code is defined as substitution at the level of words or phrases, whereas a cipher is defined as substitution at the level of letters. > Hence the term encipher means to scramble a message using a cipher, while encode means to scramble a message using a code. Similarly, the term decipher applies to unscrambling an enciphered message, and decode to unscrambling an encoded message. The terms encrypt and decrypt are more general, and cover scrambling and unscrambling with respect to both codes and ciphers. Figure 7 presents a brief summary of these definitions. In general, I shall keep to these definitions, but when the sense is clear, I might use a term such as 'codebreaking to describe a process that is really 'cipher breaking - the latter phrase might be technically accurate, but the former phrase is widely accepted. I want to use this as a part of [[Runic Concept]] ### TCB Pg. 49 - Vignere Square ![[IMG_6761.jpg]] > To unscramble the message, the intended receiver needs to know which row of the Vigenère square has been used to encipher each letter, so there must be an agreed system of switching between rows. This is achieved by using a keyword. To illustrate how a keyword is used with the Vigenère square to encrypt a short message, let us encipher divert troops to east ridge, using the keyword WHITE. First of all, the keyword is spelt out above the message, and repeated over and over again so that each letter in the message is associated with a letter from the keyword. The ciphertent is then generated as follows. To encrypt the first letter, d, begin by identifying the key letter above it, W, which in turn defines a particular row in the Vigenère square. The row beginning with W, row 22, is the cipher alphabet that will be used to find the substitute letter for the plaintext d. We look to see where the column headed by d intersects the row beginning with W, which turns out to be at the letter Z. Consequently, the letter d in the plaintext is represented by Z in the ciphertext. [[TCB Pg. 49 - Vignere Square]] ### TCB Pg. 64 - Calculations by Steam > These mathematical tables were calculated by hand, and the mistakes were simply the result of human error. This caused Babbage to exclaim, I wish to God these calculations had been executed by steam!' This marked the beginning of an extraordinary endeavor to build a machine capable of faultlessly calculating the tables to a high degree of accuracy. In 1823 Babbage designed 'Difference Engine No. 1', a magnificent calculator consisting of 25,000 precision parts, to be built with government funding. > Although Babbage was a brilliant innovator, he was not a great implemen-ter. After ten years of toil, he abandoned Difference Engine No. 1', cooked up an entirely new design, and set to work building 'Difference Engine No. 2'. > When Babbage abandoned his first machine, the government lost confidence in him and decided to cut its losses by withdrawing from the project - it had already spent £17,470, enough to build a pair of battle-ships. It was probably this withdrawal of support that later prompted Babbage to make the following complaint: 'Propose to an Englishman any principle, or any instrument, however admirable, and you will observe that the whole effort of the English mind is directed to find a difficulty, a defect, or an impossibility in it. If you speak to him of a machine for peeling a potato, he will pronounce it impossible: if you peel a potato with it before his eyes, he will declare it useless, because it will not slice a pineapple.' Babbage might be a mAGI who's job it is to help humanity relearn technologies. ### TCB Pg. 106 - Sun Tzu and the Fist > Sun-Tzu, author of the Art of War, a text on military strategy dating from the fourth century Bc, stated that: Nothing should be as favorably regarded as intelligence; nothing should be as generously rewarded as intelligence; nothing should be as confidential as the work of intelligence.' The French were fervent believers in the words of Sun-Izu, and in addition to honing their cryptanalytic skills they also developed several ancillary techniques for gathering radio intelligence, methods that did not involve decipherment. For example, the French listening posts learned to recognize a radio operator's fist. Once encrypted, a message is sent in Morse code, as a series of dots and dashes, and each operator can be identified by his pauses, the speed of transmission, and the relative lengths of dots and dashes. A fist is the equivalent of a recognizable style of handwriting. ### TCB Pg. 149 - Dark Spirits and Mental Ju-Jitsu > As a mathematician, he(Marian Rejewski) would try to analyze every aspect of the machine's operation, probing the effect of the scramblers and the plugboard cablings. However, as with all mathematics, his work required inspiration as well as logic. As another wartime mathematical cryptanalyst put it, the creative codebreaker must 'perforce commune daily with dark spirits to accomplish his feats of mental ju-jitsu' ### TCB Pg. 202 - Something Magic in Decipherment > Deciphering ancient texts seems an almost hopeless pursuit, yet many men and women have devoted themselves to this arduous enterprise. > Their obsession is driven by the desire to understand the writings of our ancestors, allowing us to speak their words and catch a glimpse of their thoughts and lives. Perhaps this appetite for cracking ancient scripts is best summarized by Maurice Pope, the author of The Story of Decipherment. > 'Decipherments are by far the most glamorous achievements of scholar ship. There is a touch of magic about unknown writing, especially when it comes from the remote past, and a corresponding glory is bound to attach itself to the person who first solves its mystery.' Reminds me of one of my favorite verses: > [!Bible] [Proverbs 25:2 - ESV](https://bolls.life/ESV/20/25/) > 2. It is the glory of God to conceal things, but the glory of kings is to search things out. ### TCB Pg. 204 - Phonograms, Semagrams, and Overmystification > Interest in hieroglyphics was reawakened in the seventeenth century, when Pope Sixtus V reorganised the city of Rome according to a new network of avenues, erecting obelisks brought from Egypt at each inter. section. Scholars attempted to decipher the meanings of the hieroglyphs on the obelisks, but were hindered by a false assumption: nobody was prepared to accept that the hieroglyphs could possibly represent phonetic characters, or phonograms. The idea of phonetic spelling was thought to be too advanced for such an ancient civilisation. Instead, seventeenth-cen-tury scholars were convinced that the hieroglyphs were semagrams - that these intricate characters represented whole ideas, and were nothing more than primitive picture-writing. The belief that hieroglyphics is merely pic-ture-writing was even commonly held by foreigners who visited Egypt while hieroglyphics was still a living script. Diodorus Siculus, a Greek historian of the first century Bc, wrote: > Now it happens that the forms of the Egyptians' letters take the shape of all kinds of living creatures and of the extremities of the human body and of implements ... For their writing does not express the intended idea by a combination of syllables, one with another, but by the outward appearance of what has been copied and by the metaphorical meaning impressed upon the memory by practice... So the hawk symbolises for them everything which happens quickly because this creature is just about the fastest of winged animals. And the idea is transferred, through the appropriate metaphorical transfer, to all swift things and to those things to which speed is appropriate. > In the light of such accounts, perhaps it is not so surprising that seventeenth-century scholars attempted to decipher the hieroglyphs by interpreting each one as a whole idea. For example, in 1652 the German Jesuit priest Athanasius Kircher published a dictionary of allegorical interpretations entitled (Edipus agyptiacus, and used it to produce a series of weird and wonderful translations. A handful of hieroglyphs, which we now know merely represent the name of the pharaoh Apries, were translated by Kircher as: 'the benefits of the divine Osiris are to be procured by means of sacred ceremonies and of the chain of the Genii, in order that the benefits of the Nile may be obtained'. Today Kircher's translations seem ludicrous, but their impact on other would-be decipherers was immense. Kircher was more than just an Egyptologist: he wrote a book on cryptography, constructed a musical fountain, invented the magic lantern (a precursor of cinema), and lowered himself into the crater of Vesuvius, earning himself the title of 'father of vulcanology. The Jesuit priest was widely acknowledged to be the most respected scholar of his age, and consequently his ideas were to influence generations of future Egyptologists. I worry that I'll do this in my study of Hebrew. I don't want to be a Thomas Young who uncovered that hieroglyphs were, in fact, phonograms, and instead of moving forward with revealed knowledge, decided to cling to Hephaestus instead due to the more enjoyable explanation. Thomas Young did perform the first double slit experiment, so he has that going for him. ### TCB Pg. 239 - The Code Breaking > Cryptography is a science of deduction and controlled experiment; hypotheses are formed, tested and often discarded. But the residue which passes the test grows until finally there comes a point when the experimenter feels solid ground beneath his feet: his hypotheses cohere, and fragments of sense emerge from their camouflage. The code breaks'. Perhaps this is best defined as the point when the likely leads appear faster than they can be followed up. > It is like the initiation of a chain-reaction in atomic physics; once the critical threshold is passed, the reaction propagates itself. This feels similar to the passing of the emergence point from Deep Simplicity. [[DS - Pg. 175 - Emergence of Complexity Through Buttons - A Potential Answer to When a Table Becomes a Table]] ### TCB Pg. 256 - God Rewards Fools > Ralph, like us, was willing to be a fool. And the way to get to the top of the heap in terms of developing original research is to be a fool, because only fools keep trying. You have idea number 1, you get excited, and it flops. Then you have idea number 2, you get excited, and it flops. Then you have idea number 99, you get excited, and it flops. Only a fool would be excited by the 100th idea, but it might take 100 ideas before one really pays off. Unless you're foolish enough to be continually excited, you won't have the motiva-tion, you won't have the energy to carry it through. God rewards fools. ### TCB Pg. 324 - Superposition, The Logical Answer > Superpositionists argue along the following lines. If we do not know what a particle is doing, then it is allowed to do everything possible simul. taneously. In the case of the photon, we do not know whether it passed through the left slit or the right slit, so we assume that it passed through both slits simultaneously. Each possibility is called a state, and because the photon fulfils both possibilities it is said to be in a superposition of states. > We know that one photon left the filament and we know that one photon hit the screen on the other side of the partition, but in between it somehow split into two 'ghost photons that passed through both slits. Superposition might sound silly, but at least it explains the striped pattern that results from Young's experiment performed with individual photons. In comparison, the old-fashioned classical view is that the photon must have passed through one of the two slits, and we simply do not know which one - this seems much more sensible than the quantum view, but unfor tunately it cannot explain the observed result. While this has a lot of leaps, it's the Occam's Razor compared to the many-worlds interpretation. ### TCB Pg. 327-329 - How a Quantum Computer Works > Imagine that you have two versions of a question. To answer both questions using an ordinary computer, you would have to input the first version and wait for the answer, then input the second version and wait for the answer. In other words, an ordinary computer can address only one question at a time, and if there are several questions it has to address them sequentially. However, with a quantum computer, the two questions could be combined as a superposition of two states and inputted simultaneously - the machine itself would then enter a superposition of two states, one for each question. Or, according to the many-worlds interpretation, the machine would enter two different universes, and answer each version of the question in a different universe. Regardless of the interpretation, the quantum computer can address two questions at the same time by exploiting the laws of quantum physics. > If the computer takes one second to test each number, then it would have taken 69 seconds to find the answer. In contrast, a quantum computer would find the answer in just 1 second. (Talking about classical computers that solves a problem that requires 128 variations. ) > As before, the numbers would have to be entered one at a time, which we know to be time-consuming. However, if we are dealing with a quantum computer, the operator has an alternative way of inputting numbers which is much faster. Because each particle is fund-mental, it obeys the laws of quantum physics. Hence, when a particle is not being observed it can enter a superposition of states, which means that it is spinning in both directions at the same time, and so is repre senting both 0 and 1 at the same time. Alternatively, we can think of the particle entering two different universes: in one universe it spins eastwards and represents 1, while in the other it spins westwards and represents 0. Solving the same problem with a quantum computer > With all seven particles in a superposition, they effectively represent all possible combinations of eastward and westward spins. The seven particles simultaneously represent 128 different states, or 128 diferent numbers. The operator inputs the seven particles, while they are still in a superposition of states, into the quantum computer, which then performs its calculations as if it were testing all 128 numbers simultaneously. After 1 second the computer outputs the number, 69, which fulfils the requested criterion. The operator gets 128 computations for the price of one. > A quantum computer defies common sense. Ignoring the details for a moment, a quantum computer can be thought of in two different ways, depending on which quantum interpretation you prefer. Some physicists view the quantum computer as a single entity that performs the same calculation simultaneously on 128 numbers. Others view it as 128 entities, each in a separate universe, each performing just one calculation. Quantum computing is Twilight Zone technology. I finally understand quantum computing! I think? ### TCB Pg. App. D - Pigpen Cipher ![[IMG_6779.jpg]]