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 Psychology & Medicine

Security Blanket

In the Peanuts comic strip, the character Linus van Pelt is always seen with his trustworthy security blanket. What is it about a simple blanket that lets certain children feel so safe around it, and why do they become so agitated when it is taken away from them?

Psychologically speaking, the idea of attachment plays a heavy role in the child’s obsession with their security blanket (or any other comfort object, such as a teddy bear).
An infant’s perception of the world is very limited and it cannot understand the concept of “self” until it develops further. In fact, it is theorised that an infant believes that whatever it wishes, the mother (still considered by the infant as “self”) will bring it to it, thus creating an illusion of omnipotence.
When the realisation that there is something other than “me”, the baby becomes frightened. It suddenly understands that the mother and it are not one, but two separate beings. At this point, it loses the sense of omnipotence and realises it is dependent on others, creating a loss of independence.

Losing its independence and a large portion of itself (the mother), the baby becomes confused and anxious, a phenomenon paediatricians call infant’s lament. The baby tries to comfort itself by attaching itself to its first “not-me” possession – such as a blanket or teddy bear, also called a transitional object. This then allows it to be separate from the mother for periods of time. The transitional object is a reminder to the baby that it still has some control over life and some independence, which gives it comfort and allows the baby to sleep better at night (literally).
Thus, the security blanket is aptly named, as it provides the baby with the confidence and security to adapt to the new world, allowing the baby to grow and develop into a social being.

When the baby develops into a child, it develops its own sense of self-confidence so that it can detach from the transitional object. However, some children never detach themselves and the security blanket persists for a longer time. Unfortunately, this is often found socially unacceptable and seen as a sign of weakness.
Interestingly, studies show that these children are often more independent than other children, due to their ability to be less dependent on their parents. The security blanket never criticises or doubts the child’s abilities, therefore gives the child a source of infinite confidence.

Another research by Lucy van Pelt shows that removal of the security blanket from a child results in withdrawal symptoms such as fear, panic, perspiration, glazed eyes and unconsciousness within 50 seconds.