X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 89953D1B562 for ; Mon, 8 Mar 2004 19:19:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85322-03 for ; Mon, 8 Mar 2004 15:19:28 -0400 (AST) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id B5E13D1B530 for ; Mon, 8 Mar 2004 15:19:25 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i28JJNn18271; Mon, 8 Mar 2004 14:19:23 -0500 (EST) From: Bruce Momjian Message-Id: <200403081919.i28JJNn18271@candle.pha.pa.us> Subject: Re: Article on DB encryption In-Reply-To: <200403081020.21312.silvanadimartino@tin.it> To: Silvana Di Martino Date: Mon, 8 Mar 2004 14:19:23 -0500 (EST) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/129 X-Sequence-Number: 12698 Silvana Di Martino wrote: > And this one shows a feasible solution for PostgreSQL (using pgcrypto): > > "Oracle has one of the best solutions for in-database encryption-decryption > keys. It stores the keys, encrypted, in a table. For users with access > rights, it decrypts the keys, which in turn decrypt the desired data. The > downside, of course, is that you have unencrypted data on the network, but > the benefit is making access to encrypted data secure. Not even the database > administrator can see the unencrypted data--even the keys to get at the data > are encrypted. This solution can be implemented in any of the major > databases, and Oracle provides a secure key generator as well as other tools > to get you started." Interesting. I can see how the client decrypts the stored password, but I don't see how the server works with that decrypted password. I can see how the client could use it to decrypt data on their end, or send the password as part of the query as an argument to a pg_crypto function. The user could decrypt it and store it in a temporary table, and join to that table in queries, and pass that decrypted password column to pg_crypto functions, but do we guarantee that that temp table would not be on the disk if the server crashes and is then stolen? Seems server-side variables would be a natural, secure use for this that temp tables don't supply. -- 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