Hello,

 I'm trying to guess how the CKA_ID is calculated from the public key 
 when nss generates a rsa key pair and try to store in a smart card 
 via pkcs11 (C_CreateObject) assigning an ID (CKA_ID). 
 Somewhere in the documentation [1]  is said that CKA_ID is 
 generated from some part of the public key but it is not specified
 which part.

 Surfing within the nss code I have found the   
 PK11_MakeIDFromPubKey(SECItem *pubKeyData) function 
 and its call seem to pass the rsa modulus as pubKeyData 
 to be digested using SHA1 and the result is the CKA_ID 
 assigned to that key.

 I have tried to do that as stand alone program but the result 
 was not the same (I,m afraid it is my fault), so my question is,
 Is it CKA_ID calculated  as a SHA1 from the DER encoding of the  
 modulus of the public key when generating a key pair?. In case 
 that no, How is it calculated?

Thanx in advance 
Greetings.

[1]. http://developer.mozilla.org/en/docs/PKCS11_FAQ
-- 
Paul Santapau Nebot 
Universitat Jaume I 
Clauer Project (http://clauer.nisu.org)
Ext 8250
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to