Cryptography overview#


Cryptography is mostly associated with the development and creation of mathematical algorithms, which are used to insure various security aspects See 12. It is the cornerstone of modern communications security and is based on various mathematical concepts and theories such as: number theory, computational complexity theory and probability theory 3. The following post provides a quick overview of various cryptography concepts such as encryption, decryption and hashing.

Types of cryptography algorithms#

Cryptography algorithms can be classified according to various criteria 3. One can distinguish them, according to the number of their deployed keys, which results in the following three categories:

  • Secret Key Cryptography (SKC): or “Symmetric encryption”, uses one single shared key for both encryption and decryption to provide privacy and confidentiality 31.

  • Public Key Cryptography (PKC): or “Asymmetric encryption” uses one keys couple: A public key for encryption and a private key for decryption 3. It is essentially used for authentication, non-repudiation, and key exchange 1.

  • Hash Functions: Irreversible mathematical transformations that generates a checksum/a digital fingerprint used for checking the data integrity or none-corruptness 3.

Encryption vs Hashing#

Encryption transforms a plain-text into something unintelligible called cipher-text using a key. The essential thing about encryption is that it is reversible 2. A unique cipher-text & plain-text couple can be determined using encryption, decryption and a key. Encryption is used essentially in confidentiality. For example, in an electronic exchange, you encrypt messages to prevent a third party lacking the key from reading the messages 4.

Hashing, unlike encryption, transforms the input data into a (usually fixed length) sequence of characters often called checksum/hash-sum or a tag. Moreover, hashing is a one-way operation that does not require a key and so the quality of a hashing algorithm depends on the uniqueness of the generated hashes. Two different messages with the same hash values are a case of “collision”. Hashing is used to maintain data integrity 4. For example, if a hash sum is generated based on a message text, any future changes on the text would be detected due the mismatch between the previously generated hash and the current one.

Encryption and Decryption#

Encryption transforms a plain-text into a cipher-text using an encryption key. The process of reversing this operation uses also a key and is called "decryption" 3. These operations can be explained by the following formulas: \(C=E_{k}(P)\) and \(P=D_{k}(C)\), where P = plain-text, C = cipher-text, E = the encryption method, D = the decryption method, and k = the key 3. There exist several types of encryption (symmetric/asymmetric) and several ciphering techniques (block/stream) and modes etc 3. The major differences between those will be explained in the following post Encryption overview.

A summary of cryptography algorithms#

There are several practical implementations and algorithms of the aforementioned concepts. Some of these are widely used standards defined by the National Institute of Standards and Technology (NIST) such the Advanced Encryption Standard (AES) and the Secure Hashing Algorithm (SHA) etc. The most known algorithms are summarized below:


    Cryptographic algorithms
    • Symmetric encryption
      • Block cipher
        • AES
        • DES
        • Twofish
        • Blowfish
      • Stream cipher
        • RC4
        • ChaCha
    • Asymmetric encryption
      • RSA
      • ECC
    • Hashing functions
      • RSA
      • ECC
Figure 1: Cryptographic algorithms

Share this blog#

Updated on 18 April 2022

👨‍💻 edited and review were on 08.04.202

References and Further readings#

1(1,2,3)

Abdel-Karim Al Tamimi. Performance Analysis of Data Encryption Algorithms. 2006.

2(1,2)

Madhura Oak. Symmetric Cryptography. https://madhuraoakblog.wordpress.com/2014/06/29/symmetric-cryptography/, 05.01.2018.

3(1,2,3,4,5,6,7,8)

Gary C. Kessler. An Overview of Cryptography. 2017.

4(1,2)

ssl2buy. Difference Between Hashing and Encryption. https://www.ssl2buy.com/wiki/difference-between-hashing-and-encryption, 05.01.2018.