tain subbands/bitplanes while encrypting certain other
subbands/bitplanes (Cancellaro et al., 2008), (Lian
et al., 2006). Some of the encrypted domain algo-
rithms are proposed in (Bianchi et al., 2010), (Piva
et al., 2010), (Zhao et al., 2010), (Katzenbeisser et al.,
2008). However, these algorithms cause irreversible
distortion which might not be desirable especially in
case of biomedical images. Thus, here we propose
a technique for watermarking of encrypted JPEG-LS
compressed images, where the compressed bitstream
is encrypted while watermark is embedded using con-
texts (explained in section 2). This paper is organized
as follows. Section 2 gives the preliminaries. In sec-
tion 3, we present the embedding and detection pro-
cess. We discuss the experimental results in section 4.
Section 5 concludes the paper.
2 PRELIMINARIES
In this section we briefly discuss the JPEG-LS com-
pression algorithm (Weinberger et al., 2000), and the
challenges in watermarking a compressed-encrypted
JPEG-LS image. In figure 1-a, an initialcontext is
computed in the Gradient block using the pixels a,
b, c and d. This initialcontext is a positive quantity
and is mapped into equal negative and positive values
using a classmap. For e.g., let the initialcontext be
denoted as Q ∈ [0,728] (Weinberger et al., 2000). Let
us denote Q
neg
∈ [−1, −364] and Q
pos
∈ [1, 364] and
let classmap f (.) denote the function which maps Q
to Q
neg
or Q
pos
or 0, i.e, f : Q → {Q
pos
,Q
neg
,0}. In
the regular mode, the current sample x is predicted in
Predictor block using a finite past pixel set compris-
ing of pixels a, b and c. Generally the fixed prediction
has some bias in it which is canceled out using the
context in which pixel occurs. Finally, the prediction
residual between the corrected (bias canceled) pre-
dicted value and the original pixel is Golomb coded.
Further each pixel (of a M x N image) occurs under
Q
px[ j]
∈ {Q
pos
,Q
neg
,0} while encoding, where px[ j]
denotes the pixel at position j, ∀ j = 1, 2, ..., M x
N and Q
px[ j]
denotes its context. Also, the Golomb
coded bit stream can be encrypted using a secure ci-
pher scheme such as RC4 (Schneier, 1996) for confi-
dentiality, which can then be distributed.
Now, modifying such a randomized bitstream
to insert watermark faces certain limitations. The
Golomb coded bitstream is highly sensitive to bit er-
rors. Even if one bit gets corrupted, the rest of the
decoding can be compromised. Therefore, we choose
the context of the encoded image for embedding wa-
termark without requiring any decryption or decom-
pression. Next we discuss the proposed algorithm.
3 PROPOSED ALGORITHM
The proposed algorithm involves encryption of
Golomb coded bit stream while embedding water-
mark through context. Encryption is performed on the
output bit stream of JPEG-LS compression (figure 1-
a). The encryption algorithm that we propose to use
is RC4 cipher (Schneier, 1996). The encryption does
not result in any increase in compressed file size as
the encryption is done using a stream cipher. The en-
crypted bit stream along with classmap f and context
frequencies is sent to the watermark embedder (figure
1-b) where the watermark embedding takes place.
The first step in watermarking process involves
finding the frequency or number of occurrences of
each context Q ∈ Qpos. Then according to the dy-
namic range of highest frequency contexts, the wa-
termark signal is divided into smaller length seg-
ments. Further Euclidean distance between the se-
lected contexts against the watermark segments is
computed. The contexts which give minimum dis-
tance will represent watermark information. Finally
contexts involved in computing Euclidean distance
are exchanged with the other contexts which does not
belong to highest occurring contexts. The main pur-
pose behind selecting highest occurring contexts is
that the higher the dynamic range, the more number of
watermark signal bits can be embedded. We describe
the watermark embedding procedure next.
3.1 Embedding Process
Let Q
p
j
∀ j = 0, 1, ....,L − 1 be the L highest occur-
ring contexts which are selected from Q
pos
for Eu-
clidean distance criteria. Here, L is chosen such that
L ≤ max(Q
pos
)/2, for e.g. in our case max(Q
pos
) =
364. Let freq
j
represent the frequency of Q
p
j
∀ j =
0,1,....,L − 1. Now, let us arrange freq
j
∀ j =
0,1,....,L − 1 in ascending order as shown in fig-
ure 2 and different freq
j
’s are then grouped in range
R
i
, where range R
i
∀ i = 0, 1,....,K − 1 represent
the i
th
range, such that K ≤ L. Although it would
be easy to range the frequencies in uniform inter-
vals, this may not be a good idea as it will increase
detection error rate as the dynamic range of fre-
quencies in range will vary too much. Therefore,
we choose unequal range lengths, with range limits
[freq
R
i
,freq
R
i+1
− 1] ∈ R
i
∀ i = 0, 1, ....,K − 1. Let
b
i
∀ i = 0,1,....,K − 1 be the minimum number of
bits used to represent the elements present in i
th
range
R
i
∀ i = 0,1,....,K − 1. Let their be E
i
number of fre-
quency elements (and hence number of contexts) in
i
th
range R
i
∀ i = 0,1,....,K − 1. The values of the
parameters K and b
i
used for simulation purpose are
SIGMAP 2011 - International Conference on Signal Processing and Multimedia Applications
162