Sitemap
Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Let’s understand Cryptography

--

Communication has become a more extensive area from old-school letters to quick chat applications. Data security is another separate subfield in the communication area. Communication system requires to be fully protected to avoid criminal and privacy-breaching activities. The literature review conducted an observation of how research being done in the field of cryptography to achieve security requirements in network and application security. This review compares earlier and modern studies related to cryptography with the impact that has been done. By reviewing both scholarly and non-scholarly works, the objective is to make a case that continuing research into the use of cryptography is supreme in preserving data security and privacy.

First thing First

The first use for cryptography used for the systems is to enable two people, Alice and Bob, to keep their communications secure over an insecure channel in a manner that prevents an attacker, Eve, from being able to understand the conversation. Today’s cryptography is vastly more complicated than its earlier versions. However, all the sophisticated methods have been built underneath the basics. Cryptography today, even though it still has far-reaching military implications, has expanded domains. The novel approaches of systems are designed to provide cost-effective means of securing and thus protecting large amounts of electronic data using cryptography. Cryptography offers methods for data privacy.

Let's understand the communication model

The communication model is used to demonstrate security in communication. Alice is a message conveyer who sends data; Bob is the receiver of this data. In this scenario, we assume that the communication channel used to send the data is an insecure channel.

Communication Model

Early Cryptography

Cryptography is as long as the first writings happen in the communication process. The fascinating history of cryptography extends up to 4000 years back. The first known evidence, which is accounted as Kahn’s The Code Breakers (‘Involutory commutants with some applications to algebraic cryptography. II’, 1967), traces cryptography from its initial and limited use by the Egyptians (4000 years ago) to the twentieth century. Cryptography had a more significant improvement in world war I and II (Callahan, 2014). Though it gives hints about the first usages of cryptography, it isn’t straightforward to pinpoint the exact origin of cryptography. However,

  • The inscriptions carved into the walls of the main chamber of the tomb of the nobleman Khnumhotep II, inscriptions date to approximately 1900 BC
  • The Arthashastra is a classic work on statecraft that is attributed to Kautilya and was written sometime between 321BC and 300BC. This work reminds that of espionage communication with their spies via secret writing (Gebbie, 2009).
  • The first record of active cryptanalysis comes from the Arabs during the 700s

Later, research moved on to using simple mono-alphabetic substitution ciphers from 500 to 600 BC. This involved replacing the letters of the message with other letters of a different alphabet following some secret rule. This rule is the key to retrieve the original message back from the garbled message (Gebbie, 2009).

It is a turning point in launching cryptography research and modern cryptography. By the time, in 1980, the DES algorithm, which was adopted by the American National Standards Institute (ANSI), was used commercially. Following this milestone was yet another when a new concept was proposed to develop Public Key Cryptography (PKC), which is still experiencing research development today (Levy, 2001).

Simple Plaintext Cryptography (Simple Ciphers)

As mentioned in the introduction section, simple encryption algorithms were invented 4000 years ago. These ciphers are based on substitution and transposition of characters in a single plaintext. While, the operations performed in modern encryption algorithms are usually a bit similar, but they affect individual bits and bytes. So, we can agree that modern cryptography schemes are more secure than earlier systems. The substitution ciphers are about substituting each group of plaintext letters with another predefined group according to an alphabet. For decrypting, the user should use a reverse substitution. There are several substitution ciphers: Caesar cipher, Monoalphabetic Ciphers, etc.

Vigenère Tableaux is also another simple plaintext cipher. It is easy to understand and implement. It is encrypting alphabetic text by using a series of interwoven Caesar ciphers. It employs a form of polyalphabetic substitution (Bruen 2011) (Bruen and Forcinito, 2011).

Polyalphabetic Substitution Ciphers is more cryptographically secure compared to basic substitution ciphers. It displays a rather flat distribution, which gives no information to a cryptanalyst. In monoalphabetic ciphers’ their frequency distribution reflects the distribution of the underlying alphabet, So that, easily breakable. Polyalphabetic substitutions are more secure than monoalphabetic It uses substitutions, but still insecure because of the key length

Symmetric key cryptosystem

