X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 68159D1B179 for ; Thu, 29 Jul 2004 14:52:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79297-09 for ; Thu, 29 Jul 2004 17:52:35 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 8883CD1B16B for ; Thu, 29 Jul 2004 14:52:30 -0300 (ADT) Received: (qmail 24654 invoked by uid 500); 29 Jul 2004 18:00:10 -0000 Date: Thu, 29 Jul 2004 13:00:10 -0500 From: Bruno Wolff III To: Greg Stark Cc: Daniel Struck , Mitch Pirtle , pgsql-php@postgresql.org Subject: Re: [ADMIN] Secure DB Systems - How to Message-ID: <20040729180010.GA23523@wolff.to> Mail-Followup-To: Greg Stark , Daniel Struck , Mitch Pirtle , pgsql-php@postgresql.org References: <20040709152722.GA20935@wolff.to> <20040713113557.31e9d6dc@localhost> <20040713123817.GB3710@wolff.to> <20040713151838.0004cb8e@localhost> <40F3EC4A.1060101@spacemonkeylabs.com> <20040727134133.676ab9cf@localhost> <20040727194905.GA20499@wolff.to> <87brhzsx9x.fsf@stark.xeocode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87brhzsx9x.fsf@stark.xeocode.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/45 X-Sequence-Number: 2870 On Wed, Jul 28, 2004 at 16:16:10 -0400, Greg Stark wrote: > > Bruno Wolff III writes: > > > That depends on the kind of queries. Searching for exact matches should work > > fine. Some other things can be done in special cases. > > If searching for exact matches works then you're using a naive encryption > system. The problem is that it also means your database is vulnerable to > dictionary attacks. Good encryption systems will include random padding to > ensure that you can't attack it by merely guessing many possible plaintexts > and verifying to see if any match. IVs act to make the key appear longer. This is especially useful when humans are picking passphrases that are used to generate the key. If you control what the actual keys are, then you can make dictionary attacks impractical. However, there still would be the problem that identical items in the database would be identical. Which, depnding on your application, might be a problem because of information leakage.