3

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.

sectest
  • 59
  • 5
  • I'm voting to close this question as off-topic because it's more fitting on https://security.stackexchange.com/ – Matt S May 20 '16 at 14:05

2 Answers2

0

I found this How are .NET 4 GUIDs generated?. It seems this is vulnerable for collision attacks such as the birthday attack.

Community
  • 1
  • 1
SureshAtt
  • 1,891
  • 2
  • 17
  • 22
0

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).

Russell Hankins
  • 1,196
  • 9
  • 17