You are on page 1of 5

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 8, AUGUST 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.

ORG

25

A Secret Key Cryptographic Algorithm


Sheetal Saigal1, Saloni2 and Surbhi Akshat Sharma3
AbstractCryptography is the field concerned with linguistic and mathematical techniques for securing information, particularly in communications. Historically, cryptography was concerned only with encryption, i.e., means of transforming information from its normal, comprehensible form into an incomprehensible state, making it unreadable without the key. Encryption was used initially to ensure secrecy in critical information sharing, such as those of spies, defense communications, and diplomats. The field of cryptography has expanded its horizons: modern cryptography provides tools and tricks for more than just keeping secrets and has a variety of new and important applications, for example, authentication, digital signatures, electronic voting and digital cash. Cryptography is now an interdisciplinary subject, collating from several fields. Older forms of cryptography were majorly concerned with patterns in language and diagrams. Now, the emphasis has moved, and cryptography makes extensive use of mathematics, particularly discrete mathematics, and topics from number theory, information theory, computational complexity, statistics and combinatorics. The paper discusses about the history, means and the innovations in cryptography, we will be discussing about the various symmetric key algorithms in detail and also propose a new secret key algorithm for a considerably secret code and the key for the transmission of the messages and information. Index Terms Cryptography, Encryption, Decryption, Symmetric/Secret-key algorithms, Network security.

Introduction
O much has been said and so much has been gained;

thousands of lives have been lost, and empires have fallen because a secret was not kept. Powerful rulers learned to keep secrets and pass information without interception; that was the beginning of cryptography [1]. Cryptography has a history of around 4000 years. Ancient Egyptians enciphered some of their writings on the monuments. Julius Caesar has used a simple substitution cipher for around 2000 years ago, which is now known as Caesar cipher. Information security requirements have changed a lot in the last several decades. The security of information was traditionally provided by physical and administrative mechanisms. Tremendous increase in computer use requires automated tools to protect files and other stored information. Transmission of information and data over the collection of interconnected network and communication links require network security measures to protect data during transmission [2].

Sheetal Saigal is with the Department of Computer Science, Krishna Engineering College, Ghaziabad, 201007 (U.P.) India. Saloni is with the Department of Masters of Computer Applications, Krishna Engineering College, Ghaziabad, 201007(U.P.) India. Surbhi Akshat Sharma is with the Department of Information Technology, Krishna Engineering College, Ghaziabad, 201007(U.P.) India.

Cryptography is the art of secret (crypto) writing (graphy) responsible for developing algorithms which may be used for secrecy or privacy, authentication and provide large solutions to computer and communications security problems. Cryptography encrypts the data into an unreadable format, called cipher text. Only those who possess a secret key can decipher (or decrypt) the message into plain text. Modern cryptography follows scientific approach and design cryptographic algorithms that are hard to break. Cryptography follows encryption principles/methods and converts original information (called plaintext) into transformed or coded message (called ciphertext). Decryption is the reverse, i.e. converting ciphertext back into plaintext. A cipher is an algorithm for transforming plaintext into ciphertext by transposition and/or substitution method. Some critical information used in cipher and known only to sender/receiver is called as key. In cryptology code is a term used for an algorithm for transforming plaintext into ciphertext. While cryptography is the study of securing data, cryptanalysis (also called codebreaking) is the study of principles and methods of transforming ciphertext back into plaintext without the knowledge of the key. Cryptology is the combined field of cryptography and cryptanalysis. "Cryptography" derives from the Greek word kruptos, meaning "hidden". The key to hiding data is to devise a hiding (encryption) mechanism that is very difficult to reverse (i.e., to find the original data)

2011 Journal of Computing Press, NY, USA, ISSN 2151-9617

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 8, AUGUST 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

26

without using the decryption key. Usually, the harder it is to discover the key, the more secure the mechanism. In symmetric key (also called "secret-key") encryption, the same key is used for both encryption and decryption. In asymmetric (also called "public-key") encryption, one key is used for encryption and another for decryption [2]. The objective of this paper is to describe cryptography, types of cryptographic algorithms, and various symmetric cryptographic algorithms and then propose a new secret-key algorithm. The rest of this paper is organized as follows: Section 2 covers the basic services provided by cryptography, Section 3 introduced the brief description of the key, Section 4 analyses public and private key cryptography, Section 5 explains private key cryptography in detail, a new secret key algorithm is proposed in Section 6 followed by an encryption and decryption example, Section 7 gives the advantages of proposed algorithm and then we address conclusion and future work in Section 8.

Integrity ensures that the data received is the same as sent by the authorized entity. The receiver of a message should be able to confirm that the message has not been modified in the transmission. An intruder should not be able to substitute the fake message for the actual one.

2.4 NONREPUDIATION:
Nonrepudiation ensures that the receiver can prove that the message was sent by the specified party. Similarly, the sender can prove that the message was received by the specified party.

3 INTRODUCING THE KEY


Key is the most important material in cryptology. If someone predicts it, he/she can derive the secret information. In education, introducing the key is another matter. In the real world, many people use Internet, we want to have customers for e-commerce who we do not know who to trust. This is a very different problem from the ordinary secret messages, where the sender and receiver know each other [3]. It is useful to classify keys on the basis and type of usage. E.g., Data Encryption keys (for general communication) , PIN Keys (for personal identification numbers), File keys (for encrypting files).

2 CRYPTOGRAPHY
Cryptography is the study of providing security by encrypting the original message in a way so that an intruder cannot read the message. We characterize the cryptographic systems based on the type of encryption algorithms used, number of keys and the way in which the plain text is processed [2]. There are following four basic services provided by cryptography:

2.1 CONFIDENTIALITY (SECRECY):


Confidentiality ensures that data remain secret. It is the protection of transmitted data so that the intruder cannot read the encrypted message from the ciphertext. This requires that an intruder should not know the source and destination, frequency, and length of the data flow on the communications network.

Fig 1: Key used in Encryption 4 TYPES ALGORITHMS OF CRYPTOGRAPHIC

2.2 AUTHENTICATION:
Authentication ensures that the communicating entity is authentic (that it claims to be). It should be possible for the recipient of a message to find out its origin. Also the intruder should not be able to masquerade as someone else.

There are several ways of classifying cryptographic algorithms. Based on the number of keys employed for encryption and decryption, there are mainly two types of algorithms [4].

2.3 INTEGRITY:

2011 Journal of Computing Press, NY, USA, ISSN 2151-9617

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 8, AUGUST 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

27

Public Key or Asymmetric Key Cryptography: Each communicating entity has its own private key and public key. One is used for encryption and the other for decryption. It is computationally infeasible to determine the decryption key given only knowledge of the cryptographic algorithm and the encryption key [5]. Secret Key or Symmetric Key Cryptography: The same key is used for both encryption and decryption and it is shared between the two communicating parties.

the keystream. It is termed "self-synchronizing" because the decryption process can stay synchronized with the encryption process merely by knowing how far into the n-bit keystream it is. Synchronous stream cipher: It generate the keystream in a fashion independent of the message stream but by using the same keystream generation function at sender and receiver. While stream ciphers do not propagate transmission errors, they are, by their nature, periodic so that the keystream will eventually repeat.

5 SYMMETRIC KEY CRYPTOGRAPHY


Secret key or symmetric key cryptographic algorithm uses identical keys for both encryption of plaintext and decryption of ciphertext.

B. BLOCK CIPHER: Block ciphers can operate in one of several modes; the following four are the most important: Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB) mode and Output Feedback (OFB) [6]. The most common secret-key cryptography scheme used today is the Data Encryption Standard (DES), designed by IBM in the 1970s and adopted by the National Bureau of Standards (NBS) [now the National Institute for Standards and Technology (NIST) in 1977 for commercial and unclassified government applications. DES has been adopted as Federal Information Processing Standard 46 (FIPS 46- 3) and by the American National Standards Institute as X3.92). DES is a block cipher employing a 56-bit key that operates on 64-bit blocks [6].
There are a number of other secret-key cryptography algorithms that are also in use today like CAST-128 (block cipher), RC2 (block cipher) RC4 (stream cipher), RC5 (block cipher), Blowfish (block cipher), Two fish (block cipher). In 1997, NIST initiated a process to develop a new secure cryptosystem for U.S. government applications. The result, the Advanced Encryption Standard (AES), became the official successor to DES in December 2001.