There are two forms of cryptosystems: symmetric and asymmetric. Symmetric cryptosystems involve the use of a single key known as the secret key to encrypt and decrypt data or messages. Asymmetric cryptosystems, on the other hand, use one key (the public key) to encrypt messages or data, and a second key (the secret key) to decipher or decrypt those messages or data (Fujisaki 2011) (Fujisaki and Okamoto, 2013).

In symmetric cryptosystems, both parties communicating with each other use only one key for encryption and decryption. The entities communicating using symmetric encryption must exchange the secret key. The main difference from asymmetric cryptosystems is the key used here should be kept secret. There are several symmetric key algorithms such as AES, DES, TRIPLE DES, RC4, BLOWFISH (Diaa Salama 2008) (Elminaam, Abdul Kader and Hadhoud, 2009).

Symmetric encryption allows efficient communication between the two parties in a closed environment. Compared to asymmetric symmetric algorithms work incredibly fast, since computations are relatively simple operations. Therefore, symmetric-key based algorithms perform better in relatively inexpensive hardware. The key size of 128-bit is sufficient to achieve adequate security features. Generally, there is no difference in security. Security is basically based on the strength of the algorithm and the size of the key. Both symmetric and asymmetric have different kinds of algorithms. Good algorithm methods and key size effectiveness should be considered in order to design a better security solution.

Block Ciphers & Stream Ciphers

There are two types of symmetric encryption algorithms: Block ciphers and Stream ciphers.

Block cipher performs as blocks in both plaintext and ciphertext. The user has to set lengths of bits for encryption in blocks of data with the use of a specific secret key. For example, DES and Rijndael algorithm uses a block size of 64-bit and 128-bit, respectively. The level of security mainly depends on the data and the key size. Examples of Block ciphers are DES, DESL, AES.

In the Stream-ciphers’ data is encrypted as a stream. Individual characters of plaintext are encrypted simultaneously. The memory needed for the computation is lesser than in the block ciphers’. However, the major drawback of the stream cipher is its lengthy initialization phase in the first usage. Communication protocols do not identify stream cipher. Stream cipher has a simple structure and speedy hardware (Debdeep Mukhopadhyay 2007) (Kohda and Tsuneda, 1995). They are used in applications where the size of the plaintext is unknown. Examples of stream ciphers are RC4, E0, and AES.

Different kinds of symmetric-key cryptosystems: DES, AES, and Blowfish

The DES, as the result of the contest, was developed at IBM as an adjustment for the previous system (Davis, 1978). The DES is widely used for the encryption of PIN numbers, bank transactions, and the likes. The DES is an example of a block cipher that operates on blocks of 64 bits at a time, with an input key of 64 bits. Every 8th bit in the input key is a parity check bit, which means that, in fact, the key size is effectively reduced to 56 bits (Abomhara et al., 2010a) (Mohamed Abomhara et al., 2010).

3DES (aka Triple DES) was developed based on the DES algorithm to address the obvious flaws in DES. 3DES simply extends the key size of DES by applying the algorithm three times in sequence with three distinct keys

Advanced Encryption Standard (AES), which came in 1997, is a replacement for DES. Rijndael cryptosystem is used as the AES after the NIST contest (Naji, Zaidan and Zaidan, 2009). AES cryptosystem operates on 128-bit blocks, arranged as 4x4 matrices with 8-bit entries. Variable block length and key length can be used according to the latest configurations such as 128, 192, or 256 bits (Taqa, Zaidan and Zaidan, 2009).

Blowfish is a symmetric key block cipher with variable key length from 32 to 448-bits and a block size of 64 bits. It executes above the Feistel network. Bruce Schneier designed blowfish as a fast, free alternative to existing encryption algorithms. However, it suffers from weak keys’ problem; no attack is known to be successful (KumarVerma and Singh, 2012).

As a comparison, In default usage, DES and Blowfish have the same block size of 64-bit while AES has a 128-bit block size. Not like DES, asymmetric algorithms such as AES and Blowfish have variable key sizes. DES, 3DES, and Blowfish are structure on the Feistel Network algorithm. AES deals with substitution and permutation. DES is vulnerable to Brute Force attacks and AES is vulnerable to Side-Channel Attacks. Blowfish is a commercially used algorithm and however, no attack identified yet (Patil et al., 2016).

