# A Physical-Layer Watermarking Scheme Based on 5G NR
## 2 Watermark System Model on 5G NR
### Basic Watermarking Scheme
#### 2.1.3 Watermark Extraction and Authentication Scheme  
After embedding the watermark, for the receiver, the base sequence of DMRS can be expressed as:  
\[\widetilde{y}(n)=e^{j\widetilde{\varphi}}y(n)=e^{j\widetilde{\varphi}}e^{j( \varphi(n)\pi/4+\alpha w(n))} \tag{3}\]  
where \(\widetilde{y}(n)\) is the received base sequence of DMRS, and it is assumed that there is a phase offset \(\widetilde{\varphi}\) after transmission through the channel. The phase offset obtained by channel  
Figure 2: Basic watermark generation scheme.  
estimation is \(\phi\)[21]. Then, the phase obtained by the receiver is compared with the phase of the standard base sequence:  
\[\widetilde{y}(n)e^{-j\hat{\varphi}}=e^{j(\varphi(n)\pi/4+aw(n)+(\widetilde{ \varphi}-\hat{\varphi}))} \tag{4}\]  
\[\Delta\varphi(n)=Arg\Big{(}\widetilde{y}(n)e^{-j\hat{\varphi}}\Big{)}-\varphi(n )\pi/4 \tag{5}\]  
Then, judge the transmitted watermark bits by  
\[\hat{w}(n)=\left\{\begin{array}{cc}1&\Delta\varphi(n)>0\\ -1&\Delta\varphi(n)<0\end{array}\right. \tag{6}\]  
The constellation of \(\widetilde{y}(n)e^{-j\hat{\varphi}}\) is shown in Figure 4. In Figure 4, it is assumed that DMRS occupies 24 subcarriers. Compared with the standard \(\varphi(n)\), there is a deviation in the calculated phase of DMRS, which is introduced by the watermark \(\hat{w}\).  
In addition to extracting the watermark from the transmission signal, the receiver needs to regenerate the watermark to complete the authentication. The receiver and the sender share the key, and at the same time, the receiver can demodulate the user bits \(\hat{b}\), then hash the key and the user bits \(\hat{b}\), and intercept the hashed result \(\hat{h}\) to an appropriate length to regenerate the watermark bit \(\hat{w}^{\prime}\). Finally, according to whether the watermark bit generated by the receiver, \(\hat{w}^{\prime}\), is the same as the watermark bit extracted by the receiver, \(\hat{w}\), it is determined whether the authentication is successful:  
\[r_{auth}=\left\{\begin{array}{cc}1&\frac{1}{24}\sum\limits_{n=1}^{24}\hat{w} ^{\prime}(n)\hat{w}(n)\geq G\\ 0&\frac{1}{24}\sum\limits_{n=1}^{24}\hat{w}^{\prime}(n)\hat{w}(n)<G\end{array}\right. \tag{7}\]  
where \(r_{auth}\) represents the final authentication result and \(G\) is the threshold. \(r_{auth}=1\) represents authentication success, and \(r_{auth}=0\) represents authentication failure. The watermark authentication scheme is shown in Figure 5.  
Figure 3: The constellation of symbols. Blue circles indicate the constellation of symbols specified in the protocol, green circles indicate the constellation after embedding bit 0 of the watermark, and red circles indicate the constellation after embedding bit 1 of the watermark.  
To briefly summarize the above process, the sender first generates a watermark, embeds the watermark into the phase of the base sequence of DMRS in 5G NR system, and then transmits the watermark-embedded signal. The receiver first receives the signal, demodulates the received signal, and extracts the watermark embedded by the sender. Then, the receiver regenerates the watermark signal according to the demodulated user's signal, and completes the authentication process by comparing the extracted watermark with the regenerated watermark.