How Public Key Generate and Store

Posted by arlene

Public Key Generation

The main requirement for cryptographic keys is that they be chosen at random. Unfortunately, true randomness is very difficult to achieve. Because of this, many systems attempt to mix changing data from several sources, but this approach is often unsuccessful. For example, an early version of a popular secure Web browser created cryptographic keys that were based in part on the time of day, as given by the machine’s clock. The attackers in this case knew the approximate time that the keys were generated, so they were able to test a small set of possible keys using only a few minutes of computer time.

There are true random number generators, which are based on such natural physical phenomena as radioactivity and shot noise. These devices are not broadly deployed and are often expensive. For keys generated by computer software, two solutions are popular.

  • User input

For long-term keys, key generators rely on input from outside the computer. Typically, the user is asked to type randomly for a while. The letters typed are ignored, and instead slight random variations in the interarrival time of keystrokes are used.

  • Pseudorandom

For moment-to-moment creation of short-term keys, key generation is pseudorandom, combining unpredictable pieces of information such as the process identifier, the computer’s real-time clock, the number of hardware interrupts received, and so forth. None of these items alone is random enough, but they can be combined into a randomness pool. This pool can then be used to generate keys that are sufficiently random for most purposes.

Living the Web 2.0

Even when the keys are randomly generated, there may be some additional challenges in creating them. Sometimes a cryptosystem will have some keys, or some patterns of keys, that are known to be weaker in some way than an average key chosen at random. The key-generation procedures must avoid these weak keys.

Passwords intended for human use are also keys. Unfortunately, when people choose their own passwords, they tend to choose poor ones. Just as unfortunately, if users are assigned passwords by a computer, they write them down. (Actually, in an era of network threats to security, writing down a really good password and sticking it in your purse may be the best choice. To protect against individuals with physical access, write down only part of the password and remember the rest.) The usual advice is to use a long, memorable password, such as a multiwordpass phrase or a password composed of multiple words separated by weird punctuation.

Public Key Storage

After good cryptographic keys are generated, they must be stored somewhere. Proper storage for both short and long periods of time is essential to good security. During the lifetime of a key, it may be used and stored in many different places, such as the following.

When a key is used by a computer, it must necessarily be in memory. This is a problem on most computers, because the contents of memory may be available to other software running on the same system. On a PC, there is no real defense against this threat, because PC operating systems provide no protection. Traditional multiuser operating systems prevent users from reading or writing the memory allocated to other users. Often, however, a privileged user or a debugger necessarily has access to the memory of other processes. For these reasons, keys used on a system are only as secure as access to the machine and the password of the system administrator. To mitigate the risks of online storage, good practice includes zeroing out all storage used for keys as soon as they are no longer needed.

  • On disk

Cryptographic keys are frequently stored in disk files, because they are too long and too random to be entered by hand. Key files on disk are frequently stored in encrypted form. The good news is that stealing the encrypted file may not benefit the attacker. The bad news is that the security of all the keys in the file is only as good as that of the master key, which is frequently a human-sensible password, not a true random key. In addition, one should understand where the file password itself is kept. If the system needs to be able to restart automatically after a power failure, the password for the key file must be online somewhere. If automatic restart is not required, the system might prompt an operator to enter the key file password. In this case the operator might wonder if the prompt is from the real key unlocking software or from a clever imitation seeking only to steal the key file password. Because of these limitations, security for encrypted key files generally also reduces to the physical security of the computer combined with the security of the administrator password. And do not forget that the key file will be present on backup tapes. How are backups handled and stored?

Commercial systems often use protected hardware devices such as cryptographic accelerators and smart cards both to store keys and to perform cryptographic operations. Because the key never leaves the device, which is designed to be tamperproof, the key is physically protected. This approach is not entirely without risks, however. Although it may be impossible to steal a key stored in this way (at least not without being detected), it still may be possible for rogue software to command the use of the keys to decrypt or encrypt messages on behalf of unauthorized parties.

Some systems take a different approach for truly valuable keys. In these systems, the key is not kept online at all but is used only on isolated computer systems and stored in a vault when not in use. If having even a single copy is too risky, secret sharing may be used to split the key into a number of separate parts, some subset of which are needed to re-create the key. When keys, or the keys to unlock encrypted key files, are kept offline, there must be documented procedures for access to the keys as well as for how they are handled, stored, and destroyed.

Possibly related posts: (automatically generated)
How Public Key Generate and Store

2 Responses to “How Public Key Generate and Store”

  1. Form Builder to determine if it contained the components, I needed as Website Developer to create various types of forms for websites and to save me valuable programming time. … CoffeeCup WebCam

  2. The estimated retail price for Norton AntiVirus Dual Protection for Mac is US$69.95 (year subscription). … Purchase Norton Internet Security

Leave a Reply

LogoAlexa CounterFeedBurner Counter