=Paper=
{{Paper
|id=Vol-1830/Paper85
|storemode=property
|title=An Infallible Technique for Hiding Confidential Data in Compressed Video using LSB and RSA Algorithm
|pdfUrl=https://ceur-ws.org/Vol-1830/Paper85.pdf
|volume=Vol-1830
|authors=Ismaila Idris,Onoja Emmanuel Oche,John K. Alhassan
}}
==An Infallible Technique for Hiding Confidential Data in Compressed Video using LSB and RSA Algorithm==
International Conference on Information and Communication Technology and Its Applications
(ICTA 2016)
Federal University of Technology, Minna, Nigeria
November 28 β 30, 2016
An Infallible Technique for Hiding Confidential Data in Compressed Video using
LSB and RSA Algorithm
Ismaila Idris, Onoja Emmanuel Oche, and John K. Alhassan
Department of Cyber Security, Federal University of Technology, Minna, Nigeria
AbstractβBy hiding data in compressed video using a secret message in (data) bits are securely hidden in Motion Vector
key, we can prevent and eliminate the security threat faced by with high frequency above some specified πΆπππ
computers and smart devices in this information age. In this One data bit of the message is securely placed at the
paper, we hid data by focusing on the motion vectors used to Least Significant Bit (LSB) of each larger Candidate Motion
structure and reframe both the frontward extrapolative and Vectors component, which is encoded as a unique area in a
bi-directional in dense image frames. The selection of specified location generated by where the motion estimation
candidate set of these motion vectors are established on their generated motion vectors. Using the variable macro block 8
affiliated prediction error. An adaptive threshold is sought for by 8, 8 by 16,16by 8 and16 by 16sizes of H.264, using each
each frame (based on greedy approach) to gain lustiness while
2 bits from the data bit stream to choose one size out of the
sustaining a modest error level. The secret data bit stream is
inserted in the Least Significant Bit (LSB) of both parts of the
four different sizes for the Motion Estimation process.
candidate motion vectors. The approach is implemented and Carefully considering the angular (phase angle) difference
checked for hiding data in natural sequences of multiple blocks between two nearest CMV, we embed the massage inside the
of frames and the outputs are measured. The measurement is sample video. These CMV were chosen according to the
based on minimum distortion to the reframed video and respective motion vectors magnitude. Using the Phase Angle
minimum overhead on the compressed video frame. The Difference in sectors between CMV, the message bit stream
proposed approach is justified efficient in line the stated is encoded accordingly with initial constrain of the block
condition, and more valid when compare with a motion vector matching to search for a magnitude within the selected
attribute-based approach. region to be greater than the initial threshold as predefined.
This approach is focused on determining the direct reversible
Keywords-confidential data; video Compression; data hiding technique to find, at the decoder the CMV which relied on
Steg-analysis; watermarking; Huffman Codin; candidate motion the motion vectors attributes.
vectors Achieving least level distortion to prediction error and
data size overhead was approached differently in this paper
I. INTRODUCTION which is based on the prediction error associated with each
The term βConfidential dataβ typically denotes data block. The major constraint is difficulty of figuring out the
classified as restricted, according to a specific data non-linear quantization process.
classification scheme needs to be properly secured via any
secured mechanism that will not reveal it presence to an
unauthorized party (steganography). This data hiding
mechanism in different stegano-graphic cover is a broad
field. It is a technique of embedding secret data in a media or
other source and still maintaining the integrity of the data. It
can be used to embed confidential information for
annotation, access control, content transaction tracking, copy
right protection and tampering detection [1].
This research focuses on internal changes of video
compression process, precisely the motion estimation level.
Choosing this level was based on the fact that the
compressed video frames contents are internally processed
Figure 1. Data hiding techniques
during the encoding and decoding of the video which possess
detection constraint when analyzed by applying image steg-
analysis techniques besides it is coded loosely, thus it is not II. RELATED WORKS
susceptible to quantization distortions. Change of motion A mechanism of data hiding in compressed domain that
vector based on Magnitude and Phase angle attribute has makes use of encoding and compression sequences was
been the fundamental bases of most research applied on proposed in [2], this is usually applied during different
secure data hiding in a stegano-graphic cover. Confidential compression phase of after the compression phase of the
124
International Conference on Information and Communication Technology and Its Applications (ICTA 2016)
video sequences. An optimal output with less image
distortions can me efficiently achieved when spatial and π§
π§, ππ %2 =0
temporal model usually known as spatiotemporal model are π
concurrently used. π§β² = π. π. ππππ π§ , π§, ππ
π§
% 2 = 1 πππ π§ β βπ (3)
In [3], a data hiding technique based on transformation π
mechanism in which the Discrete Cosine Transform (DCT) 2π. ππππ π§ , ππ π§ = βπ
coefficient modifications are done through sequential
compression steps was proposed. The technique transforms a π§
Where π = β ββ1
specified block of video frames (images) say 8 by 8 pixel π
block into a 64 DCT coefficients of separate values. A
further systematic procedure is then carried out on the In the work of [5], the Hide Behind Corner (HBC)
compression process; this is the quantization process, which algorithm was used to secretly hide message in which
is a usually based accurately calculated DCT coefficient. The encrypted key is placed at the image corners and then the
secure data hiding procedure which is performed on the LSB hidden image is convey via a stego-cover. The recipient of
of the frames immediately follow. It was observed that the the message has a foreknowledge of all the encrypted keys
above mechanism can be more secured if the encryption of hidden at the corner of the image. A reverse technique called
secret data is done with pseudo-randomly generated secret Reverse Data Hiding (RDH) mechanism is applied to the
key. encrypted image which contains the original message; this is
In [3], the framesβ and macro-blocksβ indices represent only possible when all the encrypted corners are properly
watermark which are embedded into the quantized DCT decrypted to using the appropriate secret key.
value of the blocks (the non-zero value). A watermarking A new concept of data hiding using visual cryptography
process was used which is based on tampering detection was presented in [6] where encrypted video is split into
technique. By using a semi-fragile watermarking protoco l frames using FFMPEG tool. Randomly two frames are
the technique resulted in detecting temporal, spatial and selected to hide secure message and image, converting this
spatio-temporal tampering region. After the π·ππΆ and image to a grey scale and from grey scale to binary images
quantization phases, follows the embedding process for some which is then split into two shares using visual cryptographic
4 by 4 block selected from each of 16 by 16 macro-blocks scheme. The cipher text is embedded into the two shares. By
for embedding macro-block where the blocks with the larges using invisible watermarking technique, those two shares
Least Non Zero (πΏππ ) level arrangement are selected which hidden in the selected frames and the image is hidden and
simply define the frequency sample. For every selected finally all the frames are again converted into video using the
block, 1 bit of message is embedded. The security of this FFMPEG tool and video is encrypted using the base64
mechanism was improved by using the secretkey π΄π for encoder with asymmetric cryptographic technique. The
authentication which is encrypted by a pseudo randomly receiver system performs video decryption accordingly, via a
generated key π
π to designateππ the watermark point. decryption splitting mechanism in which the system decrypts
and split received video into separate units of frames and
ππ = πΈ(π
π : π΄π ) (1) extracting various shares and data by selecting the frames
which was watermarked
Another approach of securely hiding information was Another novel (and secure) data hiding mechanism was
proposed in [4] where the coefficientsβ sign of some suggested by [7] in which embedding process of secret
fundamental factors such as; the Motion Vector Difference message in digital videos is performed based on magnitude
(MVD), Intra Prediction Mode (IPM), and DCTare encrypted of the phase angle of each motion vector( in the macro-
while data hiding is done on the DCT magnitudes at a block)found in each inter-frame. Selection of the candidate
specified threshold. The technique seems highly secure motion vector is based on an initialized threshold π. The
based on the fact that encryption process and data hiding mathematical representation of the phase angle in each
mechanism were respectively done separately. This motion vector for carrying out embedding process is
technique was mathematically modeled as precisely stated calculated as follows:
below, given that, watermark is represented as ππ and initial ππ ππ£
coefficient is of image Z, for every high security measure, π, π = ππππ‘ππ (4)
ππ ππ
encryption of watermark with a given a stream cipher before
the process, we have the following: Where;
Change in value of the coefficient is as: ππππ£ = the βvertical component of motion vectorβπππ
|π§|
ππππ = the βhorizontal component of motion vectorβπππ
π§, ππ β( )β % 2 = 1
π
π§β² = |π§|
(2) The mathematical steps for sequential data embedding
π. π. ππππ π§ , π§, ππ %2=0 are stated thus:
π
π§ ο· For data bit = 0, search for ππ2π and ππ2π+1 within
Where π = β β+1
π the range of;
Otherwise, 0π < π2π β π2π+1 β€ 180π (5)
125
International Conference on Information and Communication Technology and Its Applications (ICTA 2016)
ο· For data bit = 1, t search for ππ2π and ππ2π+1 within
the range of;
180π < π2π β π2π+1 β€ 360π (6)
ο· For all condition = Null, calculate a pair of motion
vector that satisfied condition (i) and (ii) above.
In [8], a temporal model based on H.264 encoder was
used for hiding data. In this model data hiding is based on
Variable Block Sizes (VBS). The model standard uses seven
un-identical but uniformly arranged block sizes 16 by16, 16
by 8, 8 by16, 8 by 8, 8 by 4, 4 by 8 and 4 by 4. The
fundamental principle of this mechanism is to develop an
encoder that will be forced to select a block type not just Figure 2. Proposed System
based on a single condition of efficiency alone but also on
security parameters defined for the confidential data in Step 1: For LSB of pixel π΄ = messageπ1 , go to second step2.
respect available data integrity threat. This objective was And for, of pixel π΄β messageπ1 , go to step 3.
achieved by assigning a randomly generated key in form of
binary code to each separate block type. Each block has a Step 2: For π(π΄, π΅) = message π2 , all pixels remain
unique binary code. For simplicity, a block of 4 by 4 sizes unchanged. If the value of π(π΄, π΅)β messageπ2 ,
was used [10][11]. The security of this mechanism lies in the pixelπ΅ = +1 or -1
conversion process of the data before embedding process.
Here, the data is change to binary digits, which are then Step 3: Forπ(π΄ β 1, π΅)=messageπ2 ,pixelπ΄= -1. And
grouped into various pairs and mapped into macro blocks For π(π΄ β 1, π΅)β messageπ2 ; pixelπ΄= +1
which are going to be motion compensated and thereafter
subjected to embedding process [13][14]. We mathematically state the function π(π΄, π΅)as;
π΄β²
π π΄β² , π΅β² = πΏππ΅ + π΅β² (7)
2
III. OVERVIEW OF PROPOSED SYSTEM From the above algorithm, since the new LSB method
As shown in the figure below, the proposed confidential for matching procedure is +1 or -1 based on pixel position,
data hiding approach in compressed video using secret key mostly the adjacent pixels and the separate pixel within the
has it input value as video. This input value is subjected to closet position between cover image tends to be very
separation process in which the motion images (video) are insignificant. We can infer that while hiding data high
split into image frames. The subjection process follows quality is maintained.
immediately, which subjects the image frames to coding
process to produce a compressed frame (compressed video),
where the coding procedure is DCT and Huffman coding.
The next system stage is the application of secret key to the
frames. With key generation principle based on RSA
algorithm, a random secret key is generated, applied to the
secret data which is then securely inserted to the video cover
in the LSB of the frame through the implementation of LSB
algorithm. This automatically produces the new video
referred to as Stego-video. At the receiving end, the secret
data can be extracted by reversing the LBS procedure and
secret key process; this is also called inverse LSB and secret
key.
A. Algorithm Title: LSB Algorithm.
Confidential data is embedding process is don on two
separate pixels which are pixelπ΄andpixelπ΅as a cover for the Figure 3. LSB Matching Embedding Procedure
confidential data respectively [15]. Adjustment process
follows immediately on one of pixel π΄ andpixelπ΅ to embed B. Algorithm Title: LSB Algorithm Data Hiding Algorithm
2bits of message π1 and message π2 . A flowchart This algorithm take input value as video and produce stego-
representing the embedding process is represented in figure video as output. It also implements other simple encoding
3. procedures:
126
International Conference on Information and Communication Technology and Its Applications (ICTA 2016)
Step 1: Receive input value as video
Step 2: Perform separation process (video into frames)
Step 3: Perform8 by 8 block pixel Integer DCT
Step 4: Perform 8 by 8 block pixel scanning.
Step 5: By Huffman coding Compress frame
Step 6: Perform secret key and data encryption.
Step 7: Insert data to LBS
Step 8: Produce stago-video as output
C. Algorithm Title: Data Extraction Algorithm
Figure 4. An independent two search paths for determining 5 * 5
This algorithm take input value as Stego-video and MotionVectorwithina greedy search area
produce Hidden data (ciphertext) as output. It also
implements other simple procedures.
IV. EXPERIMENTAL RESULTS
Step 1: Take in Stego-video.
Step 2: Decoding step 1 via Inverse Huffman coding and A video stream of 89Mb was separated into three
IDCT. different frames, compressed, converted into binary codes
Step 3: Perform inverse LSB and Secret Key to extract using MATLAB) and subjected to message insertion (via
data. LSB algorithm). The frames were reconstructed and an
evaluation test of comparative performance of the re-
constructed image frame (video) using size 256 X 256 for all
D. Algorithm Title: KeyGeneration(RSA)Algorithm frames from sample video was tested. With the
transformation process on specific block size of 8 by 8, an
Step 1: Randomly generate some large primes say π and π, optimum result of the DCT coefficient was obtained. This
nearer to a given key was found to be 64 coefficients. With the variation range of 1
Step2: Select a key within the range of π and π, and 64, the variousπππΈ and ππππ
of the reconstructed
Step3: compute π = π β π, image frames were compared with a defined standard image
Step 4: computeπ(π β 1)(π β 1) frame for different range of 1-64 as earlier used (i.e.
Step 5: Generate π excluding zero). The result obtained shows that data hidden
Assume π = 1; π₯ = 1 in LSB of compressed video has little or no distortion to the
While (πππ π, π = 0) original video. Based on the average PSNR estimation, a
π = π + 1; high PSNR value was obtained which proves high image
Step 6: Generate π quality of the reconstructed video which is similar to (if not
Take π = 1 + π₯ β π almost the same as) the original video. At the receiving end,
While πππ π , π = 0 ; the whole insertion process was reversed. The experiment
π₯ =π₯+1 shows that concealed confidential data will be un-noticed
even if the data is conveyed through an un-secured medium
π = 1+π₯βπ
π = π /π
E. Our Greedy Search Algorithm
Our greedy search algorithm takes the following steps
Step 1: For 9 + 8 = 17 as overall points, check the points
concentrated at the middle nine points including
the product grid and the eight closest points to 9 *
9 grids. If the search window center =least block
distortion point (Integer DCT), terminate search; if
not, proceed to step 2. Figure 5. Sample Ship Frames
Step 2: When the central 8closest points on the 3 * 3 grid
is found to be the lowest in previous step, proceed As a criterion for good image quality, the parameter MSE
to step 3; if not forward to step immediate step (Mean Square Error) and PSNR (Peak Signal to Noise Ratio)
after step 3. are express below;
Step 3: Search until for winning point in step 1 above = 1 MSE(Mean Square Error) is an acronym for the mean-
for window center in 3*3 searches. Search squared error. It measures the error difference between a
minimum of 3 based on position of winning point given stego-image and it covers [16]. This can be
=1. Then halt search. mathematically defined as follows:
Step 4: Determine half of 9 * 9 search window sizes 2
π π
choose center to be equal to minimum block πππΈ = πΎ π=1 π =1 πππ β πππ (9)
distortion measure point in step 1 and repeat search Where
procedure as step 2 and step 3 in Three Search Step 1
πΎ= ,
πβπ
127
International Conference on Information and Communication Technology and Its Applications (ICTA 2016)
blocks is not strongly compressed. The extraction of
πππ = Value of a given image in pixel at location π, π in embedded image was found to be easy with almost no
the cover image distortion to original message (massage integrity was
πππ = Value of a given image in pixel the same location absolutely maintained). This approach was compared with
other massage hiding techniques gathered from different
in the fitting stego-image.
literatures and it was found more efficient, robust and
(Peak to peak value of the original data )2
reliable. Future work will focused on further increase in size
ππππ
= 10 πΈ
πππΈ
(8) of the βembedded payloadβ while maintaining efficiency,
robustness and message integrity.
Where E= log10 REFERENCES
[1] K. S. Anooplal and S.Girish βAn infallible method to transfer
The standard unit of measuring PSNR is usually confidential data using delta steganographyβ, International Journal of
designated as ππ΅ value for quality consideration. This Engineering Research and Technology (IJERT), vol.4, pp. 1060 β
means high value of PSNR signifies good quality of image 1063, 2015.
[2] M. P. Hemalatha, R. Dinesh Kumar andD. Vinoth kumar βImage
TABLE I. ANALYSIS OF PSNR VALUES FOR DIFFERENT TEST steganography using HBC and RDH techniqueβ, International Journal
SEQUENCES of Computer Applications Technology and Research,vol. 3, pp. 136-
139, 2014.
[3] I. E. G. Richardson, βH.264 and MPEG-4 Video Compression:
VideoCoding for Next Generation Multimediaβ. Hoboken, NJ, USA:
Wiley, pp. 260 β 273, 2014.
[4] A. A. Hussein,βData hiding in motion vectors of compressed video
based on their associated prediction errorβ,IEEE Trans. Inf. Forensics
Security, vol. 6, pp. 100-120, March 2011.
[5] F. Mehdi, S. Shirmohammadi, M. Semsarzadeh, and J.
Zhao,βTampering detection in compressed digital video using
watermarkingβ IEEE Trans. Instrumentation and Measurement, vol.
63, pp. 65-70, May 2014
[6] S.M. Poonkuzhali, βData hiding using visual cryptography for secure
transmissionβ, International Journal of Advanced Research in
Computer and Communication Engineering, , vol. 2, pp. 66-75, April
2015
[7] K.. Spyridon, , E. Eleni, N. Athanassios, V.Manjula, and K..Radhika
βData hiding in H.264 encoded video sequencesβ, IEEE Proc. MMSP
2012
[8] S. G. Lian, Z. X. Liu, Z. Ren and H. L. Wang, "Secure advanced
video coding based on selective encryption algorithms," IEEE Trans.
Consumer Electron., vol. 52, pp. 621-629, May 2014
[9] M. Shahid, Chaumont, and W. Puech, "Fast protection of H.264/AVC
by selective encryption of CAVLC and CABAC for I and P frames,"
IEEE Trans. Circuits Syst. Video Technol. Article in a conference
proceedings: vol. 21, pp. 565-576, May 2011
[10] T. Shanableh, βData hiding in MPEG video files using multivariate
regression and flexible macroblock ordering,β IEEE Trans. Inf.
ForensicsSecurity, vol. 7, pp. 455β464, Apr. 2012
[11] S. E. Thomas, S. T. Philip, S. Nazar, A. Mathew and N. Joseph,
βAdvanced cryptographic steganography using multimedia filesβ,
International Conference on Electrical Engineering and Computer
Science (ICEECS), pp. 239-242, May 2012.
[12] P. N. Ghorpade, β Data hiding in compressed video using LSB
Figure 6. Graph of PSNR Sequence algorithmβ, International Journal of Engineering Research &
Technology (IJERT),vol. 3. pp. 346-349, April, 2014.
From the PSNR sequences graph, the sequence of Ship1 [13] M. N. Asghar and M. Ghanbari, βAn efficient security system for
and Ship 3 has high motion dynamics while Ship 2 has CABAC bin-strings of H.264/SVC,β IEEE Trans. Circuits Syst.
moderate upper finger motion. We evaluated this algorithm Video Technol., vol. 23, no. 3, pp. 425β437, Mar. 2013.
and compared PSNR value of original information image [14] D. Angadi, R. Pimpale, Y. Vibhute and B.S.Kamble. βData hiding in
versus extracted image for different input videos motion vectors of compressed videoβ, International Journal of
Emerging Technology and Advanced Engineering, vol. 4, pp. 234-
239, February 2014.
V. CONCLUSION AND FUTURE WORK [15] E. Diana and G. S. Jenifer, βEncrypted data hiding in video stream
We were able to come up with an unfailing, optimally using code word substitutionβ, International Journal of Science
Technology & Engineering -IJSTE , vol 1, pp. 39-45, March 2015.
secure technique for hiding confidential information in a
stego-medium. The above work still further it experiment via [16] R. Sridevi, V. L. Paruchuri, and K.S. Rao, βImage steganography
combined with cryptographyβ, International Journal of Computers
a three step greedy search process to choose a suitable value & Technology, Vol.9, pp. 976-984,July2001.
for threshold to be used in selecting macro-blocks that match
to a given CMV in order for identically identified of
candidates the decoder in-spite of the condition that a macro-
128