Fig 2 : Symmetric Key Algorithm Secret key cryptography schemes are generally categorized into stream ciphers and block ciphers. Stream ciphers operate on a single bit (byte or computer word) at a time, and implement some form of feedback mechanism so that the key is constantly changing. A block cipher is so-called because the scheme encrypts one block of data at a time using the same key on each block. In general, the same plaintext block will always encrypt to the same ciphertext when using the same key in a block cipher whereas the same plaintext will encrypt to different ciphertext in a stream cipher [2].

6 NEW SECRET KEY ALGORITHM


6.1 ENCRYPTION ALGORITHM: 1. Get the ASCII value of the character of the plaintext. 2. Calculate the binary equivalent of the ASCII value. 3. Get its 2s complement. 4. Reverse the number. 5. Assume any 4 digit number as a key e.g. 1001

A. STREAM CIPHER:
Self-synchronizing stream cipher: It calculates each bit in the keystream as a function of the previous n bits in

2011 Journal of Computing Press, NY, USA, ISSN 2151-9617

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 8, AUGUST 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

28

6. Divide the reversed number with the chosen key. 7. Store the quotient in the first 5 digits and the remainder in the last 3 digits. (If the quotient or the remainder is less than 5 or 3 digits respectively, then add the required number of 0s to the left hand side). This gives us the cipher text.

Its ASCII equivalent is 162 and so the character becomes o.

6.4 EXAMPLE FOR DECRYPTION:


After encrypting S, we get the cipher text 10100001 which is character o, now we will decrypt the cipher text to get the plaintext. 1. By multiplying the first 5 digits of the cipher text with the key, the result obtained is: 1 2. 0 1 1 0 1 0 0

6.2 DECRYPTION ALGORITHM:


1. 2. 3. 4. 5. Multiply the first 5 digits of the cipher text with the key. Add the last 3 digits of the cipher text to the multiplied result. Reverse the obtained result. Get its 2s complement. Find its decimal equivalent to get the ASCII value and then its corresponding character, which is of the plaintext.

Adding last 3 digits of the cipher text, to the above result gives: 1 0 1 1 0 1 0 1

3.

Reversed number is: 1 0 1 0 1 1 0 1

6.3 EXAMPLE FOR ENCRYPTION:


1. Let the character of the plaintext be S. Its ASCII equivalent is 83. Its binary equivalent is : 0 3. 1 0 1 0 0 1 1 4.

Its 2s complement is: 0 1 0 1 0 0 1 1

2.

Its ASCII equivalent is 83 and the character is S, which is the original plain text.

The 2s complement of the number is: 1 0 1 0 1 1 0 1

7 ADVANTAGES ALGORITHM
1. 2. 3.

OF

THE

PROPOSED

4.

Reversed number is: 1 0 1 1 0 1 0 1

The algorithm is simple to implement. The algorithm is cost effective. The algorithm is more secure as it includes both 2s complement and the reverse operation.

5. 6.

Let the key be 1001. Dividing the reversed number by the key gives the quotient as 10100 and the remainder as 001. As per the algorithm, the cipher text becomes: 1 0 1 0 0 0 0 1

8 Conclusions
Modern cryptography provides tools and tricks for more than just keeping secrets and has a variety of new and important applications. Large number of cryptographic algorithms are developed which use different keys and their combinations which cannot be applied everywhere especially for small amount of data and these algorithms are not very cost effective. The algorithm proposed here uses secret key to encrypt the

7.

2011 Journal of Computing Press, NY, USA, ISSN 2151-9617

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 8, AUGUST 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

29

data, keeping in mind the performance of the algorithm. It is simple and very suitable for small amount of data. No doubt, public key cryptographic system is more secure than secret key systems. So our future work is to propose an algorithm which will use public key.

References
[1] Joseph Migga Kizza, A Guide to Computer Network Security, Springer Verlag Londan Limited-2009. [2] William Stallings, Cryptography and Network Security, Fourth edition. [3] M. Tolga SAKALLI, Ercan BULU$ and Fatma BUYUKSARACOGLU Cryptography Education for Students, Conference 2004 IEEE. [4] Behrouz A. Forouzan, Data Communication and Networking (3rd edition). [5] History of Cryptography http://www.answers.com/topic/history-of-cryptography, written on 2007. [6] S. Hebert, A Brief History of Cryptography, an article available at http://cybercrimes.net/aindex.html

2011 Journal of Computing Press, NY, USA, ISSN 2151-9617

You might also like