Set Master Key (QC3SETMK, Qc3SetMasterKey) API


  Required Parameter Group:

1 Master key ID Input Binary(4)
2 Key verification value Output Char(20)
3 Error code I/O Char(*)

 Service Program Name: QC3MKSET

 Default Public Authority: *EXCLUDE

 Threadsafe: Yes

The Set Master Key (OPM, QC3SETMK; ILE, Qc3SetMasterKey) API sets the specified master key from the parts already loaded.

For more information about master keys, see Cryptographic services key management.


Authorities and Locks

Required special authority
*ALLOBJ and *SECADM

Required Parameter Group

Master key ID
INPUT; BINARY(4)

The master key IDs are

1 Master key 1
2 Master key 2
3 Master key 3
4 Master key 4
5 Master key 5
6 Master key 6
7 Master key 7
8 Master key 8
-1 ASP master key
-2 Save/restore master key

Key verification value
OUTPUT; CHAR(20)

The key verification value (KVV) can be used to determine if the master key has changed.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Completion Messages

Message ID Completion Message Text
CPC9EDA C Master key &1 has been set.


Error Messages

Message ID Error Message Text
CPF222E E &1 special authority is required.
CPF24B4 E Severe error while addressing parameter list.
CPF3C1E E Required parameter &1 omitted.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPD9D88 E An error occurred during exit program post-processing.
CPD9D89 E An error occurred during exit program pre-processing.
CPF9D90 E Master Key &1 was not set due to an exit program cancel.
CPF9D94 E A pending value exists for a master key.
CPF9DAD E The master key ID is not valid.
CPF9DB0 E No key parts have been loaded.
CPF9DDA E Unexpected return code &1.



API introduced: V5R4

[ Back to top | Cryptographic Services APIs | APIs by category ]