Sie sind auf Seite 1von 50

CHAPTER- I

INTRODUCTION
Digital visual cryptographicis one of the latest techniques which is used for safeguarding the origins of the image by protecting it against Piracy. Cryptographic is a set of identifying information that is either visibly or invisibly imprinted on a host image in order to identify the origin of the host image.

1.1 Types of Cryptographic in terms of Fidelity


Fragile Cryptographic This cryptographic is mainly used for detecting modification of data. This cryptographic gets degraded even for a slight modification of data in the image. Robust Cryptographic This cryptographic has the ability to withstand various image attacks thus providing authentication. Semi-Fragile Cryptographic It is an intermediate between fragile and robust cryptographics. It is not robust against all possible image attacks.

CHAPTER-2
REPERESENTATION OF IMAGES:
In the chapter we discuss in detail about the RGB images, its model and the representations of such images in decimal bit planes and binary bit planes as well. Then the representation of the character image using a bit map is also discussed.

2.1 RGB color model


The RGB color model is an additive model in which red, green and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation RGB come from the three primary colors red, green and blue. These three colors should not be confused with the primary pigments of red, yellow and blue known in the art world as primary colors.

Fig 2.1 RGB COLOUR MODEL The RGB color model itself does not define what is meant by red, green, and blue, and the results of mixing them are not exact spectral make-up of the red, green and blue primaries are defined. The color model then becomes an absolute color such as RGB.

2.2 A picture model for RGB representation:

Fig 2.2 RGB representation An RGB image, along with its separate R, G and B components; note that the white snow consists of strong red, green and blue; the brown barn is composed of strong red and green with little blue; the dark green grass consists of strong blue and moderately strong red and green.

2.3 Representation of RGB image:


A digital color image can be typically represented by triplet of values, one for each color channels, as in the frequency used RGB. The individual color values are almost universally 8-bit values resulting in 3 bytes (24 bits) per pixel. There are a number of alternative methods of storing the image data.

2.3 REPRESENTATION OF 3 BIT DECIMAL RGB-COLOR MODEL Since each of the individual colors can be represented by 8-bit values resulting in 3 bytes we can divide the 3 bit decimal bit plane into 24 frames of each being a binary bit plane as it can be viewed as shown in the following data.

= Decimal Bit Planes Planes

Fig 2.4 THE REPRESENTATION OF BINARY EQUIVALENT OF THE RGB DECIMAL BIT PLANE

2.4 Representation of character using a BIT map:

Typically a binary message character is represented as a binary bit map, which is a 8 by 8 matrix as shown in the fig. for example shown below series of 0s represents a smooth line and there by we can see a character E. 0 0 0 0 0 0 0 0

BIT MAP FOR E

CHAPTER -3
THE CONCEPT OF CRYPTOGRAPHICING
Digital cryptographicing is a technique which follows an individual to add hidden copyright notices or other verification messages to digital audio, video, or image signals and documents. Such a message is a group of bits describing information pertaining to the signal or to the author of the signal (name, place, etc.).The technique takes its name from cryptographicing of paper or money as securtity measure. Digital cryptographicing can be a form of stenography, in which data is hidden in the message without the end users Knowledge. A simple example of a digital cryptographic would be a visible seal placed over an image to identify the copyright. However the cryptographic might contain additional information including the identity of the purchaser of a particular copy of the material. According to the human perception, the digital cryptographics can be dividing into different types as follows: visible and invisible. Visible cryptographic is a secondary translucent overlaid into the primary image.

3.1 Fundamentals of cryptographicing


This section describes the different approaches that cryptographicing algorithms is based on. The main topics being wether to embed watermaks in the spatial domain or a transform domain. Advantages and disadvanteges are also discussed. The ideal algorithm Nothing is perfect, which also holds true for cryptographicing algorithms.But what if it was possible to construct the perfect or ideal cryptographicing scheme? Listed here are a sum up of requirements to such an ideal algorithm, serving as introduction to the topic,but also emphasizing the many contradictions one encounters when dealing with cryptographicing. Robust Since cryptographicing is primarily used for copyright protection and proving ownership, the embedded cryptographic has to survive and be extractable after the marked image has been submitted to a variety of things, for example:

Scaling of the image Converting a color image to grayscale Blurring, sharpening and other image-effect algorithms Lossy compression, for example JPEG, used widely on the internet

Fig 3.1 robust system Transparent There are some obvious reasons for wanting to embed the cryptographic, without being able to see any difference on the marked image contra the original. Not being able to see the cryptographic, may keep some people from trying to remove it. If the image is used unrightfully, and your cryptographic can afterwards be extracted, you have a pretty good case against the copyright violator. It is also desirable to preserve the quality of an image, even though a cryptographic is embedded in it. Imagine for 7

example that beautiful pictures promoting a tourist website are severely distorted by the cryptographicing. Then the algorithm would be practically unusable. Tamper resistant Tightly linked to robustness, since any effort made to remove or deteriorate the cryptographic should result in the cryptographiced image being severely degraded in quality. There are different approaches for achieving a good level of robustness, which will be discussed later. Cheap and easy implementation For a cryptographicing algorithm to have success, it has to be relatively easy to implement, while not costing a fortune. An algorithm is of no use if it takes a day to mark a picture, and a day to extract the mark again. It has to be usable in real life which of course is application dependant. Robust and fragile cryptographics It seems that for most applications, it would be ideal to have a cryptographic that are able to survive transmission, usage and attacks. Such a cryptographic is named robust. On the other hand, cryptographics is also used to detect if the image they are in, has been altered. That is cryptographics that cannot resist any alteration. Such cryptographics is called fragile. Finally cryptographics have been proposed, trying to combine robustness and fragility. That is a cryptographic that can survive some alterations, but would break if the image was cropped for example, or parts of another image was inserted into it.

Spatial domain One approach is to embed cryptographics in the spatial domain of an image.

Fig 3.2 spatial domain The idea is that the number of bits you wish to embed, the cryptographic size, is stored in the pixels of the image to be marked. Let us for example want to embed 40 bits of cryptographic information in a host image. Then we supply a seed to a PRNG (Pseudo Random Number Generator) and uses it to provide us with 40sets of (x,y) with respect to the illustration, in other words we select 40 pixels.Each of these pixels are now altered, exchanging a chossen bit of color information with our cryptographic bit. The choice of bit involves a trade-off: If we choose one of the lesser significant bits, our alteration can be held invisible in the marked picture, but image compression and other things might be attacking these less significant bits, which could mean that the cryptographic is not very robust. If a more significant bit is chossen, we would achieve much better robustness, but our alteration would be visible. It would look weird if the sunset picture had 40 black spots in it. When you would attempt to extract the cryptographic at a given time, the PRNG would then be started with the same seed, and again produce the 40 pixels, from where we canextract our bits. This method is easy to use, but has many drawbacks. Even small alterations to our image would destroy at least some of our cryptographic information. Therefore the method could be used for embedding fragile cryptographics.corresponds to the siblings of chosen coordinate, the last four to the siblings of the chosen coordinates parent in the tree. The four outputs are the coefficients corresponding to the chosen coordinates four children. The trained neural network can now be used to embed the cryptographic. The eight input vectors for each selected coordinate is given to the neural network, resulting in four outputvectors.The cryptographic information is then embedded by replacing the original coefficients with the output from the neural network, adjusted by a constant..To obtain the cryptographiced image, an inverse DWT is performed.

Extraction phase 1. Transform the cryptographiced image using DWT. 2. Build the tree representation. 3. Use the seed k to start a sequence with the PRNG. This gives a set of coordinates.

4. The corresponding vectors are fed to the neural network, which results in four output vectors. The difference between the expected output and the actual output of the neural network provides information of the hidden cryptographic

3.2 Block diagram for cryptographicing

Fig 3.4 block diagram for cryptographicing

10

3.3 Proposed Cryptographicing Technique


In this section, we give a description about the technique we propose, including the embedding and extraction processes. Our proposed cryptographicing technique uses biorthogonal wavelets (biorthogonal splines in specific) for cryptographicing. We decompose the image using DWT. The cryptographic we use is a binary image. We embed the cryptographic, with the use of a key ( a small binary image), in the detail wavelet coefficients in order to make the technique robust against several attacks, and to preserve imperceptibility.Our technique for embedding and extraction can be summarized as follows: 3.3.1 The Embedding Process The general embedding process is summarized in Fig. 1. Some of the conventional wavelet cryptographicing techniques embeds the cryptographic in the components of the first level DWT. Other techniques, that perform a second level decomposition, obtain the approximation sub-band from the first level decomposition, and then decompose it further as shown in Fig. 2. In our proposed embedding process, we use a localized decomposition, meaning that the second level decomposition is performed on the detail sub-band resulting from the first level decomposition as shown in Fig.

Figure 3.4: The proposed cryptographic embedding method. The host image is taken as the input to decompose it and embed the cryptographic in its coefficients to produce the cryptographiced image.

Fig 3.4 embedding process

11

Figure 3.4.1: Second level decomposition. L represents the approximation sub-band, HL represents the horizontal sub-band, LH represents the vertical, and HH represents diagonal sub-band.

Figure 3.4.2: The second level decomposition in the proposed method.

The embedding process can be described in the following steps: Step1: Decompose the image using DWT to obtain the horizontal detail information (HL1). Step2: Decompose HL1 resulted from step 1 using DWT to obtain the second level detail coefficients (HL2). Step3: Generate a PN sequence whenever a cryptographic bit is zero, and add it to HL2 resulted from step2. Step4: Perform the inverse of the DWT (IDWT) twice to obtain the cryptographiced image.

12

3.3. 2 The Extraction Process The extraction process is shown in Fig 3.3.3 Figure 3.3.3: The proposed cryptographic extraction method. The cryptographiced image is taken as the input. It is then decomposed to extract the cryptographic from its coefficients.

For extracting the cryptographic, we apply the following steps to the cryptographiced image: Step1: Perform DWT to obtain the horizontal detail information (HL1). Step2: Again, decompose HL1 using DWT to obtain HL2. Step3: Compute the correlation between the detail coefficients resulted from step2 (HL2) and the PN sequence. Step4: Set the cryptographic pixel value to zero (black) whenever the correlation is greater than a certain threshold.

3.4 Types of Cryptographiced Images:


The cryptographiced images are basically in two different categories: 1. Visible cryptographics 2. Invisible cryptographics

I.Visible cryptographics:

Visible cryptographics change the signal altogether such that the cryptographiced signal is totally different from the actual signal, e.g., adding an image as a cryptographic 13

to another image. Stock photography agencies often add a cryptographic in the shape of a copyright symbol () to previews of their images, so that the previews do not substitute for high quality copies of the product included with a license. Visible cryptographics can be used in following cases: 1.Visible cryptographicing for enhanced copyright protection. In such situations, where images are made available through internet and the content owner is concerned tat the images will be used commercially (e.g. imprinting coffee mugs) without payment of royalties. Here the content owner desires an ownership mark, that is visually apparent, but which does not prevent image being used for other purposes (e.g. scholarly research). 2.Visible cryptographicing used to indicate ownership originals. In this case images are made available through the internet and the content owner desires to indicate the ownership of the underlying materials (library manuscript), so an observer might be encouraged to patronize the institution that owns the material.

