Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF013DF9D for ; Thu, 5 Jul 2012 16:33:10 +0000 (UTC) Received: (qmail 45726 invoked by uid 500); 5 Jul 2012 16:33:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 45688 invoked by uid 500); 5 Jul 2012 16:33:09 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 45680 invoked by uid 99); 5 Jul 2012 16:33:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 16:33:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.18.84.132] (HELO brightmail-internal3.sri.com) (128.18.84.132) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 16:33:02 +0000 X-AuditID: 80125484-b7f1e6d000001edb-58-4ff5c1a7ab7f Received: from exchange-hub02.SRI.COM (exchange-hub02.SRI.COM [128.18.23.154]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client did not present a certificate) by brightmail-internal3.sri.com (SRI Internal SMTP Gateway) with SMTP id BE.1C.07899.7A1C5FF4; Thu, 5 Jul 2012 09:32:39 -0700 (PDT) Received: from EXCHANGE-DB08.SRI.COM ([fe80::a11e:7c21:6886:9a20]) by exchange-hub02.SRI.COM ([fe80::f097:c52f:a570:8336%12]) with mapi id 14.02.0298.004; Thu, 5 Jul 2012 09:31:43 -0700 From: Jim Klo To: "" Subject: Re: Cryptograhically signed docs... Thread-Topic: Cryptograhically signed docs... Thread-Index: AQHNWTP6QRnFgf7rFUiFg2X9Tdl1iZcYPjmAgACHjoCAApS7AA== Date: Thu, 5 Jul 2012 16:31:42 +0000 Message-ID: <7149BF67-2B75-4687-868C-47F8811ED26A@sri.com> References: <79061073-7E58-4CBC-9DC1-8A98C6811796@sri.com> <0848BFC4-1340-4FF9-A04D-EE6D205A90A0@couchbase.com> In-Reply-To: <0848BFC4-1340-4FF9-A04D-EE6D205A90A0@couchbase.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.12.16.56] Content-Type: multipart/alternative; boundary="_000_7149BF672B754687868C47F8811ED26Asricom_" MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsXSICQ+S3f5wa/+Bh0PVC069+xlc2D02Pjh OGMAYxSXTUpqTmZZapG+XQJXxvUdH1kL9uZVXH9+iLmBcUNMFyMnh4SAicTkVZ9ZIWwxiQv3 1rN1MXJxCAnsZJKYvvsPM4Szl1Fizq6/jCBVbALyEoe3P2AGsUUELCVuLfjIAmILC+hITNq0 jhUiritx7dsTFgjbSeL5xrtgvSwCKhLTz71mB7F5BawkPv79DVYvJLCDUeLME50uRg4OTgFH iaVNGSBhRqCDvp9awwRiMwuIS9x6Mp8J4lABiSV7zjND2KISLx//g3pAQWJZ92NWiPo4ic49 y5ghVglKnJz5hGUCo8gsJKNmISmbhaQMIm4g8f7cfGYIW1ti2cLXULa+xMYvZxkhbDOJM9O2 sCKrWcDIsYpRJqkoMz2jJDcxM0cXFlXGesVFmXrJ+bmbGMGRFtKyg3HFLsNDjAIcjEo8vIa5 X/yFWBPLiitzDzFKcDArifD2Znz1F+JNSaysSi3Kjy8qzUktPsQozcGiJM4bZszvLySQnliS mp2aWpBaBJNl4uCUamDcceXAdNOjO8Wy8hX+iBzczMu72WD7vZ0brUtmLtr7KPUlt+dzMZ8Y qdSl0jzqHb/uMEw7VvNcT3vdfNsLnK/SlNjK73u7SQsseHdtwZYJawul5u4z9bTPYcxdupLL 9bhoL4v0z5IDrxnsY78yllgcqP99ME1jiptO8JlH+q3Hrfm+xvXuWrFdiaU4I9FQi7moOBEA S4ep+bACAAA= --_000_7149BF672B754687868C47F8811ED26Asricom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Jens, Agreed - however our use case wouldn't work well with solution you propose.= Our documents are signed before they are inserted into CouchDB http://goo= .gl/vlJwO (and actually before certain metadata fields are attached to the = object). That's one area where I think your proposal is lacking is that th= ere's not really a method to exclude fields from the signature except via u= nderscore fields. The key thing to note is we had a document model before o= bject signing requirement; so we had to design a signature solution that wa= s additive in order to not change object model field names for risk of blow= ing backwards compatibility. If there was way with your solution, similar = to the security object, store an model to XOR against to compute/validate t= he signature that might be fine. On Jul 3, 2012, at 6:07 PM, Jens Alfke wrote: On Jul 3, 2012, at 10:01 AM, Jim Klo wrote: Yes, and as a matter of fact, i just got digital signature validation using= OpenPGP within a map function working a few minutes ago! Here's a link to the relevant code: https://github.com/jimklo/TheCollector/= blob/master/dataservices/thecollector-resources/views/lib/sig_utils.js As far as I can tell, this code uses a data schema where the signed content= s are wrapped in some kind of OpenPGP encoding: var msg_list =3D openpgp.read_message(doc.digital_signature.signatur= e); for (var i=3D0; i