A non-transitory computer readable recording medium storing a random number expanding program that makes a computer to execute:
- a receiving process of a random number r(M) of M bits;
- an expanding process of the random number r(M) to a random number s(N) of N bits using a logical operation that is obtained by a multiplication of one matrix of a check matrix with a size of M×N and a generator matrix with a size of M×N which are determined from a linear code for error correction by a vector in a case in which the random number r(M) is the vector having M components, the multiplication being performed through addition based on an exclusive OR;
- and
- an outputting process of a bit value whose number is larger than M bits out of N bits of the random number s(N).