pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Bruce Badger <bruce_badger@BadgerSE.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: MD5 PasswordPacket
Date: Thu, 19 Dec 2002 21:33:46 -0500 (EST)
Message-ID: <200212200233.gBK2XkC22600@candle.pha.pa.us> (raw)
In-Reply-To: <3E027F8C.1010200@BadgerSE.com>

Bruce Badger wrote:
> Where can I read up on the encoding of the String in the PasswordPacket 
> required when I get an AuthenticationMD5Password message from the backend?

Read the source code.   :-)

> 
> I've looked at some code that implements the encoding, but reading the 
> specification (the intent) would be most useful.

That string is encoded twice, once with the username string, and another
time with the random salt sent from the server.

> One question in particular springs to mind: can usernames and passwords 
> be made up of multi-byte characters, and how does this affect the MD5 
> encoding?

It should be fine, I think.  The encoding is just a string if bytes to
MD5, and there is no encoding conversion done as part of that transfer.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (2+ messages)

Message-ID: <200212200233.gBK2XkC22600@candle.pha.pa.us>
Permalink:  ../200212200233.gBK2XkC22600@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200212200233.gBK2XkC22600@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pgman@candle.pha.pa.us, bruce_badger@BadgerSE.com
  Subject: Re: MD5 PasswordPacket
  In-Reply-To: <200212200233.gBK2XkC22600@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox