From: Aaron Bono <postgresql@aranya.com>
To: John Tregea <john@debraneys.com>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Storing encrypted data?
Date: Mon, 17 Jul 2006 10:55:53 -0500
Message-ID: <bf05e51c0607170855i632fdd2fob1455fdc8ef4c9d4@mail.gmail.com> (raw)
In-Reply-To: <44BB28AC.3070302@debraneys.com>
References: <A70AE049E81A6A40879D5DC0AC8C38C9069508ED@venus.infics.com>
<44BAE3B0.8060403@debraneys.com>
<20060717030705.GA87022@winnie.fuhr.org>
<44BB28AC.3070302@debraneys.com>
On 7/17/06, John Tregea <john@debraneys.com> wrote:
>
> Hi Michael,
>
> Thanks for your advice. I was looking at the bytea data type in the
> PostgreSQL book I bought (Korry and Susan Douglas, second edition). I
> was concerned that if I have to escape certain characters like the
> single quote or the backslash, how do I guarantee that the escaped
> version does not already appear in the encrypted string?
>
> Should I use the octal value to escape the single quote (\047) and
> backslash (\\134)?
>
> Those character sequences are extremely unlikely to occur in an
> encrypted string.
>
> Is the the right approach ?
>
> Also... I note that I cannot change the data type of my field from text
> to bytea (I am using PGADMIN III). Do you know why?
When I have data like this, I do a Base64 encoding. The string ends up
longer but I no longer have to worry about special characters mucking things
up.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
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-sql@postgresql.org
Cc: postgresql@aranya.com, john@debraneys.com, mike@fuhr.org
Subject: Re: Storing encrypted data?
In-Reply-To: <bf05e51c0607170855i632fdd2fob1455fdc8ef4c9d4@mail.gmail.com>
* 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