Principles of Cryptography: Symmetric Key and Public Key
Cryptography is a science of secrecy which secures communication, so that an intruder can't gain information. Symmetric and Asymmetric Key (Secret Key and Public Key) both are the means to prohibit the intruder to access the potential information.
Summary
Cryptography is a science of secrecy which secures communication, so that an intruder can't gain information. Symmetric and Asymmetric Key (Secret Key and Public Key) both are the means to prohibit the intruder to access the potential information.
Things to Remember
- Cryptography secures the potential information
- Both Symmetric and Asymmetric Key uses special key to encrypt
- Without the key decryption is impossible
MCQs
No MCQs found.
Subjective Questions
No subjective questions found.
Videos
No videos found.

Principles of Cryptography: Symmetric Key and Public Key
Principles of Cryptography
Cryptography is a science of secrecy which allows a sender to disguise data for secure communication so that an intruder can't gain information from the intercepted data. The receiver, of course, must be able to recover the original data from the disguised data. Some important terminologies used in cryptography are:
Plaintext /clear text: original form of data
Cipher (code) text: encrypted or disguised data
Key: Secret information to encrypt or decrypt data
Cryptography software and/or hardware devices use mathematical formulas (algorithms) to change text from one form to another. It is the technique in protecting integrity or secrecy of electronic messages by converting them into unreadable (cipher text) form.
Symmetric Key Cryptography (Secret Key)
In Symmetric key cryptography, both sender and receiver share a single secret key for encryption and decryption. The caliper text has almost the same size as the original message and built on a secret or some random unpredictable data.The strength mostly depends on the key length and encryption of large files is faster and efficient.

-
- Caesar cipher
For English text, substitution of the letter in plaintext message is done by a letter that is k position behind that letter. If k=2, then "I am a student" would be "k co c UV FG PV" in cipher text. While the ciphertext looks like nonsense, it wouldn't take long to break the code if you knew that the Caesar cipher was being Used, as there are only 25 possible key values. It is easier to break if you know that cipher text is used to disguise data.
- Monoalphabetic Cipher
In monoalphabetic cipher, substitution of one letter in plaintext message is done by another letter, but not following the regular pattern as Caesar cipher, as long as each letter has a unique substitution.
plaintext: abcdefghijklmnopqrstuvwxyz
ciphertext: mnbvcxzasdfghjkipoiuytrewqFor example, Plaintext: boby, love you, angle
Cipher text: nkn, s gktcwky, mgsbc
A monoalphabetic cipher would also appear to be better than the Caesar cipher in that there are On the order of 1026 possible pairings of the letter rather than 25 possible pairings. This cipher also can be broken if you apply statistical analysis such as occurrences of letters in plaintext language (as in English plaintext, "e" and "t" are the most frequently occurring letters accounting 13 percent and 9 percent respectively), pairing of letter often together such as "in", "it", "the", "ion", "ing" etc.
- Polyalphabetic Encryption: The idea behind polyalphabetic encryption is to use multiple monoalphabetic or Caesar ciphers, with specific cipher to encode a letter in a specific position in plaintext message. For example, if two different Caesar cipher (with k=2 and k=5), as shown below, one might choose to use these ciphers C1 and C2, in the repeating pattern of C1, C2, C1 i.e. first letter of plaintext is to be encoded using C1, the second using C2, and third using C1 and fourth using again C1 by repeating pattern.
Plaintext: a m s t u d e n
C1 (k=2):k c o u v w f g p
C2 (k=5):n f r x y z i j s
Then plaintext message “I am a Student "is encrypted as "k fo c xvwigpy" using C1C2C1 pattern. Here encryption and decryption keys are knowledge of two Caesar keys k=3 and k=5 as well as pattern C1C2C1.
Asymmetric Key Cryptography (Public Key)

Asymmetric Key Cryptography principle uses two keys:
- Public encryption key (e)
- Private decryption key (d)
In Asymmetric Key Cryptography principle whenever the value 'e' is known encryption easy and any messages can easily encrypt.Likewisedecryption very hard, complex when d is not known (this is regarded as a key of decryption).Decryption easy when d is known.The most famous Asymmetric Key Cryptography principle algorithm is RSA.
Data Encryption Standard (DES)
DES is the block cipher — an algorithm that takes a fixed-length string of plaintext bits and transforms it through a series of complicated operations into another ciphertext bitstring of the same length. In the case of DES, the block size is 64 bits. DES also uses a key to customizing the transformation, so that decryption can supposedly only be performed by those who know the particular key used to encrypt. The key ostensibly consists of 64 bits; however, only 56 of these are actually used by the algorithm. Eight bits are used solely for checking parity and are thereafter discarded. Hence, the effective key length is 56 bits, and it is always quoted as such. Every 8th bit of the selected key is discarded, that is, positions 8, 16, 24, 32, 40, 48, 56, 64 are removed from the 64-bit key leaving behind only the 56-bit key

The operation of one of these intermediate stages is illustrated in (b). Each stage takes two 32-bit inputs and produces two 32-bit outputs. The left output is simply a copy of the right input. The right output is the bitwise XOR of the left input and a function of the right input and the key for this stage, Ki. All the complexity lies in this function. The function consists of four steps, carried out in sequence. First, a 48-bit number, E, is constructed by expanding the 32-bit Ri-1 according to a fixed transposition and duplication rule. Second, E and Ki are XORed together. This output is then partitioned into eight groups of 6 bits each, each of which is fed into a different S-box. Each of the 64 possible inputs to an S-box is mapped onto a 4-bit output. Finally, these 8 x 4 bits are passed through a P-box.
In each of the 16 iterations, a different key is used. Before the algorithm starts, a 56-bit transposition is applied to the key. Just before each iteration, the key is partitioned into two 28-bit units, each of which is rotated left by a number of bits’ dependent on the iteration number. Ki is derived from this rotated key by applying yet another 56-bit transposition to it. A different 48-bit subset of the 56 bits is extracted and permuted on each round.

References:
- A.S. Tanenbaum, “Computer Networks”, 3rd Edition, Prentice Hall India, 1997.
- W. Stallings, “Data and Computer Communication”, Macmillan Press, 1989.
- Kurose Ross, “Computer Networking: A top-down approach”, 2nd Edition, Pearson Education
- Larry L. Peterson, Bruce S. Davie, “Computer Networks: A Systems Approach”, 3rd Edition, Morgan Kaufmann Publishers
Lesson
Network Security
Subject
Computer Engineering
Grade
Engineering
Recent Notes
No recent notes.
Related Notes
No related notes.