Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B9B522E39CC for ; Fri, 21 Dec 2007 13:48:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 63566-03 for ; Fri, 21 Dec 2007 13:48:54 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by postgresql.org (Postfix) with ESMTP id 731112E3921 for ; Fri, 21 Dec 2007 13:48:54 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so527488mue.3 for ; Fri, 21 Dec 2007 09:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=V+W5cWGqR3dw86a4hZqvEvZ3OSwE52uuOy8qahxRX3s=; b=b6yP6HKCfO6abbn3403FwHYM5JtutoY5cdYczuVH6btdq1GhUfQbJkI+op3+s7BSg0fMiOeo66fG99vECAoJ4QQtEXpoA6cc1OMA8fk027pQyJd9dIS6JGS01MrKTsyztVDIpXlgNz3EzkokIuDTwNX0BItpBR846WKqyaBdfv8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bweJ93vleizNjQdUIl92/2tz5+mSpKa0X4xga63O4j8I+jwTrVUPkd4/B0x3NbeFq/QmOv7v/AEhNiPQOxR7fN2u1+dIE0cVI4L3nwUeX8eOTF+NaU1eNS9UV31yWOGcmOQtAJldbq47Z7JoF7clvR9bwnuVFoWGXpAZxJ/RPNA= Received: by 10.78.138.6 with SMTP id l6mr2088852hud.32.1198259331396; Fri, 21 Dec 2007 09:48:51 -0800 (PST) Received: by 10.78.18.2 with HTTP; Fri, 21 Dec 2007 09:48:51 -0800 (PST) Message-ID: Date: Fri, 21 Dec 2007 12:48:51 -0500 From: "Merlin Moncure" To: "Andrew Sullivan" , "Pgsql Hackers" Subject: Re: function body actors (was: [PERFORM] viewing source code) Cc: "Tom Lane" In-Reply-To: <20071221164826.GI10918@crankycanuck.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <26811.1198215605@sss.pgh.pa.us> <20071221164826.GI10918@crankycanuck.ca> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/806 X-Sequence-Number: 112095 On Dec 21, 2007 11:48 AM, Andrew Sullivan wrote: > On Fri, Dec 21, 2007 at 12:40:05AM -0500, Tom Lane wrote: > > > whether there is a useful policy for it to implement. Andrew Sullivan > > argued upthread that we cannot get anywhere with both keys and encrypted > > function bodies stored in the same database (I hope that's an adequate > > summary of his point). > > It is. I'm not a security expert, but I've been spending some time > listening to some of them lately. The fundamental problem with a system > that stores the keys online in the same repository is not just its potential > for compromise, but its brittle failure mode: once the key is recovered, > you're hosed. And there's no outside check of key validity, which means > attackers have a nicely-contained target to hit. > > > I'm not convinced that he's right, but that has to be the first issue we > > think about. The whole thing is a dead end if there's no way to do > > meaningful encryption --- punting an insoluble problem to the user doesn't > > make it better. > > Well, one thing you could do with the proposal is build a PKCS#11 actor, > that could talk to an HSM. Not everyone needs HSMs, of course, but they do > make online key storage much less risky (because correctly designed ones > make key recovery practically impossible). So the mechanism can be made > effectively secure even for very strong cryptographic uses. ISTM the main issue is how exactly the authenticated user interacts with the actor to give it the information it needs to get the real key. This is significant because we don't want to be boxed into an actor implementation that doesn't allow that interaction. If simply calling out via a function is enough (which, to be perfectly honest, I don't know), then we can implement the actor system and let actor implementations spring to life in contrib, pgfoundry, etc. as the community presents them. merlin