## 3 Optimal Attack Strategy
### The Modeling of the Optimal Attack Strategy Problem  
For a discrete random variable \(X\), with possible values of \(\{x_{1},x_{2},\ldots,x_{n}\}\), its probability distribution is \(\Pr(X=x_{i})=p_{i}\) (\(i=1,2,\ldots,n\)), and then the information entropy of \(X\) is defined as:  
\[H(X)=-\sum_{i=1}^{n}p_{i}\log_{2}{(p_{i})}. \tag{4}\]  
**Theorem 1**. : _Under the Assumption 1 and the tampering strategy (3), the overall average entropy of the system after tampering is_  
\[\bar{H}=\frac{1}{m}\sum_{l=1}^{m}(-\eta_{l}\log_{2}{\eta_{l}}-(1-\eta_{l})\log _{2}{(1-\eta_{l})}), \tag{5}\]  
_where \(\eta_{l}=q_{l}+(1-p_{l}-q_{l})F(C_{l}-\phi_{l}^{T}\theta)\)._  
Proof. : For a sequence of binary data \(\{s_{l,k}\}\) in the channel after a data tampering attack, with possible values of \(\{1,0\}\) and probability distributions of \(\Pr(s_{l,k}=1)=\eta_{l}\) and \(\Pr(s_{l,k}=0)=1-\eta_{l}\), respectively. When the input vector corresponding to \(s_{l,k}\) is \(\phi_{l}^{T}\), according to (2) and (3), it is obtained that  
\[\Pr\{s_{l,k}=1\} = \Pr\{s_{l,k}=1|s_{l,k}^{0}=1\}\Pr\{s_{l,k}^{0}=1\}+\Pr\{s_{l,k}=1 |s_{l,k}^{0}=0\}\Pr\{s_{l,k}^{0}=0\}\] \[= (1-p_{l})F(C_{l}-\phi_{l}^{T}\theta)+q_{l}(1-F(C_{l}-\phi_{l}^{T }\theta))\] \[= q_{l}+(1-p_{l}-q_{l})F(C_{l}-\phi_{l}^{T}\theta)\] \[= \eta_{l}.\]  
From (4), the information entropy of \(s_{l,k}\) is expressed as:  
\[H(s_{l,k}) = -\eta_{l}\log_{2}{\eta_{l}}-(1-\eta_{l})\log_{2}{(1-\eta_{l})}. \tag{6}\]  
The overall information entropy of all the data in the system, which is the joint entropy of all the random variables of the system, is expressed according to the chain rule of entropy as:  
\[H(s_{1,1},s_{1,2},\ldots,s_{m,N}) = \sum_{l=1}^{m}\sum_{k=1}^{N}H(s_{l,k}|s_{l,k-1},\ldots,s_{1,1}) \tag{7}\] \[= \sum_{l=1}^{m}\sum_{k=1}^{N}(H(s_{l,k})-I(s_{l,k};s_{l,k-1}, \ldots,s_{1,1})),\]  
where \(H(s_{l,k}|s_{l,k-1},\ldots,s_{1,1})\) is the conditional entropy, which is used to measure the uncertainty or information content of one random variable, \(s_{l,k}\), given other random variables, \(s_{l,k-1},\ldots,s_{1,1}\) and \(I(s_{l,k};s_{l,k-1},\ldots,s_{1,1})\), provide mutual information to quantify the information reduced by \(s_{l,k-1},\ldots,s_{1,1}\). Since \(s_{l,k}\) are independent of each other, at this point\(s_{i,j},i\
eq l,j\
eq k\) provides no additional information for the elimination of uncertainty in \(s_{l,k}\), i.e., \(I(s_{l,k};s_{l,k-1},\ldots,s_{1,1})=0\), with \(H(s_{l,k}|s_{l,k-1},\ldots,s_{1,1})=H(s_{l,k})\), which leads to \(H(s_{1,1},s_{1,2},\ldots,s_{m,N})=\sum_{l=1}^{m}\sum_{k=1}^{N}H(s_{l,k})\). Combining (6) and (7), there is:  
\[\bar{H} = \lim_{N\rightarrow\infty}\frac{1}{mN}H(s_{1,1},s_{1,2},\ldots,s_{ m,N})\] \[\bar{H}=\frac{1}{m}\sum_{l=1}^{m}(-\eta_{l}\log_{2}{\eta_{l}}-(1-\eta_{l})\log _{2}{(1-\eta_{l})}), \tag{5}\]0 \[\bar{H}=\frac{1}{m}\sum_{l=1}^{m}(-\eta_{l}\log_{2}{\eta_{l}}-(1-\eta_{l})\log _{2}{(1-\eta_{l})}), \tag{5}\]1  
The expression for the average entropy of the system, \(\bar{H}\), with respect to the attack strategy \((p_{l},q_{l})\) is obtained and the theorem is proved. In the actual model, the attack energy is not infinite, so the data tampering attack in this paper needs to satisfy both the total energy constraint and the maximum energy constraint. The total energy constraint is the upper bound of the sum of attack strategies \((p_{l},q_{l})\), \(l=1,2,\ldots,m\) in the set of attack strategies, \(\Omega\), denoted as \(\varepsilon\). There are also restrictions in the attack strategy for a single group attack strategy, and \(\bar{p}\) and \(\bar{q}\) denote the maximum energy constraints for \(p_{l}\) and \(q_{l}\), respectively. Under the energy-constrained condition, combined with (5), the question to be investigated in this paper is transformed into: How can the attacking policy reasonably allocate energy to the multi-observation system in order to minimize the average entropy of the system as a whole and obtain the optimal data tampering attack strategy?