Re: PKCS#11 URI slot attributes & last call

Jan Pechanec <> Wed, 17 December 2014 23:53 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 540FE1A0084; Wed, 17 Dec 2014 15:53:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.21
X-Spam-Status: No, score=-4.21 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, UNPARSEABLE_RELAY=0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Uin1yjicJOPX; Wed, 17 Dec 2014 15:52:58 -0800 (PST)
Received: from ( []) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B91741A007A; Wed, 17 Dec 2014 15:52:58 -0800 (PST)
Received: from ( []) by (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sBHNqruY013545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Dec 2014 23:52:54 GMT
Received: from ( []) by (8.14.4+Sun/8.14.4) with ESMTP id sBHNqqCS023988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 17 Dec 2014 23:52:53 GMT
Received: from ( []) by (8.14.4+Sun/8.14.4) with ESMTP id sBHNqqGm023981; Wed, 17 Dec 2014 23:52:52 GMT
Received: from (/ by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Dec 2014 15:52:51 -0800
Date: Wed, 17 Dec 2014 15:52:50 -0800 (PST)
From: Jan Pechanec <>
X-X-Sender: jpechane@keflavik
To: Nikos Mavrogiannopoulos <>
Subject: Re: PKCS#11 URI slot attributes & last call
In-Reply-To: <>
Message-ID: <alpine.GSO.2.00.1412171537500.4549@keflavik>
References: <alpine.GSO.2.00.1412161359100.4549@keflavik> <> <20141216234252.GN3241@localhost> <>
User-Agent: Alpine 2.00 (GSO 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Source-IP: []
X-Mailman-Approved-At: Thu, 18 Dec 2014 08:24:59 -0800
Cc:, Stef Walter <>, Jaroslav Imrich <>,,
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 17 Dec 2014 23:53:00 -0000

On Wed, 17 Dec 2014, Nikos Mavrogiannopoulos wrote:

>On Tue, 2014-12-16 at 17:42 -0600, Nico Williams wrote:
>> The rationale is this:
>>  - you may have a PKCS#11 library with various slots, and you may have
>>    builtin tokens as well as removable tokens, and...
>>  - you need to intelligently pick one at logon time so you don't prompt
>>    the user for PIN entry for tokens they don't have access to (e.g.,
>>    the TPM), just the one smartcard they plugged in.
>> PKCS#11 is pretty lousy at this, and all we have to match on are the
>> various slot and token attributes.
>> There are tokens that won't let you list public objects without PIN
>> entry.  And there are tokens where incorrect PIN entry can lead to
>> logout.  And PAM has limits as to what it can do in terms of
>> intelligently prompting a user for a slot/token/object.
>I don't follow how the above require the slots to be known in order to
>figure where the object is. In gnutls we handle all of these use cases,
>and we don't need to know the slot at all. First you iterate all slots
>searching for the object, and then you login and search again. How would
>knowing the slot would have helped that?

	hi Nikos, if I expect a token to be inserted with some key 
(rather then identifying the key to use) then specifying the slot 
where such token is to be found seems useful to me.  If I understand 
it correctly, that's how pam_pkcs11 works.  It has two configuration 
options for this - slot description and slot ID.

	I know that the slot ID is cryptoki module specific.  It would 
have been nice if the specification supported token serial number as 
it does for tokens.

	also, the PKCS#11 URI can be used to identify PKCS#11 objects, 
tokens, and libraries.  I think that adding attributes to add the last 
major element, a token, is a good idea.

	the updated text would have to provide information about 
general unreliability using the slot ID, for example.


Jan Pechanec <>