On Apr 17, 2010, at 16:34 , Dimitrios Siganos wrote: > Viktor TARASOV wrote: >> Dimitrios Siganos wrote: >> >>> My question is: can I change this id and make it smaller? Who allocates >>> this id? >>> >> You can change it back to one-byte ID >> when you set 'pkcs15-id-style' = 'native' >> in the 'pkcs15' part of the pkcs15.profile. >> > Thank you for the tip, that worked fine. I changed the profile to native > and I got the key id 45. > > Now I have another question, is there a deterministic way to allocate > that id? Is 45 some kind of special number that says this is the first > id or is it just a random number or an implementation specific number?
I believe this is a random choice done in [1] > Let's say I have 1000 smartcards each equiped with a single unique rsa > private key. Is there a way to ensure that all the private keys have the > same key id (e.g. 45)? That should be the result when you initialize all cards separately. >>> Some apps, assume that the key id is small and don't allocate enough >>> buffer space for my long key id. >>> >> What are these apps? >> > My phrase "some apps" is wrong. It is just my assumption showing > through. I only know of one app which cannot handle long ids and it is > charon, the IKEv2 daemon of strongswan. Thanks, added the note to ApplicationSupport page as well [2] [1] http://www.opensc-project.org/opensc/browser/trunk/src/pkcs15init/pkcs15-lib.c?rev=415#L51 [2] http://www.opensc-project.org/opensc/wiki/ApplicationSupport?action=diff&version=26 -- Martin Paljak http://martin.paljak.pri.ee +3725156495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel