Cryptography

Structures of cryptography

Nitesh Malviya
June 17, 2021 by
Nitesh Malviya

Cryptography is the technique of using mathematics and computation to convert plain text to unintelligible text so only those persons for whom the information is intended can access and read the data. Cryptography not only facilitates the storing and transferring of the data safely across the network but can also be used for authentication. 

With cryptography, only concerned people or legitimate parties can access and decrypt the data, thus maintaining the confidentiality of the data being transmitted and received.

Learn Applied Cryptography

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

Why cryptography?

The foremost important reason to use cryptography is to maintain confidentiality, accuracy and integrity of data. Cryptography makes eavesdropping attacks impossible over the network and it ensures information and data security. 

Cryptography also ensures data is safely stored, and even if it is accessed by a third person, they cannot read the data in plaintext.

Features of cryptography

  • Confidentiality: cryptography assures that the information can be accessed by the intended persons and no other third person can access the information.
  • Integrity: cryptography ensures that the information cannot be modified while it is in storage or transition between the intended sender and receiver.
  • Non-repudiation: cryptography ensures that the owner or sender of the information cannot deny his or her intention to send the data at a later stage.
  • Authentication: cryptography ensures the identities of sender and receiver, thus only authorized persons can access the data.

How cryptography works

Cryptography algorithms make use of encryption and decryption for sending, receiving and storing the data. Since cryptography involves encryption and decryption, let’s see what they are.

  • Encryption: the process of converting plaintext into ciphertext is called encryption. This is done to ensure that the encrypted data cannot be read by anyone while it is being transmitted over the network.
  • Decryption: decryption is the process of converting ciphertext to plaintext. For decryption, the receiver must have the key for decrypting the encrypted data. The key can be a private key or symmetric key, depending upon what cryptographic algorithm is being used.

Private and public keys in cryptography

A key is a bit valued string that is used to convert the plaintext into cipher text and vice-versa. A key can be a word, number or phrase. The key is kept private and secure to ensure no other person can access the key, and it is a fundamental part of cryptography. 

Cryptography makes use of public and private keys. A public key is issued publicly by the organization and is used by the end-user to encrypt the data. The encrypted data, once received by the organization, is decrypted by using a private key and the data is converted to plaintext.

It’s the onus of the organization to store the private key at a safe location. Proper authorization needs to be maintained to ensure only authorized people have access to private keys.

Types of cryptography

Symmetric cryptography

In symmetric cryptography, the sender and recipient of the data use the same key to encrypt and decrypt the data. The sender and receiver must exchange the key with each other over a secure channel to maintain confidentiality.

The following encryption algorithms make use of symmetric encryption: 3DES, AES, DES and RC4.

Asymmetric cryptography

In asymmetric cryptography, the sender and the receiver of the data should use different keys for encrypting and decrypting the data. One of the keys is distributed publicly for encrypting and the other is kept securely for decryption. 

The following encryption algorithms make use of asymmetric encryption: ECC (Elliptic Curve Cryptography), DSA (Digital Signature Algorithm), RSA (Rivest-Shamir-Adleman), El Gamal and Diffie-Hellman.

Hash functions

A hash function takes an arbitrary amount of data as an input and produces a hash of a fixed size. This hash is called a hash value. The hash value is stored and can be later used to verify the user. 

The credentials of the user are hashed and compared to the ones stored in the database. If both matches, then the user is authorized; if not, access is denied. Hash functions are one-way functions and cannot be reversed. Thus, they cannot be decrypted.

Digital signature

A digital signature is a mathematical technique for authentication and verification of software, messages, documents and more. It also provides data integrity and non-repudiation — that is, it prevents the sender from claiming that he or she did not send the information. 

This technique ties a person to digital data, which can be verified by the receiver or by any third party independently. The digital signature is calculated by the data and a secret key known to the signer only.

Utilizing cryptography

Cryptography technology provides us with secure transmission of data between sender and receiver, thus maintaining the confidentiality, authenticity, integrity of the data. Cryptography is an integral part of the digital world and its use and application cannot be ignored.

Learn Applied Cryptography

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

Sources

Introduction to cryptography, AfricaCERT

Cryptography introduction, GeeksforGeeks

An introduction to cryptography, Network Associates

Nitesh Malviya
Nitesh Malviya

Nitesh Malviya is a Security Consultant. He has prior experience in Web Appsec, Mobile Appsec and VAPT. At present he works on IoT, Radio and Cloud Security and open to explore various domains of CyberSecurity. He can be reached on his personal blog - https://nitmalviya03.wordpress.com/ and Linkedin - https://www.linkedin.com/in/nitmalviya03/.