Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 802324758C9 for ; Thu, 19 Dec 2002 21:33:52 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 6339F4758E6 for ; Thu, 19 Dec 2002 21:33:51 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gBK2XkC22600; Thu, 19 Dec 2002 21:33:46 -0500 (EST) From: Bruce Momjian Message-Id: <200212200233.gBK2XkC22600@candle.pha.pa.us> Subject: Re: MD5 PasswordPacket In-Reply-To: <3E027F8C.1010200@BadgerSE.com> To: Bruce Badger Date: Thu, 19 Dec 2002 21:33:46 -0500 (EST) Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/65 X-Sequence-Number: 3478 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