SlideShare a Scribd company logo
1 of 17
Download to read offline
Matlab
Project proposal:
Our proposed project’s elaboration is as under
Project title:
Encryption and Decryption of Wave(sound) File in
Image Formats
Instructor:
Sir Ali Ajwad
Group detail:
Sr no. Name Registeration no.
1 M SAIF UL ISLAM SP13-BCE-031
2 HABAB NISAR SP13-BCE-016
3 BILAL RAFIQUE SP13-BCE-010
4 HASEEB RAZA SP13-BCE-018
^
1Encryption & Decryption of Sound
Contents
Dedication: ...................................................................................................................................................2
Acknowledgement: ..................................................................................................................................3
Project in Brief:.............................................................................................................................................4
Abstract: .......................................................................................................................................................5
1. Introduction:.........................................................................................................................................6
1.1 Wave bitstream format....................................................................................................................6
1.2 Image Formats and Image Compression .........................................................................................7
2. Encryption.............................................................................................................................................8
2.1. Obtaining data of wave file in column matrix.....................................................................................8
2.2 Converting column matrix into M x N matrix. ................................................................................9
2.3 Converting matrix into Image File. ................................................................................................10
3. Decryption of wave from image ........................................................................................................11
3.1 Data type conversion ...........................................................................................................................11
3.2 Algorithm to convert image matrix into column matrix and hence .wav..........................................12
3.3 Audio Recorder:....................................................................................................................................12
4. Graphical use Interface(GUI): ............................................................................................................12
4.1 Creating a MATLAB GUI .......................................................................................................................13
4.2 Explanation:..........................................................................................................................................13
4.3. Final output: ........................................................................................................................................15
5. Deploy tool: ....................................................................................................................................15
6. Uses:....................................................................................................................................................16
7. Bibliography: ......................................................................................................................................16
^
2Encryption & Decryption of Sound
Dedication:
WE DEDICATE THIS PROJECT TO OUR PARENTS AND TO ALL OF
OUR TEACHERS WHO EDUCATED US IN WHOLE AGE OF
EDUCATION FROM SCHOOL TO UNIVERSITY.
^
3Encryption & Decryption of Sound
Acknowledgement:
All praise to Almighty Allah, the most merciful and Compassionate, who enabled us to
complete this Project. We express our gratitude to our kind supervisor Sir Ali Ajwad who
is behind the idea of this project. We express to our gratitude to our kind Theory
instructor Sir Ahsen Malik who kept our morale high by his suggestions and appreciation.
He was available to us whenever and for whatever we consulted him. To our class fellows
and friends, we always remember their cooperation with us. They helped us in our project
wherever we needed, especially our fellow Mr. Sohaib , Mr. Naqqash and Miss Saima for
providing their help. At last but not the least; we would like to acknowledge the support
of our family members. We would like to admit that we owe all our achievement’s to our
truly, sincere and most loving parents, brothers and sisters who mean the most to us, and
whose prayers are a source of determination for us.
^
4Encryption & Decryption of Sound
Project in Brief:
Project Title: Encryption and Decryption of Wave File in Image Formats.
Undertaken By:
Bilal Rafique ----- Sp13-BCE-010
M Saif Ul Islam -- Sp13-BCE-031
Habab Nisar ---- Sp13-BCE-014
Haseeb Raza ---- Sp13-BCE-015
Course: Signals & Systems
Instructors:
Lab: Sir Ali Ajwad
Theory: Sir Ahsen Malik
Tool Used: Matlab R2014
Operating System: Windows 8.1
Dated: 20-Dec-2014
^
5Encryption & Decryption of Sound
Abstract:
We will be elaborating the method of encrypting wave files in popular image formats like
JPEG, TIF and PNG along with retrieving them from these image files. MATLAB software
is used to perform matrix manipulation to encrypt and decrypt sound files into and from
image files. This method is not only a stenographic means but also a data compression
technique. Steganography (a rough Greek translation of the term Steganography is secret
writing) has been used in various forms for 2500 years. Briefly stated, steganography is
the term applied to any number of processes that will hide a message within an object,
where the hidden message will not be apparent to an observer.
^
6Encryption & Decryption of Sound
1. Introduction:
This present work puts forth a novel method to encrypt ‘.wav’, which are basically sound
files in image formats such as PNG, TIF and JPEG. The sound file is fetched and the
values corresponding to the sample range is put in a column matrix which is then put in
a two dimensional matrix having “double” as data-type. Using ‘imwrite’ function of
MATLAB, this matrix defined in the class ‘double’ is put in a graphics file or image file.
After encryption the data is retrieved from the image file and compared with the
original wave file to show the variation in encrypted and decrypted data. This
methodology can not only be used as stenographic means but possibly as a technique
for data compression. The illustrated method for data encryption of sensitive user
information can be used as a viable method to further secure cloud computing
transactions.
Figure 1
1.1 Wave bitstream format
Waveform Audio File Format (WAVE) is an application of RIFF or Resource Interchange
File Format which stores audio bit streams in “chunks”. WAVE encodes the sound in LPCM
format i.e. Linear Pulse Code Modulation.
Sound is basically a pressure wave or mechanical energy having pressure variance in an
elastic medium. The variance propagates as compression and rarefaction wherein
^
7Encryption & Decryption of Sound
compression occurs when pressure is higher than the ambient pressure and rarefaction
occurs when the pressure of the propagating wave is less than the ambient pressure.
Exactly in the same manner a WAVE file just represents the sampled sound waves which
happen to be above or below the equilibrium or ambient air pressure. The plot of wave
file is shown in fig 1.
Figure 2
1.2 Image Formats and Image Compression
Digital image formats are means of storing digital images in either uncompressed (e.g.
TIFF), compressed (e.g. JPEG) and vector formats. On rasterization an image is converted
into a grid of pixels. Basically there are two types of image file compression algorithm-
lossless and lossy. In lossless compression the entire digital data is preserved during
compression thus preserving image quality. In lossy compressions, the digital data
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 10
6
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
wav form of first 2000000 samples
^
8Encryption & Decryption of Sound
preservation takes place by compromising image quality . Here we will be discussing PNG,
TIFF and JPEG formats and these are the very formats in which the wave file will be
encrypted into.
MASTER IMAGE FORMATS
2. Encryption
2.1. Obtaining data of wave file in column matrix
We will be using “dil.wav” wave file as a example whose wave representation is
show above in fig 1. The sampling length of this tone is 2000000 samples.
Following is the MATLAB code which fetches the wave file using ‘wavread’
function. Amplitude values are obtained in the range of 0 and +1.
^
9Encryption & Decryption of Sound
Variable ‘D’ which holds first 2000000 samples. It is to be noted that the variable D is
basically a column vector.
2.2 Converting column matrix into M x N matrix.
A ‘grayscale’ image of M by N pixels is represented in MATLAB as an M X N
matrix having “double” data type wherein each element of the matrix denotes a
pixel within an intensity of 0 and 1. It is to be noted that the variable D is a
column matrix with “double” type and intensity within 0 and 1. So to convert
variable D in an image format we have to transform D into a 1000 X 2000 matrix.
Figure 3 conversion from 1d to 2d
^
10Encryption & Decryption of Sound
Code to convert to convert matrix A into MxN is shown in fig.4
Figure 4
2.3 Converting matrix into Image File.
We convert matrix A into JPEG , PNG and TIF formats using MATLAB function called
“imwrite”.
Imwrite (A,’.../filename.xyz’);
The above syntax stores matrix A in the file path mentioned. We also save column
matrix D in a new wave file using “wavwrite” function.
How the wave file appears in JPEG format (this is a cropped image as the actual file is far
bigger).also shown in fig.5
Figure 5
^
11Encryption & Decryption of Sound
3. Decryption of wave from image
This method is just the opposite of encryption with minor variations. When the image is
created during encryption it is basically an MxN matrix with “double” data type,
however on fetching the same image back to MATLAB we get an MxN matrix with
datatype “uint8” i.e. unsigned integer of 8 bit.
Thus we need to first convert all elements of matrix obtained into double precision .
Decryption can be basically understood as a data mining method to fetch, audit and
understand the pattern of data stored in the encrypted file.
3.1 Data type conversion
“im2double” function of MATLAB takes an image as input and converts it into another
image or matrix having all elements with type double. As already stated, the image files
retrieved by MATLAB are in unsigned integer form and before they are put in column
matrix representing a WAVE file, it has to be converted into data type of double precision.
^
12Encryption & Decryption of Sound
3.2 Algorithm to convert image matrix into column matrix
and hence .wav.
“wavwrite ( X, FS, ‘.../filename.wav’);”
The above function is used to save X column vector in the given ‘filename’ () with a desired
frequency ‘FS’. The column vector X is obtained by converting image matrix of double
precision into column matrix. The method is explained in the following programming code
of MATLAB.
3.3 Audio Recorder:
Matlab build in function recorder = audiorecorder(Fs,nBits,nChannels) which allows us to to record the
sound for specific time is used is to record the audio message of user for 50 seconds.
4. Graphical use Interface(GUI):
In computing, a graphical user interface (GUI, sometimes pronounced "gooey" (or "gee-
you-eye")) is a type of interface that allowsusers to interact with electronic
devices through graphical icons and visual indicators such as secondary notation, as
opposed to text-based interfaces, typed command labels or text navigation. GUIs were
introduced in reaction to the perceived steep learning curve ofcommand-line
interfaces (CLIs), which require commands to be typed on the keyboard.
The actions in a GUI are usually performed through direct manipulation of the graphical
elements. In addition to computers, GUIs can be found in hand-held devices such
as MP3 players, portable media players, gaming devices and smaller household, office
and industry equipment.
^
13Encryption & Decryption of Sound
4.1 Creating a MATLAB GUI
GUIs (also known as graphical user interfaces or UIs) provide point-and-click control of
software applications, eliminating the need to learn a language or type commands in
order to run the application.
MATLAB apps are self-contained MATLAB programs with GUI front ends that automate a
task or calculation. The GUI typically contains controls such as menus, toolbars, buttons,
and sliders. Many MATLAB products, such as Curve Fitting Toolbox, Signal Processing
Toolbox, and Control System Toolbox, include apps with custom user interfaces. You can
also create your own custom apps, including their corresponding UIs, for others to use.
GUIDE (graphical user interface design environment) provides tools for designing user
interfaces for custom apps. Using the GUIDE Layout Editor, you can graphically design
your UI. GUIDE then automatically generates the MATLAB code for constructing the UI,
which you can modify to program the behavior of your app.
4.2 Explanation:
Figure 6 shows GUI model created with GUIde command here we put three axes 2 for
showing wave of encrypted and decrypted signal. And 3rd
for displaying the logo of
Comsats. There are static text fields for displaying the text i.e group member names. We
add 8 push buttons in our GUI as shown in fig. 6 whose operation is written on each
button. We use build in function uiget file to select sound file from computer. We can
make tags for component placed. Then the function of each component can be assigned
with the help of its tag. After making the model we press the play button in menu bar of
window then this will create the code of GUI layout. Code contains different functions
each button’s functionality can be controlled by its function. We can use handles of every
function along with component tag to shift between different functions. Each component
function is loaded with its code and the final output GUI is shown in figure 7.
^
14Encryption & Decryption of Sound
Figure 6 GUI CREATION
^
15Encryption & Decryption of Sound
4.3. Final output:
Figure 7 GUI FINAL OUTPUT
5. Deploy tool:
We have used the deploy tool command of matlab to make the .exe file of our application,
so that every one can use this application however his/her computer has no matlab
software.
^
16Encryption & Decryption of Sound
6. Uses:
There are very vast applications/uses of encryption and decryption for which this app is helpful few of
them are given below:
 Secure data transfer.
 Military intelligence purposes.
 Safe communication.
7. Bibliography:
 http://www.cheers4all.com/2012/07/secure-communication-by-encryption-and-decryption-
matlab-code/
 http://www.techopedia.com/definition/1773/decryption
 http://en.wikipedia.org/wiki/WAV
 arxiv.org/pdf/1307.6711

More Related Content

What's hot

Image encryption
Image encryptionImage encryption
Image encryption
rakshit2105
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
Asim Kumar Pathak
 
Intruders and Viruses in Network Security NS9
Intruders and Viruses in Network Security NS9Intruders and Viruses in Network Security NS9
Intruders and Viruses in Network Security NS9
koolkampus
 
Cryptography full report
Cryptography full reportCryptography full report
Cryptography full report
harpoo123143
 

What's hot (20)

Image Security
Image SecurityImage Security
Image Security
 
CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
 
Video Steganography
Video SteganographyVideo Steganography
Video Steganography
 
Image Encryption in java ppt.
Image Encryption in java ppt.Image Encryption in java ppt.
Image Encryption in java ppt.
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Steganography and watermarking
Steganography and watermarkingSteganography and watermarking
Steganography and watermarking
 
Image encryption
Image encryptionImage encryption
Image encryption
 
Graphical password authentication
Graphical password authenticationGraphical password authentication
Graphical password authentication
 
Digital image forgery detection
Digital image forgery detectionDigital image forgery detection
Digital image forgery detection
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Steganography
SteganographySteganography
Steganography
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Image Steganography Project Report
Image Steganography Project ReportImage Steganography Project Report
Image Steganography Project Report
 
Steganography Tutorial | How To Hide Text Inside The Image | Cybersecurity Tr...
Steganography Tutorial | How To Hide Text Inside The Image | Cybersecurity Tr...Steganography Tutorial | How To Hide Text Inside The Image | Cybersecurity Tr...
Steganography Tutorial | How To Hide Text Inside The Image | Cybersecurity Tr...
 
Intruders and Viruses in Network Security NS9
Intruders and Viruses in Network Security NS9Intruders and Viruses in Network Security NS9
Intruders and Viruses in Network Security NS9
 
Cryptography full report
Cryptography full reportCryptography full report
Cryptography full report
 
Deepfakes: Trick or Treat?
Deepfakes: Trick or Treat?Deepfakes: Trick or Treat?
Deepfakes: Trick or Treat?
 
Data Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherData Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill Cipher
 
Visual cryptography for color images
Visual cryptography for color imagesVisual cryptography for color images
Visual cryptography for color images
 

Viewers also liked

Image encryption using aes key expansion
Image encryption using aes key expansionImage encryption using aes key expansion
Image encryption using aes key expansion
Sreeda Perikamana
 
Image encryption using aes key expansion
Image encryption using aes key expansionImage encryption using aes key expansion
Image encryption using aes key expansion
Sreeda Perikamana
 
Encryption presentation final
Encryption presentation finalEncryption presentation final
Encryption presentation final
adrigee12
 
Advanced Encryption Standard (AES) Implementaion using Java
Advanced Encryption Standard (AES) Implementaion using JavaAdvanced Encryption Standard (AES) Implementaion using Java
Advanced Encryption Standard (AES) Implementaion using Java
Sunil Kumar R
 
Performance evluvation of chaotic encryption technique
Performance evluvation of chaotic encryption techniquePerformance evluvation of chaotic encryption technique
Performance evluvation of chaotic encryption technique
Ancy Mariam Babu
 

Viewers also liked (20)

Image encryption using aes key expansion
Image encryption using aes key expansionImage encryption using aes key expansion
Image encryption using aes key expansion
 
Image encryption using aes key expansion
Image encryption using aes key expansionImage encryption using aes key expansion
Image encryption using aes key expansion
 
Encryption presentation final
Encryption presentation finalEncryption presentation final
Encryption presentation final
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Advanced Encryption Standard (AES) Implementaion using Java
Advanced Encryption Standard (AES) Implementaion using JavaAdvanced Encryption Standard (AES) Implementaion using Java
Advanced Encryption Standard (AES) Implementaion using Java
 
Cryptography IEEE 2015 Projects
Cryptography IEEE 2015 ProjectsCryptography IEEE 2015 Projects
Cryptography IEEE 2015 Projects
 
IEEE 2014 Final Year Projects | Digital Image Processing
IEEE 2014 Final Year Projects | Digital Image ProcessingIEEE 2014 Final Year Projects | Digital Image Processing
IEEE 2014 Final Year Projects | Digital Image Processing
 
Sacolloq
SacolloqSacolloq
Sacolloq
 
М.Г.Гоман (2000) – Динамика нелинейных систем и хаос
М.Г.Гоман (2000) – Динамика нелинейных систем и хаосМ.Г.Гоман (2000) – Динамика нелинейных систем и хаос
М.Г.Гоман (2000) – Динамика нелинейных систем и хаос
 
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption DecryptionVLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
 
ICIECA 2014 Paper 20
ICIECA 2014 Paper 20ICIECA 2014 Paper 20
ICIECA 2014 Paper 20
 
AES Report
AES ReportAES Report
AES Report
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
 
Performance evluvation of chaotic encryption technique
Performance evluvation of chaotic encryption techniquePerformance evluvation of chaotic encryption technique
Performance evluvation of chaotic encryption technique
 
novel Approach For Data Hiding by integrating Steganography and Extended Visu...
novel Approach For Data Hiding by integrating Steganography and Extended Visu...novel Approach For Data Hiding by integrating Steganography and Extended Visu...
novel Approach For Data Hiding by integrating Steganography and Extended Visu...
 
Spyware
SpywareSpyware
Spyware
 
Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)
 
Matlab dsp examples
Matlab dsp examplesMatlab dsp examples
Matlab dsp examples
 
Gender detection using MATLAB
Gender detection using MATLABGender detection using MATLAB
Gender detection using MATLAB
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 

Similar to Encryption & Decryption of Sound in image format on Matlab

Annotated Bibliography On Multimedia Security
Annotated Bibliography On Multimedia SecurityAnnotated Bibliography On Multimedia Security
Annotated Bibliography On Multimedia Security
Brenda Higgins
 
Steganography - Anup Palarapwar
Steganography - Anup PalarapwarSteganography - Anup Palarapwar
Steganography - Anup Palarapwar
ANUP PALARAPWAR
 
Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarking
nafees321
 
Paper id 212014145
Paper id 212014145Paper id 212014145
Paper id 212014145
IJRAT
 

Similar to Encryption & Decryption of Sound in image format on Matlab (20)

A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES
A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILESA METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES
A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES
 
audio-watermarking-with-encryption-IJERTV6IS090174.pdf
audio-watermarking-with-encryption-IJERTV6IS090174.pdfaudio-watermarking-with-encryption-IJERTV6IS090174.pdf
audio-watermarking-with-encryption-IJERTV6IS090174.pdf
 
Drubbing an Audio Messages inside a Digital Image Using (ELSB) Method
Drubbing an Audio Messages inside a Digital Image Using (ELSB) MethodDrubbing an Audio Messages inside a Digital Image Using (ELSB) Method
Drubbing an Audio Messages inside a Digital Image Using (ELSB) Method
 
A04020107
A04020107A04020107
A04020107
 
Audio-video Crypto Steganography using LSB substitution and advanced chaotic ...
Audio-video Crypto Steganography using LSB substitution and advanced chaotic ...Audio-video Crypto Steganography using LSB substitution and advanced chaotic ...
Audio-video Crypto Steganography using LSB substitution and advanced chaotic ...
 
Annotated Bibliography On Multimedia Security
Annotated Bibliography On Multimedia SecurityAnnotated Bibliography On Multimedia Security
Annotated Bibliography On Multimedia Security
 
DCT Based Secret Image Hiding In Video Sequence
DCT Based Secret Image Hiding In Video SequenceDCT Based Secret Image Hiding In Video Sequence
DCT Based Secret Image Hiding In Video Sequence
 
Secure Image Transmission for Cloud Storage System Using Hybrid Scheme
Secure Image Transmission for Cloud Storage System Using Hybrid SchemeSecure Image Transmission for Cloud Storage System Using Hybrid Scheme
Secure Image Transmission for Cloud Storage System Using Hybrid Scheme
 
Secured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic SchemeSecured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic Scheme
 
Steganography - Anup Palarapwar
Steganography - Anup PalarapwarSteganography - Anup Palarapwar
Steganography - Anup Palarapwar
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarking
 
Steganography
Steganography Steganography
Steganography
 
FPGA implementation of data hiding in images
FPGA implementation of data hiding in imagesFPGA implementation of data hiding in images
FPGA implementation of data hiding in images
 
G0210032039
G0210032039G0210032039
G0210032039
 
Audio video steganography using forensic techniquefor data security
Audio video steganography using forensic techniquefor data securityAudio video steganography using forensic techniquefor data security
Audio video steganography using forensic techniquefor data security
 
Steganography.pptx
Steganography.pptxSteganography.pptx
Steganography.pptx
 
IRJET- Low Band Width High Secured Image Transmission in Robust Channels
IRJET-  	  Low Band Width High Secured Image Transmission in Robust ChannelsIRJET-  	  Low Band Width High Secured Image Transmission in Robust Channels
IRJET- Low Band Width High Secured Image Transmission in Robust Channels
 
DWT-SVD Based Visual Cryptography Scheme for Audio Watermarking
DWT-SVD Based Visual Cryptography Scheme for Audio WatermarkingDWT-SVD Based Visual Cryptography Scheme for Audio Watermarking
DWT-SVD Based Visual Cryptography Scheme for Audio Watermarking
 
Paper id 212014145
Paper id 212014145Paper id 212014145
Paper id 212014145
 

More from Muhammad Saif Ul Islam

More from Muhammad Saif Ul Islam (6)

Design and Development of Automatic Water Dispenser
Design and Development of Automatic Water DispenserDesign and Development of Automatic Water Dispenser
Design and Development of Automatic Water Dispenser
 
Defining Non Profit Sector Organization
Defining Non Profit Sector OrganizationDefining Non Profit Sector Organization
Defining Non Profit Sector Organization
 
Encryption & decryption of sound presentation
Encryption & decryption of sound presentationEncryption & decryption of sound presentation
Encryption & decryption of sound presentation
 
smartphone controlled robot
smartphone controlled robotsmartphone controlled robot
smartphone controlled robot
 
a simple mobile battery charger with inverter (ups) &night switch
a simple mobile battery charger with inverter (ups) &night switcha simple mobile battery charger with inverter (ups) &night switch
a simple mobile battery charger with inverter (ups) &night switch
 
a simple bcd counter project
a simple bcd counter projecta simple bcd counter project
a simple bcd counter project
 

Recently uploaded

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 

Encryption & Decryption of Sound in image format on Matlab

  • 1. Matlab Project proposal: Our proposed project’s elaboration is as under Project title: Encryption and Decryption of Wave(sound) File in Image Formats Instructor: Sir Ali Ajwad Group detail: Sr no. Name Registeration no. 1 M SAIF UL ISLAM SP13-BCE-031 2 HABAB NISAR SP13-BCE-016 3 BILAL RAFIQUE SP13-BCE-010 4 HASEEB RAZA SP13-BCE-018
  • 2. ^ 1Encryption & Decryption of Sound Contents Dedication: ...................................................................................................................................................2 Acknowledgement: ..................................................................................................................................3 Project in Brief:.............................................................................................................................................4 Abstract: .......................................................................................................................................................5 1. Introduction:.........................................................................................................................................6 1.1 Wave bitstream format....................................................................................................................6 1.2 Image Formats and Image Compression .........................................................................................7 2. Encryption.............................................................................................................................................8 2.1. Obtaining data of wave file in column matrix.....................................................................................8 2.2 Converting column matrix into M x N matrix. ................................................................................9 2.3 Converting matrix into Image File. ................................................................................................10 3. Decryption of wave from image ........................................................................................................11 3.1 Data type conversion ...........................................................................................................................11 3.2 Algorithm to convert image matrix into column matrix and hence .wav..........................................12 3.3 Audio Recorder:....................................................................................................................................12 4. Graphical use Interface(GUI): ............................................................................................................12 4.1 Creating a MATLAB GUI .......................................................................................................................13 4.2 Explanation:..........................................................................................................................................13 4.3. Final output: ........................................................................................................................................15 5. Deploy tool: ....................................................................................................................................15 6. Uses:....................................................................................................................................................16 7. Bibliography: ......................................................................................................................................16
  • 3. ^ 2Encryption & Decryption of Sound Dedication: WE DEDICATE THIS PROJECT TO OUR PARENTS AND TO ALL OF OUR TEACHERS WHO EDUCATED US IN WHOLE AGE OF EDUCATION FROM SCHOOL TO UNIVERSITY.
  • 4. ^ 3Encryption & Decryption of Sound Acknowledgement: All praise to Almighty Allah, the most merciful and Compassionate, who enabled us to complete this Project. We express our gratitude to our kind supervisor Sir Ali Ajwad who is behind the idea of this project. We express to our gratitude to our kind Theory instructor Sir Ahsen Malik who kept our morale high by his suggestions and appreciation. He was available to us whenever and for whatever we consulted him. To our class fellows and friends, we always remember their cooperation with us. They helped us in our project wherever we needed, especially our fellow Mr. Sohaib , Mr. Naqqash and Miss Saima for providing their help. At last but not the least; we would like to acknowledge the support of our family members. We would like to admit that we owe all our achievement’s to our truly, sincere and most loving parents, brothers and sisters who mean the most to us, and whose prayers are a source of determination for us.
  • 5. ^ 4Encryption & Decryption of Sound Project in Brief: Project Title: Encryption and Decryption of Wave File in Image Formats. Undertaken By: Bilal Rafique ----- Sp13-BCE-010 M Saif Ul Islam -- Sp13-BCE-031 Habab Nisar ---- Sp13-BCE-014 Haseeb Raza ---- Sp13-BCE-015 Course: Signals & Systems Instructors: Lab: Sir Ali Ajwad Theory: Sir Ahsen Malik Tool Used: Matlab R2014 Operating System: Windows 8.1 Dated: 20-Dec-2014
  • 6. ^ 5Encryption & Decryption of Sound Abstract: We will be elaborating the method of encrypting wave files in popular image formats like JPEG, TIF and PNG along with retrieving them from these image files. MATLAB software is used to perform matrix manipulation to encrypt and decrypt sound files into and from image files. This method is not only a stenographic means but also a data compression technique. Steganography (a rough Greek translation of the term Steganography is secret writing) has been used in various forms for 2500 years. Briefly stated, steganography is the term applied to any number of processes that will hide a message within an object, where the hidden message will not be apparent to an observer.
  • 7. ^ 6Encryption & Decryption of Sound 1. Introduction: This present work puts forth a novel method to encrypt ‘.wav’, which are basically sound files in image formats such as PNG, TIF and JPEG. The sound file is fetched and the values corresponding to the sample range is put in a column matrix which is then put in a two dimensional matrix having “double” as data-type. Using ‘imwrite’ function of MATLAB, this matrix defined in the class ‘double’ is put in a graphics file or image file. After encryption the data is retrieved from the image file and compared with the original wave file to show the variation in encrypted and decrypted data. This methodology can not only be used as stenographic means but possibly as a technique for data compression. The illustrated method for data encryption of sensitive user information can be used as a viable method to further secure cloud computing transactions. Figure 1 1.1 Wave bitstream format Waveform Audio File Format (WAVE) is an application of RIFF or Resource Interchange File Format which stores audio bit streams in “chunks”. WAVE encodes the sound in LPCM format i.e. Linear Pulse Code Modulation. Sound is basically a pressure wave or mechanical energy having pressure variance in an elastic medium. The variance propagates as compression and rarefaction wherein
  • 8. ^ 7Encryption & Decryption of Sound compression occurs when pressure is higher than the ambient pressure and rarefaction occurs when the pressure of the propagating wave is less than the ambient pressure. Exactly in the same manner a WAVE file just represents the sampled sound waves which happen to be above or below the equilibrium or ambient air pressure. The plot of wave file is shown in fig 1. Figure 2 1.2 Image Formats and Image Compression Digital image formats are means of storing digital images in either uncompressed (e.g. TIFF), compressed (e.g. JPEG) and vector formats. On rasterization an image is converted into a grid of pixels. Basically there are two types of image file compression algorithm- lossless and lossy. In lossless compression the entire digital data is preserved during compression thus preserving image quality. In lossy compressions, the digital data 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 6 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 wav form of first 2000000 samples
  • 9. ^ 8Encryption & Decryption of Sound preservation takes place by compromising image quality . Here we will be discussing PNG, TIFF and JPEG formats and these are the very formats in which the wave file will be encrypted into. MASTER IMAGE FORMATS 2. Encryption 2.1. Obtaining data of wave file in column matrix We will be using “dil.wav” wave file as a example whose wave representation is show above in fig 1. The sampling length of this tone is 2000000 samples. Following is the MATLAB code which fetches the wave file using ‘wavread’ function. Amplitude values are obtained in the range of 0 and +1.
  • 10. ^ 9Encryption & Decryption of Sound Variable ‘D’ which holds first 2000000 samples. It is to be noted that the variable D is basically a column vector. 2.2 Converting column matrix into M x N matrix. A ‘grayscale’ image of M by N pixels is represented in MATLAB as an M X N matrix having “double” data type wherein each element of the matrix denotes a pixel within an intensity of 0 and 1. It is to be noted that the variable D is a column matrix with “double” type and intensity within 0 and 1. So to convert variable D in an image format we have to transform D into a 1000 X 2000 matrix. Figure 3 conversion from 1d to 2d
  • 11. ^ 10Encryption & Decryption of Sound Code to convert to convert matrix A into MxN is shown in fig.4 Figure 4 2.3 Converting matrix into Image File. We convert matrix A into JPEG , PNG and TIF formats using MATLAB function called “imwrite”. Imwrite (A,’.../filename.xyz’); The above syntax stores matrix A in the file path mentioned. We also save column matrix D in a new wave file using “wavwrite” function. How the wave file appears in JPEG format (this is a cropped image as the actual file is far bigger).also shown in fig.5 Figure 5
  • 12. ^ 11Encryption & Decryption of Sound 3. Decryption of wave from image This method is just the opposite of encryption with minor variations. When the image is created during encryption it is basically an MxN matrix with “double” data type, however on fetching the same image back to MATLAB we get an MxN matrix with datatype “uint8” i.e. unsigned integer of 8 bit. Thus we need to first convert all elements of matrix obtained into double precision . Decryption can be basically understood as a data mining method to fetch, audit and understand the pattern of data stored in the encrypted file. 3.1 Data type conversion “im2double” function of MATLAB takes an image as input and converts it into another image or matrix having all elements with type double. As already stated, the image files retrieved by MATLAB are in unsigned integer form and before they are put in column matrix representing a WAVE file, it has to be converted into data type of double precision.
  • 13. ^ 12Encryption & Decryption of Sound 3.2 Algorithm to convert image matrix into column matrix and hence .wav. “wavwrite ( X, FS, ‘.../filename.wav’);” The above function is used to save X column vector in the given ‘filename’ () with a desired frequency ‘FS’. The column vector X is obtained by converting image matrix of double precision into column matrix. The method is explained in the following programming code of MATLAB. 3.3 Audio Recorder: Matlab build in function recorder = audiorecorder(Fs,nBits,nChannels) which allows us to to record the sound for specific time is used is to record the audio message of user for 50 seconds. 4. Graphical use Interface(GUI): In computing, a graphical user interface (GUI, sometimes pronounced "gooey" (or "gee- you-eye")) is a type of interface that allowsusers to interact with electronic devices through graphical icons and visual indicators such as secondary notation, as opposed to text-based interfaces, typed command labels or text navigation. GUIs were introduced in reaction to the perceived steep learning curve ofcommand-line interfaces (CLIs), which require commands to be typed on the keyboard. The actions in a GUI are usually performed through direct manipulation of the graphical elements. In addition to computers, GUIs can be found in hand-held devices such as MP3 players, portable media players, gaming devices and smaller household, office and industry equipment.
  • 14. ^ 13Encryption & Decryption of Sound 4.1 Creating a MATLAB GUI GUIs (also known as graphical user interfaces or UIs) provide point-and-click control of software applications, eliminating the need to learn a language or type commands in order to run the application. MATLAB apps are self-contained MATLAB programs with GUI front ends that automate a task or calculation. The GUI typically contains controls such as menus, toolbars, buttons, and sliders. Many MATLAB products, such as Curve Fitting Toolbox, Signal Processing Toolbox, and Control System Toolbox, include apps with custom user interfaces. You can also create your own custom apps, including their corresponding UIs, for others to use. GUIDE (graphical user interface design environment) provides tools for designing user interfaces for custom apps. Using the GUIDE Layout Editor, you can graphically design your UI. GUIDE then automatically generates the MATLAB code for constructing the UI, which you can modify to program the behavior of your app. 4.2 Explanation: Figure 6 shows GUI model created with GUIde command here we put three axes 2 for showing wave of encrypted and decrypted signal. And 3rd for displaying the logo of Comsats. There are static text fields for displaying the text i.e group member names. We add 8 push buttons in our GUI as shown in fig. 6 whose operation is written on each button. We use build in function uiget file to select sound file from computer. We can make tags for component placed. Then the function of each component can be assigned with the help of its tag. After making the model we press the play button in menu bar of window then this will create the code of GUI layout. Code contains different functions each button’s functionality can be controlled by its function. We can use handles of every function along with component tag to shift between different functions. Each component function is loaded with its code and the final output GUI is shown in figure 7.
  • 15. ^ 14Encryption & Decryption of Sound Figure 6 GUI CREATION
  • 16. ^ 15Encryption & Decryption of Sound 4.3. Final output: Figure 7 GUI FINAL OUTPUT 5. Deploy tool: We have used the deploy tool command of matlab to make the .exe file of our application, so that every one can use this application however his/her computer has no matlab software.
  • 17. ^ 16Encryption & Decryption of Sound 6. Uses: There are very vast applications/uses of encryption and decryption for which this app is helpful few of them are given below:  Secure data transfer.  Military intelligence purposes.  Safe communication. 7. Bibliography:  http://www.cheers4all.com/2012/07/secure-communication-by-encryption-and-decryption- matlab-code/  http://www.techopedia.com/definition/1773/decryption  http://en.wikipedia.org/wiki/WAV  arxiv.org/pdf/1307.6711