Re: [Spasm] certspec work (draft-seantek-certspec-06.txt)

Wei Chuang <weihaw@google.com> Fri, 24 June 2016 20:32 UTC

Return-Path: <weihaw@google.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A204812D678 for <spasm@ietfa.amsl.com>; Fri, 24 Jun 2016 13:32:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.126
X-Spam-Level:
X-Spam-Status: No, score=-4.126 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c7ADFBpMvCmh for <spasm@ietfa.amsl.com>; Fri, 24 Jun 2016 13:32:49 -0700 (PDT)
Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CA6DA12D697 for <spasm@ietf.org>; Fri, 24 Jun 2016 13:32:48 -0700 (PDT)
Received: by mail-oi0-x22d.google.com with SMTP id f189so130655951oig.3 for <spasm@ietf.org>; Fri, 24 Jun 2016 13:32:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wsC1hGSR/BxZZRrvmH68Wex3FeIJMGKbpVmpOiMcNj4=; b=DfnC3MWrWgCz3rLdfC+ihH+5xT82WGny6WtjOONdPPzjC4tPdVPIsw5wWZPi0MCQSE 3GuwnLm2jC1XnPpT3yeYR4VTAnm7tnPMBbhkUNl1xJ4fZRK6/1sfIfnwPlIazJ2YpWIN AYcg5sXzaA7lKYgqUORk380e0Ip8lTChwYIlXdOBqVO01en5uq8UqstmXLUg+M/c0ujv +iXjbvDB4qKGMEp84zcF1uE9graCIP3C62+q90FepUBqVtpgluZrEfmYXclUOZ2kSQe2 YASzQwWupRZayDgq243EKSv45Jehyres1x34Qtd4ov65ePz2EplvwP01d5wdXEBQv+S9 M1dQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wsC1hGSR/BxZZRrvmH68Wex3FeIJMGKbpVmpOiMcNj4=; b=UqKQmecvFjLVJChYExCT1eKh6d3Tn58pCfWwTGN2Kj6l8roopN//RvPG9r+r8GtfFB zNATR+yGK1t0oJXr0UjYc+KJU/SwyOejsRVKR/6qYfW80N+693VOAok0l0fH7elPnBCf Ps2H3mEdjZtU18fFesEPBlFNSF6B+yWnbambVjgnwgwdiOkevGgsOVbUlRaJlLAElIRf 46qBi+P1MhF4Mf51ndSIzNAybz5HMJOODJVAeqAdwHgTg+DuTjVv20b2NJOhvpKYxREW QuhQgkCGc5Fc1AO61F3Fg93SyBEwR/rLazQxEz1z1SVCVYy3HRF8dhP9Q6XOp8HVy0fT fV5g==
X-Gm-Message-State: ALyK8tJJ+bCpi/ohERtb+UOepXv1SwYOEwdedZcGHUzwgFxxlEiW+ArcM5we7Ksk8tJiTa4yshEWYK21s+qAlB5Q
X-Received: by 10.202.229.131 with SMTP id c125mr4332802oih.166.1466800367853; Fri, 24 Jun 2016 13:32:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.27.139 with HTTP; Fri, 24 Jun 2016 13:32:47 -0700 (PDT)
In-Reply-To: <74ff1afa-2edf-0868-7d34-e8675be4511b@seantek.com>
References: <20160608161629.19935.86198.idtracker@ietfa.amsl.com> <f7c50b01-9d68-11ac-c343-9ffff7dbf143@seantek.com> <CAAFsWK1C4n-9rx+zCr+ig6of3XA=shE1HnvkTyJ6wfVp=BOJPw@mail.gmail.com> <ad9589bf-1e63-cb93-4ed9-613e7299a53c@seantek.com> <CAAFsWK0btFp4N3q_WYV0_snvWh6CO-HEBhPqDy=tCfJ6WY4ovg@mail.gmail.com> <74ff1afa-2edf-0868-7d34-e8675be4511b@seantek.com>
From: Wei Chuang <weihaw@google.com>
Date: Fri, 24 Jun 2016 13:32:47 -0700
Message-ID: <CAAFsWK04os=1AZytf6WFdNuHx1nnw9PHQsKXRnxgjQWfgzedGg@mail.gmail.com>
To: Sean Leonard <dev+ietf@seantek.com>
Content-Type: multipart/alternative; boundary="001a1141c1bee23e3905360c1297"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/NgmH2l2jiiXoCZK7ys1JLkuQmsI>
Cc: spasm@ietf.org
Subject: Re: [Spasm] certspec work (draft-seantek-certspec-06.txt)
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Jun 2016 20:32:51 -0000

