This method although convenient, does have some security risks as anyone who discovers or intercepts the password can use the private key if they have access to the computer where the key is stored. Another vulnerability is that once the key is decrypted it is held within the computer's memory where it could be copied by a rogue program. Security can be increased by storing the encrypted key on removable media, for example a floppy disk. An attacker would then need access to this media and knowledge of the password before they could use the private key. However, this method still requires the key to be decrypted and held within the computer's memory where again it could be copied by a rogue program.
Smart cards can provide a very secure way of generating, storing and using private keys.
In its most basic implementation, smart cards can be used to store private keys and digital certificates protected with a password. Security can be further enhanced by using a microprocessor within the card to generate the public and private key pairs and to perform the actual encryption. Data to be decrypted or digitally signed is passed to the card where the microprocessor performs the operation and then passes the data back to the computer. That way the key never leaves the card and is therefore not vulnerable to attack by rogue programs scanning the computer's memory for keys. Electronic purses Many applications in place today use a smart card as a replacement for cash because of the higher security they offer over standard credit cards.