II.Invisible
Invisible cryptographics do not change the signal to a perceptually great extent, i.e., there are only minor variations in the output signal. An example of an invisible cryptographic is when some bits are added to an image modifying only its latest significant bits. Invisible cryptographics that are unknown to the end user are stegnatography. While the addition of the hidden messages to the signal does not restrict that signals use, it provides a mechanism to track the signal to the original owner. Another application is to protect digital media by fingerprinting each copy with the purchasers information. If the purchaser makes illegitimate copies, these will contain his name. Fingerprints are an extension to cryptographicing principle and can be both visible and invisible. There are various spatial and frequency domain techniques used for adding cryptographics to and removing them from signals. Purely spatial techniques are not robust to some attacks to the signal like cropping and zooming, where as most frequency domain techniques and mixed domain techniques are quite robust to such attacks.

14

Fig 3.5 invisible The communication of a digital cryptographic may be viewed as an exercise in digital communication message bits are encoded and embedded in a suitable carrier. The properties that are desired of the cryptographic, such as imperceptibility, robustness to noise and to image editing such as cropping and rotation are the factors that drive the choice of carrier. In robust cryptographics, it is the combination of low signal amplitude (because the cryptographic is invisible) and large bandwidth (because image are typically quite large), as well as the relatively short length of the message, that dictates the use of spread spectrum for encoding the message bits. Spectrum is a robust and secure from of communication. In image cryptographicing, he spread spectrum signal is typically placed in the frequency domain to produce a cryptographic that is immune to image processing.

3.5 Functional requirements of cryptographicing:


A cryptographic conveys as much information as possible. This implies that the cryptographic data should be high. a cryptographic should be a secret and be accessible to authorized parties only. This requirement is known as security of the cryptographic. This is achieved by use of cryptographic keys. A cryptographic is an integral part of data. This must persist even after single processing and data manipulation. This also includes manipulation that attempts to remove the cryptographic. This requirement is known as robustness requirement. A cryptographic though being irremovable should also be impercepitable. It should not modify or alter the quality of content. Normally, the degradation in quality is well below cryptographic recovery process may or may not be allowed to use the original contents of the digital cryptographic one percent.

3.6 Generic model of cryptographicing scheme:

15

The generic model shows how a digital cryptographicing scheme functions. The first part shows how to create cryptographiced data. The second part shows how to recover the cryptographic from a test data. A content owner approaches a neutral registration authority. Depending on the nature of multimedia content, the authority allots a unique registration number. It also archives content and unique registration number for future reference. A content owner generates suitable water mark, which can be embedded with in data. Such a cryptographic should be unobtrusive and secure. To ensure that cryptographic is imperceptible, the cryptographic signal amplitude should be relatively small compared to the average amplitude of content. To ensure security of embedded digital cryptographic, one or several secret and crypto logically secured keys have to be used. To ensure robustness against data manipulation and processing, it is helpful to have very small digital cryptographics and ensure that it is redundantly disturbed in the host data. Thus, while extracting a digital cryptographic, a small sample of cryptographic data is enough. The digital cryptographic, public/private key and host data is processed using cryptographicing algorithm to generate the cryptographiced data.To extract the cryptographic, the authorized agency requires cryptographic and/or original host data, secure or public key and test data. All these inputs are processed by cryptographic recovery program to extract cryptographic or confidence measure. The confidence measure indicates the degree of closeness of original cryptographic and recovered cryptographic.

3.7 Requirements of digital cryptographicing:


Digital cryptographicing has to meet the following requirements: 1. Perceptual transparency: The algorithm must embed data without affecting the perceptual quality of underlying host signal. 2. Security: A secure data embedding procedure can not be broken unless the unauthorized user access to a secret key that controls the insertion of data in host signal. 3. Robustness: Cryptographicing must survive attacks by lossy data compression and image manipulation like cut and paste, filtering etc. 16

4. Unambiguous: Retrieval of cryptographic should unambiguously identify the owner 5. Universal: Same cryptographic algorithm should be applicable to all multimedia under consideration. 6. Imperceptibility: The cryptographic should not be visible by human visual system (HVS) and should not degrade the image quality. 7. Reliability: To ensure that the project application returns the cryptographic each time.

CHAPTER IV:

DISCRETE WAVELET TRANSFORM


With the development of the JPEG2000 standard digital visual cryptographicschemes that are based on Discrete Wavelet Transform (DWT) are becoming more and more interesting. The majority of cryptographicing schemes consider Discrete Cosine Transform (DCT) as the method of choice. An overview can be found in . Though, there is evidence that DWT could enhance robustness of the cryptographic against intentional and unintentional attacks, work based on DWT for cryptographicing is comparatively rare but exists.. The reason mainly being that the former JPEG standard relied on DCT. With the advent of JPEG 2000 schemes based on DWT are gaining interest. Though, cryptographic robustness varies with the underlying transform algorithms, provisions must be taken to harden a cryptographic against attacks. Ways are, e.g. multiple embedding and the application of error correction codes are in use to regain the embedded cryptographic. Robustness of cryptographicing schemes being far from satisfactory this paper investigates application of DWT in conjunction with ECC.

