Random numbers are widely used in numerical computing, statistical simulation, random sampling, etc. At present, the mechanism for generating random numbers by computers is at risk of being attacked. In some cases, generated random numbers may be predicted. However, current RNGs used in blockchain are not sufficient enough to handle attacks. Therefore, it is necessary to improve the security of random numbers. This paper improves the random number generator and designs a secure random number generator based on blockchain (BCsRNG). In practice, an encapsulated function algorithm of the secure random number is developed with the smart contract. Moreover, an API is provided to facilitate input and output. The experimental results show that the random numbers generated by BCsRNG are difficult to decipher and have higher randomness and security.INDEX TERMS Random number, Blockchain, Smart contract, Security, Random number generator I. INTRODUCTION
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.