McAfee MEJCAE-AM-DA Product Guide - Page 71

Using E-Business Server as a UNIX-style filter, Working with ASCII and binary data

Page 71 highlights

Advanced Topics Working with ASCII and binary data • A zero exit status code signifies a normal exit. • A non-zero exit status code tells you that an error occurred. Different error exit conditions return different exit status codes to the shell. For a list of E-Business Server exit codes, see Exit and Error Codes. Using E-Business Server as a UNIX-style filter UNIX uses pipes to make two applications work together. The output of one application can be directly fed through a pipe to be read as input to another application. For this to work, the applications must be able to read the raw material from "standard input" and write the output to "standard output." E-Business Server uses standard input if no input files are specified. E-Business Server uses standard output if standard input was used for input and no output files were specified. You can force standard output by adding '--output -' to the command line. To use E-Business Server's UNIX-style filter mode, reading from standard input and writing to standard output, add the '--output -' option and do not specify any input files: ebs --encrypt --armor --user --output - For example: ebs --encrypt --armor --user ksmith --output - This feature makes it easier to use E-Business Server with scripts and email applications. When you use E-Business Server's filter mode to decrypt a ciphertext file, you may find the PGPPASS environment variable useful. This variable holds the passphrase so that E-Business Server does not prompt you for this information. For information on various ways to specify your passphrase, see Alternative ways to work with passphrases on page 72. Working with ASCII and binary data ASCII-armored text is binary data that has been encoded using a standard, printable, 7-bit ASCII character set. This allows users to transport the information through many email systems that only allow messages that contain ASCII text. The sections to follow describe how to: • encrypt and transmit binary data • send binary data files in ASCII-armored format without encryption or signature • decrypt ASCII-armored messages • send a public key in ASCII-armored format • send ASCII text files to different machine environments Encrypting and transmitting binary data Many email systems only allow messages that contain ASCII text. As a result, E-Business Server supports an ASCII-armored format for ciphertext messages (similar to MIME). This format, which represents binary data using only printable ASCII characters, enables you to transmit binary encrypted data through 7-bit channels, or to send binary encrypted data as normal email text. E-Business Server's ASCII-armored format acts as a form of "transport armor," protecting the message against corruption as it travels through intersystem gateways on the Internet. E-Business Server also appends a CRC to detect transmission errors. ASCII-armored format converts the plaintext by expanding groups of 3 binary 8-bit bytes into 4 printable ASCII characters. As a result, the file expands by about 33%. However, this expansion is offset by the compression that occurs before encryption. 69 E-Business Server™ 8.6 Product Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188

69
E-Business Server
8.6
Product Guide
Advanced Topics
Working with ASCII and binary data
A zero exit status code signifies a normal exit.
A non-zero exit status code tells you that an error occurred. Different error exit conditions return different
exit status codes to the shell.
For a list of E-Business Server exit codes, see
Exit and Error Codes
.
Using E-Business Server as a UNIX-style filter
UNIX uses pipes to make two applications work together. The output of one application can be directly fed
through a pipe to be read as input to another application. For this to work, the applications must be able to
read the raw material from “standard input” and write the output to “standard output.”
E-Business Server uses standard input if no input files are specified. E-Business Server uses standard output
if standard input was used for input and no output files were specified. You can force standard output by
adding ‘
--output -
’ to the command line.
To use E-Business Server’s UNIX-style filter mode, reading from standard input and writing to standard
output, add the ‘
--output -
’ option and do not specify any input files:
ebs --encrypt --armor --user <recipients_userid> --output -
For example:
ebs --encrypt --armor --user ksmith --output -
This feature makes it easier to use E-Business Server with scripts and email applications. When you use
E-Business Server’s filter mode to decrypt a ciphertext file, you may find the
PGPPASS
environment variable
useful. This variable holds the passphrase so that E-Business Server does not prompt you for this
information. For information on various ways to specify your passphrase, see
Alternative ways to work with
passphrases
on page 72
.
Working with ASCII and binary data
ASCII-armored text is binary data that has been encoded using a standard, printable, 7-bit ASCII character
set. This allows users to transport the information through many email systems that only allow messages
that contain ASCII text.
The sections to follow describe how to:
encrypt and transmit binary data
send binary data files in ASCII-armored format without encryption or signature
decrypt ASCII-armored messages
send a public key in ASCII-armored format
send ASCII text files to different machine environments
Encrypting and transmitting binary data
Many email systems only allow messages that contain ASCII text. As a result, E-Business Server supports
an ASCII-armored format for ciphertext messages (similar to MIME).
This format, which represents binary data using only printable ASCII characters, enables you to transmit
binary encrypted data through 7-bit channels, or to send binary encrypted data as normal email text.
E-Business Server’s ASCII-armored format acts as a form of “transport armor,” protecting the message
against corruption as it travels through intersystem gateways on the Internet. E-Business Server also
appends a CRC to detect transmission errors.
ASCII-armored format converts the plaintext by expanding groups of 3 binary 8-bit bytes into 4 printable
ASCII characters. As a result, the file expands by about 33%. However, this expansion is offset by the
compression that occurs before encryption.