The transform of a signal is just another form of representing the signal. It does not change the information content present in the signal. The Wavelet Transform provides a time-frequency representation of the signal. It was developed to overcome the short coming of the Short Time Fourier Transform (STFT), which can also be used to analyze non-stationary signals. While STFT gives a constant resolution at all frequencies, the Wavelet Transform uses multi-resolution technique by which different frequencies are analyzed with different resolutions. A wave is an oscillating function of time or space and is periodic. In contrast, wavelets are localized waves. They have their energy concentrated in time or space and

17

are suited to analysis of transient signals. While Fourier Transform and STFT use waves to analyze signals, the Wavelet Transform uses wavelets of finite energy.

Fig 4.1 dwt The wavelet analysis is done similar to the STFT analysis. The signal to be analyzed is multiplied with a wavelet function just as it is multiplied with a window function in STFT, and then the transform is computed for each segment generated. However, unlike STFT, in Wavelet Transform, the width of the wavelet function changes with each spectral component. The Wavelet Transform, at high frequencies, gives good time resolution and poor frequency resolution, while at low frequencies, the Wavelet Transform gives good frequency resolution and poor time resolution.

4.1 Function of Discrete Wavelet Transform (DWT)


The basic idea of DWT for one-dimensional signals is briefly described. A signal is split into two parts, usually the high frequency and the low frequency part. This splitting is called decomposition. The edge components of the signal are largely confined to the high frequencies part. The signal is passed through a series of high pass filters to analyze the high frequencies, and it is passed through a series of low pass filters to analyze the low frequencies. Filters of different cutoff frequencies are used to analyzethe signal at different resolutions. Let us suppose that x[n] is the original signal, spanning a frequency band of 0 to rad/s. The original signal x[n] is first passed through a halfband highpass filter g[n] and a lowpass filter h[n]. After the filtering, half of the samples can be eliminated according to the Nyquists rule, since the signal now has the highest frequency of /2 radians instead of . The signal can therefore be subsampled by 2, simply by discarding every second sample. This constitutes one level of decomposition and can mathematically be expressed as follows:

18

where yhigh[k] and ylow[k] are the outputs of the highpass and lowpass filters, respectively, after subsampling by 2. The above procedure can be repeated for further decomposition. The outputs of the highpass and lowpass filters are called DWT coefficients and by these DWT coefficients the original image can be reconstructed. The reconstructed process is called the Inverse Discrete Wavelet Transform (IDWT).

4.2 The Continuous Wavelet Transform and the Wavelet Series


The Continuous Wavelet Transform (CWT) is provided by equation 2.1, where x(t) is the signal to be analyzed. (t) is the mother wavelet or the basis function. All the wavelet functions used in the transformation are derived from the mother wavelet through translation (shifting) and scaling (dilation or compression).

The mother wavelet used to generate all the basis functions is designed based on some desired characteristics associated with that function. The translation parameter relates to the location of the wavelet function as it is shifted through the signal. Thus, it corresponds to the time information in the Wavelet Transform. The scale parameter s is defined as |1/frequency| and corresponds to frequency information. Scaling either dilates (expands) or compresses a signal. Large scales (low frequencies) dilate the signal and provide detailed information hidden in the signal, while small scales (high frequencies) compress the signal and provide global information about the signal. Notice that the Wavelet Transform merely performs the convolution operation of the signal and the basis function. The above analysis becomes very useful as in most practical applications, high frequencies (low scales) do not last for a long duration, but instead, appear as short bursts, while low frequencies (high scales) usually last for entire duration of the signal. The Wavelet Series is obtained by discretizing CWT. This aids in computation of CWT using computers and is obtained by sampling the time-scale plane. The sampling rate can be changed accordingly with scale change without violating the Nyquist criterion. Nyquist criterion states that, the minimum sampling rate that allows

19

reconstruction of the original signal is 2 radians, where is the highest frequency in the signal. Therefore, as the scale goes higher (lower frequencies), the sampling rate can be decreased thus reducing the number of computations.

4.3 The Discrete Wavelet Transform


The Wavelet Series is just a sampled version of CWT and its computation may consume significant amount of time and resources, depending on the resolution required. The Discrete Wavelet Transform (DWT), which is based on sub-band coding is found to yield a fast computation of Wavelet Transform. It is easy to implement and reduces the computation time and resources required. The foundations of DWT go back to 1976 when techniques to decompose discrete time signals were devised [5]. Similar work was done in speech signal coding which was named as sub-band coding. In 1983, a technique similar to sub-band coding was developed which was named pyramidal coding. Later many improvements were made to these coding schemes which resulted in efficient multi-resolution analysis schemes. In CWT, the signals are analyzed using a set of basis functions which relate to each other by simple scaling and translation. In the case of DWT, a time-scale representation of the digital signal is obtained using digital filtering techniques. The signal to be analyzed is passed through filters with different cutoff frequencies at different scales.

4.4 DWT and Filter Banks


4.4.1 Multi-Resolution Analysis using Filter Banks Filters are one of the most widely used signal processing functions. Wavelets can be realized by iteration of filters with rescaling. The resolution of the signal, which is a measure of the amount of detail information in the signal, is determined by the filtering operations, and the scale is determined by upsampling and downsampling (subsampling) operations The DWT is computed by successive lowpass and highpass filtering of the discrete timedomain signal.This is called the Mallat algorithm or Mallat-tree decomposition.Its significance is in the manner it connects the continuous-time mutiresolution to discretetime filters. In the figure, the signal is denoted by the sequence x[n], where n is an integer.The low pass filter is denoted by G0 while the high pass filter is denoted by H0.At each level,the high pass filter produces detail information, d[n],while the low pass filter associated with scaling function produces coarse approximations, a[n].

