Cryptography
Cryptography
Cryptography
Theory
Ethical Hacking
Cryptography
Cryptography is a process of converting plain text data (readable) into
ciphertext (unreadable) data to protect confidentiality so that unauthorized users
cannot understand what is transmitted. Encryption algorithms are used to perform
mathematical computation on data using the key and convert data to ciphertext.
The algorithm that is chosen to perform encryption with some key can also be used
for decryption. Decryption is the process of converting ciphertext to plaintext.
Encryption is a reversible operation, i.e., converting plaintext to ciphertext and vice
versa is possible using the algorithm and key. Cryptography is used to protect the
confidentiality of information shared on the internet such as email messages, chat
sessions, web transactions, personal data, corporate data, e-commerce applications,
etc.
Objectives of Cryptography
Confidentiality: To ensure that private or confidential information is not made
available or disclosed to unauthorized individuals.
Types of Cryptography
Based on the number of keys used for encryption they are classified into two types
● Symmetric key cryptography
● Asymmetric key cryptography
Symmetric Encryption
The symmetric key algorithm is also known as the secret key algorithm.
Symmetric key algorithms use the same cryptographic key for both encryption and
decryption. Data Encryption Standard (DES) and Advanced Encryption Standard
(AES) algorithms are the most commonly used symmetric key algorithm which
uses a key at sender side for encryption, and the receiver uses the same key for
decryption. To make two parties (sender and receiver) to communicate
confidentially, they must first exchange the secret key so that each party can
encrypt messages to send and decrypt messages to read. This process is known as
key exchange. This key is shared between two parties over a secure channel. Based
on input data these algorithms can be further divided into two categories
Classical ciphers
Classical ciphers are cryptographic algorithms that have been used in the
past (practically computed and solved manually). Classical ciphers are often
divided into substitution ciphers and transposition ciphers.
Substitution cipher: In a substitution cipher, letters are systematically replaced
throughout the message for other letters. In these cipher method monoalphabetic
substitution ciphers, where just one cipher alphabet is used. Polyalphabetic
substitution cipher, where multiple cipher alphabets are used.
Transposition ciphers: In a transposition cipher, the letters themselves are kept
unchanged, but their order within the message is scrambled. Many transposition
ciphers are done according to geometric design.
Modern ciphers
Modern ciphers are designed based on various concepts of mathematics such
as number theory, computational complexity theory, and probability theory. It
needs the computational power to encrypt and decrypt the data. Modern encryption
methods are divided into two type based on input data (Block and Stream ciphers),
and a number of keys (secret key and public key) used.
Hash function
A hash function performs a series of mathematical operations to convert
input data into a fixed length alphanumeric characters. The input to the hash
function is an arbitrary length, but the output is always of fixed length.
Steganography
Steganography is an art of hiding a secret message within an ordinary
message and extracting it at the destination to maintain the confidentiality of data.
The program named ‘snow’ is used to conceal messages in ASCII text by
appending whitespace to the end of lines. There are different tools that can hide
text in pictures so that to retrieve the hidden secret message the receiver must use
the same tool as sender used to hide the text message. Steganalysis is the art of
discovering and rendering secret messages using steganography.
Cryptography Attacks
Cryptography attacks are based on the assumption that the cryptanalyst has
access to the encrypted information.
● Chosen plaintext
● Adaptive chosen plaintext attack
● Known plaintext
● Known ciphertext
● Chosen ciphertext
● Chosen key
● Rubber cosh cryptanalysis
Brute force attack is a process of defeating a cryptographic scheme by trying
a large number of possible keys until the correct encryption key is discovered.
References:
1. Stallings, W. (2017). Cryptography and network security: Principles and
practice. Boston: Pearson Prentice Hall.
2. Ninocrudele. (2018, April 03). Retrieved from
http://ninocrudele.com/azureleap-aes-encryption-and-hash-algorithm-
concepts-and-best-practices-in-cloud