Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Generating unique session ids



> > SELECT md5('secret_salt' || nextval('my_seq')::text)
> 
> * When somebody knows md5('secret_salt' || '5') he will be able to
> easily compute
> 	md5('secret_salt' || '50')
> 	md5('secret_salt' || '51')
> 	md5('secret_salt' || '52')
> 	...
> 	md5('secret_salt' || '59')
> 	md5('secret_salt' || '500')
> 	md5('secret_salt' || '501')
> 	...
> 	md5('secret_salt' || '[any number starting from 5]').
> Without knowledge of 'secret_salt'. So your proposal is totally
> insecure.

Challenge :)

chris=> select md5('******' || '5');
               md5
----------------------------------
 7b076f591070f6912e320b95782250ae
(1 row)

I won't tell what '******' was.

Can you send me what md5('******' || '50') will give?

Bye,
Chris.







Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group