20

Fig 4.2 three level wavelet decomposition At each decomposition level, the half band filters produce signals spanning only half the frequency band. This doubles the frequency resolution as the uncertainity in frequency is reduced by half. In accordance with Nyquists rule if the original signal has a highest frequency of , which requires a sampling frequency of 2 radians, then it now has a highest frequency of /2 radians. It can now be sampled at a frequency of radians thus discarding half the samples with no loss of information. This decimation by 2 halves the time resolution as the entire signal is now represented by only half the number of samples. Thus, while the half band low pass filtering removes half of the frequencies and thus halves the resolution, the decimation by 2 doubles the scale. With this approach, the time resolution becomes arbitrarily good at high frequencies,while the frequency resolution becomes arbitrarily good at low frequencies. The time-frequency plane is thus resolved.The filtering and decimation process is continued until the desired level is reached. The maximum number of levels depends on the length of the signal. The DWT of the original signal is then obtained by concatenating all the coefficients, a[n] and d[n],starting from the last level of decomposition.

Fig 4.3 three level wavelet reconstruction

21

Shows the reconstruction of the original signal from the wavelet coefficients.Basically, the reconstruction is the reverse process of decomposition.The approximation and detail coefficients at every level are upsampled by two,passed through the low pass and high pass synthesis filters and then added.This process is continued through the same number of levels as in the decomposition process to obtain and the original signal.The Mallat algorithm works equally well if the analysis filters,G0 and H0,are exchanged with the synthesis filters. 4.4.2Conditions for Perfect Reconstruction

In most Wavelet Transform applications, it is required that the original signal be synthesized from the wavelet coefficients. To achieve perfect reconstruction the analysis and synthesis filters have to satisfy certain conditions. Let G0(z) and G1(z) be the low pass analysis and synthesis filters, respectively and H0(z) and H1(z) the high pass analysis and synthesis filters respectively. Then the filters have to satisfy the following two conditions

The first condition implies that the reconstruction is aliasing-free and the second condition implies that the amplitude distortion has amplitude of one. It can be observed that the perfect reconstruction condition does not change if we switch the analysis and synthesis filters. There are a number of filters which satisfy these conditions. But not all of them give accurate Wavelet Transforms, especially when the filter coefficients are quantized. The accuracy of the Wavelet Transform can be determined after reconstruction by calculating the Signal to Noise Ratio (SNR) of the signal. Some applications like pattern recognition do not need reconstruction, and in such applications.

4.5 Wavelet Families


There are a number of basis functions that can be used as the mother wavelet for Wavelet Transformation. Since the mother wavelet produces all wavelet functions used in the transformation through translation and scaling, it determines the characteristics of the resulting Wavelet Transform. Therefore, the details of the particular application should be taken into account and the appropriate mother wavelet should be chosen in order to usethe Wavelet Transform effectively.

22

Fig4.4 some of the commonly used wavelet functions.Haar wavelet is one of the oldest and simplest wavelet.Therefore, any discussion of wavelets starts with the Haar wavelet. Daubechies wavelets are the most popular wavelets.They represent the foundations of wavelet signal processing and are used in numerous applications.These are also called Maxflat wavelets as their frequency responses have maximum flatness at frequencies 0 and.This is a very desirable property in some applications The Haar,Daubechies, Symlets and Coiflets are compactly supported orthogonal wavelets.These wavelets along with Meyer wavelets are capable of perfect reconstruction. The Meyer, Morlet and Mexican Hat wavelets are symmetric in shape. The wavelets are chosen based on their shape and their ability to analyze the signal.

23

CHAPTER-V:

DOMAINS AND APPLICATIONS OF CRYPTOGRAPHICING 5.1 Domains used in cryptographicing:


Spatial domain: This is one of the simplest techniques Simple Technique obtained by LSB Substitution i.e. Obtain the bit planes of the Host Image and Replace the zero bit plane of host image with cryptographic image Advantages: a) A simple technique
b) Requires no cryptographic image

c) No blocking artifacts d) Maximum Capacity Disadvantages:

24

a) Prone to tampering and attacks like Compression. b) Rotation c) Scaling d) Translation e) Cropping etc. Transform domain: Host image is transformed into another domain using DCT, Hartley, and Wavelet etc. Cryptographic image is embedded in the frequency coefficients of the transformed host image Cryptographic is extracted from the cryptographiced image by taking inverse transform and identifying the coefficients Advantages: a) Robustness b) Resistant to rotation, scaling and translation c) Perceptibility Disadvantages: a) Less Capacity b) Computationally Complex c) Blocking artifacts due to block processing Hybrid domain: This is intermediate between spatial and transform domain, it is a combination of both spatial and frequency domain. Advantages: a) To increase the capacity of the cryptographic. b) To make use of the benefit of transform domains. c) To maximize the immunity of the cryptographic

5.2 Applications of cryptographicing:


Cryptographicing has wide range of application .they can be used for 1.Data Hiding -- Providing private secret messages

25

2. Copyright Protection 3. Copy Control 4. Data Authentication 5. Broadcasting Monitoring 6. Copy Protection

------

To prove ownership To trace illegal copies and License Agreement Check if content is modified For commercial Advertisement To protect illegal copying of the information

5.3 Cryptographicing components:

VISIBILITY

CAPACITY Fig 5.1 cryptographicing component CAPACITY:

ROBUSTNESS

