Hi, > -----Original Message----- > From: opensc-devel-boun...@lists.opensc-project.org [mailto:opensc-devel- > boun...@lists.opensc-project.org] On Behalf Of Martin Paljak > Sent: 15. helmikuuta 2011 7:47 > To: NdK > Cc: opensc-devel@lists.opensc-project.org > Subject: Re: [opensc-devel] Multiple certs on a MyEID card? > > Hello, > > On Feb 14, 2011, at 11:08 PM, NdK wrote: > > > On 14/02/2011 17:52, Andreas Jellinghaus wrote: > > > >> I have no clue about myeid, but some other cards are only 32k for example. > >> reserving 8192 would be 25% and that is only one directory file... > > Well, javacards have a limit of 32k of data, IIUC, so it's more or less > > the maximum for single-app javacards. MyEID have a 3F00 file of 32k, so > > I think that's the real available size for the primary app (please > > correct me if I'm wrong). > > 32k stems from the fact that the main data type of a java card is signed > short. Yet the EEPROM size of modern cards is 64, 128 or even more K-s. > > I don't know the details but I would not be surprised if API generated objects > like non-transient keys (which are not stored as char arrays in term of Java > code) get mostly allocated separately from that 32K ? > Maybe Toni knows more.
Current MyEID cards are 80K, but some of this space is used by the MyEID applet itself. The file size you see in the 3F00 file is the remaining free space, but due to a limitation of java cards in general, as Martin mentioned, 32k is the largest number for signed short. This only shows that you have at least this amount o space left. To get to know how much space you actually have left, you could create a file that is 32k, and the see how much space is left. Then if you still get the maximum (32k), then create another 32k file and then see the results. By adding these values together you get the actual space. > > But I'm still missing some useful details (like typical keysize, how > > much space does a key need in index files & so on)... > Looking at that index file might help? Also, every applet will take some > memory for internal bookkeeping, so it is not simply 1:1. A single key (private or public) needs typically 70-90 bytes in the dir file (index file). The actual amount depends on the label length. One 1024bit RSA key pair takes 512bytes and one 2048bit key pair takes 960bytes. Kind regards, Toni _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel