The Wayback Machine - https://web.archive.org/web/20240702184346/https://www.geeksforgeeks.org/traditional-symmetric-ciphers/
Open In App

Traditional Symmetric Ciphers

Last Updated : 14 Oct, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The two types of traditional symmetric ciphers are Substitution Cipher and Transposition Cipher. The following flowchart categories the traditional ciphers:

1. Substitution Cipher:
Substitution Ciphers are further divided into Mono-alphabetic Cipher and Poly-alphabetic Cipher.

First, let’s study about mono-alphabetic cipher.

  1. Mono-alphabetic Cipher –
    In mono-alphabetic ciphers, each symbol in plain-text (eg; ‘o’ in ‘follow’) is mapped to one cipher-text symbol. No matter how many times a symbol occurs in the plain-text, it will correspond to the same cipher-text symbol. For example, if the plain-text is ‘follow’ and the mapping is :

    • f -> g
    • o -> p
    • l -> m
    • w -> x

    The cipher-text is ‘gpmmpx’.

    Types of mono-alphabetic ciphers are:

    (a). Additive Cipher (Shift Cipher / Caesar Cipher) –
    The simplest mono-alphabetic cipher is additive cipher. It is also referred to as ‘Shift Cipher’ or ‘Caesar Cipher’. As the name suggests, ‘addition modulus 2’ operation is performed on the plain-text to obtain a cipher-text.

    C = (M + k) mod n
    M = (C – k) mod n

    where,
    C -> cipher-text
    M -> message/plain-text
    k -> key

    The key space is 26. Thus, it is not very secure. It can be broken by brute-force attack.
    For more information and implementation see Caesar Cipher

    (b). Multiplicative Cipher –
    The multiplicative cipher is similar to additive cipher except the fact that the key bit is multiplied to the plain-text symbol during encryption. Likewise, the cipher-text is multiplied by the multiplicative inverse of key for decryption to obtain back the plain-text.

    C = (M * k) mod n
    M = (C * k-1) mod n

    where,
    k-1 -> multiplicative inverse of k (key)

    The key space of multiplicative cipher is 12. Thus, it is also not very secure.

    (c). Affine Cipher –
    The affine cipher is a combination of additive cipher and multiplicative cipher. The key space is 26 * 12 (key space of additive * key space of multiplicative) i.e. 312. It is relatively secure than the above two as the key space is larger.
    Here two keys k1 and k2 are used.

    C = [(M * k1) + k2] mod n
    M = [(C – k2) * k1-1 ] mod n

    For more information and implementation, see Affine Cipher

    Now, let’s study about poly-alphabetic cipher.

  2. Poly-alphabetic Cipher –
    In poly-alphabetic ciphers, every symbol in plain-text is mapped to a different cipher-text symbol regardless of its occurrence. Every different occurrence of a symbol has different mapping to a cipher-text. For example, in the plain-text ‘follow’, the mapping is :

    f -> q
    o -> w
    l -> e
    l -> r
    o -> t
    w -> y

    Thus, the cipher text is ‘qwerty’.

    Types of poly-alphabetic ciphers are:

2. Transposition Cipher:
The transposition cipher does not deal with substitution of one symbol with another. It focuses on changing the position of the symbol in the plain-text. A symbol in the first position in plain-text may occur in fifth position in cipher-text.

Two of the transposition ciphers are:

  1. Columnar Transposition Cipher –
    For information and implementation, see Columnar Transposition Cipher
  2. Rail-Fence Cipher –
    For information and implementation, see Rail-Fence Cipher

Previous Article
Next Article

Similar Reads

Autokey Cipher | Symmetric Ciphers
Autokey Cipher is a polyalphabetic substitution cipher. It is closely related to the Vigenere cipher but uses a different method of generating the key. It was invented by Blaise de Vigenère in 1586. In general, more secure than the Vigenere cipher. Example-1: Plaintext = "HELLO" Autokey = N Ciphertext = "ULPWZ" Example-2: Plaintext = "GEEKSFORGEEKS
4 min read
Difference between AES and DES ciphers
What is AES? It stands for Advanced Encryption Standard, developed in 2001. As triple-DES was found to be slow, AES was created and is six times faster than the triple DES. It is one of the most widely used symmetric block cipher algorithm used nowadays. It works on bytes rather than bits. What is DES? It stands for Data Encryption Standard, develo
2 min read
Stream Ciphers
In stream cipher, one byte is encrypted at a time while in block cipher ~128 bits are encrypted at a time. Initially, a key(k) will be supplied as input to pseudorandom bit generator and then it produces a random 8-bit output which is treated as keystream. The resulted keystream will be of size 1 byte, i.e., 8 bits. Stream ciphers are fast because
4 min read
Traditional TCP
Transmission Control Protocol (TCP) is the transport layer protocol that serves as an interface between client and server. The TCP/IP protocol is used to transfer the data packets between transport layer and network layer. Transport protocol is mainly designed for fixed end systems and fixed, wired networks. In simple terms, the traditional TCP is
4 min read
Difference between Next Generation Network and Traditional Network
1. Next Generation Network : In short Next Generation Network is termed as NGN which is packet based network used for both telephony and data. It uses multiple broadband and Quality of Services (QoS) enabled transport technologies to establish advance communication system. NGN can handle multiple type of services/traffic such as voice, audio, video
5 min read
Difference between Traditional Firewall and Next Generation Firewall
Prerequisite - Introduction to firewall in computer network and Types of Firewall 1. Traditional Firewall : A traditional firewall is network security device which typically provides stateful inspection of network traffic that entering or exiting point inside network based on state, port, and protocol. So in simple traditional firewall mainly contr
3 min read
Difference between Traditional WAN and SD WAN
Prerequisite - Local Area Network & Wide Area Network 1. Traditional WAN : Traditional network is based on completely hardware network devices which mostly rely on Multi Protocol Label Switching (MPLS) for resilient and efficient network traffic flow. Number of hardware devices are installed along with proprietary circuits to route IP services
5 min read
Difference between Software Defined Network and Traditional Network
1. Software Defined Network (SDN) : SDN stands for Software Defined Network which is networking architecture approach. It enables the control and management of network using software applications. Through Software Defined Network (SDN) networking behavior of entire network and its devices are programmed in centrally controlled manner through softwa
5 min read
Difference between Traditional Data Center and Software Defined Data Center
Before jumping into Software Defined Data Centre (SDDC), let us understand what is the data center and its importance. The data center is well-known for storing data in a dedicated facility. Data is digitally stored and elements such as storage facilities, servers, computers, firewalls, and balancers are connected with it. There is a tremendous nee
3 min read
Fernet (symmetric encryption) using Cryptography module in Python
Cryptography is the practice of securing useful information while transmitting from one computer to another or storing data on a computer. Cryptography deals with the encryption of plaintext into ciphertext and decryption of ciphertext into plaintext. Python supports a cryptography package that helps us encrypt and decrypt data. The fernet module o
3 min read