On Wed, Jun 22, 2016 at 5:40 PM, Sean Leonard <dev+ietf@seantek.com> wrote:

> On 6/15/2016 2:21 PM, Wei Chuang wrote:
>
>
>
>
> 4. Another naming method I'm aware of is CRLSets used in Chromium:
>> <https://dev.chromium.org/Home/chromium-security/crlsets>https://dev
>> .chromium.org/Home/chromium-security/crlsets
>> This might be something to consider and possibly mention in section 6 "Other
>> Certificate Specifications".
>>
>>
>> Wei, can you provide more specifics on what you mean when you say
>> "another naming method": do you want a way to identify CRLSets, or are you
>> asking for documentation on how CRLSets identify certificates?
>>
>
> This is another technique for identifying a certificate.  I point it out
> for completeness in case its useful.  I believe its advantage is that its
> supposed to be compact, and general.
>
>
>>
>> I am only somewhat familiar with CRLSets, but I was under the impression
>> that an entry in a (the) CRLSet identifies a certificate by one of: SHA-256
>> fingerprint, SHA-256 hash of the public key (SPKI), or SHA-256 hashes of
>> one of the former two split up into a Merkle tree.
>>
>
> I believe its simpler than that.  Its the SHA-256 hash of the issuer SPKI
> and the certificate serial number.  I don't recall it being tied to Json
> (but I could be wrong).
>
>
> Hello Wei, I wanted to follow up on this. I am willing to write in a spec
> that includes the hash of the issuer's SPKI.
>
> It will look like:
>
> ISSUERSN:SPKI/SHA-256:3434ABAB..00DA;04FDBDA0
>
> namely, the issuer part will be of the form "SPKI", a slash, and the hash
> name. This preserves algorithm agility, and is syntactically
> distinguishable from the LDAP string encoding.
>
> Compare with:
>
> ISSUERSN:O=DigiCert,ST=UT,C=US;04FDBDA0
>
>
> The question I would like to pose is: does Chromium or some other
> implementation actually index certificates based on the issuer's SPKI hash,
> followed by the serial number?
>

Yes.  CRLSets are used in Chromium:
https://www.imperialviolet.org/2012/02/05/crlsets.html
https://www.imperialviolet.org/2014/04/29/revocationagain.html


>
> The other certspecs (well, most of them anyway) are intended to be indexes
> or keys in a database or other lookup system. There are known systems that
> index by SHA-1 hash, by issuer + SN, etc. (as has been previously
> discussed). File paths are obviously indexes. Notably, pretty much all of
> the certspecs in draft-06 are based on data in the subject certificate, or
> operatively associated directly with the subject certificate (e.g., file
> path). The issuer DN is present in the subject certificate, so it is
> "direct" (no certificate path building required). In contrast, an arbitrary
> verifier has to perform several steps:
> 1. hunt for the issuer certificate based on the SPKI (hash)
> 2. extract the issuer DN(s) (there could be multiple issuer certificates,
> e.g., certificate rollover. Clearly not key rollover)
> 3. then run the algorithm as if ISSUERSN: is specified with the issuer
> DN(s) rather than the SPKIs.
>
> This seems sub-optimal to me, unless the implementation is truly indexing
> based on the hash of the issuer's SPKI, and has some live or precomputed
> table that keeps the issuer's SPKI and certificate(s) together.
>
> I would appreciate some citation to the Chromium source code or writeup,
> regarding how Chromium keeps track of certificates.
>

agl's github link:
https://github.com/agl/crlset-tools

-Wei


>
> Sean
>
> PS An implementation could index certificates purely based on
> serialNumber, and then sift through all matching certificates by comparing
> issuer DN(s) and/or issuer SPKIs. Assuming that serialNumbers are supposed
> to be relatively large and random, this will be pretty efficient.
>
> PPS If I enable this, I will also enable SPKI specification in
> SUBJECTEXP:. However specifying the hash of the subjectPublicKeyInfo is
> "direct" because the SPKI is contained in the subject's own certificate.
>
>