Hello,

On Jul 6, 2010, at 2:04 PM, Jean-Michel Pouré - GOOZE wrote:
> I try to understand how many keys/certificates can be stored in a
> smartcard. Usually vendor specs say "32k, 64k" space on smartcard.
Some of that space (if if they advertise 32K, ir ptobably has a 32K EEPROM 
chip) may not be available for external use.


> From my test, it appears that when a smartcard is full, you cannot
> transfert RSA keys or certificates.
That makes sense, no?

> Would it be possible for OpenSC to display available space left on
> device? Or the number of RSA keys / X.509 certs which can be stored.
Patches are welcome. EF(UnusedSpace) could be the starting pointer in PKCS#15.

> Another question: how do we know in advance how much space is used by
> RSA keys and X.509 certificates? Are there tips to calculate this fast?

If you import keys from a host system, convert the PEM to DER and use ls -l, 
add some ("few") bytes for internal bookkeeping and you get the rough size that 
gets used on the card. The same applies to on-board key generation. You know 
the size in bits of the keys and probably there is some extra space used for 
internal bookkeeping. 

-- 
Martin Paljak
@martinpaljak.net
+3725156495

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to