Re: [Pgsql-ayuda] Seguridad Postgres

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
Cc: Edwin Quijada <listas_quijada(at)hotmail(dot)com>, pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [Pgsql-ayuda] Seguridad Postgres
Date: 2003-09-17 20:30:29
Message-ID: 20030917203029.GF4233@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Wed, Sep 17, 2003 at 12:12:07PM -0500, Manuel Sugawara wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
>
> > Oops, es cierto, sorry :-( La idea es usar MD5 para almacenar
> > "versiones digeridas" de las claves de los usuarios, no almacenarlas
> > en claro. Cuando tienes que autentificar un usuario, obtienes la
> > "sal" que se uso para digerir la clave original, digieres la clave
> > que te esta entregando el usuario con esa sal, y comparas con la
> > almacenada.
>
> No exactamente, a menos que me falle la memoria MD5 no usa el concepto
> de salt. Creo que estas confundiendo md5 con crypt(3), el algoritmo de
> encripción estándar en Unix basado en DES.

Oops... tienes razon. Pero en realidad lo que me estaba confundiendo
era una extension de GNU a crypt(3). Extracto de crypt(3) en mi sistema:

GNU EXTENSION
The glibc2 version of this function has the following additional fea-
tures. If salt is a character string starting with the three charac-
ters "$1$" followed by at most eight characters, and optionally termi-
nated by "$", then instead of using the DES machine, the glibc crypt
function uses an MD5-based algorithm, and outputs up to 34 bytes,
namely "$1$<string>$", where "<string>" stands for the up to 8 charac-
ters following "$1$" in the salt, followed by 22 bytes chosen from the
set [a-zA-Z0-9./]. The entire key is significant here (instead of only
the first 8 bytes).

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Porque francamente, si para saber manejarse a uno mismo hubiera que
rendir examen... ¿Quién es el machito que tendría carnet?" (Mafalda)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2003-09-17 20:42:55 Re: [Pgsql-ayuda] Indices con LIKE y ILIKE
Previous Message Martin Marques 2003-09-17 20:29:13 Re: [Pgsql-ayuda] traduccion de mensajes del backend