If the watermark is present in the power consumption then the population correlation will have the value of the ratio between the standard deviation of the power consumption of the watermarking hardware and the standard deviation of the total power consumption. If the IP is included within a larger design it may not be possible for the rights holder to know the value of this. They could measure the standard deviation of the total power consumption but the standard deviation of the power consumption of the watermarking hardware would be dependent on the technology that it was implemented on, so would not necessarily be the same as their reference version.
What is known is that if the watermarking hardware is there then the population correlation will be positive and if it isn’t then it will be 0. After the sample correlation has been calculated it can be determined whether it is reasonable to reject the null hypothesis that the correlation was drawn from a distribution with a mean that is not greater than zero and hence there is no watermarking hardware present. In order to do this a p-value is calculated using a z-table. The p-value is the probability of observing by chance a result that is at least as extreme as the one being tested. A z-table contains the probabilities of a standard normal distribution, one with a mean of 0 and standard deviation of 1, being greater than a set of values.
3 1 1 * 3 1 0 / 0 = − − − = − = F N N F n x z σ µ (6-26)
It is determined by looking up on a z-table the associated probability for the value of z which can be calculated with (6-26) where x is the mean sample correlation, in this case the Fisher transform of the sample correlation,
µ
0 is the value of the meanin the null hypothesis, in this case 0, σ is the standard deviation of the sampling distribution, given by (6-2) and n is the number of samples in the mean of the sample correlation, as only one correlation is being calculated this is 1.
6.5.3.1 Summary of method
In order to tell whether the power consumption data supports the presence of a watermark the following steps must be taken:
1) The power consumption (P) of the device is measured from its reset state and the Hamming distance (H) of the registers in the PRBG for the same number of samples (T) is recorded.
2) The correlation between the two is calculated.
ρ = Corr (P, H) (6-27)
3) The Fisher transform is applied to the correlation.
F = Fisher (ρ) (6-28)
4) The confidence level must be decided. This is the probability incorrectly detecting a watermark when there is none. A typical value is 0.05.
C = 0.05 (6-29)
5) The p-value is calculated.
P = Z (F (T-3)1/2) (6-30)
6) If the p-value is lower than the confidence level then the null hypothesis can be rejected and the watermark has been detected.
6.5.3.2 Experimental Results
Watermark Yes No Yes No Yes No
Samples 5000 5000 1000 1000 1000 1000 σ Total 1 1 1 1 1 1 σ Watermark 0.05 - 0.1 - 0.05 - Null Hypotheses rejected (%) 97 4.8 93.9 5.0 46.6 4.8
Table 6-1: Summary of the simulation results.
A series of simulations was performed in order to verify the method. The power consumption of the watermarking hardware was modelled by generating a series of random numbers between 0 and 255 and calculating the Hamming distance between them, giving values between 0 and 8. Noise was included by adding a series of normally distributed random numbers to the model. The noise represents both the power consumption from the rest of the circuit and any non-linearity in the power consumption vs. Hamming distance. The correlation was performed between the Hamming distance values and the power consumption model. This was repeated
10,000 times for different numbers of samples and with different amounts of noise. Simulations of hardware power consumption with no watermark were also performed. In these, the Hamming distance for a watermark was calculated in the same way and they were correlated with normally distributed random numbers that had the same standard deviation as the total power consumption for the watermarked simulations. The results are summarised in Table 6-1.
6.5.3.3 Type I and II Errors
There are two types of errors when trying to detect a watermark: detecting one that is not there and not detecting one that is. The probability of incorrectly rejecting the null hypothesis and falsely claiming there is a watermark is the significance level chosen for the p-value test. This is why the number of times a watermark was detected in the simulations when there was none was always approximately 5% irrespective of the number of samples taken and the population correlation.
Figure 6-5 : A graph illustrating the effect of increasing the number of samples of the ease of detecting a watermark
The probability of not detecting a watermark that is there is controlled by two factors: the population correlation and the number of samples. The smaller the population correlation the greater the number of samples that must be taken to ensure the same probability of detecting the watermark. This is because increasing the
number of samples reduces the standard deviation of the sampling distributions making it easier to differentiate between the two. This is illustrated in Figure 6-5, the curves in both plots are normal distributions with the same mean but different standard deviations, the shaded area represents the amount of the sampling distribution that the correlation can come from in order to reject the null hypothesis with a confidence of 0.95. It is clearly more likely to successfully detect the watermark from the lower graph.