CFR2D5.DO by James Main Kenney 1997 Part 5 (of 5) documentation for encryption program CFRJMK version 2.0 (CFRT20.BA for the Tandy Radio Shack TRS-80 Model 100/102/200; CFRN20.BA for the NEC PC-8201A/8300; CFRJMK20.BAS for GW-BASIC/QBASIC, compiled as CFRJMK20.EXE for MS-DOS/Windows) Operating Instructions B (Conclusion) (continued from CFR2D4.DO) If output vs. input is selected then, at the next prompt, press key C or key Y for the calculation and display after every character of the coefficient of correlation between input and output. Press only ENTER for the calculation to be completed and displayed only when a key is pressed (see below) or at the end, which is much faster. The choice of display does not affect the cipher algorithm, so it need not be the same for decryption as for encryption. Using CFRJMK20.BAS/.EXE, if a pixel plot is selected, a prompt for graphics screen type appears: press only ENTER for screen 1, or enter 1, 2, 7, 8, or 9 when running CFRJMK20.BAS under GW-BASIC and using a VGA monitor; under QBASIC, or running CFRJMK20.EXE, screens 10, 11, 12, or 13 may also be used. For a CGA monitor, use only screens 1 or 2; for an EGA monitor (untested), use screens 1, 2, 7, 8, 9, or 10. (Screens 3 and 4 are for Hercules, also untested; no data for 5 or 6 could be found.) If an unacceptable number is entered, an error trap converts the display to screen 1 (with a beep). Screen 1 will also be automatically used if a pixel plot is selected only during encryption. At the next prompt, "Passwords?", up to 254 characters (255 in MS-DOS) may be entered via the keyboard to supplement the keyfile and resident keytext or in lieu of them. For best security, these characters should not be easily guessed or found by methodical trial-and-error, such as a single dictionary word or common name, or a word associated with the user or file. Use multiple unspaced nonsense words, or common words broken up in some easily remembered way by punctuation marks or other characters. Press ENTER after typing the characters (or not). NEC users should note that trailing spaces are ignored by the 8201A. If keytext has been entered at the passwords prompt, a character count and checks are displayed (the latter as a checksum and a weighted sum of the ASCII values, and a pair of printable 7-bit characters formed from these to facilitate memorization), together with the prompt "(R)edo?". Press key R or key Y to repeat the passwords prompt, allowing an erroneous entry to be replaced without having to restart the program. If the passwords keytext is correct, press only ENTER. Following a display of the "keystring" (formed from the resident keytext and/or the passwords), the prompt "(F)or fontstring only?" allows, by pressing key F or key Y, greater processing speed by using the keystring only in initial permutations of the fontstring; press only ENTER to also use it during the encryption or decryption proper for best security. Pressing only ENTER produces the next prompt, "(N)o fontstring?"; press key N to dispense with the fontstring, saving the time used in reading and permutating it. Pressing only ENTER to allow the fontstring to be formed increases security except for "one-time" ciphers with random keyfiles, which need no added protection, and it produces a display of the initial unrandomized fontstring (characters for bytes 32 to 126 in ASCII order). If the fontstring was not rejected, the final pre-encryption prompt requests the number of complete (95 character) permutations to be made prior to the start of encryption or decryption proper. Set the number of initial permutations by entering any positive integer, or accept the default of 3 by pressing only ENTER. (Three fontstring permutations are adequate to completely alter the longest keystring.) Entering a zero results in no initial permutation in CFRN20.BA or CFRT20.BA, but permutations are still made during encryption; in CFRJMK20.BAS/.EXE, entering zero will result in 3 permutations, as though ENTER was pressed without typing a number. A minimum of one permutation is needed for compatibility. There will then be a display of each of the selected number of complete (95 character) fontstring permutations as they are made. Each permutation is followed by the number of "runs" of its ASCII values and (after the first) by the mean and sample standard deviation of the runs for the completed permutations (see CFR2D3.DO). If a keyfile skip was entered, there will then be a second delay for it to be rerun after the keyfile is closed and reopened. Encryption will start automatically if a plaintext filename has been entered; otherwise, the program will wait for keyboard entry of plaintext: when done, press the ESCape key. Decryption will always start automatically. Note that attempting to correct errors in keyboard entered plaintext by backspacing does not delete the corresponding ciphertext; in CFRJMK20.BAS/.EXE, the backspace key does not even backspace on the screen, as it does in CFRT20.BA and CFRN20.BA, but generates a character which reappears after decryption. If a pixel plot (scatter diagram) is being displayed, press the spacebar at any time to clear the screen and dispay only new data. While displaying output vs. input, press ENTER or any other key except ESC (or, for CFRJMK20.BAS/.EXE, keys C, P, B, S, O, K, or T) to complete the calculation and display of correlation coefficient if this is not being done automatically on every character. Using CFRJMK20.BAS/.EXE, the display may be changed during encryption or decryption: press the same keys mentioned during the display prompt to change the selection: key B for a blank screen; key S to display the keystring and fontstring; key O to display output vs. input (and key C to toggle between manual and automatic display of correlation coefficient); key K to display working key values; or key T to display the working key (modulo 95) versus time (whose bottom plot can be toggled between full screen width and the width at the moment any key is pressed except those previously mentioned); in addition, press key P to display plaintext. See CFR2D3.DO for additional details and for observations to make. Encryption or decryption may be terminated at any point by pressing the ESCape key; the terminal phase and the output file will then be the same as if the input file ended at that point. Following encryption or decryption, there will be a beep. If a blank screen dispay was chosen, the screen will remain blank until any key is pressed. Scatter diagrams (pixel plots) and unfiled plaintext are protected until any key is pressed. The run time for encryption or decryption proper is calculated (in seconds) by CFRJMK.BAS/.EXE, and may be calculated from the displayed clock readings using CFRT20.BA or CFRN20.BA. The lengths of the plaintext and ciphertext files are given along with a checksum for the former. To facilitate keyfile management for "one-time" use, the position of the last-used keyfile character is given, and the number of use cycles (keyfile openings) noted. For a "one-time" cipher, the keyfile must be in its first use cycle. The option is then offered, by pressing key O or key Y, of overwriting (with spaces) the input file, thus preventing its recovery by a memory dump; KILLing of the overwritten file is automatic, and a prompt then appears to allow its name to be transferred to the output file, by pressing key R or key Y. Reject overwrite or renaming by pressing only ENTER. Note that these options may be unneccessary for short files (8 KB or less of ciphertext) using CFRJMK20.EXE, which allows the same filename for both input and output, resulting in automatic overwrite of the input. A similar option is then offered to overwrite and KILL the keyfile, if one was used. Using CFRT20.DO or CFRN20.DO, return to Menu is automatic. Using CFRJMK20.BAS/.EXE, there is a prompt that allows a rerun by pressing key R or key Y, or an exit by pressing any other key. As mentioned in CFR2D5.DO, this prompt (or Menu) may be reached at any (letter) prompt by pressing the ESCape key. (end)