One embodiment of the present invention provides a system that maintains
keys using limited storage space on a computing device, such as a smart
card. During operation, the system receives a request at the computing
device to perform an operation involving a key. While processing the
request, the system obtains an encrypted key from remote storage located
outside of the computing device, wherein the encrypted key was created by
encrypting the key along with an expiration time for the key. Next, the
system decrypts the encrypted key to restore the key and the expiration
time, wherein the encrypted key is decrypted using a computing-device
key, which is maintained locally on the computing device. Finally, if the
expiration time has not passed, the system uses the key to perform the
requested operation. Note that by storing the encrypted key in remote
storage, the computing device is able to use the key without consuming
local storage space to store the key.