It refers to the amount of information we are able to insert into the host image. Capacity = Bytes of hidden data Bytes of Cover image ROBUSTNESS: It refers to ability of inserted information to withstand image modifications. At present, digital cryptographicing research primarily involves the identification of effective signal processing strategies to discreetly, robustly, and unambiguously hide the cryptographic information into multimedia signals. The general process involves the use of a key which must be used to successfully embed and extract the hidden information. The embedding mechanism entails imposing imperceptible changes to the host signal to generate a cryptographiced signal containing the cryptographic information, while the extraction routine attempts to reliably recover the hidden cryptographic from a possible tampered cryptographiced signal. The objective of this project is the security of image and security has the following objectives: - The transmitted information confidentiality- The transmitted information integrity,

26

- The transmitted information authenticity, - The transmitted information non-repudiation, - The disposability of the required information and of the required services, The authenticity of the image can be verified by another person or system connected in the same network. This kind of authenticity check is very important and was intensively developed in the last years. The author of the message sends a transformed form of another message, related with the first one, to a third entity. Processing this transformed form of the messages the third entity can establish the author. Today, digital signatures or digital envelopes (the transformed forms of a message) are used by specialized systems or organizations to check the authenticity of a message. The embedding mechanism entails imposing imperceptible changes to the host signal to generate a cryptographiced signal containing the cryptographic information, while the extraction routine attempts to reliably recover the hidden cryptographic from a possible tampered cryptographiced signal. One of the most used multimedia signals category is that of images. For example 80% of the data transmitted using the internet are images. This is the reason why it is very important to study the digital cryptographicing of images.

5.4 Types of cryptographic in terms of fidelity:


There are three types of cryptographics in terms of Fidelity. They are a) Robust Cryptographic: This cryptographic has the ability to withstand various image attacks thus providing authentication. b) Fragile Cryptographic: This cryptographic is mainly used for detecting modification of data. This cryptographic gets degraded even for a slight modification of data in the image. c) Semi Fragile Cryptographic: It is an intermediate between fragile and robust cryptographics. It is not robust against all possible image attacks.

27

CHAPTER VI:
6.1 Intoduction to MATLAB
MATLAB is a software package for computation in engineering, science, and applied mathematics. It offers a powerful programming language, excellent graphics, and a wide range of expert knowledge. MATLAB is published by and a trademark of The Math Works, Inc. The focus in MATLAB is on computation, not mathematics: Symbolic expressions and manipulations are not possible (except through the optional Symbolic Toolbox, a clever interface to Maple). All results are not only numerical but inexact, thanks to the rounding errors inherent in computer arithmetic. The limitation to numerical computation can be seen as a drawback, but it is a source of strength too: MATLAB is much preferred to Maple, Mathematical, and the like when it comes to numerics.

28

On the other hand, compared to other numerically oriented languages like C++ and FORTRAN, MATLAB is much easier to use and comes with a huge standard library. The unfavorable comparison here is a gap in execution speed. This gap is not always as dramatic as popular lore has it, and it can often be narrowed or closed with good MATLAB programming. Moreover, one can link other codes into MATLAB, or vice versa, and MATLAB now optionally supports parallel computing. Still, MATLAB is usually not the tool of choice for maximum-performance Computing. The MATLAB niche is numerical computation on workstations for nonexperts in computation. This is a huge nicheone way to tell is to look at the number of MATLAB-related books on mathworks.com. Even for supercomputer users, MATLAB can be a valuable environment in which to explore and fine-tune algorithms before more laborious coding in another language. Most successful computing languages and environments acquire a distinctive character or culture. In MATLAB, that culture contains several elements: an experimental and graphical bias, resulting from the interactive environment and compression of the write-compile-link-execute analyze cycle; an emphasis on syntax that is compact and friendly to the interactive mode, rather than tightly constrained and verbose; a kitchen-sink mentality for providing functionality; and a high degree of openness and transparency (though not to the extent of being open source software).

6.2 The MATLAB System:


When you start MATLAB, you get a multilayered desktop. The 0layout and behavior of the desktop and its components are highly customizable (and may in fact already be customized for your site). The component that is the heart of MATLAB is called the Command Window, located on the right by default. Here you can give MATLAB commands typed at the prompt, >>. Unlike FORTRAN and other compiled computer languages, MATLAB is an interpreted environmentyou give a command, and MATLAB tries to execute it right away before asking for another. At the top left you can see the Current Directory. In general MATLAB is aware only of files in the current directory (folder) and on its path, which can be customized. Commands for working with the directory and path include cd, what, add path, and edit path (or you can choose File/Set path. . . from the menus). You can add files to a directory on the path and thereby add Commands to MATLAB. Next to the Current Directory tab is the Workspace tab. The workspace shows you what variable names are currently defined and some information about their

29

contents. (At start-up it is, naturally, empty.) This represents another break from compiled environments: variables created in the workspace persist for you to examine and modify, even after code execution stops. Below the Command Window/Workspace window is the Command History window. As you enter commands, they are recorded here. This record persists across different MATLAB sessions, and commands or blocks of commands can be copied from here or saved to files. As you explore MATLAB, you will soon encounter some toolboxes. These are individually packaged sets of capabilities that provide in-depth expertise on particular subject areas. There is no need to load them explicitlyonce installed, they are always available transparently. You may also encounter some link, which is a semi-independent graphical control- engineering package not covered in this document.

Fig 6.1 COMMAND WINDOW

30

Fig 6.2 Change the current working directory

6.3 Graphical Versus Command-Line Usage:


