Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CE07764FC31 for ; Wed, 24 Sep 2008 12:44:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43409-02 for ; Wed, 24 Sep 2008 12:44:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 3B30764FC25 for ; Wed, 24 Sep 2008 12:44:46 -0300 (ADT) Received: from commandprompt.com (CPE001b63afe888-CM001adea9c5a6.cpe.net.cable.rogers.com [99.236.211.160]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m8OFmJb9024394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 24 Sep 2008 08:48:22 -0700 Date: Wed, 24 Sep 2008 11:44:42 -0400 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql) Message-ID: <20080924154442.GJ58356@commandprompt.com> Mail-Followup-To: Andrew Sullivan , pgsql-general@postgresql.org References: <200809231952.m8NJqTP05977@momjian.us> <215184.36316.qm@web25807.mail.ukl.yahoo.com> <20080924150518.GA844@fetter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080924150518.GA844@fetter.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 24 Sep 2008 08:48:22 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/940 X-Sequence-Number: 137947 On Wed, Sep 24, 2008 at 08:05:18AM -0700, David Fetter wrote: > C is not magic obfuscation gear. Anybody with a debugger can expose > what it's doing. There have been math papers showing that it's > impossible to hide the functionality of a piece of software based only > on the ability to run it, so the entire prospect of obscuring the > software's functionality when people can send arbitrary inputs to it > is one of those "known-impossible" problems like the halting problem. To be fair, one of the points that others are trying to make is not "secure this function for real" but "secure this function enough to make it a little costly." Sure, someone with a debugger and probably not much work could figure out what the function is. If all you're trying to do is make it expensive for dodgy software shops to re-use your code, however, this is probably enough: the sort of person who thinks re-using someone else's undocumented code is easier than writing it from scratch is probably not going to go to the trouble of really learning the code via debugging tools. As a defence against criminally lazy developers, "compliled C code" is probably good enough. (Of course, clever non-C code is probably also enough, in my opinion, but obviously others disagree.) A -- Andrew Sullivan ajs@commandprompt.com +1 503 667 4564 x104 http://www.commandprompt.com/