Posted in History & Literature

Morse Code

In 1825, an artist by the name of Samuel Morse was travelling to a city far from his home to paint a commission. While working on his painting, he received a letter from his father, which informed Samuel that his wife was ill with an infection. The next day, another letter came, but this time detailing his wife’s sudden death. Upon receiving the letter, Morse immediately returned to his home as fast as possible, but he arrived after they had already buried his wife. This was the age before fast long-distance communication, where messages could only be sent as fast as the horses that carried them.

Frustrated by the inefficient communication methods of his time, Morse became dedicated to devising a better way to send messages over long distance at a much faster speed. After intensive studying of electromagnetism, Morse eventually developed the first concept of a single-wire telegraph. The telegraph could send electrical signals of variable length at fast speeds down wires with a simple button.

Together with the telegraph, Morse devised a code alphabet so that messages could be sent encoded into short and long signals on the telegraph. A dot (“dit”) represents a short press, a dash (“dah”) represents a long press (three times longer than a short press). Each letter is separated by a space the length of 3 dots. Words would be spaced out by a slightly longer pause – the length of 7 dots. Morse designed the code to be efficient and so he made the most common letters (E, I, S, T and so forth) the shortest in length.


Posted in Life & Happiness

Point Of View

Sometimes, we make a mistake while talking to someone and say something to offend them. But what is worse than accidentally doing so is not understanding why they were offended, or why they are suddenly angry at you. Everyone’s life is as unique as their fingerprints, with different experiences leading to the forming of different values. If you do not consider someone’s point of view, what may appear harmless to you may end up being a hurtful comment for the other person.

Even when the message was not particularly offensive, not taking a person’s point of view in consideration can lead to an uncomfortable moment. For example, imagine that you were giving someone a friendly advice when they suddenly turned angry and walked away. If you were to come to me and ask why the person became angry, I could reply in two ways. If I said “Well no surprises there, you clearly didn’t consider their feelings and she had a right to be angry”, you would probably feel quite down. The reason being, you were reaching out with a genuine desire to help, but it ended up with you feeling as if you hurt that person instead. No matter how good your intentions were, the way you say it and the way the other person hears it can turn it into an insult.

Let us use an analogy to make the above lesson easier. Now, let us imagine that I suddenly threw a candy at you with no warning. You will probably be surprised and not catch the candy, letting it drop to the ground. Even though what I threw at you was a sweet candy, throwing it at you when you were not ready just made that candy fall so no one could eat it. Even worse, I might have accidentally thrown it too high and hit your face. Like so, if I throw something at a time I judge to be right, the other person will find it difficult to catch it. But if I was to ask you “Are you ready?” first, then you would find it much easier to catch the candy. The key is to say something when the other person is ready, and in a way that they could accept.

No matter how good your intentions may be, first consider whether the person is prepared to receive that message. Thinking before you speak, being considerate of others and respecting their points of view will quickly make you a beloved friend who everyone wants to talk to.


Posted in History & Literature

Spelling Alphabet

One weakness with the English alphabet is that when they are spelt out aloud, some letters are too similar and end up being confused. For example, B sounds like D and M sounds like N. Although this is not too major an issue in normal life, it becomes very problematic when giving important information over the phone, such as an identification number. The same problem applies in the military where precise orders are required. To overcome the issue of similar-sounding letters, many systems have been developed to replace the letters with words when spelling words aloud over the phone or radio. For example, if the ID number EFS9201 has to be told to the other person, it can be read as “echo-foxtrot-sierra-nine-two-zero-one”. It is also used in the military to say abbreviations, such as “oscar mike” for “on the move”. As the spelling alphabet system is designed so that no two words sound similar, it is a very effective way of accurately transmitting information over the phone.

The spelling alphabet (NATO phonetic alphabet) is as follows:


Posted in Science & Nature

Cryptography: Vigenere Cipher

It has thus been proven that the Caesar cipher, the pigpen cipher and any substitution cipher can be simply broken using frequency analysis. The basis for this is that each letter or symbol can only represent a single letter, meaning that letter frequencies (e, t, a, o…) are directly translated onto the cipher language. Ergo, by making each letter represent more than one letter, the letter frequencies can be masked and an additional level of security can be added to the cipher. This is called polyalphabetic substitution and it is the basis for a type of cipher known as the Vigenère cipher.

The cipher was first conceived in 1553 by Giovan Battista Bellaso and has been improved since. It is famous for being rather simple to use despite the difficult to decipher it at a beginner’s level. This trait earned the cipher the nickname “le chiffre indéchiffrable”, which is French for “the indecipherable cipher”.

The Vigenère cipher can be thought of a stack of Caesar ciphers (essentially a cipher within a cipher), where each letter is shifted by a variable key (in a normal Caesar shift, every letter is shifted by the same key). This is achieved by the implementation of a keyword and a table called a tabula recta. A tabula recta is simply a grid made from 26 rows of the alphabet, each row of which is made by shifting the previous one to the left. This table essentially shows all the possible outcomes of a Caesar shift.

Now, let us try encoding a message using the Vigenère cipher. The message “attack at dawn” is encoded using the keyword “nothing”. Ideally, there should be no repeating letters in the keyword for the sake of security. Therefore, if there are any repeating letters, just remove the repeated letters (e.g. “crocodile” -> “crodile”). First, repeat the keyword until it matches the number of letters of the message (e.g. “attackatdawn” is aligned with “nothingnothi”). Then, use the tabula recta to encrypt the message. The rule of thumb is “key-row, message-column”, meaning that the row of the tabula recta starting with the letter of the key is matched against the column starting with the respective letter of the message. To take the first letter as an example, the key letter is “n” and the message letter is “a”. The letter corresponding to where the “n” row and “a” column meets is “N”. If this rule is followed for each letter, the encrypted message becomes: “NHMHKXGGRTDV”. Although it takes some effort to find each letter on the table, the message becomes “indecipherable” to a beginner cryptanalyst as frequency analysis becomes useless. For example, the repeating letter “H” can represent either “t” or “a”. The longer the keyword is, the more secure the Vigenère cipher becomes.

However, the Vigenère cipher is not indecipherable. Next, we will look at a cryptanalysis method called the Kasiski examination that attacks a polyalphabetic cipher such as the Vigenère cipher to gain access to the keyword.

Posted in Science & Nature

Cryptography: Pigpen Cipher

Another well-known substitution cipher is the “pigpen cipher” or “Freemason’s cipher”. As the name suggests, it was often used by Freemasons to encrypt their messages. However, as time has passed, it has become so well-known that it is not a very secure cipher at all.

The pigpen cipher does not substitute the letter for another letter, but instead uses a symbol that is derived from a grid-shaped key. The key is made of two 3×3 grids (#)(one without dots, one with dots) and two 2×2 grids (X)(one without dots, one with dots). The letters are filled in systematically so that each shape represents a certain letter (e.g. v=s, >=t, <=u, ^=v)

The cipher has many variations that attempt to throw off an attacker by rearranging the order of the grids or the letters. Thus, even if a cunning attacker picks up on the fact that the cipher is a pigpen cipher, they may use the wrong key and get a completely wrong message. Nonetheless, it is a useful skill to recognise the unique symbols of the pigpen cipher as it is a popular cipher used commonly in puzzles.

As with any substitution ciphers, frequency analysis and pattern recognition is the key to cracking the pigpen cipher.