|
-
Jun 30th, 2005, 10:14 AM
#1
Thread Starter
New Member
VB Connection/Authentication problems!
I am using Visual Basic .NET 2003 to build a front-end to a PostgreSQL database. My
problem is with authentication. I am authenticating with Clear Text right now, but I
need passwords to be encrypted. I am trying to do this with MD5 hashes. In the front-end, I can use VB’s MD5CryptoServiceProvider to encrypt the password, but before I send it to the server, there is one more thing I need to do. The MD5 authentication process with PostGreSQL requires me to obtain a 4-byte Salt value (or seed) from the server
first, use this random generated salt in further encrypting the password, and then send it.
How can I obtain this Salt value from the server? Right now to connect to the server I
just have a basic ODBC Connection with the connection string set and I just use
ODBCconnection.open(). But I need this process to be interactive. The password is
stored in the connection String for the ODBC connection object, so before that is sent
I need to receive that 4-byte Salt value. The process is (authentication is requested by the front end, back end determines that MD5 is required from client and so it responds to client with a random Salt value, then the client replies with the encrypted password). I seen an example in C using a pg_stream.recieve() command to get the Salt value coming from the server, but again I just have no idea of how to go about this. Should I be using a stored procedure to get the salt? I can't find any info anywhere!!!!
Please help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|