Cryptography Terminology

Cryptography, the study of encryption and decryption techniques.

Cryptanalysis, codebreaking and deciphering ciphertext without the key.

Cryptology, the field of cryptography and cryptology.

Alice, Bob & Eve Framework

Alice sends a message to Bob and Eve (stands for eaves dropper) wants to get the message. Here; there are, classical (e.g. Caesar cipher) and modern processes (e.g. 3-DES) in order to keep the message secret. 

Alice & Bob

Here I’m going to use plaintext (the message) and ciphertext (the encrypted message). Basically, the secrecy process depends on any key K such that; plaintextK = ciphertext and ciphertextK = plaintext, where “⊕” represents the any computation.

Eve (Threat)

Here Eve wants to get the secret message, so in order to keep the secrecy there are two questions need to be answered:

(i) How much does the attacker know about the medium (communication algorithms, protocols etc.)?

(ii) How does the attacker not know about the medium?

Hence, there are two scenarios:

(i) The attacker knows the system, security relies on the secrecy of the keys (system called Kerchoff’s Principle also called Open-Designed or Shannon Maxim).

(ii) The attacker doesn’t know the system due to proprietary and confidential medium (related to history this approach is defenseless) . This process is called Security by Obscurity ( e.g. Steganography relies on this idea) .

Steganographic Image Example:

Computer Laboratory, University of Cambridge.

Steganographic Message Example:

Dear George,
Greetings to all at Oxford. Many thanks for your letter and for the summer examination package  All entry forms and fees forms should be ready  for final despatch to the Syndicate by Friday
20th or at the very latest, I’m told, by the 21st

Alphabet in Cryptography

If you look at any dictionary -definition of alphabet- the first meaning states “A set of letters or other characters with which one or more languages are written especially if arranged in a customary order” and the second meaning states “A system of signs or signals that serve as equivalents for letters”.

Some Alphabet Sets and Sizes

[English: {a, b, c, …, z} size: 26], [Morse Code: {., -} size: 2], [Computer Bits: {1,0} size: 2], [Decimal: {0,1,2, …, 9} size: 10], [Hexadecimal: {0,1,2, … F} size: 12].

Introduction to Symmetric Cryptography: Substitution Cipher

Substitution Cipher is the oldest use of Symmetric Cryptography. In order to generate ciphertext, each alphabet in plaintext is replaced by another alphabet. Earliest known substitution cipher is Caesar Cipher named after Julius Caesar, according to Suetonius (Rome’s most notable historian and biographer as per Google), used it with alphabet shift to protect messages of military significance where amount of shift (x) is the key.

Caesar Cipher with shift (key) 3.

Plaintext: MEET ME LATER Key: 4, Ciphertext: QIIX QI PEXIV.

Plaintext: MEET ME LATER Key: 26, Ciphertext: MEET ME LATER.

Caesar Cipher on English Plaintext

Here, set of possible shifts or keys are {0,1,…,25} and the size of the plaintext alphabet is equal to key size (26). So the possible keys can be expressed as k = 26i + x = x, where i is an integer.

Brief Definition for Modulo Operation

The remainder, when a is divided by n (modulus), is denoted by ” a mod n “, i.e. if a = q *( n+r), for any integer q, r = a mod n.

If (a mod n) = (b mod n), a and b are congruent modulo n, denoted as ” ≡ (mod n) “.

(mod n) operator maps all integers into the set of integers between 0 and n-1, Zn ={0,1,…,(n–1)} is called residue classes.

Caesar Cipher with English Letters

Ciphertext : E(x,Plaintext) = (Plaintext + x ) mod 26, for encryption process.

Plaintext: D(x,Ciphertext) = (Ciphertext – x) mod 26, for decryption process.

Caesar Cipher Limitation

Compared to the B.C. era, of course there is no significant activity today. As mentioned above, the key size is the size of the plaintext alphabet (26, for English Letters). Due to small key size, it is said to be vulnerable against brute force attack.

Mono-Alphabetic Cipher

It’s also another application of the substitution cipher. Here, each plaintext alphabet is assigned to a different unique ciphertext alphabet. Key assigns the mapping for each alphabet, where key is a permutation of alphabet set, n! permutations for n-element set. The possible number of keys is n!, where is the plaintext alphabet size. This system is not vulnerable against brute force attack but cryptanalysis techniques such as letter frequency on the known alphabet is the weak side of the cipher.

English Letter Frequency / Cornell University

Due to above scheme of English letter frequency; letters “E” and “T” are the most frequents, “J”and “Z” are the least frequents. The frequency bias can also occurs in sequence of multiple alphabets, though.Uniform distribution for alphabets (no frequency biases), maximizes the information entropy in alphabets, all alphabets are equally likely and have equal frequency.

Example for Mono-Alphabetic Cipher

Alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ

Key: DKVQFIBJWPESCXHTMYAUOLRGZN where; A to D, B to K, C to V etc.

Plaintext: MEET ME LATER, Ciphertext: CFFUCFSDUFY.

Poly-Alphabetic Cipher

It consists multiple mono-alphabetic cipher substitutions by using a key to define encryption mappings per alphabet. Vigenere cipher is an example of simple poly-alphabetic cipher.

Encryption: C_i = (P_i + k_(i mod m) mod 26, where C and P are ciphertext and plaintext respectively. For instance,

Plaintext: MEET ME LATER, Key: LEMON (m=5)[where #keys = n^m];

Shift by : LEMO NL EMONL, Ciphertext: XIQH ZP PMHRC

One-Time Pad Vigenere Cipher

Here one-time pad states, m needs to be as long as plaintext [≥ (plaintext size)]. For instance,

Key: LEMONISSOUR (m=11), Plaintext: MEET ME LATER;

Shift by: LEMO NI SSOUR, Ciphertext: XIQH ZM DSHYI.

O.S. Tapsin

Resources: https://d3c33hcgiwev3.cloudfront.net/_43a7ab6cf1744c34fe99bec7712b7f69_slides_crypto_overview.pdf?Expires=1564012800&Signature=LVR~y24ZdijrLS74~n1HXxgvY23FAP-BAmMCgsBW6h~2FLu5elSrSedzS151untCVHyd5b9pV9rn~ZXnd0WQdj~Z3N-jVJyMY8o9mgz3cqjAh5Z2M0VCchbCM7No76ELjyh9tHl~3uSQE97hb6Gy3A7tg0CsqP9wv0AGNJ1rCtY_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A by Sang-Yoon Chang, Ph.D. — https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/c/Caesar_cipher.htmhttp://pi.math.cornell.edu/~mec/2003-2004/cryptography/subs/frequencies.htmlhttps://d3c33hcgiwev3.cloudfront.net/7fdfc933e4c346e540bdd2eeefc94f97_slides_classical_cipher_substitution.pdf?Expires=1566777600&Signature=YmrvV5fiZIqL9hHL23ymf4KPpSRto4lOH3p9znZ–JiSiZfaoA4rg-o0IC6xzElH48wVuLU0tIKM0wlAyGwUKSuO-h2IgaPp7ruzWGM6T4L4VxU1k4UFV5O7qfATc5PYbjJwZ68P8dgaF5hIHa4c~kU5tyXCUDRnJLH~VAEP-c4&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A by Sang-Yoon Chang, Ph.D. —

One thought on “I. Cryptography: 101

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s