Re: Drawbacks of using BYTEA for PK?

Поиск
Список
Период
Сортировка
От David Garamond
Тема Re: Drawbacks of using BYTEA for PK?
Дата
Msg-id 400318DE.2000506@zara.6.isreserved.com
обсуждение исходный текст
Ответ на Re: Drawbacks of using BYTEA for PK?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark wrote:
> On the other hand it is possible to do this right. Include a secret of some
> kind in the MD5 hash, something that's not publically available. That secret
> is in essence the password to the scheme. Now it's not really "obscurity" any
> more than any password based scheme is "security through obscurity".
>
> However even that isn't ideal, since you have to be able to change the
> password periodically in case it's leaked. I believe there are techniques to
> solve this though I can' think of any off the top of my head.
>
> But if your only threat model is people attacking based on the publicly
> visible information then an MD5 of the combination of a sequence and a secret
> is a perfectly reasonable approach.

We're originally talking about using MD5 as a means to generate unique
ID right (and not to store password hash to be checked against later)?

Then this "secret key" is unnecessary. Just get some truly random bits
(if the number of bits is 128, then you can use it as it is. If the
number of bits is > 128, you can hash it using MD5 to get 128 bit. If
the number of bits is < 128, you're "screwed" anyway :-)

--
dave


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Announce: Search PostgreSQL related resources
Следующее
От: "Keith C. Perry"
Дата:
Сообщение: Re: Drawbacks of using BYTEA for PK?