
	This tool is to help manage the RSA .reserved key file. Some changes 
will have to be made to the server in order for the new .reserved format to
work. These changes re stated below. The key tool can do the following:

	l - list all of the keys currently in the .reserved file
	a - add a new key to the file. You will be prompted for the
	    type name you want to give to the key
	d - delete a key from the key list
	c - convert the .reserved file. This is to add the key type
	    name to the key list. Useful to convert the .reserved from
	    original format to the newer format.
	v - verify if a key is in your .reserved file.



	Changes needed to be made to server:

		in defs.h:
		    after 
			KEY_SIZE	32
		    add:
			KEY_TYPE	10
		
		in data.c:
		    after 
			testdata[KEY_SIZE]; 
		    add:
			char keytype[KEY_TYPE];

		in data.h:
		    after
			extern char testdata[KEY_SIZE];
		    add:
			extern char keytype[KEY_TYPE];

		in reserved.c:
		in reserved.c:
		    in decryptReservedPacket:
		      used to be:

    			done = found = 0;
    			do
    			{
        		    if (read(fd, key_global, KEY_SIZE) != KEY_SIZE) {
                		printf("global key wrong size\n");
                		done = 1;
        		    }
        		    if (read(fd, key_public, KEY_SIZE) != KEY_SIZE) {
                	        printf("public key wrong size\n");
                	        done = 1;
        		    }
        		    if (! bcmp(key_global, cpacket->global, KEY_SIZE))
        		    	done = found = 1;
        		    if (!bcmp(key_public, cpacket->public, KEY_SIZE))
        		        done = found = 1;
    			} while (! done);



		    in decryptReservedPacket:
		      change to:

			strcpy(keytype,"???");		/* NBT 10-19-92 */
    			done = found = 0;
    			do
    			{
        		    if (read(fd, key_global, KEY_SIZE) != KEY_SIZE) {
                		printf("global key wrong size\n");
                		done = 1;
        		    }
        		    if (read(fd, key_public, KEY_SIZE) != KEY_SIZE) {
                	        printf("public key wrong size\n");
                	        done = 1;
        		    }
        		    if (read(fd, keytype, KEY_TYPE) != KEY_TYPE) {  /* NBT 10-19-92 */
                		printf("key type wrong size\n");
                		done = 1;
        		    }
        		    if (! bcmp(key_global, cpacket->global, KEY_SIZE))
        		    	done = found = 1;
        		    if (bcmp(key_public, cpacket->public, KEY_SIZE))
        		        done = found = 1;
    			} while (! done);



		in main.c: 
		    in printStats:
			used to be: 

			    fprintf(logfile, "Leaving: %-16s (%c%c) %3dP %3dA %3dW/%3dL %3dmin %2d <%s@%s> %s",
            		    me->p_name,
            		    teamlet[me->p_team],
            		    shipnos[me->p_no],
            		    me->p_stats.st_tplanets - startTplanets,
            		    me->p_stats.st_tarmsbomb - startTarms,
            		    me->p_stats.st_tkills - startTkills,
            		    me->p_stats.st_tlosses - startTlosses,
            		    (me->p_stats.st_tticks - startTticks)/600,
            		    numPlanets(me->p_team),
            		    me->p_login,
#ifndef FULL_HOSTNAMES
            		    me->p_monitor,
#else
            		    me->p_full_hostname,
#endif
            		    ctime(&curtime));


			change to:

			    fprintf(logfile, "Leaving: %-16s [%s] (%c%c) %3dP %3dA %3dW/%3dL %3dmin %2d <%s@%s> %s",
            		    me->p_name,
            		    keytype,			/* NBT 10-19-92 */
            		    teamlet[me->p_team],
            		    shipnos[me->p_no],
            		    me->p_stats.st_tplanets - startTplanets,
            		    me->p_stats.st_tarmsbomb - startTarms,
            		    me->p_stats.st_tkills - startTkills,
            		    me->p_stats.st_tlosses - startTlosses,
            		    (me->p_stats.st_tticks - startTticks)/600,
            		    numPlanets(me->p_team),
            		    me->p_login,
#ifndef FULL_HOSTNAMES
            		    me->p_monitor,
#else
            		    me->p_full_hostname,
#endif
            		    ctime(&curtime));


	Because of the way reserved.c works we can not record the type of
key used until they log off. Someone on r.g.n. already mentioned this.

				--Nick Trown
