Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory and mass storage capability in Java Card

I am developing a cardlet in Java Card and I need to store a lot of data.

Concerning the card's technical key features I can read:

  • 78Ko EEPROM

  • Min. 2GB flash memory

My question concerns the flash memory access : How to store datas into it ?

In my applet, I instantiate persistants byte arrays to store my datas but proceding this way, I use the EEPROM.

I'm discovering smart cards and I'm a little lost.

like image 587
Raoul722 Avatar asked Jun 24 '26 11:06

Raoul722


1 Answers

You can test if the optional package javacardx.external.MemoryAccess is implemented to gain access. You won't be able to directly use the memory for your Applet.

To you use it you would probably have to execute something similar to:

javacardx.external.Memory.getMemoryAccessInstance(MEMORY_TYPE_EXTENDED_STORE,  short[] memorySize, short memorySizeOffset)

Note that the Java Card implementation is mainly concerned with security applications. Storing data directly in unprotected flash is probably not the way to go.

The manufacturer may have implemented a proprietary API to access the flash. Better ask your vendor if the above solution does not work.

like image 79
Maarten Bodewes Avatar answered Jun 26 '26 10:06

Maarten Bodewes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!