I'm exploring the possibility of using a rand function in cryptography. I want to know if it's suitable to be employed as a cryptographic function, considering its randomness and unpredictability.
7 answers
Claudio
Fri Dec 13 2024
For this purpose, rand_s is a more appropriate choice.
ethan_thompson_psychologist
Fri Dec 13 2024
Alternatively, functions from the C++ Standard Library can be used for cryptographically secure random number generation.
WhisperInfinity
Fri Dec 13 2024
The rand function is known to produce a predictable sequence of numbers.
Caterina
Fri Dec 13 2024
This predictability makes it unsuitable for use in cryptographic applications.
Eleonora
Fri Dec 13 2024
These functions are designed to provide the level of randomness needed for cryptographic purposes.