.net - Can guids be trusted for security, or are they predictable if the system can be forced to generate many known guids? -
to start, , define guid, using .net framework guid hypothetical situation users when preforming specific action have guids generated. each user can see own guids. if user know 1 of user's guid there security compromise.
how safe system if asume user has no way steal user's guid , can guess it?
i understand blindly guessing guids impossible. if had million success values, still have 10^20 chance of successful guess
where afraid problem may exist guid prediction. can user generate large number of requests, @ guids got, , knowing .net guid generation formula improve odds of guessing? can these odds reduced point security concern? in case how should keys generated in unique non guessable way?
i ask mentions odds of guesses/collisions add hard meaning it. either exact number define odds, or like, "it can used store account data, not sensitive data"
edit
this question seems go territory sought explore question is guid key (temporary) encryption?
guid's/uuid's intended generate 128 bit numbers use id's unique (for intents , purposes).
uuid's not designed generate cryptographically strong random number sequences, , if want maximum un-predictability, cryptographically strong random number sequences want. this, .net provides rngcryptoserviceprovider - designed ground unpredictable can reasonably achieved algorithmic means, why not use it?
example:
byte[] generaterandombytes() { byte[] key = new byte[16]; system.security.cryptography.rngcryptoserviceprovider c = new system.security.cryptography.rngcryptoserviceprovider(); c.getbytes(key); return key; }
Comments
Post a Comment