I want to implement the coin flip mechanism in which the result will be independent of anything just like real coin flip.I am confused on how to make totally independent...
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question does not appear to be about Information security within the scope defined in the help center." – Matthew, Purefan, RoraΖ, crovers, Steve
Depending on what language you are using, some of them can generate cryptographically secure pseudo-random integers, which is probably good enough for a coin flip mechanism, such as PHP 7's random_int function.
However, there are also true random number generation services out there, such as api.random.org. The randomness comes from atmospheric noise, rather than a pseudo-random algorithm.
You can't. That's why methods for what you really want are called CSPRNGs - Cryptographically Secure Pseudo Random Number Generators.
Yet, what is true for most of crypto is true here, too: If you don't know what you're talking about, try not to implement it yourself. Instead, use established libraries that offer what you need.
Of course you can. The coin is still dependent on it's physical state and velocity, but it is not discretely predictable.
https://www.random.org/coins/ has a random number generator based on atmospheric noise. That's a lot more random than a dice or a coin. it's quantum.
If you don't want an online service you can buy a hardware TRNG USB dongle or get the noise from a cheap RTL-SDR.
But the difference are mostly theoretical. For what you want, a CSPRNG will suffice. /dev/urandom will do on unix (and no, it's not inferor to /dev/random).