A storage device, comprising: an access port; a non-volatile memory device operable to store data, the memory device being partitioned into at least one read-only partition, the read-only partition storing one or more smart-card applications and/or firmware; a controller coupled to the access port and to the non-volatile memory, the controller being operable to receive read data from the memory device and couple the read data to the access port, and to receive write data from the access port and couple the write data to the memory device, the controller further being configured to receive status words, including a status word indicating that the read-only partition should be opened to writing and to respond by changing the attribute of the read-only partition from read-only to read/write, and provide the status word to the access port indicating the attribute of the read-only partition has changed from read-only to read/write, the controller further being configured to execute a plurality of write commands to the read-only partition when the attribute of the read-only partition is read/write, the controller further being configured to determine the size of the read-only partition and the size of any data being written to the read-only partition, the controller further being configured to apply a resizing command to the memory device to resize the partition if the controller determines that the size of any data being written to the read-only partition is larger than the size of the of the read-only partition; and a smart-card device coupled to the controller and including a processor, wherein a cryptography engine and a data storage device are integrated with the processor, the smart-card device being configured to receive commands coupled by the controller from the access port to the smart-card device, the commands including a command to open the read-only partition to writing, the smart-card device being configured to respond to the command to open the read-only partition to writing by determining if the smart-card device is in an authorized state, and, if so, to send to the controller the status word indicating that the read-only partition should be opened to writing; wherein the smart-card device is configured to determine if it is in an authorized state by receiving a user provided PIN or password applied to the access port and by comparing the received PIN or password to a PIN or password stored in the smart-card device. an access port; a non-volatile memory device operable to store data, the memory device being partitioned into at least one read-only partition, the read-only partition storing one or more smart-card applications and/or firmware; a controller coupled to the access port and to the non-volatile memory, the controller being operable to receive read data from the memory device and couple the read data to the access port, and to receive write data from the access port and couple the write data to the memory device, the controller further being configured to receive status words, including a status word indicating that the read-only partition should be opened to writing and to respond by changing the attribute of the read-only partition from read-only to read/write, and provide the status word to the access port indicating the attribute of the read-only partition has changed from read-only to read/write, the controller further being configured to execute a plurality of write commands to the read-only partition when the attribute of the read-only partition is read/write, the controller further being configured to determine the size of the read-only partition and the size of any data being written to the read-only partition, the controller further being configured to apply a resizing command to the memory device to resize the partition if the controller determines that the size of any data being written to the read-only partition is larger than the size of the of the read-only partition; and a smart-card device coupled to the controller and including a processor, wherein a cryptography engine and a data storage device are integrated with the processor, the smart-card device being configured to receive commands coupled by the controller from the access port to the smart-card device, the commands including a command to open the read-only partition to writing, the smart-card device being configured to respond to the command to open the read-only partition to writing by determining if the smart-card device is in an authorized state, and, if so, to send to the controller the status word indicating that the read-only partition should be opened to writing; wherein the smart-card device is configured to determine if it is in an authorized state by receiving a user provided PIN or password applied to the access port and by comparing the received PIN or password to a PIN or password stored in the smart-card device.