I am using guid as session id for my web application, is it secure.
GUID v4.
In security context, is it safe? If not, what is the reason.
I am using guid as session id for my web application, is it secure.
GUID v4.
In security context, is it safe? If not, what is the reason.
I found this How are .NET 4 GUIDs generated?. It seems this is vulnerable for collision attacks such as the birthday attack.
Guids are guaranted to be unique. But they are not random. If you generate many guids quickly, you'll see that some of the digits repeat. It's not as secure as a cryptographic random number, but more secure than an integer (especially a database auto-number integer).