Unique code for every user

A

Arne Vajhøj

Arne said:
This problem is very similar to session id in secured web applications.

Based on that I will suggest:
- hash the sequential key
- store the hash value server side and lookup based on that

Hashes is designed to make it difficult to go from hash to
original value.

Note though that both hashing and the symmetric key ciphers
are painfully vulnerable to brute force attack if the algorithm
is known.

It does not take long to hash or encrypt all values 0-999999999
find ones own obfuscated id and apply the algorithm to the next.

As an absolute minimum you should pick the id's randomly.

Arne
 
A

Arne Vajhøj

Ross said:
I interpreted the original post to mean that the long number created
should incorporate the original transaction number in such a way that
it can be extracted.

Yes.

But that can be worked around by storing the generated value
in the database.

Arne
 
T

Tom Anderson

Note though that both hashing and the symmetric key ciphers
are painfully vulnerable to brute force attack if the algorithm
is known.

It does not take long to hash or encrypt all values 0-999999999
find ones own obfuscated id and apply the algorithm to the next.

A little bit of salt will deal with that nicely.

tom
 
A

Arne Vajhøj

Tom said:
A little bit of salt will deal with that nicely.

Only if it is secret.

And if the algorithm is known then the salt may very likely
be known as well.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,616
Members
45,306
Latest member
TeddyWeath

Latest Threads

Top