This action might not be possible to undo. Are you sure you want to continue?
A B.tech Project Report submitted in partial fulfillment of the requirement for the B.Tech. under Biju Patnaik University of Technology, Rourkela.
SIDHARTHA SANKAR PRADHAN ATMASWAROOPA TRIPATHY
Reg. No #0801314109 Reg No. #0801314098
JULY - 2012 Under the guidance of
Dr. SATYARANJAN PATTANAIK
APEX INSTITUTE OF TECHNOLOGY & MANAGEMENT Pahala, Bhubaneswar, Odisha – 752101, India
Efficient Steganography using LSB and encryption technique
Steganography is the process of hiding one file inside another such that others can neither identify the meaning of the embedded object, nor even recognize its existence. Current trends favor using digital image files as the cover file to hide another digital file that contains the secret message or information. Steganography become more important as more people join the cyberspace revolution. Steganography is the art of concealing information in ways that prevent the detection of hidden messages. The goal of steganography is to avoid drawing suspicion to the existence of a hidden message. This approach of information hiding technique has recently become important in a number of application areas. Digital audio, video, and pictures are increasingly furnished with distinguishing but imperceptible marks, which may contain a hidden copyright notice or serial number or even help to prevent unauthorized copying directly. Military communications system make increasing use of traffic security technique which, rather than merely concealing the content of a message using encryption, seek to conceal its sender, its receiver or its very existence. Similar techniques are used in some mobile phone systems and schemes proposed for digital elections. One of the most common methods of implementation is Least Significant Bit Insertion, in which the least significant bit of every byte is altered to form the bit-string representing the embedded file. Altering the LSB will only cause minor changes in color, and thus is usually not noticeable to the human eye. While this technique works well for 24-bit color image files, steganography has not been as successful when using an jpeg color image file, due to limitations in color variations and the use of a color map. The advantages of LSB are its simplicity to embed the bits of the message directly into the LSB plane of coverimage and many techniques use these methods . Modulating the LSB does not result in a humanperceptible difference because the amplitude of the change is small. Therefore, to the human eye, the resulting stego-image will look identical to the cover-image. This allows high perceptual transparency of LSB. Another level of security adds to steganography by using an encryption technique for encrypting message before adding to image.
Efficient Steganography using LSB and encryption technique
We would like to express our immense sense of gratitude to our guide, Dr. Satya Ranjan Pattanaik, for his valuable instructions, guidance and support throughout our project.
We again owe our special thanks to Dr. Satya Ranjan Patanaik, B.Tech. project Coordinator for giving us an opportunity to do this report.
And finally thanks to Prof. R.C. Das, Principal, AITM for his continued drive for better quality in everything that happens at AITM. This report is a dedicated contribution towards that greater goal.
SIDHARTHA SANKAR PRADHAN REG. NO.-0801314109
ATMASWAROOPA TRIPATHY REG. NO-0801314098
Efficient Steganography using LSB and encryption technique
Table of Contents
Synopsis List of Figures List of Tables Chapter No. Description Page No.
1 1.1 1.2 1.3 1.4 1.5
Introduction and Scope of the Thesis Introduction Scientific Background Background of the Problem Objective Scope 1 1 2 3 3
2 2.1 2.2 2.3
Information hiding using Steganography Introduction Overview of Steganography Summary 4 5 10
Least Significant Bit insertion
3.1 3.2 3.3 3.4
Introduction Least Significant Bit Insertion Secure Information Hiding System Advantage of LSB Technique
11 11 12 15
Results & Discussion Concealing Message Extracting Message Experimental Results Discussion 27 28 29 30 6 6.6 Disadvantage of LSB Technique Summary 16 16 4 4.4 4.3 5.5 Encryption and RSA algorithm Introduction Types of Encryption Asymmetric Encryption Schemes RSA algorithm Summary 17 18 19 22 26 5 5.1 5.5 3.2 Conclusion Future thoughts Conclusion 31 31 Bibliography iv .4 Experimental Process.Efficient Steganography using LSB and encryption technique 3.2 4.1 4.1 6.2 5.3 4.
1 5.1 Description Basic Steganography model Producing Stego image process Steganography at sender side Output at the Receivers side Page No.Efficient Steganography using LSB and encryption technique List of Figures Figure No.1 5. 6 13 29 30 v . 2.1 3.
Intruders may reveal the information to others. A Greek word meaning “covered writing.” Null ciphering is a process of encoding a message in plain sight. Dermeratus wanted to warn Sparta of Xerxes‟ pending invasion. through the use of steganography. Covering it with wax again. he scraped the wax off one of the wooden tablets they used to send messages and carved a message on the underlying wood. it is not to keep others from knowing the hidden information but it is to keep others from thinking that the information even exist 1. During the war between Sparta and Xerxes. the second letter of each word in an innocent message could be extracted to reveal a hidden message. rather they used a method termed “null ciphering.1 Introduction and Scope of the Thesis 1. the Germans utilized this technology. or use it to launch an attack. Unlike the Greeks.2 Background Scientific Steganography is an ancient technology that has applications even in today‟s modern society. these messages were not physically hidden.Efficient Steganography using LSB and encryption technique Chapter . To do this. One solution to this problem is.1 General Introduction One of the reasons that intruders can be successful is that most of the information they acquire from a system is in a form that they can read and comprehend. 1 . Although its roots lay in ancient Greece. modify it to misrepresent an individual or organization. this would not be the last time steganography would be used in times of war. However.” steganography has taken many forms since its origin in ancient Greece. the tablet appeared to be unused and thereby slipped past the sentries‟ inspection. For example. Steganography is a technique of hiding information in digital media. In World War II. In contrast to cryptography.
Today 2 .Efficient Steganography using LSB and encryption technique steganography has continually been used with great success throughout history.
its receiver or its very existence. this technology is not always used for good intentions. and pictures are increasingly furnished with distinguishing but imperceptible marks. it is important to study steganography in order to allow innocent messages to be placed in digital media as well as intercept abuse of this Technology. as well as encode music information in the ever-popular mp3 music file. The techniques have been used to create the watermarks that are in our nation‟s currency. However. and fingerprints can be used to identify the people who break copyright agreements. terrorist groups are “hiding maps and photographs of terrorist targets and posting instructions for terrorist activities on sports chat rooms. According to various officials and experts. Digital audio. video. which may contain a hiding copyright notice or serial number or even help to prevent unauthorized copying directly.3 Background of the Problem Steganography  become more important as more people join the cyberspace revolution. terrorists and criminals can also use it to convey information. Thus. 1. The goal of steganography is to avoid drawing suspicion to the existence of a hidden message. Similar techniques are used in some mobile phone systems and schemes proposed for digital elections. This approach of information hiding technique has recently become important in a number of application areas. and other Web sites.Efficient Steganography using LSB and encryption technique steganography is being incorporated into digital technology. rather than merely concealing the content of a message using encryption. Steganography include an array of secret communication methods that hide the message from being seen or discovered. Some of the techniques used in steganography are domain tools or simple system such as least significant bit (LSB) insertion 2 . This aspect of steganography is what sparked the research into this vast field and Education and understanding are the first steps toward security. seek to conceal its sender. Steganography is the art of concealing information in ways that prevent the detection of hidden messages. Copyrights can be included in files. Military communications system make increasing use of traffic security technique which.
1. (ii) Three different approaches being explored which are least significant bit. pattern block encoding. masking and filtering and algorithms and transformation 3 . 1.4 Objective This project comprehends the following objectives: (i) To produce security tool based on steganographic techniques.5 Scope The scope of the project as follow: (i) Implementation of steganographic tools for hiding information includes text and image files.Efficient Steganography using LSB and encryption technique and noise manipulation. However there are technique that share the characteristic of both of the image and domain tools such as patchwork. spread spectrum methods and masking. and transform domain that involve manipulation algorithms and image transformation such as discrete cosine transformation and wavelet transformation. (ii) To explore techniques of hiding data using steganography.
Efficient Steganography using LSB and encryption technique Chapter . the message or encrypted message is embedded in a digital host before passing it through the network. This is because the digital formats make possible to provide high image quality even under multi-copying. Steganography is a technique of hiding information in digital media. In contrast to cryptography. Besides hiding data for confidentiality. steganography can be employed to secure information. this approach of information hiding can be extended to copyright protection for digital media: audio. The growing possibilities of modern communications need the special means of security especially on computer network. In addition. most of information is kept electronically. The copyright such as audio. This has resulted in an explosive growth of the field of information hiding. the special part of invisible information is fixed in every image that could not be easily extracted 4 . video.1 Introduction Due to advances in ICT (Inverse Cryptography technology). the security of information has become a fundamental issue. Therefore.2 Information Hiding Using Steganography 2. Consequently. Besides cryptography. Therefore. thus the existence of the message is unknown. The network security is becoming more important as the number of data being exchanged on the Internet increases. the confidentiality and data integrity are requires to protect against unauthorized access and use. video and other source available in digital form may lead to large-scale unauthorized copying. the rapid growth of publishing and broadcasting technology also require an alternative solution in hiding information. and images.
Paired with existing communication methods. fingerprinting. watermarking. • • In watermarking applications. designed to be invisible to an informal analysis. 2. Fingerprint. However. book and software publishing industries. which mean covered or secret and – graphy mean writing or drawing. • Steganography hide the secret message within the host data set and presence imperceptible. information is hidden within a host data set and is to be reliably communicated to a receiver. and steganography . Steganography is the art and science of hiding information such that its presence cannot be detected  and a communication is happening [1.3]. Secret information is encoding in a manner such that the very existence of the information is concealed. The main goal of steganography is to communicate securely in a completely undetectable manner  and to avoid drawing suspicion to the transmission of a hidden data . The host data set is purposely corrupted. literally. steganography means. Information hiding is an emerging research area. steganography can be used to carry out hidden exchanges. the owner of the data set embeds a serial number that uniquely identifies the user of the data set. film.Efficient Steganography using LSB and encryption technique without specialized technique saving Image quality simultaneously . This adds to copyright information to makes it possible to trace any unauthorized used of the data set back to the user. All this is of great concern to the music. which encompasses applications such as copyright protection for digital media. this paper will only focus on information hiding using steganography approach. covered writing. In those applications. All these applications of information hiding are quite diverse . but in a covert way.2 Overview Steganography The word steganography comes from the Greek Steganos. the message contains information such as owner identification and a digital time stamp. Therefore. which usually applied for copyright protection. It is not to 5 .
Carrier is also known as cover-object. then the method has failed  . There has been a rapid growth of interest in steganography for two main reasons : • The publishing and broadcasting industries have become interested in techniques for hiding encrypted copyright marks and serial numbers in digital films.Efficient Steganography using LSB and encryption technique keep others from knowing the hidden information. The basic model of steganography consists of Carrier. Message and Password. changing rapidly and the first academic conference on this topic was organized in 1996. however. • Moves by various governments to restrict the availability of encryption services have motivated people to study methods by which private messages can be embedded in seemingly innocuous cover messages. books and multimedia products.Until recently. but it is to keep others from thinking that the information even exists. If a steganography method causes someone to suspect the carrier medium. audio recordings. Fig 2. which the message is embedded and serves to hide the presence of the message. information hiding techniques received very much less attention from the research community and from industry than cryptography. This situation is.1 Basic Steganography Model 6 .
The stego-object is created by replacing the selected redundant bits with message bits 7 . mpi and voc (iii) File and Disk that can hides and append files by using the slack space (iv) Text such as null characters.Efficient Steganography using LSB and encryption technique Basically. or a serial number. The Original image may or may not be required in most applications to extract the message. Message is the data that the sender wishes to remain it confidential. where they can be both color and gray-scale. The coverobject with the secretly embedded message is then called the stego-object. the model for steganography is shown on Figure 2. just alike morse code including html and java (v) Images file such as bmp. a covert communication.1. which ensures that only recipient who know the corresponding decoding key will be able to extract the message from a cover-object. The process consists of two steps (i) Identification of redundant bits in a cover-object. Recovering message from a stego-object requires the cover-object itself and a corresponding decoding key if a stego-key was used during the encoding process. avi. IP and UDP (ii) Audio that using digital audio formats such as wav. (ii) The embedding process then selects the subset of the redundant bits to be replaced with data from a secret message. the information hiding process extracts redundant bits from cover-objec[4. cipher text. gif and jpg. In general. There are several suitable carriers below to be the cover-object: (i) Network Protocols such as TCP. other image.8]t. midi. It can be plain text. or anything that can be embedded in a bit stream such as a copyright mark. Redundant bits are those bits that can be modified without corrupting the quality or destroying the integrity of the cover-object. Password is known as stego-key. mpeg.
steganography prevents an unintended recipient from suspecting that the data exists. Basically. the purpose of cryptography and steganography is to provide secret communication. the structure of a message is scrambled to make itmeaningless and unintelligible unless the decryption key is available.2. steganography does not alter the structure of the secret message. It makes noattempt to disguise or hide the encoded message. the definition of breaking the system is different . In addition. the system is broken when the attacker can read the secret message. he 8 . Therefore.Efficient Steganography using LSB and encryption technique 2. The resulting stego-image can be transmitted without revealing that secret information is being exchanged. In cryptography. cryptography offers theability of transmitting information between persons in a way that prevents a third party from reading it. It is possible to combine the techniques by encrypting message using cryptography and then hiding the encrypted message using steganography. Cryptography hides the contents of a secret message from a malicious people. for instance. Breaking a steganographic system need the attacker to detect that steganography has been used and he is able to read the embedded message. In contrast. where we transform the message so as to make it meaning obscure to a malicious people who intercept it. the steganography system is defeated. However. even if an attacker were to defeat the steganographic technique and detect the message from the stego-object.1 Steganography Cryptography vs. A message in cipher text. In other word. In cryptography. might arouse suspicion on the part of the recipient while an “invisible” message created with steganographic methods will not. but hides it inside a cover-image so it cannot be seen. whereas steganography even conceals the existence of the message. Basically. steganography is not the same as cryptography. Steganography must not be confused with cryptography. the security of classical steganography system relies on secrecy of the data encoding system. Furthermore. Once the encoding system is known. Cryptography can also provide authentication for verifying the identity of someone or something.
Efficient Steganography using LSB and encryption technique would still require the cryptographic decoding key to decipher the encrypted message . 9 .
The simplest steganography techniques embed the bits of the message directly into least significant bit plane of the cover-image in a deterministic sequence. secret communication does not advertise a covert communication by using steganography. Copyright notice or watermark can embedded inside an image to identify it as intellectual property. feature tagging. we can prove by extracting the watermark. If someone attempts to use this image without permission. Copying the stego–image also copies of the embedded features and only parties who possess the decoding stego-key will be able to extract and view the features. 2. and other descriptive elements can be embedded inside an image.2]. message and recipient. numerous steganography techniques that embed hidden messages in multimedia objects have been proposed . time stamps. annotations. Modulating the least significant bit does not result in human-perceptible difference because the amplitude of the change is small.3 Techniques Steganography Over the past few years.2. it can avoid scrutiny of the sender.2 Applications Steganography There are many applications for digital steganography of image.2. Therefore. In feature tagging. Common approaches are include: (i) Least significant bit insertion (LSB) (ii) Masking and filtering (iii) Transform techniques Least significant bits (LSB) insertion is a simple approach to embedding information in image file. This is effective only if the hidden communication is not detected by the others people. 10 . including copyright protection. On the other hand. captions.Efficient Steganography using LSB and encryption technique 2. and secret communication [1. There have been many techniques for hiding information or messages in images in such a manner that the alterations made to the image are perceptually indiscernible.
or other variants. 2. there are some advantages and disadvantages of implementing LSB on a digital image as a carrier. thus embed the information in significant areas so that the hidden message is more integral to the cover image than just hiding it in the noise level. or Wavelet Transform. 11 .Efficient Steganography using LSB and encryption technique Masking and filtering techniques. hiding capacity. All these are define based on the perceptual transparency. We have also presented an image steganographic system using LSB approach. However. which make them more robust to attack. in a manner similar to paper watermarks. hide information by marking an image. In future.3 Summary In this paper we gave an overview of steganography. usually restricted to 24 bits and gray scale images. Transformations can be applied over the entire image. Discrete Fourier Transform. we will attempt another two approaches of steganographic system on a digital image. It can enhance confidentiality of information and provides a means of communicating privately. robustness and tamper resistance of the method. The techniques performs analysis of the image. These methods hide messages in significant areas of the cover-image. such as the Discrete Cosine Transform (DCT) used in JPEG compression. to block throughout the image. This will lead us to define the best approach of steganography to hide information. Transform techniques embed the message by modulating coefficients in a transform domain.
3.1 Introduction Least significant bits (LSB) insertion is a simple approach to embedding information in image file.Efficient Steganography using LSB and encryption technique Chapter . Modulating the least significant bit does not result in human-perceptible difference because the amplitude of the change is small. Pixels: (00100111 11101001 11001000) (00100111 11001000 11101001) (11001000 00100111 11101001) 01000001 (00100110 11101001 11001000) (00100110 11001000 11101000) (11001000 00100111 11101001) A: Result: 12 .2 Least Insertion Significant Bit One of the most common techniques used in steganography today is called least significant bit (LSB) insertion.3 Least Significant Bit Insertion 3. the least significant bits of the cover-image are altered so that they form the embedded information. The simplest steganographic techniques embed the bits of the message directly into least significant bit plane of the cover-image in a deterministic sequence. The following example shows how the letter A can be hidden in the first eight bytes of three pixels in a 24-bit image. This method is exactly what it sounds like.
LSB insertion requires on average that only half the bits in an image be changed. However. while the stego-object known as stego-image. The second file is the message itself. In this process. the carrier will be known as coverimage. This process simply embedded the message into the cover-image without supplied any password or stego-key. At this stage. 3. Since the 8-bit letter A only requires eight bytes to hide it in. The image (Figure 4). the size of image and the message must be defined by the system. Figure 2. there are hidden message that imperceptible. we decided to use a plaintext as the message. 13 . The first is the original image so called cover-image. which is the information to be hidden in the image. which can embed up to 60kB messages. Before embedding process.1 is illustrated the process. The cover-image will be combined with the message.Efficient Steganography using LSB and encryption technique The three underlined bits are the only three bits that were actually altered. Therefore. The ideal image size is 800x600 pixels. The implementation of system will only focus on Least Significant Bit (LSB) as one of the steganography techniques as mentioned in previous section 2For embedding the data into an image. the ninth byte of the three pixels can be used to begin hiding the next character of the hidden message. we study an image file as a carrier to hide message. which in and gif format will hold the hidden information.3 Secure Information Hiding System (SIHS) An information hiding system has been developed for confidentiality. This will produce the output called stegoimage. The Stego-image seems identical to the cover-image. we decided to do so because we have to understand the ways of LSB insert the message bit into the image and extract the message from the stego-image produced. we require two important files. This is important to ensure the image can support the message to be embedded. in this paper. However.
8) RB(1. 14 .:)=B(1. Y=uint8(X) l=length(Y).:).1 Clear all clc Close all disp('Matrix size should be greater than input') X=input('Enter your text'). Example 3. x=input('Enter the matrix size').1 Producing Stego-Image Process To illustrate this we are giving an example how to insert information in to an image. B=dec2bin(Y. Basically an image is a matrix so in simple form we are inserting information in to an matrix.Efficient Steganography using LSB and encryption technique Figure 3. The under given example will show how to insert information into matrix.
2)). else break.jj)-1. end lll=length(RB). for ii=1:x for jj=1:x if(cc<=lll) RRB(1.jj)=M(ii.Efficient Steganography using LSB and encryption technique for i=2:l RB=[RB.jj).jj)=M(ii.B(i.cc)=dec2bin(mod(M(ii. cc=cc+1. end end end cc=1.jj).:)].2)==1) M(ii.2)==0) M(ii. for ii=1:x for jj=1:x if(m<=lll) if(RB(1. 15 . end else if(mod(M(ii. M=magic(x) m=1.jj). end end m=m+1.m)=='0') if(mod(M(ii.jj)+1.
Therefore.Efficient Steganography using LSB and encryption technique else break end end end for ll=1:cc/8 RBB(ll.4 Advantage of LSB The advantages of LSB are its simplicity to embed the bits of the message directly into the LSB plane of cover-image and many techniques use these methods . char(RR) Output: Matrix size should be greater than input Enter your text 'hello world' Enter the matrix size 16 Ans = hello world 3.1:8)=RRB(1.1. RR=uint8(RRR). This allows high perceptual transparency of LSB 16 . Modulating the LSB does not result in a human-perceptible difference because the amplitude of the change is small. end RRR=bin2dec(RBB).l). the resulting stego-image will look identical to the cover-image. RR=reshape(RR. to the human eye.(ll-1)*8+1:ll*8).
Slight modifications in the color palette and simple image manipulations will destroy the entire hidden message. In our approach it means that it also depends on the cover-image size. Any process that modifies the values of some pixels. may result in degrading of the quality of the original object. Some examples of these simple image manipulations include image resizing and cropping. such schemes can be easily destroyed by an opponent such as using lossy compression algorithms or a filtering process. Some intelligent software also checks for areas that are made up of one solid color. While LSB insertion is easy to implement. the time taken for generating the random numbers depends on the size of the key. Changes in these pixels are then avoided because slight changes would cause noticeable variations in the area and. it is also easily attacked. This increases the hidden information capacity of the cover-object. 17 . but the cover-object is degraded more. A slight variation of this technique allows for embedding the message in two or more of the least significant bits per byte. 3.6 Summary In this chapter we have presented an enhancement of the steganographic system using LSB approach to provide a means of secure communication. Although the LSB embedding methods hide data in such a way that the humans do not perceive it.5 Disadvantage LSB of We noticed that in the approach discussed above. Future work we would to extend the system to be more robust and efficient and using LSB technique for image steganography along with different encryption technique. either directly or indirectly.Efficient Steganography using LSB and encryption technique 3. Other variations on this technique include ensuring that statistical changes in the image do not occur. and therefore it is more detectable.
Efficient Steganography using LSB and encryption technique Chapter . It is now commonly used in protecting information within many kinds of civilian systems. to make the encrypted information readable again. Encryption has long been used by militaries and governments to facilitate secret communication. mobile telephones. the word encryption may also implicitly refer to the reverse process. encryption is the process of transforming information (referred to as plaintext) using an algorithm (called a cipher) to make it unreadable to anyone except those possessing special knowledge.g.1 Introduction In cryptography. the Computer Security Institute reported that in 2007. referred to as cipher text). is referred to as decryption (i. decryption e. Encrypting such files at rest helps protect them should physical security measures fail. for example data being transferred via networks (e. USB flash drives). and 53% utilized encryption for some of their data in storage.4 Encryption and RSA algorithm 4. i.In many contexts. In recent years there have been numerous reports of confidential data such as customers' personal records being exposed through loss or theft of laptops or backup drives. Digital rights management systems which prevent unauthorized use or reproduction of copyrighted material and protect software against reverse engineering (see also copy protection) are another somewhat different example of using encryption on data at rest. 71% of companies surveyed utilized encryption for some of their data in transit.. “software for encryption” can typically also perform decryption. The result of the process is encrypted information (in cryptography. Encryption can be used to protect data "at rest". usually referred to as a key . wireless intercom 18 ..e. the Internet.e. such as files on computers and storage devices (e. Encryption is also used to protect data in transit. wireless microphones.g. The reverse process. to make it unencrypted).g. e-commerce). For example.
e.1 Encryption Symmetric Symmetric encryption is the oldest and best-known technique. which can be a number. One of the earliest public key encryption applications was called Pretty Good Privacy (PGP). There have been numerous reports of data in transit being intercepted in recent years. See. a word. traffic analysis. is applied to the text of a message to change the content in a particular way. A single slip-up in system design or execution can allow successful attacks. but other techniques are still needed to protect the integrity and authenticity of a message. It was written in 1991 by Phil Zimmermann and was purchased by Symantec in 2010. or just a string of random letters. Otherwise any node between the sender and the encryption agent could potentially tamper it.g. but successfully using encryption to ensure security may be a challenging problem. Encrypting data in transit also helps to secure it as it is often difficult to physically secure all access to networks.. Encryption.2 Types of Encryption 4.Efficient Steganography using LSB and encryption technique systems.2. they can encrypt and decrypt all messages that use this key. for example. or Trojan horse. A secret key. by itself. Standards and cryptographic software and hardware to perform encryption are widely available. This might be as simple as shifting each letter by a number of places in the alphabet. 19 . on the same device it has been composed) to avoid tampering. can protect the confidentiality of messages. Digital signature and encryption must be applied at message creation time (i. Bluetooth devices and bank automatic teller machines.e. Sometimes an adversary can obtain unencrypted information without directly undoing the encryption. TEMPEST. verification of a message authentication code (MAC) or a digital signature. 4. As long as both sender and recipient know the secret key.
where we look at how to design and analyze various schemes. A public key is made freely available to anyone who might want to send you a message. but by using the matching private key. With regard to notions of security. binary files. however. Anyone who knows the secret key can decrypt the message. It requires far more processing power to both encrypt and decrypt the content of the message. in which there are two related keys-a key pair. or documents) that are encrypted by using the public key can only be decrypted by applying the same algorithm. Our study of asymmetric encryption (following our study of other primitives) will begin by searching for appropriate notions of security. This is in contrast to the symmetry in the private key setting. One answer is asymmetric encryption. where both parties had the same key.2.2 Asymmetric Encryption The problem with secret keys is exchanging them over the Internet or a large network while preventing them from falling into the wrong hands.3 Asymmetric schemes encryption The setting of public-key cryptography is also called the “asymmetric” setting due to the asymmetry in key information held by the parties. We then consider constructions. A problem with asymmetric encryption. the mechanism for achieving data privacy in the public key or asymmetric setting. This means that you do not have to worry about passing public keys over the Internet (the keys are supposed to be public). Any message (text. private key is kept secret. we will be 20 . Any message that is encrypted by using the private key can only be decrypted by using the matching public key. so that only you know it. is that it is slower than symmetric encryption. 4. Asymmetric encryption is thus another name for public-key encryption. A second. and models and formalizations via which they are captured.Efficient Steganography using LSB and encryption technique 4. Namely one party has a secret key while another has the public key that matches this secret key.
but not stateful. We write C ←$ Epk(M) or C ←$ E(pk . The second issue (namely constructions) is a diﬀerent story. The message 21 . We write M ← Dsk(C) or M ← D(sk. Accordingly we will deal with the security issues quite brieﬂy. So while only a receiver in possession of the secret key can decrypt. so that we enter the study of asymmetric encryption already having a good idea of what encryption is. M) for the operation of running E on inputs pk. The key pk used to encrypt is di ﬀerent from the key sk used to decrypt. not much more than the fact that in the latter the adversary gets the public key as input. known to the sender and also to the adversary.E. Thus. just re-formulating the deﬁnitions we have seen before. from this point of view there is very little diﬀerence between symmetric and asymmetric encryption.Efficient Steganography using LSB and encryption technique able to build considerably on our earlier study of symmetric encryption. the greater part of the eﬀort in this chapter will be on schemes and their security properties. This is important (and re-assuring) to remember. while for the symmetric case we used block ciphers. All the intuition and examples we have studied before carry over.C). The algorithm may be randomized. • The deterministic decryption algorithm D takes the secret key sk and a cipher text C not equal to return a message M. anyone in possession of the corresponding public key can encrypt data to send to this one receiver. the basis is (typically) computationally intractable problems in number theory. Indeed. how security is modeled. M and letting C be the cipher text returned. and what it means for a scheme to be secure. We write (pk. An asymmetric encryption scheme is just like a symmetric encryption scheme except for an asymmetry in the key structure. sk) be the pair of keys returned. An asymmetric encryption scheme AE = (K. respectively. Namely in the asymmetric case.as follows: • The randomized key generation algorithm K (takes no inputs and) returns a pair (pk. • The encryption algorithm E takes the public key pk and a plaintext (also called a message) M to return a value called the cipher text. Designs of asymmetric encryption schemes rely on tools and ideas diﬀerent from those underlying the design of symmetric encryption schemes. sk) of keys.D) consists of three algorithms . Furthermore pk is public. sk) ←$ K for the operation of executing K and letting (pk. the public key and matching secret key.
the holder of the secret key is a sender. In an asymmetric encryption scheme. Anyone in possession of R‟s public key pk can then send a message M privately to R. This assumption is made in what follows. The latter will be able to decrypt C using sk via M ← Dsk(C). if C was returned by Epk(M) then Dsk(C) = M. But these are not our concern now. using the secret key to tag its own messages so that the tags can be veriﬁed by others. we make the assumption that any prospective sender is in possession of an authentic copy of the public key of the receiver. and in the natural formulation of these schemes messages might be group elements and cipher texts might consist of several group 22 . Let R be an entity that wants to be able to receive encrypted communications. We will look later into mechanisms for assuring this state of knowledge. This is because there is no unique sender to maintain state. In constructing and analyzing the security of asymmetric encryption schemes. We require that the scheme provide correct decryption. we will not consider stateful asymmetric encryption algorithms. Many asymmetric encryption schemes are algebraic or number-theoretic. so that we know what are the kinds of objects whose security we want to assess. To do this.Efficient Steganography using LSB and encryption technique space associated to a public key pk is the set Plaintexts(pk) of all M for which Epk(M)never returns . using the secret key to decrypt cipher texts sent to it by others. and not someone else‟s public key. meaning really is the R‟s public-key. The encryption algorithm might be randomized. In a digital signature scheme. The decryption algorithm is deterministic and stateless. A viable scheme of course requires some security properties. sk) that might be output by K and any message M ∈ Plaintexts(pk). many diﬀerent entities are sending data to the receiver using the same public key. The last part of the deﬁnition says that cipher texts  that were correctly generated will decrypt correctly. Note that an entity wishing to send data to R must be in possession of R‟s public key pk. and must be assured that the public key is authentic. they would encrypt M via C ← Epk(M) and send the cipher text C to R. But the key management processes are not part of the asymmetric encryption scheme itself. Note the key generation algorithm is run locally by R. The ﬁrst step is key generation: R runs K to generate a pair of keys (pk. and must for security. The key usage is the “mirror-image” of the key usage in a digital signature scheme. the holder of the secret key is a receiver. sk) for itself. First we want to pin down what constitutes a speciﬁcation of a scheme. which means that for anykey-pair (pk. But unlike in a symmetric encryption scheme. We do not require that the message or cipher text be strings.
only someone with knowledge of the prime factors can feasibly decode the message. However. The prime factors must be kept secret. and Leonard Adleman at MIT.4 RSA Algorithm RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers. it was mostly considered a curiosity and. 4. but with currently published methods. 2000 (the term of patent was 17 years at the time). (The encodings will usually not be made explicit. as their public key. Since a paper describing the algorithm had been published in August 1977. Whether breaking RSA encryption is as hard as factoring is an open question known as the RSA problem. Patent 4405829  for a "Cryptographic communications system and method" that used the algorithm in 1983. along with an auxiliary value. as far as is publicly known. if the public key is large enough.1 History Clifford Cocks. RSA stands for Ron Rivest. MIT was granted U. the factoring problem. 23 . two weeks earlier. Shamir. the letters RSA are the initials of their surnames.) In particular.4. His discovery. but given the relatively expensive computers needed to implement it at the time. an English mathematician working for the UK intelligence agency GCHQ. who first publicly described it in 1978. Anyone can use the public key to encrypt a message. was never deployed. Adi Shamir. A user of RSA creates and then publishes the product of two large prime numbers. and Adleman devised RSA independently of Cocks' work. it is understood that either messages or cipher texts can be encoded as strings wherever necessary. listed in the same order as on the paper. we might talk of the length of a message of cipher text. and Rivest. with the understanding that we mean the length of some binary encoding of the quantity in question 4. described an equivalent system in an internal document in 1973. The RSA algorithm was publicly described in 1978 by Ron Rivest.S. however.The patent would have expired on September 21.Efficient Steganography using LSB and encryption technique elements. but the algorithm was released to the public domain by RSA Security on 6 September 2000. was not revealed until 1998 due to its top-secret classification. Adi Shamir and Leonard Adleman .
most commonly 24 . Compute n = p*q . C. The keys for the RSA algorithm are generated the following way: 1.4. 2. Choose an integer e such that 1 < e < φ(n) and greatest common divisor of (e. A message-tobe-transferred is enciphered to cipher text at the encoding terminal by encoding the message as a number M in a predetermined set. From the DWPI's abstract of the patent.Efficient Steganography using LSB and encryption technique prior to the December 1977 filing date of the patent application. is computed when the exponentiated number is divided by the product of two predetermined prime numbers (associated with the intended receiver). where φ is Euler's totient function. For security purposes.. Choose two distinct prime numbers p and q.e. In Key generation RSA involves a public key and a private key. e and φ(n) are co-prime. a patent in the US might not have been possible. e is released as the public key exponent. 4. The system includes a communications channel coupled to at least one terminal having an encoding device and to at least one terminal having a decoding device. Prime integers can be efficiently found using a primality test.2 Operation The RSA algorithm involves three steps • • • key generation Encryption Decryption. That number is then raised to a first predetermined power (associated with the intended receiver) and finally computed. n is used as the modulus for both the public and private keys 3. The remainder or residue. Messages encrypted with the public key can only be decrypted using the private key. φ(n)) = 1. The public key can be known to everyone and is used for encrypting messages. 4. the integer p and q should be chosen at random. i. Compute φ(n) = (p – 1)(q – 1). e having a short bitlength and small Hamming weight results in more efficient encryption . Had Cocks' work been publicly known. and should be of similar bit-length. regulations in much of the rest of the world precludedpatents elsewhere and only the US patent was granted.
(4..e.537. small values of e (such as 3) have been shown to be less secure in some settings. The private key consists of the modulus n and the private (or decryption) exponent d which must be kept secret. Determine d as: d= e -1 mod(ɸ(n)) i. but this is very unlikely to occur in practice.Efficient Steganography using LSB and encryption technique 0x10001 = 65.1) The public key consists of the modulus n and the public (or encryption) exponent e. 25 . He then computes the cipher text corresponding to C= M e mod(n) (4.31 standard prescribes. In Encryption Alice transmits her public key to Bob and keeps the private key secret. However. where lcm is the least common multiple. IEEE 1363 describes. is to choose d matching de ≡ 1 mod λ with λ = lcm(p − 1. λ can also be defined using the Carmichael function. λ(n).2) This can be done quickly using the method of exponentiation by squaring. Bob then wishes to send message M to Alice. 5. q − 1). that p and q match additional requirements: be strong primes. • This is more clearly stated as solve for d given (d*e) mod φ(n) = 1 • This is often computed using the extended Euclidean algorithm. used by PKCS#1.He first turns M into an integer m. such that by using an agreed-upon reversible protocol known as a padding scheme. and PKCS#1 allows. Note that at least nine values of m will yield a cipher text c equal to m. Bob then transmits to Alice. • d is kept as the private key exponent. Notes: • An alternative. and be different enough that Fermat factorization fails. • The ANSI X9. d is the multiplicative inverse of e mod φ(n). Using λ instead of φ(n) allows more choices for d.
(In practice.1 1. For a padded plaintext message „M‟.120.Efficient Steganography using LSB and encryption technique During Decryption Alice can recover from by using her private key exponent via computing M= C d mod(n) there are more efficient methods of calculating using the pre computed values below.233. Compute n=P*Q giving n = 61 × 53 = 3. such as P=61and Q=53. Here is an example of RSA encryption and decryption.3) Given. Choosing a prime number for leaves us only to check that is not a divisor of 3120. 2. Choose any number 1< e <3120 that is co-prime to 3. she can recover the original message M by reversing the padding scheme. Let e=17.) (4. but one can also use Open SSL to generate and examine a real key pair. Compute d. Example 4. 5. Choose two distinct prime numbers. the modular multiplicative inverse of (d*e) mod((p-1)*(q-1))=1yielding D=2753. 3. the encryption function is M17 mod (3233).233 & e=17). 4. The public key is (n=3. 26 . Compute the totient of the product as ɸ (n)=(p-1)*(q-1) giving ɸ (3233) = (61-1)*(53-1) = 3120. The parameters used here are artificially small.
also from the public key. Encryption in steganography plays a crucial role which increases the level of security and increases productivity of the steganography process. In real life situations the primes selected would be much larger. 27 . Both of these calculations can be computed efficiently using the square-and-multiply algorithm for modular exponentiation.Efficient Steganography using LSB and encryption technique The private key is (n=3. in order to encrypt M=65. For an encrypted cipher text . 3.233. we calculate M= 27902753 mod (3233) = 65. in our example it would be relatively trivial to factor „n‟.5 Summary In this paper we give overview of encryption and RSA algorithm. obtained from the freely available public key back to the primes P and Q. RSA algorithm is a popular and efficient algorithm. we calculate C= 6517 mod (3233) = 2790 To decrypt C=2790.233 & d=2753). 4. we could then compute „d‟ and so acquire the private key. Given „e‟. the decryption function is C2753 mod(3233) For instance.
Efficient Steganography using LSB and encryption technique Chapter . It has three levels of security as follows. It first compares the length of the message to be concealed with the size of the image to ensure that the image can hold the secret file. a 800 × 600 pixel image can contain a total amount of 800x600x1=480. If the size of secret file is more.5 Experimental Process. Thus.1 Message Concealing The proposed method is designed for BMP images. so a total of 3 bits can be stored in each pixel. Level I-The message is inserted at a random pixel value of the image as inserted by the sender. Level 2-The message to be sent is encrypted using an encryption algorithm (here we have used RSA algorithm). G. a bit of each of the red. When using a 24 bit color image. But precaution must be taken such that message length should not exceed matrix size. B is selected and message is inserted in the selected layer. then a new image is selected. It can be any row and column of the image matrix.000 bits (60. Results and Discussions 5. 28 . green and blue color components can be used. So one layer between R.000 bytes) of secret data.
If anyone try to break into the system then he has to know the starting position of the message then encryption method used and method of insertion. Convert the encrypted message to unsigned integer form 5. cover image Output: stego image (containing message) 1. Till he/she got all information the value of information might have lost. Save the image 11. Now convert it in to binary form 7.Efficient Steganography using LSB and encryption technique Level 3-The encrypted message now inserted to image using LSB technique. Encrypt the entered message 4. The stego key is used to generate the same random number with which selection of the pixels is done and the order of block. Store the message in a one row matrix 8. Insert the message 3. Now insert the binary format message in to image 10. End 5. Store the message length in a predefined position of image 9. In LSB technique encrypted message is converted to binary form and inserted in the least significant bit of pixel value as inserted before. Algorithm for Concealing messages (Sender Side) Input: message. store location of image where message to be hidden 2.2 Message Extracting The same stego key is used for decoding of secret message from the stego image. These the three level of security enable the process to be a highly secure message system. Find the length of the message inserted 6. 29 .
3 Experimental Results Sender Result Fig 5. Decrypt the retrieved message 5.Efficient Steganography using LSB and encryption technique Algorithm Extraction message (Receiver side) Input: stego image(containing message) Output: hidden message 1. Retrieve the size of the hidden message 3.1(Steganography at Sender side) 30 . Display the message 6. End 5. Retrieve the message by same insertion method 4. Enter location to start(Stego key) 2.
Stego image look alike the original image which does not show any distortion. 31 .1 both original and the stego image is shown. Thus the stego image will not attract attention towards itself.Efficient Steganography using LSB and encryption technique Receiver Result Fig 5.4 Discussion In the above two figures in figure 5.2(Output at Receiver side) 5. So it can be transferred to the recipient without displaying information within itself.
.2 Conclusion With this project we have learned a lot. . This allows for a much broader spectrum of uses: one would be able to encode . thinking of how to detect and attack it and the methods to do so are far more complex than actually doing the Steganography itself. We have learned that while implementing Image Steganography is important. We became more interested in the subject the more we researched it. This project was fun from the start and only got more interesting as we went on developing it.Efficient Steganography using LSB and encryption technique Chapter .1 thoughts Future We hope to add support to hide all file formats.6 Conclusion 6. especially about bit operations and different encryption technique. . There is a lot of research that is beginning to discover new ways to detect Steganography.pdf.exe. We also would like to implement batch image processing and statistical analysis so that We can run the program through a dataset of images and detect Steganography and perhaps crawl through Google Image Search to see how prevalent Steganography is. 6. etc. The program would be more versatile because often hiding text just isn‟t enough. most of which involves some variation of statistical analysis.mp3. We eventually plan to port the program to use C/C++ other programming language so that we may take advantage of bit-fields in C and learn to code GUI‟s as well.doc. It is interesting to see what other methods will be developed and how accurate they will be at detecting Steganography 32 .
Portland Oregon. Amin. pp. Klimant. R. Shah Alam. 1019-1022. 1525. 273-289.  E.  J. Chandramouli. Salleh. “Analysis of LSB Based Image Steganography Techniques”. “Modeling the Security of Steganographic Systems”.Efficient Steganography using LSB and encryption technique EFFICIENT STEGANOGRAPHY USING LSB AND ENCRYPTION TECHNIQUE BIBLIOGRAPHY  C. 1999.. pp.P Peticolas. 274--278. April 1998. 2003. Jajodia. 4th National Conference On Telecommunication Technology Proceedings (NCTT2003). “Information Hiding Using Steganography”. pp. Cachin. Ibrahim. Portland. in 2nd Workshop on Information Hiding. “Some Design Issues For Robust Data hiding Systems”. et al. http://citeseer. PICS '99. “Digital Steganography: Hiding Data within Data”. Johnson & S. Zollner. pp.  F... January 14-15. pp." in Proceedings of the Image Processing. Memon. H.  D. Johnson. Malaysia.J. 306-318. in proceeding of IEEE.  M. July 1999. Anderson and M. Kuhn.F. “Steganalysis of Images Created Using Current Steganography Software”. Lin and E.com/404009. in Proceeding for the Second Information Hiding Workshop. N. USA. pp. IEEE pp. 33 . Ramkumar & A. H. Akansu. 21-25. 1062-1078.  M. 345-355.F. vol. “Information Hiding – A Survey”.N. May-Jun 2001. Artz.G.A. “Staganalysis: The Investigation of Hiding Information”.  R. et al. IEEE. Delp. "A Review of Data Hiding in Digital Images. 113-116.  N. April 1998.T.J. pp. “An Information-Theoretic Model for Steganography”. Federrath. Ed.M. IEEE Internet Computing. Image Capture Systems Conference. S. in proceeding 2nd Information Hiding Workshop. Image Quality. Apr. 2001. 1998.nj. 75-80.html  N. M. pp. Jajodia. 1998. S.nec.
Petitcolas.A.  Mao. An up-to-date book on cryptography. Oxford University Press. F.P. IEEE Journal of Selected Area in Communications.Efficient Steganography using LSB and encryption technique  R.  Patterson & wayne (1998).Modern Cryptography Theory and Practice ISBN 0-13-066943-1.J. 1988. Roman & littlefield‟  Dominic Welsh – Codes and Cryptography. “On The Limits of Steganography”. Mathematical cryptography for Computer scientists and mathematician. May 1998. 34 . pp. Anderson. Wenbo (2004). 474-481.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.