Asymmetric key cryptosystem

Asymmetric-key cryptography, known as the Public-Key Cryptography (PKC), was proposed by Diffie and Hellman (Diffie and Hellman, 1976). The idea is that encryption/decryption is done using two keys: a private key and a public key. The plaintext is encrypted by performing modular operations and provide the ciphertext and the public key with other public parameters to the receiver to decrypt it (M. Abomhara et al., 2010).

Diffie-Hellman Key exchange

The simplest public-key algorithm is the Diffie-Hellman key exchange (Diffie and Hellman, 1976). This protocol allows two users to set up a secret key using a public-key scheme based on discrete logarithms. The protocol is secure only if the two parties agree on establishing authenticity. DH is used for secret-key key exchange only, and not for authentication or digital signatures (Li, 2010).

DSA

Digital signatures are also be generated for stored data and programs so that the integrity of the data and programs may be verified at any later time. One method for sending low size and capacity data by using DSA is proposed by Erfaneh Noroozi. “Hash function” is used in this method and it generates dynamic and smaller size bits that depend on each byte of data (Noroozi, Daud and Sabouhi, 2013). Generating signatures is now involved with several encryption algorithms such as RSA, Elgamal.

Elgamal

Elgamal is an encryption model which deals with the Discrete Logarithm Problem (Huang and Tso, 2012). The main idea is that the discrete logarithms cannot be found in a practical time frame for a given number, while the inverse operation of the power can be computed efficiently. The digital signing process is a bit different from the encryption and decryption in the Elgamal.

RSA

The most used public key-cryptography implementation is RSA. Ronald Rivest, Adi Shamir, and Leonard Adleman developed it at MIT (Rivest, Shamir and Adleman, 1978). RSA today is used in hundreds of software products and can be used for key exchange, digital signatures, or encryption of small blocks of data. RSA can be used with variable block size and key size. The key-pair, the public key, and the private key are derived using a modular operation. The prime number used here is very large. Here user uses two values, p, q. These p, q values are the values that are used in RSA Public-key cryptography. P and q are prime numbers. The signing with RSA is the same as in the encryption with RSA.

Elliptic Curve in Cryptography

The elliptic curve algorithm is not an encryption algorithm, but it is an analogy used to build different kinds of cryptography (ECC) schemes. Elliptic curve arithmetic involves the use of an elliptic curve equation defined over a finite field. Here the central concept of Elliptic curve arithmetic dealing with is ECDLP i.e., Elliptic Curve Discrete Logarithm Problem (Miller, no date; Koblitz, 1987).

Conclusion

The application associated with cryptosystems provides reliable security. However, the extension of the overall security of an encryption scheme depends on the parameters used (i.e., block size, key size). It is a user’s responsibility to keep the cipher keys secret. The plaintext simple ciphers such as Caesar and Vigenère ciphers provide less security. Modern-day applications such as Pretty Good Privacy (PGP) absorb the cryptography power to provide privacy and data protection. Even though cryptography is based on mathematical complexity and time complexity, affords the user the strong security that is required and that they demand.

Some useful literatures

Abomhara, M. et al. (2010) ‘Suitability of Using Symmetric Key to Secure Multimedia Data: An Overview’, Journal of Applied Sciences, pp. 1656–1661. doi: 10.3923/jas.2010.1656.1661.

Abomhara, M. et al. (2010) ‘Video Compression Techniques: An Overview’, Journal of Applied Sciences, pp. 1834–1840. doi: 10.3923/jas.2010.1834.1840.

Bruen, A. A. and Forcinito, M. A. (2011) Cryptography, Information Theory, and Error-Correction: A Handbook for the 21st Century. John Wiley & Sons.

Callahan, K. M. (2014) ‘The Impact of the Allied Cryptographers on World War II : Cryptanalysis of the Japanese and German Cipher Machines’. Available at: https://pdfs.semanticscholar.org/c7cf/0c41932d61457dd943dc4dffca2c8bb92e95.pdf (Accessed: 4 January 2020).

