| CPC G06F 21/78 (2013.01) [G01S 13/931 (2013.01); G06F 21/64 (2013.01); G01S 2013/9323 (2020.01)] | 12 Claims |

|
1. A method for detecting a register, comprising:
performing a signature operation on a first data to obtain a first signature, which comprises: performing a specific logical operation on a random number and multiple bits of the first data, to obtain the first signature, wherein the first data comprises 2n bits, and n is an integer greater than or equal to 1;
storing the first data in a data register;
performing the signature operation on a second data stored in the data register, to obtain a second signature; and
comparing the first signature and the second signature to detect the data register,
wherein the performing the specific logical operation on the random number and multiple bits of the first data, to obtain the first signature, comprises one of the following:
performing a specific logical operation on the 0th bit to the (n−1)th bit of the first data and a first sub-result, to obtain the first signature, wherein the first sub-result is determined based on a first random number and the nth bit to the (2n−1)th bit of the first data;
performing a specific logical operation on the nth bit to the (2n−1)th bit of the first data and a second sub-result, to obtain the first signature, wherein the second sub-result is determined based on a second random number and the 0th bit to the (n−1)th bit of the first data; or
performing a specific logical operation on the 0th bit to the (n−1)th bit of the first data and the nth bit to the (2n−1)th bit of the first data, to obtain the first signature;
wherein the first sub-result is obtained by:
performing a specific logical operation on a third signature and the 0th bit to the (n/2−1)th bit of the first data, to obtain a first sub-operation result, and performing a specific logical operation on the third signature and the (n/2)th bit to the (n−1)th bit of the first data, to obtain a second sub-operation result, wherein the third signature is determined based on the first random number and the nth bit to the (2n−1)th bit of the first data; and
concatenating the first sub-operation result and the second sub-operation result, to obtain the first sub-result.
|