Write/Read Encrypted Text

From: <cnliou(at)eurosport(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Write/Read Encrypted Text
Date: 2002-01-09 03:55:49
Message-ID: 200201090355.3187@th00.opsion.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I am trying to store encrypted password in a text
column but it is very unstable in my environment.
The plain password string is encrypted by a C routine
running in Windoz. The encrypted password is then
sent from Windoz via psqlODBC to postgresql.

Problem happens when the decryption routine (running
in Windoz) tries to decrypt the encrypted password
retrieved from postgresql - it succeeds occasionally
but hangs most of the time.

"SELECT length(MyEncryptedPasswordColumn) FROM
MyTable" in psql prompt does not much help debugging
as the encrypted password may contains low value(s).

However, I do find in Windoz that the retrieved
encrypted text is sometimes corrupted because the C
strlen(MyEncryptedPassword) function sometimes
returns longer integer than expected. It does not
surprise me for strlen() to return shorter values
than expected (due to low values), but it should not
return longer values than expected.

Having conducted several testings on the C encryption
routine, I have the confidence that the encryption
routine is stable.

My question are:
(1) Is it approriate to store encrypted text which
may contain low values in text columns?
(2) Is it possible to confuse psqlODBC when writing
to/reading from text column for encrypted string?
(3) Are there any other better ways to debug?

I would much appreciate any help.

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com

Browse pgsql-general by date

  From Date Subject
Next Message computertechnology 2002-01-09 04:00:00 Commercial: New Book!! PostgreSQL book is released into the market
Previous Message Michael Welter 2002-01-09 02:34:07 Very large database