Davis, R. (1978) ‘The data encryption standard in perspective’, IEEE Communications Society Magazine, pp. 5–9. doi: 10.1109/mcom.1978.1089771.

Diffie, W. and Hellman, M. (1976) ‘New directions in cryptography’, IEEE Transactions on Information Theory, pp. 644–654. doi: 10.1109/tit.1976.1055638.

Elminaam, D. S. A., Abdul Kader, H. M. and Hadhoud, M. M. (2009) ‘Performance Evaluation of Symmetric Encryption Algorithms on Power Consumption for Wireless Devices’, International Journal of Computer Theory and Engineering, pp. 343–351. doi: 10.7763/ijcte.2009.v1.54.

Fujisaki, E. and Okamoto, T. (2013) ‘Secure Integration of Asymmetric and Symmetric Encryption Schemes’, Journal of Cryptology, pp. 80–101. doi: 10.1007/s00145–011–9114–1.

Gebbie, S. (2009) A survey of the mathematics of cryptology. Available at: http://hdl.handle.net/10539/6608 (Accessed: 4 January 2020).

Huang, K. and Tso, R. (2012) ‘A commutative encryption scheme based on ElGamal encryption’, 2012 International Conference on Information Security and Intelligent Control. doi: 10.1109/isic.2012.6449730.

‘Involutory commutants with some applications to algebraic cryptography. II’ (1967) Journal für die reine und angewandte Mathematik (Crelles Journal), pp. 1–24. doi: 10.1515/crll.1967.227.1.

Koblitz, N. (1987) ‘Elliptic curve cryptosystems’, Mathematics of Computation, pp. 203–203. doi: 10.1090/s0025–5718–1987–0866109–5.

Kohda, T. and Tsuneda, A. (1995) ‘Chaotic bit sequences for stream cipher cryptography and their correlation functions’, Chaotic Circuits for Communication. doi: 10.1117/12.227907.

KumarVerma, H. and Singh, R. K. (2012) ‘Performance Analysis of RC5, Blowfish and DES Block Cipher Algorithms’, International Journal of Computer Applications, pp. 8–14. doi: 10.5120/5774–6004.

Levy, S. (2001) Crypto: How the Code Rebels Beat the Government — Saving Privacy in the Digital Age. Penguin.

Li, N. (2010) ‘Research on Diffie-Hellman key exchange protocol’, 2010 2nd International Conference on Computer Engineering and Technology. doi: 10.1109/iccet.2010.5485276.

Miller, V. S. (no date) ‘Use of Elliptic Curves in Cryptography’, Lecture Notes in Computer Science, pp. 417–426. doi: 10.1007/3–540–39799-x_31.

Naji, A. W., Zaidan, A. A. and Zaidan, B. B. (2009) ‘Challenges of Hidden Data in the Unused Area Two within Executable Files’, Journal of Computer Science, pp. 890–897. doi: 10.3844/jcssp.2009.890.897.

Noroozi, E., Daud, S. B. M. and Sabouhi, A. (2013) ‘New Algorithm with Bandwidth Reduction for Smaller Size Digital Signature’, 2013 International Conference on Informatics and Creative Multimedia. doi: 10.1109/icicm.2013.47.

Patil, P. et al. (2016) ‘A Comprehensive Evaluation of Cryptographic Algorithms: DES, 3DES, AES, RSA and Blowfish’, Procedia Computer Science, pp. 617–624. doi: 10.1016/j.procs.2016.02.108.

Rivest, R. L., Shamir, A. and Adleman, L. (1978) ‘A Method for Obtaining Digital Signatures and Public-Key Cryptosystems’. doi: 10.21236/ada606588.

Taqa, A., Zaidan, A. A. and Zaidan, B. B. (2009) ‘New Framework for High Secure Data Hidden in the MPEG Using AES Encryption Algorithm’, International Journal of Computer and Electrical Engineering, pp. 566–571. doi: 10.7763/ijcee.2009.v1.87.

--

--

Nerd For Tech
Nerd For Tech

Published in Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Dulaj Dilshan
Dulaj Dilshan

Written by Dulaj Dilshan

Developer @ Ballerina | Software Engineer @ WSO2 | Studied Engineering @ University of Moratuwa

No responses yet