MATLAB was originally entirely a command-line environment, and it retains that orientation. But it is now possible to access a great deal of the functionality from graphical interfacesmenus, buttons, and so on. These interfaces are especially useful to beginners, because they lay out the available choices clearly. As a rule, graphical interfaces can be more natural for certain types of interactive work, such as annotating a graph or debugging a program, whereas typed commands remain better for complex, precise, repeated, or reproducible tasks. One does not always need to make a choice, though; for instance, it is possible to save a figures styles as a template that can be used with different data by pointing and clicking. Moreover, you can package code you want to distribute with your own graphical interface, one that itself may be designed with a combination of graphical and command-oriented tools. In the end, an advanced MATLAB user should be able to exploit both modes of work to be productive. That said, the focus of this document is on typed commands. In many (most?) cases these have Graphical interface equivalents, even if I dont explicitly point them out.

31

6.4 MATLAB Help:


MATLAB is huge. Nobody can tell you everything that you personally will need to know, nor could you remember it all anyway. It is essential that you become familiar with the online help. There are two levels of help: If you need quick help on the syntax of a command, use help. For example, help plot shows right in the Command Window all the ways in which you can use the plot command. Typing help by itself gives you a list of categories that themselves yield lists of commands. Typing doc followed by a command name brings up more extensive help in a separate window. For example, doc plot is better formatted and more informative than help plot. In the left panel one sees a hierarchical, brows able display of all the online documentation. Typing doc alone or selecting Help from the menu brings up the window at a root page. The Getting Started with MATLAB manual is a very good place to get a more gentle and thorough introduction than the one to follow here. Depending on your installation, the documentation may be available in PDF form for printing and offline reading.

6.5 Basic Commands and Syntax:


If you type in a valid expression and press Enter, MATLAB will immediately execute it and return the result, just like a calculator. >> 2+2 Ans = 4 >> 42 Ans = 16 >> Sin (pi/2) Ans = 1 >> 1/0 Warning: Divide by zero. Ans =

32

Inf >> exp (i*pi) Ans = -1.0000 + 0.0000i Notice some of the special expressions here: pi for _, Inf for 1, and i for p1.another special value is NaN, which stands for not a number. Nan is used to express an undefined value. For example, >> Inf/Inf Ans = NaN NaNs can be tricky. For example, two NaN values are unequal by definition. You can assign values to variables with alphanumeric names. >> x = sqrt (3) x= 1.7321 >> days_since_birth = floor (now) - datenum (1969, 05, 06) days_since_birth = 12810 >> 3*z ??? Undefined function or variable z. Observe that variables must have values before they can be used. When an expression returns a single result that is not assigned to a variable, this result is assigned to ans, which can then be used like any other variable. >> Tan(x) Ans = 1.0472 >> Pi/ans Ans = 3. In floating-point arithmetic, you should not expect equal values to have a difference of exactly zero. The built-in number eps tells you the maximum error in arithmetic on your particular machine. For simple operations, the relative error should be close to this number. For instance, >> exp Ans = 2.2204e-16 >> exp (log (10)) - 10 Ans = 1.7764e-15 >> Ans/10 Ans = 1.7764e-16 Here are a few other demonstration statements.

33

>> % anything after a % sign is a comment. >> x = rand (100,100); %; means "dont print out result" >> s = Hello world; % single quotes enclose a string >> t = 1 + 2 + 3 +... 4 + 5 + 6 % ... continues a line t= 21 Once variables have been defined, they exist in the workspace. You can see whats in the Workspace from its desktop window, or by typing >> Who Your variables are: Ans s t x

6.6 Saving Work:


If you enter save my file, all the variables in the workspace will be saved to a file called myfile.mat in the current directory. You can also select the variables to be saved by typing them after the filename argument. If you later enter load my file, the saved variables are returned to the workspace (overwriting any values with the same names). If you highlight commands in the Command History window, right-click, and select Create M-File, you can save the typed commands to a text file. This can be very helpful for recreating what you have done.

34

CHAPTER-VII:
IMPLEMENTATION
The implementation of the project can be analyzed by viewing it in several stages as shown in following block diagrams at the transmitter and receiver ends respectively. At the transmitter end, we have the RGB image and he binary message. The processes involved on transmitted end can be divided into following stages: In the first stage both the RGB image and the binary message are divided into blocks of 8 by 8. These message block section is followed by a section called block selection, in this sage one block each from the divided image and message information are selected. After the blocks each from message information and image are selected, the embedding of the character (message block) is done into the image. The embedding in this process is carried out by watering scheme(WMS). In the next stage the cryptographicing scheme is encrypted using a sophisticated encryption algorithm, in our project we consider RSA encryption scheme.

35

The embedded image is called the cryptographiced image, now both the cryptographiced image and the encrypted cryptographicing scheme are transmitted through the channel.At the receiver end, we have cryptographiced image and encrypted cryptographicing scheme information. The processes of retrieving the original message information are carried out in following stages. As the receiver is aware of the private key, the decoding of the encrypted cryptographicing scheme is carried out in the first stage. Since decode information reveals the process involved in the embedding the messages characters can be decoded easily by a character extractor. In the next stage the extracted characters are assembled to form message information. In the last stage the message is assembled and then displayed.

TRANSMITTER

36

Fig 7.1 block diagram for transmitter

RECIEVER

37

Fig 7.2 block diagram for reciever We can broadly classify the stages as follows: Blocking of images Embedding image into blocks Assembling of blocks Cryptographicing scheme encryption Assembling and displaying the images

7.1 Blocking of Images:


This is the first stage of the cryptographicing an image in the project. An RGB mage of size m by n considered is divided into blocks of 8 by 8. in this project we consider an onion.png image which is a 384 by 512 sized image, its divided into 8 by 8 blocks. A few of these blocks are selected according to certain criterion. The number of blocks selected will be equal to number of message characters. This can be illustrated as shown in the figure. These selected blocks will be further processed, i.e., the embedding is done to only these blocks, after the selection of the character from the image.

