280 lines
12 KiB
HTML
280 lines
12 KiB
HTML
|
|
||
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>Cipher Data (CPHDTA)</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body bgcolor="white">
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<a name="CPHDTA.Top_Of_Page"></a>
|
||
|
<h2>Cipher Data (CPHDTA)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>
|
||
|
<ul><li>Batch program (*BPGM)</li>
|
||
|
<li>Interactive program (*IPGM)</li>
|
||
|
</ul><b>Threadsafe: </b>No
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#CPHDTA.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#CPHDTA.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#CPHDTA.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="CPHDTA"></a>
|
||
|
<p>The Cipher Data (CPHDTA) command is used to encrypt or decrypt a variable length of data.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="CPHDTA.PARAMETERS.TABLE">Parameters</a></h3>
|
||
|
<table border="1" cellpadding="4" cellspacing="0">
|
||
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
||
|
<tr>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.DATA"><b>DATA</b></a></td>
|
||
|
<td valign="top">Input data</td>
|
||
|
<td valign="top"><i>Character value</i></td>
|
||
|
<td valign="top">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.DTALEN"><b>DTALEN</b></a></td>
|
||
|
<td valign="top">Input data length</td>
|
||
|
<td valign="top">1-65528</td>
|
||
|
<td valign="top">Required, Positional 2</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.CPHK"><b>CPHK</b></a></td>
|
||
|
<td valign="top">Cipher key</td>
|
||
|
<td valign="top"><i>Character value</i></td>
|
||
|
<td valign="top">Required, Positional 3</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.RTNVAR"><b>RTNVAR</b></a></td>
|
||
|
<td valign="top">CL var for returned value</td>
|
||
|
<td valign="top"><i>Character value</i></td>
|
||
|
<td valign="top">Required, Positional 4</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.OPTION"><b>OPTION</b></a></td>
|
||
|
<td valign="top">Option</td>
|
||
|
<td valign="top">*ECPH, *DCPH, *SCPH</td>
|
||
|
<td valign="top">Required, Positional 5</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.KTYPE"><b>KTYPE</b></a></td>
|
||
|
<td valign="top">Key type</td>
|
||
|
<td valign="top"><b><u>*CLEAR</u></b>, *CIPHER</td>
|
||
|
<td valign="top">Optional, Positional 6</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.CHAIN"><b>CHAIN</b></a></td>
|
||
|
<td valign="top">Chain option</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional, Positional 7</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.ICV"><b>ICV</b></a></td>
|
||
|
<td valign="top">Initial chaining value</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
|
||
|
<td valign="top">Optional, Positional 8</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.PAD"><b>PAD</b></a></td>
|
||
|
<td valign="top">Pad option</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional, Positional 9</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.PADCHAR"><b>PADCHAR</b></a></td>
|
||
|
<td valign="top">Pad character</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>X'00'</u></b></td>
|
||
|
<td valign="top">Optional, Positional 10</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPHDTA.RTNDTALEN"><b>RTNDTALEN</b></a></td>
|
||
|
<td valign="top">CL var for returned length</td>
|
||
|
<td valign="top"><i>Decimal number</i></td>
|
||
|
<td valign="top">Optional, Positional 11</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="CPHDTA.DATA"></a>
|
||
|
<h3>Input data (DATA)</h3>
|
||
|
<p>Specifies the data or, a variable containing the data, to be encrypted or decrypted. The data must be at least as long as the length specified in the <b>Input data length</b> prompt (DTALEN parameter). If *SCPH (specific encryption) is specified in the <b>Option</b> prompt (OPTION parameter), only values 0-9 and A-F may be specified in this parameter. This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.DTALEN"></a>
|
||
|
<h3>Input data length (DTALEN)</h3>
|
||
|
<p>Specifies the length or a variable containing the length of the data to be encrypted or decrypted.
|
||
|
</p>
|
||
|
<p>When encrypting data, the length must be a multiple of 8 bytes if *NO is specified for both the <b>Pad option</b> prompt (PAD parameter) and the <b>Chain option</b> parameter (CHAIN parameter). The length must be less than 65,528 if the <b>Pad option</b> prompt (PAD parameter) is specified as *YES. The length must be less than or equal to 65,528 if the <b>Pad option</b> prompt (PAD parameter) is specified as *NO. If *SCPH (specific encryption) is specified in the <b>Option</b> prompt (OPTION parameter), this value must be 16.
|
||
|
</p>
|
||
|
<p>When decrypting data, the length must be a multiple of 8 bytes unless cipher block chaining was used when the data was encrypted. The length must be less than or equal to 65,528. This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.CPHK"></a>
|
||
|
<h3>Cipher key (CPHK)</h3>
|
||
|
<p>Specifies an 8-byte value, or a variable containing an 8-byte value, to be used as the key for the Data Encryption Algorithm. There are no restrictions on the value of this parameter. This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.RTNVAR"></a>
|
||
|
<h3>CL var for returned value (RTNVAR)</h3>
|
||
|
<p>Specifies a variable to receive the results of the cipher operation. If *YES is specified for the <b>Pad option</b> (PAD parameter) and *ECPH is specified for the <b>Option</b> (OPTION parameter), the variable must be at least as long as the next 8-byte multiple past the value specified for the <b>Input data length</b> prompt (DTALEN parameter). Otherwise, it must be at least as long as the value specified for the <b>Input data length</b> prompt (DTALEN parameter). This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.OPTION"></a>
|
||
|
<h3>Option (OPTION)</h3>
|
||
|
<p>Specifies the cipher function to be performed. This is a required parameter.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>*ECPH</b></dt>
|
||
|
<dd>A copy of the data in the <b>Input data</b> prompt (DATA parameter) is encrypted and placed in the variable specified in the <b>CL var for returned value</b> prompt (RTNVAR parameter)
|
||
|
</dd>
|
||
|
<dt><b>*SCPH</b></dt>
|
||
|
<dd>The <b>Input data</b> prompt (DATA parameter) contains 16 hexadecimal characters representing 8 bytes of data to encrypt (for example, 'C1' represents 'A'). A copy of these 16 hexadecimal characters is converted to an 8-byte field and encrypted. The resulting 8 bytes of ciphertext are converted back to 16 hexadecimal characters and placed in the <b>CL var for returned value</b> prompt (RTNVAR parameter).
|
||
|
</dd>
|
||
|
<dt><b>*DCPH</b></dt>
|
||
|
<dd>A copy of the data in the <b>Input data</b> prompt (DATA parameter) is decrypted and placed in the variable specified in the <b>CL var for returned value</b> prompt (RTNVAR parameter).
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.KTYPE"></a>
|
||
|
<h3>Key type (KTYPE)</h3>
|
||
|
<p>Specifies the format of the key specified in the <b>Cipher key</b> prompt (CPHK parameter).
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*CLEAR</u></b></dt>
|
||
|
<dd>The cipher key is specified in plaintext. If *SCPH is specified for the <b>Option</b> prompt (OPTION parameter), the value specified must be *CLEAR.
|
||
|
</dd>
|
||
|
<dt><b>*CIPHER</b></dt>
|
||
|
<dd>The cipher key is enciphered under the host master key. If *YES is specified for the <b>Chain option</b> prompt (CHAIN parameter) or the <b>Pad option</b> prompt (PAD parameter), the value specified must be *CIPHER.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.CHAIN"></a>
|
||
|
<h3>Chain option (CHAIN)</h3>
|
||
|
<p>Specifies whether cipher block chaining is to be used during the cipher operation.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>Cipher block chaining will not be used. If *SCPH is specified for the <b>Option</b> prompt (OPTION parameter) or *CLEAR is specified for the <b>Key type</b> prompt (KTYPE parameter), *NO must be specified.
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>Cipher block chaining will be used.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.ICV"></a>
|
||
|
<h3>Initial chaining value (ICV)</h3>
|
||
|
<p>Specifies an 8-byte value, or a variable containing an 8-byte value, to be used as the initial chaining value when performing cipher block chaining. This parameter is ignored if *NO is specified for the <b>Chain option</b> prompt (CHAIN option).
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NONE</u></b></dt>
|
||
|
<dd>There is no initial chaining value.
|
||
|
</dd>
|
||
|
<dt><b><i>initial-chaining-value</i></b></dt>
|
||
|
<dd>Specify the value to be used as the initial chaining value for cipher block chaining. There are no restrictions on the value for this parameter. A value must be specified if *YES is specified for the <b>Chain option</b> prompt (CHAIN option).
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.PAD"></a>
|
||
|
<h3>Pad option (PAD)</h3>
|
||
|
<p>Specifies whether padding is to be performed.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>Padding will not be performed. *NO must be specified if *SCPH is specified for the <b>Option</b> prompt (OPTION parameter).
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>Before encrypting, the data is padded out to the next 8-byte multiple using the pad character specified in the <b>Pad character</b> prompt (PADCHAR parameter). The last byte is then replaced with a count of the number of pad characters.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>After the data is decrypted, the pad characters and count byte are left appended to the data. The length of the data without the pad characters is returned in the variable specified in the <b>CL var for returned length</b> prompt (RTNDTALEN parameter).
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.PADCHAR"></a>
|
||
|
<h3>Pad character (PADCHAR)</h3>
|
||
|
<p>Specifies a 1-byte value, or a variable containing a 1-byte value, to be used as the pad character when *ECPH is specified for the <b>Option</b> prompt (OPTION parameter) and *YES is specified for the <b>Pad option</b> prompt (PAD parameter). The default (1-byte pad character) is hex 00.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPHDTA.RTNDTALEN"></a>
|
||
|
<h3>CL var for returned length (RTNDTALEN)</h3>
|
||
|
<p>Specifies a variable to receive the length of the returned data. When *DCPH is specified for the <b>Option</b> prompt (OPTION parameter) and *YES is specified for the <b>Pad option</b> prompt (PAD parameter), this length is the length of the deciphered data without padding. Otherwise, this variable contains the length of the data placed in the variable specified in the <b>CL var for returned value</b> prompt (RTNVAR parameter).
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div>
|
||
|
<h3><a name="CPHDTA.COMMAND.EXAMPLES">Examples</a></h3>None
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div>
|
||
|
<h3><a name="CPHDTA.ERROR.MESSAGES">Error messages</a></h3>Unknown
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPHDTA.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|