Cryptography
Cryptography refers to the science and art of transforming messages to make them
secure and immune to attacks. It is a method of storing and transmitting data in a
particular form so that only those for whom it is intended can read and process it.
Cryptography not only protects data from theft or alteration but can also be used
for user authentication.
The prefix “crypt” means “hidden” and the suffix “graphy” means “writing”. In
Cryptography, the techniques that are used to protect information are obtained
from mathematical concepts and a set of rule-based calculations known as
algorithms to convert messages in ways that make it hard to decode them. These
algorithms are used for cryptographic key generation, digital signing, and
verification to protect data privacy, web browsing on the internet and to protect
confidential transactions such as credit card and debit card transactions.
Features of Cryptography
Confidentiality: Information can only be accessed by the person for whom
it is intended and no other person except him can access it.
Integrity: Information cannot be modified in storage or transition between
sender and intended receiver without any addition to information being
detected.
Non-repudiation: The creator/sender of information cannot deny his
intention to send information at a later stage.
Authentication: The identities of the sender and receiver are confirmed. As
well destination/origin of the information is confirmed.
Interoperability: Cryptography allows for secure communication between
different systems and platforms.
Adaptability: Cryptography continuously evolves to stay ahead of security
threats and technological advancements.
Types of Cryptography
1) Symmetric Key Cryptography
It is an encryption system where the sender and receiver of a message use a single
common key to encrypt and decrypt messages. Symmetric Key cryptography is
faster and simpler but the problem is that the sender and receiver have to somehow
exchange keys securely. The most popular symmetric key cryptography systems
are Data Encryption Systems (DES) and Advanced Encryption Systems (AES) .
2) Asymmetric Key Cryptography
In Asymmetric Key Cryptography, a pair of keys is used to encrypt and decrypt
information. A sender’s public key is used for encryption and a receiver’s private
key is used for decryption. Public keys and Private keys are different. Even if the
public key is known by everyone the intended receiver can only decode it because
he alone knows his private key. The most popular asymmetric key cryptography
algorithm is the RSA algorithm.
3) Hash Functions
There is no usage of any key in this algorithm. A hash value with a fixed length is
calculated as per the plain text which makes it impossible for the contents of plain
text to be recovered. Many operating systems use hash functions to encrypt
passwords.
Types of Cryptography Algorithm
Advanced Encryption Standard (AES): AES (Advanced Encryption Standard) is
a popular encryption algorithm which uses the same key for encryption and
decryption It is a symmetric block cipher algorithm with block size of 128 bits, 192
bits or 256 bits. AES algorithm is widely regarded as the replacement of DES
(Data encryption standard) algorithm.
Data Encryption Standard (DES): DES (Data encryption standard) is an older
encryption algorithm that is used to convert 64-bit plaintext data into 48-bit
encrypted ciphertext. It uses symmetric keys (which means same key for
encryption and decryption). It is kind of old by today’s standard but can be used as
a basic building block for learning newer encryption algorithms.
RSA: RSA is an basic asymmetric cryptographic algorithm which uses two
different keys for encryption. The RSA algorithm works on a block cipher concept
that converts plain text into cipher text and vice versa.
Secure Hash Algorithm (SHA): SHA is used to generate unique fixed-length
digital fingerprints of input data known as hashes. SHA variations such as SHA-
2 and SHA-3 are commonly used to ensure data integrity and authenticity. The
tiniest change in input data drastically modifies the hash output, indicating a loss of
integrity. Hashing is the process of storing key value pairs with the help of a hash
function into a hash table.
Applications of Cryptography
I. Computer passwords
Cryptography is widely utilized in computer security, particularly when
creating and maintaining passwords. When a user logs in, their password is
hashed and compared to the hash that was previously stored. Passwords are
hashed and encrypted before being stored. In this technique, the passwords
are encrypted so that even if a hacker gains access to the password database,
they cannot read the passwords.
II. Digital Currencies
To protect transactions and prevent fraud, digital currencies like Bitcoin also
use cryptography. Complex algorithms and cryptographic keys are used to
safeguard transactions, making it nearly hard to tamper with or forge the
transactions.
III. Secure web browsing
Online browsing security is provided by the use of cryptography, which
shields users from eavesdropping and man-in-the-middle assaults. Public
key cryptography is used by the Secure Sockets Layer (SSL) and Transport
Layer Security (TLS) protocols to encrypt data sent between the web server
and the client, establishing a secure channel for communication.
IV. Electronic Signatures
Electronic signatures serve as the digital equivalent of a handwritten
signature and are used to sign documents. Digital signatures are created
using cryptography and can be validated using public key cryptography. In
many nations, electronic signatures are enforceable by law, and their use is
expanding quickly.
V. Authentication
Cryptography is used for authentication in many different situations, such as
when accessing a bank account, logging into a computer, or using a secure
network. Cryptographic methods are employed by authentication protocols
to confirm the user’s identity and confirm that they have the required access
rights to the resource.
VI. Cryptocurrencies
Cryptography is heavily used by cryptocurrencies like Bitcoin and Ethereum
to protect transactions, thwart fraud, and maintain the network’s integrity.
Complex algorithms and cryptographic keys are used to safeguard
transactions, making it nearly hard to tamper with or forge the transactions.
VII. End-to-end Internet Encryption
End-to-end encryption is used to protect two-way communications like
video conversations, instant messages, and email. Even if the message is
encrypted, it assures that only the intended receivers can read the
message. End-to-end encryption is widely used in communication apps like
WhatsApp and Signal, and it provides a high level of security and privacy
for users.