/ 38

/ / / /

/ /

8x8

384 X 512 Fig 7.3 blocking image

7.2 Embedding image into blocks


The essence of whole project lies in the process of embedding the characters in the block. The embedding involves two steps as follows: Division of images into frames. Cryptographicing scheme.

39

7.2.1 Division of images into frames: The considered block of RGB image has 3-bit plane viz., red, green and blue referred as RGB decimal bit plane. Since we have the message character that has been considered to be in binary form i.e.. a strings of 0s n 1s, the RGB image is converted into binary form. i.e.. each of the decimal R, decimal G, decimal B are represented in their equivalent 8-bit binary values. There by these count to 24 frames for each value of pixel in decimal bit plane. Hence the given block is divided into binary bit planes that are 24 in number as shown in the figure.

7.2.2 Cryptographicing scheme: The cryptographicing scheme is the heart of the embedding character into message block. This scheme actually reveals the entire process of embedding a character. In this cryptographicing scheme we consider the image block that we have divided into 24 frames, and the message character that we need to embed. And in the process of embedding we select 8 frames of the 24 that we have constructed from an RGB image. We in turn consider each frame and replace a row in each by respective rows of the binary character i.e., by choosing unique rows from binary character to replace in each of these 8 frames. Thus the entire character is embedded by this replacement into different frames. After the replacements or the embedding of message character into image blocks the binary R, G, B values are converted back to the decimal values, so that each of these blocks can be viewed. Thus according number of character in the image we considered so many blocks and carry on the embedding process.

CHARACTER EXTRACTION

40

Fig 7.4 character extraction

DECIMAL BIT PLANES

41

Fig 7.5 decimal bit plane

7.3 Assembling of Blocks:


42

This section refers to assembling of all the blocks in order to get a full fledged image. The image that has been divided number of blocks needs to be assembled and aligned properly to have a proper view of the image. This is because the transmitted image must be imperceptible, robust and must be viewed as a original RGB image.

7.4 Cryptographicing Encryption Scheme:


The cryptographicing scheme involves several random computations of block section, frame selection and row selection. All these encrypted using a sophisticated encryption algorithm. In our project we choose RSA encryption algorithm where in we produce a public key and a private key as discussed in earlier chapters. The public key can be viewed by all, where as the private key can be viewed only to the authorized persons. So the entire cryptographicing scheme is encrypted using the RSA algorithm and is then passed through the channel along with the cryptographiced image. The cryptographiced image along with the encrypted cryptographicing scheme are transmitted over a channel, at the receiver end the user must know the public key and the private key for the decryption of the cryptographiced encrypted message. Hence only if the private key, public key and the image all the three are available to the user one can identify the message that is present in the picture.

7.5 Assembling and Displaying the Image:


This is the last stage for the process of the communication where the user gets the information that has been embedded in the image. In this stage the image that have been extracted in the previous stage are assembled in the order that they have been transmitted. Once these images are assembled then they are ready for the display and the display is show using the bit map of each of these assembled images. Thus, we obtain the message information.

CHAPTER VIII

43

CONCLUSION
Cryptographicing has been used as a tool for embedding image for copyright protection. It is also used for transmission of the data securely and also provided assistance to management of information. In our project we have considered an RGB image that is a bit map of characters. We have successfully embedded the image information using the MATLAB.

CHAPTER-IX
44

FUTURE ENHANCEMENT
The work presented in this project is not user friendly i.e. one can provide a graphical user interface for the work that has been presented. Also the effective retrieving of the image when passed through a lossy channel can be considered for further work. The compression of the cryptographiced image can also be considered in this process.

CHAPTER-X

45

BIBLIOGRAPHY
o R. Rivest, A. Shamir and L. Adleman. A method for obtaining

digital signals signatures and public-key cryptosystems. Communications of the ACM, 21(2), February 1978
o ANSI X9.31-1998 digital signature using Reversible public key

cryptography for the Financial Services Industry (rDSA), American national standards institute, 1998 o MATLAB Referrence manual.
o Miller, M.and Doerr, G. and Cox, I. J.(2002)Dirty paper Trellis

Codes for cryptographicing.

APPENDIX

46

SOURCE CODE
clear all; close all; clc; [filename1,pathname]=uigetfile('*.*','select the image'); image1=imread(num2str(filename1)); figure(1); imshow(image1); title('original image'); % orginal image image1=double(image1); [row,col]=size(image1); imagew=imread('dmg3.tif'); figure,imshow(imagew);title('image to be embedded'); [marked]=blockdwt2(image1,imagew); % generates the embeded image markedmax = max(marked(:)); markscale = marked/markedmax*255;S figure(3); colormap(gray(256)); image(marked); % shows the embeded image title('Cryptographiced image'); %imwrite(marked,gray(256),'marked_image.bmp'); % saves the cryptographiced image as a bmp file

RESULTS
47

SAMPLE IMAGES TO BE EMBEDDED


1 Image 1 to be embedded

2. Image 2 to embedded

SAMPLE IMAGES TO BE CONSIDERED


48

original image

original image

CRYPTOGRAPHICED IMAGES
49

We a e im e ar r d a t mk g

5 0

10 0

10 5

20 0

20 5 5 0 10 0 10 5 20 0 20 5

Watermarked image

50

100

150

200

250 50 100 150 200 250

50

Das könnte Ihnen auch gefallen