Private keys must be stored securely, since forgery and loss of privacy could result from compromise (see Question 120). The measures taken to protect the private key must be at least equal to the security of the messages encrypted with the key. The private key should never be stored anywhere in plaintext form. The simplest storage mechanism is to encrypt the private key under a password and store the result on a disk. However, since passwords are sometimes easily guessed, such a password should be chosen very carefully.
Storing the encrypted key on a disk that is not accessible through a computer network, such as a floppy disk or a local hard disk, will make some attacks more difficult. It might be best to store the key in a computer that is not accessible to other users or on removable media that the user can remove and take with her when she has finished using a particular computer. Private keys may be stored on portable hardware, such as a smart card. Users with extremely high security needs, such as certifying authorities, should use special hardware devices to protect their keys (see Question 126).