1 | Algorithm description | Input | Char(*) |
2 | Algorithm description format name | Input | Char(8) |
3 | Algorithm context token | Output | Char(8) |
4 | Error code | I/O | Char(*) |
The Create Algorithm Context (OPM, QC3CRTAX; ILE, Qc3CreateAlgorithmContext) API creates a temporary area for holding the algorithm parameters and the state of the cryptographic operation. The API returns a token which can be used on subsequent cryptographic APIs. The algorithm context token can be used to extend a cryptographic operation over multiple calls. The algorithm context can not be shared between jobs. It should be destroyed using the Destroy Algorithm Context (OPM, QC3DESAX; ILE, Qc3DestroyAlgorithmContext) API. If not explicitly destroyed, the algorithm context will be destroyed at job end.
The algorithm and associated parameters.
The format of the algorithm description is specified in the algorithm
description format name parameter.
The format of the algorithm description.
The possible format names follow.
See Algorithm Description Formats for a description of these formats.
The area to store the token for the created algorithm context.
Each token will contain an authentication value. If the token is used
on a subsequent API but with an incorrect authentication value, the user
will be subjected to a 10 second penalty wait. For each authentication error
in that job, the penalty wait will increase 10 seconds up to a maximum of 10 minutes.
The structure in which to return error information.
For the format of the structure, see Error Code
Parameter.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Block cipher algorithm |
4 | 4 | BINARY(4) | Block length |
8 | 8 | CHAR(1) | Mode |
9 | 9 | CHAR(1) | Pad option |
10 | A | CHAR(1) | Pad character |
11 | B | CHAR(1) | Reserved |
12 | C | BINARY(4) | MAC length |
16 | 10 | BINARY(4) | Effective key size |
20 | 14 | CHAR(32) | Initialization vector |
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Stream cipher algorithm |
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Public key algorithm |
4 | 4 | CHAR(1) | PKA block format |
5 | 5 | CHAR(3) | Reserved |
8 | 8 | BINARY(4) | Signing hash algorithm |
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Hash algorithm |
20 | DES Documented in FIPS 46-3. DES is no longer considered secure enough for today's fast computers. It should be used for compatibility purposes only. |
21 | Triple DES Documented in FIPS 46-3. |
22 | AES Documented in FIPS 197. |
23 | RC2 Documented in RFC 2268. |
1 | MD5 Documented in RFC 1321. |
2 | SHA-1 Documented in FIPS 180-2. |
3 | SHA-256 Documented in FIPS 180-2. |
4 | SHA-384 Documented in FIPS 180-2. |
5 | SHA-512 Documented in FIPS 180-2. |
0 | ECB |
1 | CBC |
2 | OFB. Not valid with AES or RC2. |
3 | CFB 1-bit. Not valid with AES or RC2. |
4 | CFB 8-bit. Not valid with AES or RC2. |
5 | CFB 64-bit. Not valid with AES or RC2. |
0 | No padding is performed. |
1 | Use the character specified in the pad character field for padding. |
2 | The pad counter is used as the pad character. This is equivalent to PKCS #5 padding. |
0 | PKCS #1 block type 00 |
1 | PKCS #1 block type 01 |
2 | PKCS #1 block type 02 This format is allowed on encryption and decryption operations only. |
3 | ISO 9796-1 This format is allowed on calculate signature and verify signature operations only. Because of security weaknesses, this format should be used for compatibility purposes only. |
4 | Zero pad This format is allowed on encryption and decryption operations only. The clear data is placed in the low-order bit positions of a string of the same bit-length as the key modulus. All leading bits are set to zero. |
5 | ANSI X9.31 This format is allowed on calculate signature and verify signature operations only. |
6 | OAEP |
50 | RSA Documented in Public-Key Cryptography Standard (PKCS) #1. |
0 | This algorithm context will not be used in a sign or verify operation. |
1 | MD5 Documented in RFC 1321. |
2 | SHA-1 Documented in FIPS 180-2. |
30 | RC4-compatible |
Message ID | Error Message Text |
---|---|
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C1E E | Required parameter &1 omitted. |
CPF3CF1 E | Error code parameter not valid. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
CPF9DD2 E | Algorithm description format name not valid. |
CPF9DD9 E | Effective key size not valid. |
CPF9DDA E | Unexpected return code &1. |
CPF9DDE E | Cipher algorithm not valid. |
CPF9DDF E | Block length not valid. |
CPF9DE0 E | Hash algorithm not valid. |
CPF9DE1 E | Initialization vector not valid. |
CPF9DE2 E | MAC (message authentication code) length not valid. |
CPF9DE3 E | Mode not valid. |
CPF9DE4 E | Pad option not valid. |
CPF9DE5 E | PKA (public key algorithm) block format not valid. |
CPF9DE6 E | Public key algorithm not valid. |
CPF9DEE E | Reserved field not null. |
Top | Cryptographic Services APIs | APIs by category |