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 25289D1B170 for ; Thu, 29 Jul 2004 06:13:12 -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 36316-02 for ; Thu, 29 Jul 2004 09:13:05 +0000 (GMT) Received: from nameit.healthnet.lu (nameit.healthnet.lu [158.64.36.4]) by svr1.postgresql.org (Postfix) with ESMTP id 070EED1B232 for ; Thu, 29 Jul 2004 06:13:01 -0300 (ADT) Received: from control.dmz.chl.lu (drill.healthnet.lu [158.64.36.2]) by nameit.healthnet.lu (Postfix) with SMTP id A3E853E8188 for ; Thu, 29 Jul 2004 11:12:57 +0200 (CEST) Received: from 172.20.1.24 by control.dmz.chl.lu (InterScan E-Mail VirusWall NT); Thu, 29 Jul 2004 11:15:39 +0200 Received: from gentoo (pret040pcc.inf.chl.lu [172.20.54.4]) by gwia.inf.chl.lu; Thu, 29 Jul 2004 11:12:41 +0200 Date: Thu, 29 Jul 2004 11:16:08 +0200 From: Daniel Struck To: Greg Stark Cc: Bruno Wolff III , Mitch Pirtle , pgsql-php@postgresql.org Subject: Re: [ADMIN] Secure DB Systems - How to Message-Id: <20040729111608.0ef34e4b@gentoo> In-Reply-To: <87brhzsx9x.fsf@stark.xeocode.com> 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> Organization: gwia.inf.chl.lu X-Mailer: Sylpheed version 0.9.11claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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/41 X-Sequence-Number: 2866 > 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 plaintex= ts > and verifying to see if any match. To prevent this, I use in my implementation for every encrypted value a cor= responding IV to prevent that the same value will give the same crypted tex= t. This is a reason, why I must do pattern searches in postgresql itself, beca= use I do need to include the IV-column in the sql statement. Daniel --=20 Retrovirology Laboratory Luxembourg Centre Hospitalier de Luxembourg 4, rue E. Barbl=E9 L-1210 Luxembourg phone: +352-44116105 fax: +352-44116113 web: http://www.retrovirology.lu e-mail: struck.d@retrovirology.lu