Random numbers play an important role in many fields, including information security, testing and engineering practice. Especially in information security, generation of secure and reliable random numbers, they have a significant influence on national security, financial stability, trade secrets and personal privacy. Generally, random number generators can be classified as two main types: pseudo random number generators and physical random number generators. Pseudo random numbers with high speed are generated by software algorithms, but the inherent periodicity will cause serious hidden dangers when they are used in information security. Random numbers based on physical entropy sources (such as electronic thermal noise, frequency jitter of oscillator, quantum randomness) can produce reliable random numbers. However, due to the limitation of traditional physical source bandwidth, their generation speeds are at a level of Mbit/s typically, which cannot meet the needs of the current high-speed and largecapacity communication. In 2008, Uchida et al. (2008 Nat. Photon. 2 728) realized the physical random number of 1.7 Gbit/s by using a wideband chaotic laser for the first time. The emergence of wideband physical entropy sources such as chaotic laser greatly promote the rapid development of the physical random number generators. As far as we know, a semiconductor laser can generate wideband chaotic signals under external disturbances such as optical feedback, optical injection or photoelectric feedback. However, compared with the structures of other two lasers, the structure of the optical feedback semiconductor laser is simple and easy to integrate. Therefore, chaotic signals have received great attention to produce high-speed physical random number extracted from the optical feedback semiconductor laser. In the reported schemes, a variety of post-processing methods are used to improve the speed and randomness of random numbers. Besides, optimizing the chaotic entropy source can also improve the performance of random number. So far, the influence of internal parameters on the dynamic characteristics of semiconductor lasers has attracted wide attention. The linewidth enhancement factor is one of the key parameters for a semiconductor laser. The values of linewidth enhancement factor are different, depending on the type of semiconductor laser. The existence of linewidth enhancement factor results in a large number of unstable dynamic characteristics of semiconductor lasers. Therefore, it is of great significance for studying the influence of the linewidth enhancement factor on performance of random numbers. In this paper, we focus on the influence of the linewidth enhancement factor on the randomness of the obtained random numbers. The time delay characteristics and complexity are two important parameters to measure the quality of chaotic signals. The simulation results show that with the increase of the linewidth enhancement factor, the time delay characteristic peak of the chaotic signal from an optical feedback semiconductor laser decreases gradually, meanwhile, the maximum Lyapunov exponent of chaotic signal increases gradually. The randomness of random numbers, generated by the chaotic signal from the optical feedback semiconductor laser under different linewidth enhancement factors, is tested by NIST SP 800-22. The test results show that semiconductor laser with larger linewidth enhancement factor is chosen as a physical entropy source to generate random numbers with high quality.