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:

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.

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.

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

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

28 thoughts on “I. Cryptography: 101”

1. Hola! I’ve been reading your weblog for a long time now and finally got the courage to go ahead and give you a shout out from Huffman Texas! Just wanted to tell you keep up the good work!

Liked by 1 person

2. Long time supporter, and thought I’d drop a comment.

Your wordpress site is very sleek – hope you don’t mind me
asking what theme you’re using? (and don’t mind if I
steal it? :P)

I just launched my site –also built in wordpress like yours– but
the theme slows (!) the site down quite a bit.

Keep up the good work– and hope you all take care
of yourself during the coronavirus scare!

Like

3. Thank you for another fantastic article. The place else
may anybody get that type of information in such a perfect way of
writing? I have a presentation next week, and I am at the search for such info.

Like

4. Excellent post however , I was wanting to know if you could write a litte
more on this subject? I’d be very thankful if you could elaborate a little bit
further. Cheers!

Like

5. I do consider all the ideas you’ve introduced to your post.
They’re very convincing and can definitely work. Still,
the posts are very short for novices. Could you please prolong
them a little from next time? Thank you for the post.

Like

6. Great goods from you, man. I have understand your stuff
previous to and you’re just extremely wonderful. I really like what you have acquired here,
really like what you are stating and the way in which you say it.

You make it enjoyable and you still care for to keep it sensible.
I can not wait to read much more from you. This is really a tremendous site.

Like

7. Добавлю, мне не обидно, я взрослый человек.
Хотелось бы получить инструкцию, что
делать.

Like

1. Я рада, что ты взрослый, хотя я не понимаю, о чем ты.

Like

8. I cherished as much as you’ll obtain performed proper here. The comic strip is tasteful, your authored subject matter stylish. nevertheless, you command get got an shakiness over that you want be turning in the following. sick indubitably come more formerly again as precisely the same nearly a lot frequently inside case you shield this increase.

Like

9. you could have an amazing blog here! would you wish to make some invite posts on my blog?

Like

1. Thank you for comment. We don’t exchange content with other blogs.

Like

10. My brother recommended I might like this blog. He was totally right. This post actually made my day. You can not imagine simply how much time I had spent for this info! Thanks!

Like

11. You made some decent points there. I looked on the internet for the difficulty and located most individuals will go together with along with your website.

Like

12. I’m still learning from you, as I’m trying to reach my goals. I absolutely liked reading everything that is written on your website.Keep the information coming. I loved it!

Like

Like

14. Great post. I was checking continuously this weblog and I am inspired! Extremely helpful info specifically the last section 🙂 I take care of such info much. I used to be looking for this particular info for a long time. Thanks and best of luck.

Like

15. Wonderful website. Plenty of helpful info here. I’m sending it to a few pals ans additionally sharing in delicious. And obviously, thanks in your effort!

Like

16. A formidable share, I simply given this onto a colleague who was doing a little analysis on this. And he in truth bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to debate this, I really feel strongly about it and love studying extra on this topic. If doable, as you turn into experience, would you thoughts updating your blog with more particulars? It’s highly useful for me. Huge thumb up for this weblog submit!

Like

17. Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently rapidly.

Like

18. Hello.This post was extremely fascinating, especially because I was browsing for thoughts on this topic last Friday.

Like

19. I’m not that much of a online reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back later on. Many thanks

Like

20. This is very interesting, You are an overly professional blogger. I’ve joined your feed and look ahead to in search of extra of your excellent post. Also, I’ve shared your web site in my social networks!

Like

21. Quality articles or reviews is the important to be a focus for the users to pay a visit the web site,
that’s what this web site is providing.

Like

22. Somebody essentially lend a hand to make severely posts I might state.
This is the first time I frequented your website page and so far?
I surprised with the analysis you made to make this actual submit incredible.
Wonderful process!

Like

23. Hello there! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized
it’s new to me. Nonetheless, I’m definitely glad I
found it and I’ll be book-marking and checking
back often!

Like

24. Just wish to say your article is as amazing. The clarity in your post is just excellent
and i can assume you are an expert on this subject.
Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post.
Thanks a million and please continue the enjoyable work.

Like

25. I love it whenever people get together and share thoughts.
Great blog, stick with it!

Like