# Hyperspectral Data: Efficient and Secure Transmission
## 2 An Efficient and Secure Transmission Framework
### An Effective Implementation of the Proposed Framework
#### 2.1.1 Reversible Invisible Watermarking Scheme for Hyperspectral Images  
In [13], we have proposed a preliminary version of a reversible invisible watermarking scheme for hyperspectral images. This scheme relies on the approaches outlined in [9; 14], and belongs to the category of additive schemes. In the additive scheme, the watermark signal \(w\) (i.e., a watermark string) is directly added to the input signal, namely the pixels of the input hyperspectral image \(HI\). In this way the output produced (i.e., the watermarked hyperspectral image \(HI^{W}\)) contains both the signals (the one that represents the \(HI\) and the one that represents the watermark \(w\)). A secret key, \(K\), is used to perform the embedding phase. It is important to note that this scheme is reversible. Therefore, it is possible to restore the original \(HI\) and to extract the watermark \(w\). In addition, this scheme is fragile: a simple modification of \(HI^{W}\) might cause the disappearance of the embedded watermark, \(w\). Figure 1: The architecture of the proposed framework. The basic objective of our scheme is to spread the bits of \(w\) among all the bands of _HI_. More precisely, each bit of \(w\)--referred to as \(b_{w}\)--will be embedded into a set of four pixels \(S_{P}=\{x_{(0)},\ x_{(0)},\ x_{(2)},\ x_{(3)}\}\). These pixels are pseudo-randomly selected by means of a pseudo-random number generator (PRNG) based on the secret key, \(K\). Since it is possible to have a set \(S_{P}\) that cannot be used to carry \(b_{w}\) due to the fact that the extraction algorithm might be unable to extract the hidden bit, it is necessary to classify the sets into two categories: \"carrier sets\" and \"non-carrier sets\". A carrier set is a set in which a bit, \(b_{w}\), can be embedded, while a non-carrier set is a set in which a bit, \(b_{w}\), cannot be embedded. When the algorithm identifies a carrier set \(S_{P}\), a bit \(b_{w}\) can be embedded by means of the \"embedWatermarkBit\" procedure, reported in Algorithm 1, which returns as output the set \(S_{P}^{w}\). \(S_{P}^{w}\) represents the set \(S_{P}\) in which \(b_{w}\) is embedded. To classify a set \(S_{P}\), the relationship between \(S_{P}\) and its _estimation_\(S_{P}^{E}\) is exploited. This estimation is computed by means of a linear combination of the pixels of \(S_{P}\), as explained in the \"estimate\" procedure (see Algorithm 2). By using the estimation, the extraction algorithm can classify, in two steps, a set \(S_{P}\). Furthermore, the extraction algorithm can restore the original pixel values of the carrier set by manipulating a watermarked carrier set. In this manner, the reversibility property is obtained. ```
procedureembedWatermarkBit (\(S_{P},b_{w}\))
1.if\(b_{w}==1\)then
2.\(x_{(0)}^{w}=x_{(0)}+1\);
3.\(x_{(1)}^{w}=x_{(1)}-1\);
4.\(x_{(2)}^{w}=x_{(2)}-1\);
5.\(x_{(3)}^{w}=x_{(3)}+1\);
6.else
7.\(x_{(0)}^{w}=x_{(0)}-1\);
8.\(x_{(1)}^{w}=x_{(1)}+1\);
9.\(x_{(2)}^{w}=x_{(2)}+1\);
10.\(x_{(3)}^{w}=x_{(3)}-1\);
11.endif
12.\(S_{P}^{w}=\{x_{(0)^{\prime}}^{w},\ x_{(1)^{\prime}}^{w},\ x_{(2)^{\prime}}^{w},\ x_{(3)}^{w}\}\);
13.return\(S_{P}^{w}\);
14.endprocedure
```  
**Algorithm 1** The \"embedWatermarkBit\" procedure (pseudo-code from [13])  
Algorithm 3 reports the pseudo-code of the \"embed\" procedure. This procedure embeds the watermark string \(w\) into the input hyperspectral image _HI_ by using in the embedding process the secret key \(K\). In details: the pseudo-random number generator (PRNG) \(G\) is initialized by using \(K\) as a seed. Subsequently, \(w\) is subdivided into \(M\) substrings (where \(M\) is the number of bands of _HI_). The \(i\)th substring, \(w_{i}\), will be embedded into the \(i\)th band of _HI_, denoted as \(\textit{HI}_{(i)}\). Therefore, each band will carry at least \(\lfloor N/M\rfloor\) bits, where \(N\) denotes the length of \(w\).