Secure Image Filtering: Nan Hu, Sen-Ching S. Cheung Thinh Nguyen
Secure Image Filtering: Nan Hu, Sen-Ching S. Cheung Thinh Nguyen
Thinh Nguyen
University of Kentucky
Electrical & Computer Engineering
Lexington, KY, 40506
nan.hu@uky.edu, cheung@engr.uky.edu
ABSTRACT
In todays heterogeneous network environment, there is a growing
demand for distrusted parties to jointly execute distributed algorithms
on private data whose secrecy needed to be safeguarded. Protocols
that support such kind of joint computation without complete sharing of information are called Secure Multiparty Computation (SMC)
protocols. Applying SMC protocols in image processing is a challenging problem. Most of the existing SMC protocols are implemented based on cryptographic primitives like Oblivious Transfer
that are too computational intensive for pixel-based operations. In
this paper, we develop two efficient SMC protocols for distributed
linear image filtering between two parties, one party with the original image and the other with the image filter. The first protocol is
based on a combination of rank reduction and random permutation.
The second one uses random perturbation with the help of a noncolluding third party. Experimental results show that both of them
execute significantly faster than oblivious-transfer based techniques.
Index Terms Communication system security, Image Processing, Distributed Algorithms, Cryptography
1. INTRODUCTION
The proliferation of imaging and storage devices and the ubiquitous
presence of computer networks make sharing of visual data easier
than ever. Such casual exchange of visual data, however, has increasingly raised questions on how sensitive visual information can be
protected. Consider the scenario in which a user of a cellular-phone
camera wants to send his/her pictures to an online photo-processing
laboratory for image enhancement such as red-eye removal. The
user would be concerned about the privacy of his/her pictures while
the online store would need to protect the proprietary enhancement
technologies against reverse-engineering. Consider another scenario
that the police wants to search for possible suspects in a surveillance video owned by private company A, using a proprietary software from yet another private company B. The three parties involved
(police, company A, company B) all have information they do not
want to share with each other (criminal biometric database from the
police, surveillance tape from company A and proprietary software
from company B). To support such kinds of applications, one needs
to establish a joint computation and communication platform at the
pixel level that can guarantee the secrecy of private data and algorithms, and at the same time achieve a well-defined objective that
benefits all parties involved.
This is, however, not a new problem. Cryptographic protocols
that support joint computation among multiple distrusted parties without complete sharing of information are called Secure Multiparty
(1)
In the secure image filtering model, we have two users, Alice and
Bob, who own the image data x and the filter parameter respectively. Our goal is to establish a computation protocol between Alice
and Bob so that
1. Alice obtains f (x; ) without any knowledge of , and
2. Bob does not know anything about x.
For linear filtering, the filter parameters are specified as a filter
mask h defined as {h(m, n) : 2l m 2l and 2l n 2l }.
The linear filtering operation can then be written as
y(m, n) = x h =
l/2
X
l/2
X
(2)
i=l/2 j=l/2
R
and
n
R Rn(nb 2 c) . The inner product xT y can then be decomposed
as follows:
xT y = xT P 1 P y = xT LT y + xT RBy
(4)
Algorithm 1 InnerProductAlice(x, P 1 )
n
Require: x R . P
= (L R) is a n n invertible matrix
where n 2; L Rnbn/2c and R Rn(nbn/2c) .
1: x1 LT x
2: x2 RT x
3: Transmit x2 to Bob.
4: Receive y1 from Bob.
5: return x1 T y1
Algorithm 2 InnerProductBob(y, P )
Require: y Rn . P T = (T T B T ) is a n n invertible matrix
where n 2; T Rbn/2cn and B R(nbn/2c)n .
1: y1 T y
2: y2 By
3: Receive x2 from Alice.
4: Transmit y1 to Alice.
5: return x2 T y2
protocol which requires complex long-integer exponential and random key generation, this protocol requires only the highly optimized
matrix multiplications.
It may seem intuitive to implement secure linear filtering by applying the inner product algorithm on Xw row by row. However, it
is not secure as adjacent rows in Xw overlap with each other. As a
result, the redundancy in the rank-reduced data sent to Bob allows
him to form a least-square estimation of the original image. This
least square problem involves solving a least-square data matrix of
2
c M N . To achieve secrecy, Alice needs to first
size M N b (l+1)
2
randomly scramble the order of the rows in Xw before carrying out
the inner product. Without the proper row order, Bob has no means
of formulating the least-square estimation. The protocol is described
in FilterAlice and FilterBob.
Algorithm 3 FilterAlice(x, P 1 )
Require: x Rm . P 1 is a n n invertible matrix as described in
InnerProductAlice where n is the length of the linear filter.
1: Reformat x into Xw .
2: Scramble the row order of Xw .
3: for i 1 to m do
4:
rA (i) InnerProductAlice(Xw (i, :), P 1 )
5: end for
6: return rA
Algorithm 4 FilterBob(h, m, P )
Require: h Rn . m is the number of inner product operations
required. P T is a n n invertible matrix as described in
InnerProductBob.
1: for i 1 to m do
2:
rB (i) InnerProductBob(h, P )
3: end for
4: return rB
At the end of FilterAlice and FilterBob, the filtered result
y is decomposed into rA + rB where Alice has rA and Bob has rB ,
all in a scrambling order known only to Alice. As discussed earlier,
rB cannot be sent back to Alice for unscrambling as this will allow
(5)
Algorithm 6 3PartyInnerProductBob(y)
Require: y Rn .
1: Generate random vector ya .
2: yb (y ya )
3: Receive xa from Alice.
4: Transmit ya to Alice.
5: Transmit yb to Clark.
T
6: return rb = xT
a ya + xa yb
rithm described in Section 3.2 and 3.3 on a dual Wintel CPU (P43.4GHz) desktop with 1GB memory. The reason we did not test
the classic protocol on real images is because it will take hours to
do a linear filtering on a single image. The oblivious transfer based
technique takes about 20 minutes to compute the inner product of
two 20-dimensional vectors while our two-party protocol uses only
30 milliseconds and our three-party protocol uses 47 milliseconds.
Despite our non-optimal implementation of the oblivious transfer
protocol, its slow performance can be attributed to the handling of
very long integers in the encryption/decryption process as well as the
large amount of information exchanged between Alice and Bob. For
linear filtering using a 7 7 Gaussian mask on the same computing
platform, our two-party solution takes on average 0.7 seconds to denoise a 128 128 image and our three-party solution takes around
0.6 seconds.
Algorithm 7 3PartyInnerProductClark()
1: Receive xb from Alice.
2: Receive yb from Bob.
3: return rc = xT
b yb
4. EXPERIMENTS
5. CONCLUSION
This paper presents two different solutions for the secure linear filtering problem a two-party solution based on rank reduction and
random permutation, and a three-party solution based on random
perturbation. A drawback of the two-party solution is that the scrambling prevents repeated use of the protocols. To avoid scrambling,
our third-party solution relies on a third party to participate in independent random perturbation of each inner product computation.
The comparison between our proposed protocols and the classic protocol based on OT shows that our protocols are much faster and more
appropriate for pixel-wise computation. A more detailed evaluation
of the security of these algorithms, especially under malicious attack, is among the most pressing issue we are currently addressing.
Another important area is to assess the bandwidth requirement for
these algorithms, which could quickly become a bottleneck as we
move from image to video applications..
6. REFERENCES
[1] A. C. Yao, How to generate and exchange secretes, proceeding of 27th FOCS, pp. 162167, 1986.
[2] O. Goldreich, Foundations of Cryptography: Volume II Basic
Applications, Cambridge, 2004.
(a)
(b)
(c)
Fig. 1. (a) 128 128 Lena; (b) Lena smoothed by a 7 7 Gaussian
filter using secure filtering with a disguise matrix M R4949 ; (c)
is the partial result held by Bob
Our protocols are also computationally efficient. As a comparison, we have implemented a classic two-party protocol based on the
description from [4], using our own 512-bit RSA public-key cryptosystem (PKCS). We then compare its performance with the algo-