Message space ZN can be obtained based on determined number N, and message space ZN includes elements {0, . . . , N?1}. Random number space Z*N can be determined based on message space ZN, and elements included in random number space Z*N are all elements that are in message space ZN and relatively prime to N. Because N=P·Q, it can be determined that the size (namely, the number of elements included) of random number space Z*N is (P?1)(Q?1).