Professional Documents
Culture Documents
System Design
39
5.1 Chapter Introduction
Most of the VC techniques suffer loss in contrast of recovered secret image. The reason
for this loss in contrast is failure to perfectly recover the white secret pixel. The techniques
that can perfectly recover the original secret image, use XORbased VC which requires
small amount of computation. The proposed (2, 2) VC technique improves the contrast of
the recovered secret image. The contrast improvement is done by increasing the number of
basis matrices used for encrypting the white and black secret pixels. For individual black
and white recovered secret pixels the contrast values can be 0%, 25%, 50% or 75%. A white
pixel may have 0% contrast, it means the white pixel is recovered as black. Similarly the
black pixel can be recovered with 75% contrast, it means that black pixel is not perfectly
reconstructed. Even with this uncertainty of contrast of recovered secret pixel, the contrast
of the entire image increases. This happens because the human visual system has a tendency
to average out the contrast of the entire image. Hence, as compared with the traditional (2,
2) VC in which the recovered secret pixel has a maximum contrast of 50%, the proposed
(2, 2) VC technique has maximum contrast of 75%.
Another major problem in VC is of pixel expansion. Due to pixel expansion the recov
ered secret image has larger dimensions as compared to the original secret image. The pixel
expansion may change the aspect ratio of the secret image. The large size of shares makes
them difficult to handle. More space is required to store the shares and also the amount
of data required for transmission of shares is more. The proposed technique uses bicubic
algorithm for reducing the dimensions of shares. The bicubic algorithm is slow, but it gen
erates a smoother image and the image is free of any artifacts. The bicubic algorithm uses
16 nearby pixels for interpolation. The proposed (2, 2) VC for improving the contrast can
be combined with bicubic algorithm to get sizeinvariant and improved contrast recovered
secret image. The bicubic algorithm can be applied on the shares generated by most of the
techniques.
The final objective of the research is to develop an authentication system to share two
passwords. Such kind of system can be used to secure the secret information with the
help of passwords. The secret information can be revealed when both the desired persons
are present with their shares. This authentication system uses the proposed (2, 2) VC for
sharing two secrets and a simple GUI is used to extract the passwords from the shares.
Once the passwords are extracted, the secret information can be revealed in presence of
both the persons. The detailed design of all the proposed techniques and the authentication
system is given in the subsequent sections.
Different type of objective and subjective parameters are used to analyse the quality of
recovered secret images. The objective metrics like MSE, PSNR, NCC and NAE may not
always give correct results. In some cases, even if the recovered secret image is of good
quality, the values of these parameters may not indicate that the quality is poor. Hence,
some of the subjective parameters are used for evaluating the quality of recovered secret
image. The subjective parameters are designed in such a way that they closely resemble
the perception to Human Visual System (HVS). The parameters that are used to analyse
the quality of recovered secret images are described in detail along with their significance
in the section 5.6.
Assume two secret images as shown in figure 5.1. In first secret image, there is a black
pixel and a white pixel at top left and top right corners respectively. For second secret
image, there are white pixels at top left and top right corners. In order to encrypt these
images, we have to apply a traditional (2, 2) VC on one of the images. Applying a (2, 2)
VC technique, generates two shares. When these shares are overlapped, the secret image
is revealed. Then one of the shares is modified according to our proposed technique. This
modified share is flipped horizontally and then overlapped on first share, to reveal the
second secret image.
The entire process is explained with the help of an example. The secret image A is
first encrypted using (2, 2) VC technique. For this two basis matrices are used as shown in
equation 5.1. The matrix B is used for sharing a black pixel of secret image and matrix W
is used for sharing a white pixel of secret image. The first row of both the matrices is used
for sharing a subpixel to share 1 and second row is used for sharing a subpixel to share 2.
1 1 0 0 0 0 1 1
W = B= (5.1)
1 1 0 0 1 1 0 0
In VC, 1 denotes black pixel whereas 0 denotes white pixel. If a black secret pixel
is to be shared, then the
columns of
matrix B are permuted randomly. Let matrix B after
1 0 0 1
permutation be B = . The subpixel pattern for share 1 is taken from row
0 1 1 0
subpixels are placed in first row and two subpixels are placed in second row as . This
maintains the aspect ratio of the recovered secret image. This subpixel pattern is placed
for share 1 and subpixel pattern for share 2. When these shares overlap, the recovered
subpixel will look like . So the white secret pixel is recovered with 50% contrast.
This process is repeated for the entire secret image A and two shares are generated. Out
of these two shares, one share is kept as it is while the second share is modified according
to the secret image B. For this, the second share is flipped horizontally and then modified
as per our proposed algorithm. Similar kind of process of flipping the shares for sharing
two secrets was used in [49]. The second secret image is having white pixel at top left
corner. To encrypt this white pixel, we have to use the proposed algorithm. According to
the proposed algorithm, we have to select only three subpixel patterns out of the six patterns
shown in figure 5.2.
After selecting the subpixel patterns, we can start encrypting the secret image B. Here,
the pixel to be encrypted is white. Check the subpixel pattern at corresponding location
in share 1. If the subpixel pattern in share 1 is not present in the three selected subpixel
patterns, then the share 2 is not modified. But if the subpixel pattern in share 1 is present in
the three selected subpixel patterns, then share 2 is modified. If the secret pixel to be shared
is white, then the subpixel pattern present in share 1 is copied and placed at corresponding
location in share 2. If the secret pixel to be encrypted is black, then the subpixel pattern
opposite to the pattern present in share 1 is copied at corresponding location in share 2.
corresponding location. The subpixel pattern in share 1 at top left corner is . This
subpixel pattern is present in the three selected subpixel patterns, so the subpixel pattern at
corresponding location in share 2 can be modified. Since the secret pixel to be encrypted
is white, the same subpixel pattern that is present in share 1 is copied to the share 2 at
corresponding location.
Now, consider the pixel at top right corner of secret image B. While encrypting this
pixel, we have to check the subpixel patterns at corresponding location in share 1. The
subpixel pattern in share 1 at top right corner is . Now this pattern is not present in
the three selected subpixel patterns. So, the subpixel pattern in share 2 at corresponding
location is not modified. the entire share generation process is shown in diagramatic form
in figure 5.3. To reveal the secret image A, the share 1 and without flipped version of
modified share 2 must be overlapped. After overlapping these two shares, the top left pixel
of secret image A is correctly recovered as black and the right pixel in secret image A is
partially recovered as white. The contrast of the recovered secret pixel is 25% as there are
3 black and 1 white pixel. Similarly, when the share 1 and the modified flipped version
of share 2 are overlapped as shown in figure 5.4, the top left pixel in secret image B is
partially recovered as white with 50% contrast. The top right pixel in secret image B is
partially recovered as black with 25% contrast.
In this technique, the recovered secret pixels can have contrast values as 0%, 25%, 50%
and 75%. This means that a black pixel can be perfectly recovered and a white pixel can
have a maximum contrast of 75%. While encrypting the pixels of second secret image,
three subpixel patterns are selected out of 6, this ensures that approximately 50% pixels
from share 2 are modified. If more or less than 3 pixel patterns are selected then there is
a chance that only one secret image out of two will be properly recovered. The results of
from table 5.1 is present in the three selected subpixel patterns from 2nd column 5.1 only
then the subpixel pattern in share 2 at corresponding location is modified. For example, the
first subpixel pattern in share 1 is present in the three selected subpixel patterns, hence
Table 5.1: Possibilities of subpixel patterns for white pixel in secret image B
Recovered
The corre
Secret Modified Subpixel by
The corre sponding
Pixel Three Selected Patterns in Overlapping
sponding Patterns in Contrast
in Subpixel Patterns Flipped Share 1 and
Patterns in Flipped (7)
Image (2) Share 2 Modified
Share 1(3) Share 2
B (1) (5) Flipped
(4)
Share 2 (6)
50%
25%
50%
25%
50%
0%
the subpixel in flipped share 2 will be modified. The subpixel pattern at corresponding lo
cation in flipped share 2 is assumed as . Since the secret pixel to be encrypted is white,
the subpixel pattern present in share 1 is copied at corresponding location in flipped share
2. When the share 1 and the modified flipped share 2 are overlapped, the subpixel pattern
at corresponding location in the recovered secret image will be . Hence, the contrast
of the recovered secret pixel is 50%. In the second case the subpixel pattern in share 1
is not present in the three selected subpixel patterns, hence the corresponding subpixel in
flipped share 2 is not modified. The subpixel pattern in flipped share 2 is and it will
be overlapped with the subpixel pattern from share 1 . After overlapping of the shares
the recovered subpixel will be and the contrast of the recovered subpixel will be 25%.
The probability that the white secret pixel will be recovered as black is 1/6. The probability
that the white pixel is recovered with 25% and 50% contrast is 1/3 and 1/2 respectively.
The table 5.2 shows the possibilities of subpixel patterns for black pixel in secret image
B for a specific case of the three selected subpixel patterns. Here, the black secret pixel is
completely recovered as black (0% contrast) and with 25% contrast with a probability 2/3
and 1/3 respectively.
Table 5.2: Possibilities of subpixel patterns for black pixel in secret image B
Recovered
Secret The corre Subpixel by
The corre Modified
Pixel sponding Overlapping
Three Selected sponding Patterns in
in Patterns in Share 1 and Contrast
Subpixel Patterns Patterns in Flipped
Image Flipped Modified
Share 1 Share 2
B Share 2 Flipped
Share 2
0%
25%
0%
25%
0%
0%
Figure 5.5: Subpixel patterns generated using basis matrices from equation 5.2
For sharing a white secret pixel, any one pattern from figure 5.5 is selected for all
the shares whereas for a black secret pixel, opposite patterns are shared. To improve the
contrast of recovered secret image, the basis matrices are modified. Instead of having two
matrices, six different matrices are used. These matrices are as shown in equation 5.3 and
equation 5.4.
1 0 0 0 1 0 0 0
W2 = B2 = (5.3)
1 0 0 0 0 1 1 1
1 1 1 0 1 1 1 0
W3 = B3 = (5.4)
1 1 1 0 0 0 0 1
Table 5.3: Possible patterns for white secret pixel using W1 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
1 1 0 0
W1 = 50%
1 1 0 0
If the columns of these matrices are permuted, then different patterns can be generated
for both shares. With these new patterns the contrast of a subpixel pattern can be either
0%, 25%, 50% or 75%. The detailed process of the technique is described below.
Consider a binary image as shown in figure 5.6 with a black pixel at left top corner and
white pixel at right top corner. When a black pixel from secret image is to be shared, then
any matrix out of B1 , B2 and B3 will be selected randomly. Let us assume that B2 matrix
Table 5.4: Possible patterns for white secret pixel using W2 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
1 0 0 0
W2 = 75%
1 0 0 0
is selected. The columns of B2 matrix are permuted randomly. From this permuted matrix,
row 1 is used to share a subpixel to share 1 and
row 2 is used
to share a subpixel to share
0 1 0 0
2. After permuting columns of B2 , let B2 = , so the subpixel pattern to be
1 0 1 1
shared at corresponding location in share 1 will be and for share 2 will be . When
share 1 and share 2 are overlapped, the patterns will also be overlapped and the resulting
Table 5.5: Possible patterns for white secret pixel using W3 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
1 1 1 0
W3 = 25%
1 1 1 0
subpixel will be . Thus the recovered subpixel is perfectly black. Now consider a white
secret pixel at top right of secret image. To encrypt this pixel, one matrix from W1 , W2 and
W3 must be selected randomly. Let us assume that matrix
W3 is selected.
The columns of
1 0 1 1
matrix W3 are randomly permuted. Let matrix W3 = . The row 1 of matrix
1 0 1 1
W3 is used for sharing a subpixel pattern in share 1 and row 2 of the matrix is used for
sharing a subpixel pattern in share 2. The subpixel pattern to be shared in share 1 will be
and in share 2 will be . These two subpixel patterns will be overlapped when both
the shares are overlapped. Thus, the recovered subpixel pattern will be . This shows
that the contrast of the subpixel pattern is only 25% because only one white pixel is present
and remaining three are black pixels. For sharing a white secret pixel, a matrix from W1 ,
W2 and W3 is chosen. For W1 , W2 and W3 matrices, the contrast of recovered secret pixel
is 50%, 75% and 25% respectively. The subpixel patterns for sharing white secret pixel
using matrices W1 , W2 and W3 are shown in tables 5.3, 5.4 and 5.5 respectively.
For sharing a black secret pixel, a matrix from B1 , B2 and B3 is chosen. For B1 , B2
and B3 matrices, the black secret pixel is perfectly recovered. The subpixel patterns for
sharing black secret pixel using matrices B1 , B2 and B3 are shown in tables 5.6, 5.7 and
5.8 respectively.
Table 5.6: Possible patterns for black secret pixel using B1 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
1 1 0 0
B1 = 0%
0 0 1 1
Table 5.7: Possible patterns for black secret pixel using B2 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
0 0 0 1
B2 = 0%
1 1 1 0
In this technique, the contrast of recovered white secret pixel is variable. The contrast
can be 25%, 50% or 75%. If subpixels are recovered with 75% contrast, then it will improve
the contrast of the entire image. If the contrast of the subpixels is 50%, then the contrast of
the entire image will be similar to a traditional (2, 2) VCS. Even if the contrast of recovered
subpixel is 25%, it will not reduce the contrast of the entire image significantly. This is
because of the adjacent subpixel blocks. For example, if there is a subpixel pattern as
with 25% contrast and subpixel pattern with 75% contrast, which are placed adjacent
to each other, then the overall contrast of two blocks will be 50%. The Human Visual
System has a tendency to average out the contrast. The total number of black and white
pixels are same in both the blocks combined. The contrast of the entire recovered secret
image increases as compared to traditional (2, 2) VCS. The results of this technique are
described in chapter 6.
Table 5.8: Possible patterns for black secret pixel using B3 matrix
Possible Possible
Recovered
Secret patterns patterns
Matrix Selected Secret Contrast
Pixel for Share for Share
Pixel
1 2
1 1 1 0
B3 = 0%
0 0 0 1
The algorithm that is proposed here can be applied on shares generated by any visual cryp
tography scheme. The algorithm can act as a post processing step for generation of size
invariant shares. For making the dimensions of the shares equal to the dimensions of secret
image, bicubic interpolation algorithm is used. For scaling down the shares, we need a
weight matrix and an indices matrix. The explanation of the entire process is given below.
Suppose, if we have a 4x4 image and we want to shrink it by a factor of 2, then the output
image will be of 2x2. This scenario is clear from figure 5.7.
Figure 5.7: Sample input image and scaled output image by a factor of 2
Let the input space coordinates be denoted by ‘u’ and output space coordinates be de
noted by ‘x’. The first two rows of the input image are converted to two pixels in the first
row of the output image and the remaining two rows of the input image are converted to
two pixels in the second row of the output image. If we just consider the first two rows,
then the mapping will be as shown in figure 5.8.
The first two pixels from first row and second row of the input image are mapped to
single pixel in the output image. Similarly, the remaining two pixels from first row and
second row of input image are mapped to single pixel in the output image. From the figure
In general, for any scale factor the relation between input image index and output image
index is given by,
x 1
u= + 0.5(1 − ) (5.5)
s s
Using the equation 5.5, we can create the indices matrix. This indices matrix tells us
which pixels from input image should be considered for performing interpolation. The
bicubic function is used for finding out the weight matrix. It gives the interpolation weight
of a sample based on how far it is from an interpolated point. The bicubic interpolation is
represented by the following equation,
1.5x3 − 2.5x2 + 1, |x| ≤ 1
f = −0.5x3 + 2.5x2 − 4x + 2, 1 < |x| ≤ 2 (5.6)
0, otherwise
The bicubic function without any scale factor is shown in figure 5.9(a), when we scale
the image with a factor of 0.5 then the bicubic function stretches on both sides and its
amplitude decreases, it is shown using orange curve in figure 5.9(b). The curve is stretched
to occupy more neighboring pixels. This kernel function is centered at the point to be
interpolated. The interpolated value is the weighted sum of the discrete neighboring points
scaled by the value of interpolation function at those points. For a two dimensional input,
interpolation is done along one dimension and the result obtained is again interpolated along
the other dimension. After applying bicubic interpolation on the shares, the dimensions of
shares become same as that of the secret image and thus pixel expansion is removed. We
can essentially call this technique as size invariant visual cryptography technique.
The process of applying the bicubic algorithm is explained with the help of an example.
Consider a matrix A as shown in the equation 5.7. This matrix is to be resized by a factor
of 0.5, so that it will have the dimensions as exactly half of its current dimensions.
1 1 0 0
0 0 0 0
A=
(5.7)
0 0 0 0
0 0 0 0
According to the algorithm, first the indices of output matrix are found out, denoted by ‘x’.
The dimensions of the output matrix will be 2 × 2. Hence, the indices will be,
x = [1, 2]
From this the indices of the input matrix ‘u’ are calculated using the equation 5.5.
u = [1.5, 3.5]
The width of the bicubic kernel is set to 8, i.e. from 4 to +4 as shown in figure 5.9(b). The
leftmost pixel that can be used in calculating the resized values is given by
kernelwidth
lef t = f loor(u − ) (5.8)
2
After calculating, the values obtained are
The maximum number of pixels that can be included in the calculations is given by
P = ceil(kernelwidth) + 2 (5.9)
Here, P = 8 + 2 = 10. For generating the indices matrix, the values of left and P are used.
The array of maximum number of pixels is created as shown below
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
For considering the index of leftmost pixel that can be used in calculation, the value of left
is added to the above array to generate the indices matrix.
−3 −2 −1 0 1 2 3 4 5 6
indices =
−1 0 1 2 3 4 5 6 7 8
For calculating the weights matrix, the input coordinates ‘u’, indices matrix and the bicubic
function is used. The intermediate matrix ‘xw’ is generated by subtracting every element
of indices matrix from ‘u’. The matrix ‘xw’ is as shown below
4.5 3.5 2.5 1.5 0.5 −0.5 −1.5 −2.5 −3.5 −4.5
xw =
4.5 3.5 2.5 1.5 0.5 −0.5 −1.5 −2.5 −3.5 −4.5
The scale used in this algorithm is 0.5 and the bicubic algorithm is as shown in the equation
5.6. First, the values in ‘xw’ matrix are multiplied by the scale factor, then for each value
in ‘xw’, the bicubic function value is calculated. Finally, every element in the ‘xw’ matrix
is multiplied by scale factor to get the final weights matrix.
2.25 1.75 1.25 0.75 0.25 −0.25 −0.75 −1.25 −1.75 −2.25
xw × scale =
2.25 1.75 1.25 0.75 0.25 −0.25 −0.75 −1.25 −1.75 −2.25
0 −0.0117 −0.0352 0.1133 0.4336 0.4336 0.1133 −0.0352 −0.0117 0
weights =
0 −0.0117 −0.0352 0.1133 0.4336 0.4336 0.1133 −0.0352 −0.0117 0
For calculating the output pixel value from kth row of output matrix, kth row of indices
matrix and kth row of weights matrix is used. Now the indices matrix is having indices
which are out of bound i.e. the indices are not present in the input image matrix. Such
indices are removed by using symmetric padding. Here, the input matrix is having 4 indices
only, so the elements those are greater than 4 and elements having negative values will be
removed and instead of them symmetric padding is done. The resultant indices matrix is
as shown below
4 3 2 1 1 2 3 4 4 3
indices =
2 1 1 2 3 4 4 3 2 1
The weights matrix is having some elements with 0 value, those can be removed along
with the corresponding elements from indices matrix. The final values in the indices and
weights matrix are as shown below
3 2 1 1 2 3 4 4
indices =
1 1 2 3 4 4 3 2
−0.0117 −0.0352 0.1133 0.4336 0.4336 0.1133 −0.0352 −0.0117
weights =
−0.0117 −0.0352 0.1133 0.4336 0.4336 0.1133 −0.0352 −0.0117
The resizing is done, first along the rows of original image matrix. This generates an
intermediate matrix. Again same algorithm is applied on the intermediate matrix along
the columns. The first row of the indices matrix is considered for calculating the values
in first row of the intermediate matrix. After that, values from the input matrix from first
column corresponding to the values in first row of indices matrix are taken in an array as
shown below.
0
0
1
[ ]
1
B=
B′ = 0 0 1 1 0 0 0 0
0
0
0
0
The first row of the indices matrix is having indices from 1 to 4. The corresponding values
from first column of the input matrix are taken in the array B. The element by element
multiplication is done between the values in B and the first row of the weights matrix.
The resulting array is summed up and the resulting sum is placed as first element in the
intermediate matrix. When this process is repeated for all the columns in the input matrix,
it gives all elements in the first row of the intermediate matrix. The elements in the second
row of intermediate matrix are calculated using the second row of indices and weights
matrix. After this step, the intermediate matrix will have the rows equal to the output
matrix and columns equal to input matrix.
[ ]
weights. ∗ B ′ = 0 0 0.1133 0.4336 0 0 0 0
sum(weights.*B’) = 0.5469
0.5469 0.5469 0 0
intermediate matrix =
−0.469 −0.469 0 0
Now the resizing of intermediate matrix is done along the columns to get the final resized
matrix. The first row of the indices matrix is having indices from 1 to 4. The corresponding
values from first row of the intermediate matrix are taken in the array B.
[ ]
B = 0 0.5469 0.5469 0.5469 0.5469 0 0 0
The element by element multiplication is done between the values in B and the first row of
the weights matrix.
[ ]
weights. ∗ B = 0 0 0.1133 0.4336 0 0 0 0
The resulting array is summed up and the resulting sum is placed as first element in the
final output matrix.
sum(weights. ∗ B) = 0.5170
When this process is repeated for all the rows in the input matrix, it gives all elements in the
first column of the output matrix. The elements in the second column of output matrix are
calculated using the second row of indices and weights matrix. After this step, the output
matrix will have the desired number of rows and columns.
0.5170 0.0299
Output M atrix =
−0.0443 −0.0026
Using this algorithm the size of shares can be reduced and the problem of pixel expansion
can be solved. The results of this technique are described in chapter 6. This algorithm is
applied on a (2, 2) VCS and also on the proposed technique for contrast improvement.
(a) Password 1
(b) Password 2
In the proposed system, the two 6digit passwords are generated and two shares of
those passwords are created. These shares can then be sent using email, to the designated
internal and external supervisors of that institute. These shares can then be given as input
to a software which will recover the two password from the shares. The first advantage
of this system is that both the supervisors should be present for downloading the question
paper and the second advantage is that instead of mobile phone the Internet will be used
to send passwords in the form of shares. The mobile phones may have network issues like
congestion etc. and the password may not be delivered. This problem can be eliminated
with the proposed system.
The proposed system is explained with the help of an example. Initially, two six digit
random numbers are generated. For generating the random numbers discrete uniform dis
tribution function is used. This is to ensure that all the numbers have equal probability of
occurrence. The generated numbers are in the text format. These numbers are converted
into a single image using the preexisting digit templates. Two images are generated for
two passwords, each image has dimensions of 80 × 300. The individual digit templates
have dimensions of 80 × 50 as shown in figure 5.10.
For instance, if the passwords generated are 297509 and 327418, then the corresponding
digit templates are used to create a single image for entire password. The two images
created will be as shown in figure 5.11(a) and 5.11(b).
The proposed technique of sharing two secrets using two shares is applied on the two
images and two shares are generated. The first share can be emailed to the internal su
pervisor while the second share can be emailed to the external supervisor. These shares
should be downloaded by both the supervisors on the same computer. Then using a simple
software, the passwords can be extracted from these shares. Although the computer is not
required for decryption, but to avoid the printing of shares on transparent sheets, a computer
is used. When both the shares are overlapped, first password is revealed and when one of
the share is flipped and overlapped with another share, the second password is revealed.
The revealed passwords are not exactly recovered as original password images. To extract
the digits in the text format from the recovered password, a two dimensional correlation
is used. The correlation is computed using equation 5.11. Here, ‘m’ and ‘n’ are rows and
columns in the image, A and B are the two images which are to be compared, A and B are
the mean values of the images A and B respectively.
∑ ∑
(Amn − A)(Bmn − B)
r = √ ∑ ∑m n ∑ ∑ (5.11)
( m n (Amn − A)2 )( m n (Bmn − B)2 )
To extract the password digits from the recovered secret images, the recovered digits are
compared with the original digits using correlation. When the recovered secret digit matches
Table 5.10: Correlation values of recovered digit 3 with original sample digits
Recovered Digit Original Digit Correlation Value
0.0810
0.0065
0.0422
0.2333
0.0458
0.1331
0.1375
0.0648
0.1518
0.1366
the original secret digit, the correlation value is high. In this way, the text password is iden
tified from the recovered secret images. The correlation values for sample recovered secret
digit 3 and the original template digits are shown in the table 5.10. The highest correlation
value occurs for digit 3 and it is 0. 2333. For other digits the correlation values are far
less than 0.2333. The correlation values are calculated for all the recovered secret digits
of the passwords and the text password is extracted. The screenshot of the GUI used for
extracting the password is shown in the figure 5.12. In the GUI, the share 1 and share 2 are
browsed and after clicking on begin button, the passwords are extracted from the shares
(2µx µy + C1 )(2σxy + C2 )
SSIM (x, y) = (5.13)
(µ2x + µ2y + C1 )(σx2 + σy2 + C2 )
Where, µx is the average of x, µy is the average of y, σx2 is the variance of x, σy2 is the
variance of y, σxy and is the covariance of x and y. Parameters C1 and C2 are used
to stabilize the division. When the OSI and RSI are similar, then the value of SSIM
is nearly equal to 1.
N Rf n + N Rf p
N RM = (5.14)
2
where,
NF N
N Rf n =
NF N + NT P
NF P
N Rf p =
NF P + NT P
If the value of NRM is nearly equal to 0, then it means that there is very less difference
between OSI and RSI.
4. Sensitivity
NT P
Sensitivity = (5.15)
NT P + NF N
If the value of sensitivity is nearly equal to 1, then it indicates that OSI and RSI are
similar.
5. Precision
NT P
P recision = (5.16)
NT P + NF P
If the value of precision is nearly equal to 1, then the difference between OSI and
RSI is very less.
6. FM easure
2 × Recall × P recision
FM easure = (5.17)
Recall + P recision
The value of FM easure close to 1 indicates that the OSI and RSI are similar.
7. Specificity
NT N
Specif icity = (5.18)
NT N + NF P
If the value of specificity is nearly equal to 1, then the difference between OS and
RSI is very less.
If the value of BCR is nearly equal to 1, then it indicates that the difference in the
OSI and RSI is less.
Where Bk (i, j) is the n × n block centered at (i, j) in OSI and Rk (i, j) is the n × n
block centered at (i, j) in RSI. The DRD is given by,
∑s
DRDk
DRD = k=1 (5.20)
N U BN
Where NUBN is the number of nonuniform 8 × 8 blocks in the OSI.
Where, w is the number of white pixels correctly detected as white in RSI, b is the
number of black pixels correctly detected as black in RSI, and B and W are the total
number of black and white pixels in the OSI.
numeric passwords and these passwords are shared using two shares. In this system two
of the proposed techniques are used. First, a (2, 2) VC technique to share two secrets and
second, a (2, 2) VC technique to improve the contrast of recovered secret image. A GUI is
developed to take the generated shares as input and extract the two passwords from them.