Re: Sequence on a char(6) column

Поиск
Список
Период
Сортировка
От Roland Giesler
Тема Re: Sequence on a char(6) column
Дата
Msg-id TAXNET01WupM4SEwD9m000000c8@frontdoor.taxpoint.co.za
обсуждение исходный текст
Ответ на Re: Sequence on a char(6) column  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: Sequence on a char(6) column  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-novice
Bruno Wolff III wrote:
>> One option is to use a cipher (such as AES) in counter mode (you need
>> to keep the key secret, but that shouldn't be a significant
>> additional risk as you are keeping the ids in the database) and use
>> the encrypted string to generate the string. The counter can be a
>> sequence. You won't get duplicates as longer as the counter isn't
>> reset and you don't change the key.
>
> I forgot something important. For there not to be duplicates
> the function from the encrypted string to the member id needs
> to be 1-1 (injective).
> Your member code has just over 24 bits of information, so you
> want to find a cipher that works on blocks of 24 bits. You
> might have trouble finding strong ciphers that work on 24 bit blocks.

I'm sorry, Bruno, I'm not following.  I will probably understand what you
mean if fill in a little more detail.  The pgsql terminology is still a bit
foreign to me, would you mind just elaborating a little on what you are
proposing?  (Maybe I'm just a bit thick-heading about this.  It may dawn on
me soon)

Thanks in anticipation,

Roland



В списке pgsql-novice по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Sequence on a char(6) column
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Sequence on a char(6) column