Command-Line Demo User’s Guide
330 RSA BSAFE Crypto-C Developer’s Guide
• the name and location of the file to be signed
• the name of the file you want to create to hold the signature
• the private key used for signing
3. Once this information is supplied, BDEMO uses the private key to create a
signature.
Create a File Envelope
To create an envelope for a file:
1. Enter “e” at the top-level menu.
2. You will be prompted in succession for:
• the name and location of the file to be signed and enveloped
• the names of the files for storing the encrypted DES key, the initialization
vector (IV), and the encrypted data
• a seed for generating the random DES key and the IV
3. Once this information is supplied, BDEMO encrypts the DES key using the
recipient’s public key, saving the IV, encrypted DES key, and the encrypted
content in the previously specified files.
Verify a Signed File
To verify the signature for a file:
1. Enter “v” at the top-level menu.
2. You will be prompted in succession for:
• the name and location of the file to be verified
• the digital signature file
• the signer’s user number (1 or 2; you may also choose 3 if you have
generated a key pair)
3. BDEMO uses the signer’s public key to verify the signature. If the signature is
valid, BDEMO prints “Signature verified.”; otherwise, BDEMO prints
“ERROR: Invalid signature while verifying file.”
Open a File Envelope
To open an enveloped file:
1. Enter “o” at the top-level menu.
2. You will be prompted in succession for: