From: | Doug McNaught <doug(at)mcnaught(dot)org> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | nikolay(at)samokhvalov(dot)com, PostgreSQL-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Sequences/defaults and pg_dump |
Date: | 2006-02-10 12:34:35 |
Message-ID: | 87mzgztmsk.fsf@asmodeus.mcnaught.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> On Tue, Feb 07, 2006 at 15:28:31 +0300,
> Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com> wrote:
>> The real situation would be as the following.
>> I want to use some algorithm to hide real number of registered users
>> in my table user. So, I don't want to use simple sequence, when every
>> new registered user in my system can guess what is the number of
>> registered users simply observing his ID. So, I use following
> (N and M are said to be "relatively prime".)
>
> The above method isn't very secure. You might be better off using a block
> cipher in counter mode, depending on how badly you want to keep the number
> of users secret. Even that won't be foolproof as the users might cooperate
> with each other to estimate how many of them there are.
Or, just start your sequence counting at 1000000. Or use bigint and
start it at a billion.
-Doug
From | Date | Subject | |
---|---|---|---|
Next Message | Nina | 2006-02-10 13:35:32 | "psql -At -F" export column from table to .csv |
Previous Message | Leif B. Kristensen | 2006-02-10 11:57:52 | Re: backslash separated values for a field |
From | Date | Subject | |
---|---|---|---|
Next Message | anonymus.crux | 2006-02-10 13:23:46 | Re: Compiling UDF DLL under Win32 |
Previous Message | Teodor Sigaev | 2006-02-10 11:08:33 | Re: FW: PGBuildfarm member snake Branch HEAD Status changed |