Posted in Science & Nature

## Cryptography: Book Cipher

So far, the three ciphers introduced could all easily be cracked using frequency analysis and the Kasiski examination. Is there a cipher that is easy to implement yet difficult to break for a beginner cryptanalyst? An extremely popular and surprisingly powerful cipher is the book cipher. Essentially, the book cipher replaces a keyword with an entire book. Instead of replacing a letter for a letter or symbol in a systematic and mathematical way (such as a set shift number or using a tabula recta), the book cipher replaces letters for numbers that refer to a certain text within a book. As the only way to decode the message is to have the book, it is an extremely secure way of enciphering a message given that both parties have an identical copy of the book.

There are many variations of the book cipher. The most popular type is giving a page number, with the first letter of the page being the plaintext. A variant of this is giving a set of three numbers for every letter: the page number, the line number and the word number (or just two: page and line, then take the first letter). Ironically, this may be less secure at times as it may reveal that it is a book cipher. However, doing this for each letter makes the enciphering and deciphering process incredibly long and arduous.

A shortcut method is to refer to a word within a page (using the three-number set coordinates method described above) to shorten the ciphertext. Although this method is much easier in practice, it poses the challenge of finding a book that includes all the words in the plaintext, which may be difficult if the code is for military or espionage purposes.

Because of this, and the fact that both parties (or everyone in the ring) need identical versions of the book while not standing out too much, the most common books used are the dictionary (typically a famous version such as the Oxford Dictionary) or the bible (again, a standard version is used). These books are not only good because they incorporate a massive vocabulary, but they are also inconspicuous while being carried around in an enemy territory.

The book cipher is a very difficult code to crack for most people without advanced cryptanalysis training. Thus, the easiest way to crack is to deduce what book is the keytext. There are numerous ways to do this, but one way would be to cross-match the books of two known spies until common books are found. In the setting of spies in a foreign country, a book such as a traveller’s guide or phrasebook dictionary can be considered a likely target as it can be carried around easily while containing many words. Ergo, the secret behind cracking the book cipher is less about cryptography and more about using the science of deduction.

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.

Posted in History & Literature

## Thirty-Six Stratagems: Chapter 6 – Desperate Stratagems

Desperate Stratagems are last resort tactics that can be used when you are placed in a disadvantageous state or risk losing the war.

Stratagem 31: No weapon could beat seduction
This is the strategy where you use a beautiful woman to tempt the enemy to extract information or undermine their will to fight. It is a deadly strategy that never fails.

Stratagem 32: Empty fort strategy
Purposefully empty your fort to show the enemy that you are defenceless, causing them to think that it is a trap and retreat. It was effectively used by Zhuge Liang in The Three Kingdoms.

Stratagem 33: Countermine the enemy’s spy
Use the enemy’s spy to spread false information or use them as a double agent that can extract the enemy’s intelligence. The “double spies” and “dead spies” from Sun Tzu’s The Art of War fit under this stratagem.

Stratagem 34: Sacrifice yourself to comfort the enemy
Inflict injury on yourself to win the enemy’s trust. For victory, you may have to sacrifice even the dearest things such as your wife or most loyal servant.

Stratagem 35: Chain stratagems
This is an elaborate strategy where you first restrict the enemy’s movement then make use of a series of tactics one by one to decimate the enemy. The most famous example is from The Three Kingdoms in the Battle of Red Cliffs. All of the ships of Wei were linked by chains and could not move freely, making them vulnerable to a fire and causing Cao Cao to lose the battle in an instant.

Stratagem 36: If all else fails, retreat
It is often misquoted as “retreat is the best option”. The Thirty-Six Stratagems explain that retreating is not the most ideal option, but if there is no chance of winning and the cost will be too much, it is wiser to retreat then fight again after reinforcing your forces. Knowing to retreat when you are disadvantaged and the cost is too high is true wisdom.

By utilising these thirty-six stratagems wisely, you will be able to win no matter what situation strikes. Remember: life is a fierce battlefield and without effective strategies and tactics you cannot seize victory.

Posted in History & Literature

## Spy

Ancient Chinese military strategist Sun Tzu dealt with the topic of spies extensively in his book The Art of War. He believed that information and intelligence determined the flow of war and spies were a vital element. Sun Tzu talked about five types of spies.

• Local spies (鄕間): Use the enemy’s people
• Internal spies (內間): Use the enemy’s officials (like a resident spy)
• Double spies (反間): Use the enemy’s spies to feed the wrong information
• Dead spies (死間): Has a possibility of betraying, so use them to spread misinformation, leading the enemy to persecute them
• Living spies (生間): Use agents that can gather intelligence and return safely back to report their findings, the most useful type of spies