secret key cryptographic algorithm

3 downloads 0 Views 141KB Size Report
At the end of the communication the recipient can decrypt the original message if provide his public key and correlated his private key. In this Paper we are going ...
International Journal of Computer Science, Information Technology and Management Vol. 1 No. 1-2 (January-December, 2012)

SECRET KEY CRYPTOGRAPHIC ALGORITHM 1

G.Naga Satish, 1Ch.V.Raghavendran, 1P.T.K.Mehar, 2Dr. P. Suresh Varma 1 P.G.Dept of CS, Ideal College of Arts & Sciences, Kakinada, A.P., INDIA 2 Department of CS, Adikavi Nannaya University, Rajahmundry, A.P.INDIA [email protected]

Abstract: Cryptography 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. To encrypt information user must provide the public key of the recipient as well as message to be encrypted. The generated cipher text can be sent by using an insecure channel, so that would be very difficult to be interpreted by an attacker. At the end of the communication the recipient can decrypt the original message if provide his public key and correlated his private key. In this Paper we are going to discuss about public key cryptography and its applications such as Key Agreement and Data Encryption Techniques and proposed a new secret key algorithm. Keywords: Cryptography, Cipher, Attacker, Secret Key Algorithms. Public key cryptography is a method for secret I. INTRODUCTION communication between two parties without requiring Encryption is the most effective way to achieve data an initial exchange of secret keys as well as symmetric security. The process of Encryption hides the contents cryptography uses a single secret key for both of a message in a way that the original information is encryption and decryption. A core problem of the recovered only through a symmetric cryptosystems is key distribution and key decryption process. The purpose of Encryption is to management. For the key exchange they need for prevent unauthorized parties from viewing or example a secure channel or a courier. The exchange modifying the data. Encryption occurs when the data problem becomes even more difficult if many people is passed through some substitute technique, shifting want to exchange encrypted messages, for example on technique, table references or mathematical the internet. If a network communication system has n operations. All those processes generate a different users and any two of them exchange a key, then n(nform of that data. The unencrypted data is referred to 1)/2 secret key exchanges are necessary and all those as the plaintext and the encrypted data as the cipher keys have to be stored securely. Public-key text, which is representation of the original data in a cryptography is a fundamental and widely used difference form. Key-based algorithms use an technology around the world, and enables secure Encryption key to encrypt the message. There are two transmission of information on the internet and other general categories for key-based Encryption: communication systems. It is also known as Symmetric Encryption which uses a single key to asymmetric cryptography because the key used to encrypt and decrypt the message and Asymmetric encrypt a message differs from the used to decrypt it. Encryption which uses two different keys – a public In public-key cryptography, a user has a pair of key to encrypt the message, and a private key to cryptographic keys – a public key and a decrypt it. Currently, there are several types of key private-key. The private-key is kept secret, while the based Encryption algorithms such as: DES, RSA, public-key may be widely distributed and known for PGP, Elliptic curve, and others but all of these any user. Messages are encrypted with the recipient’s algorithms depend on high mathematical public key and can only be decrypted with the manipulations. One simple and good way to encrypt corresponding private key. The keys are related data is through rotation of bits or sometimes called bit mathematically, but the private-key cannot be shifting. But, rotation of bits is more advanced than practically derived from the public key. In addition, simple bit shifting. In rotation of bits operation, the the public-key cryptosystems can generate digital bits are moved, or shifted, to the left or to the right. signatures and can be combinated with symmetric The different kinds of shifts typically differ in what cryptosystems. they do with the bits. Another way is to perform logical operation on the bits of the file such as XOR II.CYPTOGRAPHY operation. The idea behind XOR Encryption is that it is impossible to reverse the operation without Cryptography is the study of providing security by knowing the initial value of one of the two arguments. encrypting the original message in a way so that an intruder cannot read the message. We characterize the

G.Naga Satish, Ch.V.Raghavendran, P.T.K.Mehar, Dr. P. Suresh Varma

