Appendix A Command-Line Demos 329
Command-Line Demo Users Guide
> bdemo -s < testin
Notice that this uses < to redirect testin as the input to BDEMO. The -s option to
BDEMO eliminates the menu prompts when BDEMO is taking input from a file.
Any line that is blank or begins with # is ignored. This means that the file used in
response file mode may contain blank lines and comment lines that begin with #.
Specifying User Keys
BDEMO comes pre-loaded with RSA key pairs for two test users: User 1 and User 2.
You can also use BDEMO to generate a new RSA key pair; if you do so, this becomes
the key pair for User 3. See Generate a Key Pair on page 331 for key pair generation.
Note: Key pair generation in BDEMO is for demonstration purposes only and is not
cryptographically secure.
When you sign, verify, seal, or open a file, BDEMO asks which users key to use. You
can specify either 1 or 2. If you have generated a new RSA key, you can specify 3.
Using BDEMO
When you type bdemo at the system prompt, the following top-level menu is
displayed:
S - Sign a file
E - Envelope a file
V - Verify a signed file
O - Open an enveloped file
G - Generate a keypair (may take a long time)
Q - Quit
Enter choice:
Commands may be entered in either upper or lower case, and all but the initial letter
of a command is ignored. So, for example, to sign a file you may either type s or
sign.
Each of the commands on this top-level menu is described below.

Sign a File

To sign a file:
1. Enter s at the top-level menu.
2. You will be prompted in succession for: