The ever-increasing pervasiveness of decentralized applications, such as blockchain, is creating challenges for sources of randomness, which play an integral part in decentralized settings. Distributed randomness generation (DRG) protocols, aiming at producing high-quality randomness without a central party, have drawn increased attention from academia as well as industry. Previous approaches lacked security proofs, and their dependence on secure messaging channels reduced their practicality. In this work, we first formalize the desired properties of a secure DRG protocol and build a security model using these formal definitions. To the best of our knowledge, this is the first work to build a security model for DRG protocols, which can be used as a general framework for security analysis of DRG protocols. We then present SecRand, a secure DRG protocol with high practicality and scalability. We improve upon previous approaches by modifying the secret generation method in the reconstruction phase, which ensures the same scalability but achieves resistance against an adversary's malicious behavior of withholding its secret shares. We also provide strict proofs under our security model, showing that SecRand achieves the desired properties and is secure enough to be used in decentralized applications. Furthermore, we present a detailed performance evaluation of SecRand by deploying it on a laptop with a Windows 10 environment in the C language. The experimental data showed that SecRand achieved a better performance compared with previous approaches in the presence of corrupted participants, and this performance advantage grew linearly with the number of corrupted participants.