Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: OTP Generation Code In C #348

Open
DinkyRajpoot56 opened this issue Oct 26, 2024 · 0 comments
Open

[Feature Request]: OTP Generation Code In C #348

DinkyRajpoot56 opened this issue Oct 26, 2024 · 0 comments

Comments

@DinkyRajpoot56
Copy link

A one-time password (OTP) is a password that is valid for only one login session or transaction, on a computer system or other digital device. For more details refer. Algorithm Randomly pick characters from our all possibilities and generate a string of the desired length from it. OTPs are generally 6-7 characters long and randomness in 6-7 characters almost guarantees a secure way of logging in. Applications

OTPs are widely used in websites like- Facebook, Google Sign-in, Wifi – accessing, Railways Portal Login etc.

How it gets generated ? Well it is a great possibility that they uses the same algorithm as an OTP is generated. If by chance (very rare) the unique string generated is already been generated before and has been associated with a different code then another random string is used. As per now it seems that only six character strings are generated randomly for a unique identification of all codes. A time will come when all the possible six character strings may get exhausted. So yes, even the web-related stuffs also heavily relies on randomness. of collision of two OTPs

The length of OTP is 6 and the set size of all possible characters in the OTP is 62. So the total number of possible sets of the pair of OTPs are 6212.
Some of them are – [{aaaaaa, aaaaaa}, {aaaaaa, aaaaab},…..{456789, 456788}, {456789, 456789}]
But the possible sets of equal pair of OTPs are:626. Some of them are – [{aaaaaa, aaaaaa}, {aaaaab, aaaaab},…..{456788, 456788}, {456789, 456789}]
Hence the of collision of two OTPs is: 626 / 6212 = 1 / 626 = 1 / 56800235584 = 1.7605561-11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant