In this section: |
If you need an encrypted file to be in ASCII format, ASCII message armoring must be set to true. This is useful if you need to email an encrypted file in ASCII format.
GPG Command Line
From the gpg command reference, the -a option must be set in the command.
ASCII Armour: Code all PGP output files in printable ASCII characters using Radix 64. a can be used on its own to convert any file to ASCII-armoured.
The following example shows how to create an ASCII armoured file that provides an encrypted file in ASCII format:
H:\>gpg --passphrase-file c:\passphrase.txt --sign --encrypt a -r "soumya" c:\M on.txt Reading passphrase from file descriptor 3 You need a passphrase to unlock the secret key for user: "soumya (sou's key) <soumya_raghavan@ibi.com>" 2048-bit RSA key, ID BC58F8F3, created 2009-03-19
The current encryption supports ASCII message armoring. However, ASCII armoring cannot be performed if the message needs to be signed. If the message is signed and encrypted, the output file would be generated only in binary format.
Consider a scenario where an outgoing message must be encrypted in ASCII format. To successfully encrypt a message in this case:
The values for the PGP preemitter configuration parameters are listed and described in the following table:
Parameter |
Description |
---|---|
Encrypt method |
Selects the form of encryption to be used. In this example, select Keypair from the drop-down list. |
Pass Phrase or Alias |
The configured pass phrase or alias. In this example, the following value is used: Key for Test server<Soumya_raghavan@ibi.com> Note: To avoid typos, it is a good idea to cut and paste this value from a text file. |
armor |
Determines whether an armored message should be generated. In this example, select true from the drop-down list. |
Public key ring |
Full path to the public key ring. Used for key pair encryption. In this example, the following path is used: C:\Program Files\GNU\GnuPG\keys\pubring.gpg |
Secret key ring |
Full path to the secret key ring. Used for key pair encryption. In this example, the following path is used: C:\Program Files\GNU\GnuPG\keys\secring.gpg |
Key Phrase |
Enter the key phrase that is required for signing. This parameter is required only when signing. |
Sign |
Determines whether messages should be signed. In this example, select false from the drop-down list. |
algorithm |
The algorithm that is used. In this example, select cast5 from the drop-down list. |
FingerPrint |
Enter the fingerprint of the sub key ring (the encryption key), which can be obtained by using the following command: gpg --fingerprint --fingerprint "alias" where:
|
The values for the PGP preparser configuration parameters are listed and described in the following table:
Parameter |
Description |
---|---|
Decrypt method |
Selects the form of decryption to be used. In this example, select Keypair from the drop-down list. |
Pass Phrase or Alias |
The real name that is configured. In this example, the following value is used: Key for Test server<Soumya_raghavan@ibi.com> Note: To avoid typos, it is a good idea to cut and paste this value from a text file. |
Public key ring |
Full path to the public key ring. Used for key pair encryption. In this example, the following path is used: C:\Program Files\GNU\GnuPG\keys\pubring.gpg |
Secret key ring |
Full path to the secret key ring. Used for key pair encryption. In this example, the following path is used: C:\Program Files\GNU\GnuPG\keys\secring.gpg |
Key Phrase |
Enter the key phrase, which is required to verify the signature. |
Flow form |
Determines the flow form to be used. In this example, select XML from the drop-down list. |
The original file is obtained.
iWay Software |