Server's Public And Private Keys

Server's public and private keys must remain the same for a reasonably long time because, in principle, every time the keys are changed it's likely that there are one or two clients just waiting for their user's to type in their usernames and passwords. When they have completed, the authorization string is encrypted with the old public key thus leading to an Unauthorized status from the server although the user may well be authorized.

The server might accept data encrypted with either of the keys for a while, but this would introduce state to the server, and would complicate things too much for something, that is really not that vital.

Furthermore, if the keys keep changing all the time (say once a minute, or even every ten minutes) the browser will practically always have to first fail trying to access a document to get the new public key, and then use it to encrypt the authorization information again (of course generating a new encryption key, because otherwise the material to be encrypted with the public key would be exactly the same as encrypted with the old key and thus compromise the safety of the system, because having two different encryptions of the same message makes it easier to break).

Since public key encryption can be considered rather safe for a period of even years, it will be reasonable to say, that the server needs not change it's public and private keys more often than say, every couple of weeks.

On Suns, if the server is run by inetd which only starts the server when someone is requesting a connection to it, i.e., the server is not running all the time, there may be a separate program updating the keys either regularly (run by cron), or during the system init (run from /etc/rc.local).

On other platforms, especially those not providing multiple processes, the key update has to be done either once at the server startup, or if the server is not booted often enough (and why would it be?) the server itself must do this task regularly.

Private key must be kept in a directory with no world or group permissions under the WWW server pseudo account's home directory, in a file with no world or group permissions to it either.

AL 12 December 1993