Getting started with Cryptography
Cryptography deals with the techniques involved in securing data from third parties known as adversaries using sophisticated mathematical equations. The key idea behind cryptography is to ensure safe and secure transmission of messages over insecure channels without the messages falling prey to eavesdropper. This is achieved by encoding the messages that is scrambling the text with a key known only to sender and recipient and making it difficult for the adversaries to understand the message. Cryptography has numerous applications in today’s world, some of them are email transmission, secure web browsing, digital currency, ATM cash withdrawal and simple message transmission. The scope of cryptography is vast, even the simplest of applications use cryptography to ensure secure data transfer.
Modern cryptography abides by the core principles — Authentication, Data Confidentiality, Data Integrity and Non-repudiation.
Fundamentals
Plain text : The original unencrypted message from the sender.
Cipher text : The encoded version of plain text the recipient receives also known as encrypted text.
Key : Randomly generated values to perform encryption and decryption of plain text and cipher text respectively. A unique key is generated via an algorithm Gen each time to make the prediction of key dubious for the intruder. The key size varies with the cipher.
Encryption : The process of encoding information and converting to an unreadable format is encryption. Several algorithms Enc are available which perform encryption in their own way with their own set of rules to scramble the data with the help of a key.
Decryption : Conversion of cipher text back to the original readable form, plain text using an algorithm Dec and key.
Cipher : The underlying algorithm which defines a procedure to perform encryption and decryption. Caesar cipher, Playfair, Vigenere, transposition and substitution ciphers are some of the classical ciphers which simply require reordering of text, swapping letters or replacing letters based on the key. Modern day ciphers are classified into stream and block ciphers. Popular ciphers are Feistal cipher, Rijndael and more.
Cryptographic algorithms classification
Symmetric Key Cryptography : Also known as private key cryptography. These algorithms use only 1 secret for both encryption and decryption. The sender and receiver share the same key, receiver uses the same key the sender uses to encrypt the plain text. No one except the 2 parties know the key, it is private to the channel. AES, DES, IDEA, BlowFish are some frequently used private key encryption algorithms.
Considering plain text as ‘m’ belongs to {0,1}, key k and ciphertext ‘c’, the encryption and decryption schemes are as follows
Enc k (m) = c; Dec k (c) = m
Dec k ( Enc k (m)) = m
Asymmetric Key Cryptography : Also known as public key cryptography. These algorithms use 2 keys, one for encryption and the other for decryption. The sender uses an encryption key which is public to all but, it can not be used to decrypt the ciphertext. The receiver uses a private key, known to none but the receiver to obtain the plain text from the encrypted text. So the public key locks and private key unlocks. This method fixes the symmetric key crypto systems’ problem of sharing the secret key over insecure channels. RSA, Diffie Hellman, El Gamal and DSA are some frequently used public key encryption algorithms.
Considering plain text as ‘m’ belongs to {0,1} , ciphertext ‘c’, public key pk and secret key k, the encryption and decryption schemes are as follows
Enc pk (m) = c; Dec sk (c)= m
Dec sk ( Enc pk (m)) = m
Cryptanalysis
The study and analysis of information to break ciphers and decrypt cipher text, breaching the crypto systems. Some basic cryptanalysis attacks,
Ciphertext only attack : The attacker has one or more ciphertext instances but has no information regarding the plain text or cipher.
Known plaintext attack : The intruder has access to some part or full plaintext. The aim of this attack to obtain the key with the analysis of the plaintext. This key can be used to further decrypt messages encrypted with the same key. So it is advisable to use a unique key for each instance.
Chosen plaintext attack : The attacker either knows the cipher or has access to the device, so feeds a plaintext message and uses the output encrypted text to find out the key.
Chosen ciphertext attack : The attacker has access to the decryption algorithm and analyzes the decryptions of the cipher text to gain insights on the key.
Thanks for stopping by this article and I really hope you did find out something new and useful today 😊!
Have fun learning. See you next time! Until then check out my other stories at AskPranaviSree.
Byee!