cryptographic systems based on the type of encryption algorithms used, number of keys and the way in which the plain text is processed. 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 cipher text. This requires that an intruder should not know the source and destination, frequency, and length of the data flow on the communications network. 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. 2.3 INTEGRITY: 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. III 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. 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). IV TYPES OF CRYPTOGRAPHIC ALGORITHMS 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. A) 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. B) 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. V SYMMETRIC KEY CRYPTOGRAPHY Secret key or symmetric key cryptographic algorithm uses identical keys for both encryption of plaintext and decryption of cipher text. 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 cipher text when using the same key in a block cipher whereas the same plaintext will encrypt to different cipher text in a stream cipher A) Stream Cipher: Self-synchronizing stream cipher: It calculates each bit in the key stream as a function of the previous n bits in the key stream. It is termed "selfsynchronizing" because the decryption process can stay synchronized with the encryption process merely by knowing how far into the n-bit key stream it is synchronous stream cipher: It generate the key stream in a fashion independent of the message stream but by using the same key stream generation function at sender and receiver. While stream ciphers do not propagate transmission errors, they are, by their nature, periodic so that the key stream will eventually repeat. 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). 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 463) 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. 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

SECRET KEY CRYPTOGRAPHIC ALGORITHM

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. VI NEW SECRET KEY ALGORITHM A) 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 1’s complement. 4. Reverse the number. 5. Assume any 4 digit number as a key e.g. 1001 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 0’s to the left hand side). This gives us the cipher text. B) Decryption Algorithm: 1. Multiply the first 5 digits of the cipher text with the key. 2. Add the last 3 digits of the cipher text to the multiplied result. 3. Reverse the obtained result. 4. Get its 1’s complement. 5. Find its decimal equivalent to get the ASCII value and then its corresponding character, which is of the plaintext. C) Example For Encryption: 1. Let the character of the plaintext be ‘S’. Its ASCII equivalent is 83. 2. Its binary equivalent is : 01010011 3. The 1’s complement of the number is: 10101100 4. Reversed number is: 00110101 5. Let the key be 1001 6. Dividing the reversed number by the key gives the quotient as 00110 and the remainder as 011. 7. As per the Algorithm, the Cipher text becomes: 00110011. Its ASCII equivalent is 51 and so the character becomes ‘3’. D) Example For Decryption: After encrypting ‘S’, we get the cipher text 00110011 which is character ‘3’, 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: 10101 011 2. Adding last 3 digits of the cipher text, to the above result gives: 10101100 3. Reversed number is: 00110101

4. Its 1’s complement is: 01010011 Its ASCII equivalent is 83 and the character is ‘S’, which is the original plain text. E) Advantages Of The Proposed Algorithm 1. The algorithm is simple to implement. 2. The algorithm is cost effective. 3. The algorithm is more secure as it includes both 1’s complement and the reverse operation. VII CONCLUSIONS Cryptography is used to achieve few goals like confidentiality, Data integrity, Authentication etc. of the send data. Now, in order to achieve these goals various cryptographic algorithms are developed by various people. For a very minimal amount of data those algorithms wouldn’t be cost effective since those are not designed for small amount of data. Keeping this goal in mind the proposed algorithm has been designed in a quite simple manner but of-course not sacrificing the security issues. The algorithm proposed uses secret key to encrypt the 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. VIII. REFERENCES [1] S. William, Cryptography and Network Security: Principles and Practice, 2nd edition, Prentice-Hall, Inc., 1999 pp 23-50 [2] William Stallings, “Cryptography and Network Security,” Fourth edition. [3] Fundamentals of Computer Security, Springer publications “Basic Cryptographic Algorithms”, an article available at www.itsc.state.md.us/oldsite/info/InternetSecurity/ Crypto/CryptoIntro.htm#Algorithms [4] “Introduction to Public-Key Cryptography”, an article available at developer.netscape.com/docs/manuals/security/pkin/c ontents.htm [5] A.J. Menezes, P.C. Van Oorschot y S.A. Vanstone, 1997. “Handbook of Applied Cryptography”, CRC Press. pp 15-28 and. 283-291.