Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 762119FB328 for ; Thu, 8 Feb 2007 07:53:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 59571-08 for ; Thu, 8 Feb 2007 07:52:50 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id C999E9F9DB0 for ; Thu, 8 Feb 2007 07:52:50 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l18BqM29007423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Feb 2007 04:52:25 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l18BqMV1076653; Thu, 8 Feb 2007 04:52:22 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l18BqLaQ076652; Thu, 8 Feb 2007 04:52:21 -0700 (MST) (envelope-from mfuhr) Date: Thu, 8 Feb 2007 04:52:21 -0700 From: Michael Fuhr To: Olivier Boissard Cc: Andrew Sullivan , pgsql-admin@postgresql.org Subject: Re: database encryption Message-ID: <20070208115221.GA76441@winnie.fuhr.org> References: <45C9A887.9040202@cerene.fr> <20070207143548.GC30604@phlogiston.dyndns.org> <45CADBBC.1020108@cerene.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45CADBBC.1020108@cerene.fr> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/124 X-Sequence-Number: 24589 On Thu, Feb 08, 2007 at 09:13:48AM +0100, Olivier Boissard wrote: > I was thinking about a system in which only the php programs will be > able to manage stored informations. In case of theft or unexpected > access to servers nobody could be able to retrieve the stored data > without the authorized key. What about theft or compromise of the server running the PHP code? In general it's a good idea to encrypt and decrypt as close to where the cleartext is needed to limit exposure, but you should also consider the vulnerability of the system that holds the key. For some applications it might make sense to use public-key encryption with the exposed (e.g., Internet-facing) server having only the public (encryption) key and a more protected backend server having the corresponding private (decryption) key. Without knowing the requirements and the threat model it's impossible to suggest a suitable solution. Can you be more specific about what you're trying to do? -- Michael Fuhr