Subject: [Curdle] PKCS#11, PKI OIDs and EdDSA/X*

From: Jim Schaad <[email-masked]>
Date: Tue, 23 Aug 2016 19:19:46 -0700

Off list somebody has asked me how we are supposed to be working with
PKCS#11.  I am not an expert on this interface and, since I was toiling away
on the bottling line all day, I did not have a lot of time to try and figure
out what the problems where.  The following is my best guess as to the
problem, I will be trying to get some clarifications to make sure that I am
right.

Currently there is a mechanism for doing Elliptic Curve and it uses
structures that are tied very closely to the ASN.1 structure that are
defined for EC and ECDSA today.   As an example the Parameters ASN.1
structure is used as the EC domain parameters for public and private keys.

With the current way we have setup the public key/private key structures,
there is no direct and easy mapping between what we are doing here and what
is done for the EC Mechanisms.  I will note that even if one uses the EC
Mechanism there are still going to be some odd things, for example the field
CKA_EC_POINT  is defined to be the ANSI X9.62 ECPoint value Q which is not
what needs to be done here.

One way forward is to recommend that a new mechanism be defined as the key
formats are going to be different so it is not a clear mapping.  However, I
don't know that we have the knowledge or the authority to make this decision
as the PKCS#11 specification is an OASIS document.  If there are OASIS
people from there on the list, by all means speak up.

For the JOSE and COSE documents, the approach that was taking was along the
same vein as create a new mechanism.  This is just one data point and may
not be relavent.

The questions at this point are:
1.  Is this the only PKCS#11 issue that people with knowledge of the API can
see?
2.  Is this a big enough issue to change our approach to use of OIDs? 
3.  Do we recommend to the appropriate people that a new mechanism be
created?

Jim

---

From: David Benjamin <[email-masked]>
Date: Wed, 24 Aug 2016 03:14:49 +0000

With the caveat that I'm not all that familiar with PKCS#11 either, as you
note, it seems trying to stuff EdDSA, etc., into EC mechanisms would
require contortions anyway. And we may well wish to define even more novel
schemes that are even further from X9.62. So we'll need this path to exist
anyway.

My gut feeling is that creating new mechanisms and, if needed, cutting down
on the friction involved in doing so, would be the best option, for much
the same reasons as wanting to use top-level OIDs in SPKIs.

David

On Tue, Aug 23, 2016 at 7:20 PM Jim Schaad <[email-masked]> wrote:

> _______________________________________________
> Curdle mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/curdle
>