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. —

30 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. 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

  5. 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

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

    Like

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. I would taking into account to thank you for the efforts youve put in penning this blog. I in reality hope to view the similar high-grade content from you forward-looking on as well. In truth, your creative writing abilities has goaded me to acquire my own, personal blog now

    Like

  15. Excerllent goods from you, man. I’ve understand your stff previous too and you
    aare ust too fantastic. I actually ike wyat you’ve accquired here, certainly loke whzt you’re stating
    and tthe wayy iin which yoou say it. You make it entertaining andd yoou still tae carre
    of to kesp itt smart. I caan not wait tto read farr
    more from you. Thiss is actually a grest site.

    Like

Leave a comment