Debian Codegraph @

man/man1/pkcshsm_mk_change.1.in

raw
1 .\" pkcshsm_mk_change.1
2 .\"
3 .\" Copyright IBM Corp. 2022
4 .\" See LICENSE for details.
5 .\"
6 .TH PKCSHSM_MK_CHANGE 1 "August 2022" "@PACKAGE_VERSION@" "openCryptoki"
7 .SH NAME
8 pkcshsm_mk_change \- utility to manage and control the re-enciphering of secure
9 keys for a concurrent HSM master key change for openCryptoki.
10
11 .SH SYNOPSIS
12 .B pkcshsm_mk_change
13 .I command
14 .RB [ OPTIONS ]
15 .
16 .PP
17 .B pkcshsm_mk_change
18 .BR \-\-help | \-h
19 .br
20
21 .SH DESCRIPTION
22 Manages and controls the re-enciphering of secure keys for a concurrent HSM
23 master key change for openCryptoki. Secure keys are encrypted by the HSM master
24 key(s). The HSM master key(s) must be changed (rolled) from time to time,
25 dependent on policies defined by the HSM security officer. Whenever a HSM master
26 key is changed, all secure keys that are encrypted with that HSM master key must
27 be re-enciphered with the new to be set master key.
28 .PP
29 Changing HSM master keys needs to be coordinated between the HSM security
30 officer and an openCryptoki administrator. The HSM security officer performs a
31 master key change via the TKE (Trusted Key Entry), while the openCryptoki
32 administrator performs administrative steps using the \fBpkcshsm_mk_change\fP
33 tool to re-encipher all openCryptoki token and session key objects, as well as
34 currently active crypto operation states with the new master key. Applications
35 using those keys can continue to run, the re-enciphering process takes place
36 transparently to them.
37 \fBImportant:\fB CCA does not support the concept of APQNs when running on AIX,
38 Linux on x64, and Linux on Power; whenever an APQN is being used as input, the
39 user must specify the value \fB0.0\fB.
40 .PP
41 A concurrent master key change works as follows:
42 .RS 2
43 .nr step 1 1
44 .IP "\n[step]." 3
45 The HSM security officer loads the new master keys using the TKE into the NEW
46 register of the set of APQNs logically belonging together.
47
48 .IP "\n+[step]." 3
49 The HSM security officer notifies the openCryptoki administrator that new master
50 keys have been loaded for all the APQNs.
51 .
52 .IP "\n+[step]." 3
53 The openCryptoki administrator uses the \fBpkcshsm_mk_change\fP to initiate a
54 master key change for openCryptoki, specifying the set of APQNs (and master key
55 types) that are to be changed. The \fBpkcshsm_mk_change\fP tool communicates
56 with running applications and performs/controls re-encipherment of the key
57 objects with the new master key.
58 .
59 .IP "\n+[step]." 3
60 When the \fBpkcshsm_mk_change\fP tool has completed its re-encipherment
61 processing, the openCryptoki administrator notifies the HSM security officer
62 that openCryptoki is ready to set/activate the new master keys.
63 .
64 .IP "\n+[step]." 3
65 The HSM security officer coordinates with other (non-openCryptoki) applications
66 and once all users of the APQNs are OK, he sets/activates the new master keys
67 on the APQNs.
68 .
69 .IP "\n+[step]." 3
70 The HSM security officer notifies the openCyptoki administrator when for all
71 APQNs the new master key have been set/activated.
72 .
73 .IP "\n+[step]." 3
74 The openCryptoki administrator uses the \fBpkcshsm_mk_change\fP tool to finalize
75 the master key change for openCryptoki. The tool communicates with running
76 applications and performs/controls finalizing the re-encipherment of the key
77 objects with the new master key.
78 .
79 .IP "\n+[step]." 3
80 When the \fBpkcshsm_mk_change\fP tool has completed its finalizing processing,
81 the master key change operation is complete.
82 .RE
83 .
84 .PP
85 The whole procedure can take an arbitrary amount of time. Especially the time
86 between the moment when the new master key has been loaded on all APQNs, and
87 the moment the new master keys are set/activated can even last several days,
88 due to time required for coordination with other (non-openCryptoki)
89 applications/users of the APQNs to prepare for the master key change.
90 .PP
91 The time to perform the re-encipherment and finalization (steps 3 and 7) of all
92 key objects as such depends on the amount of keys and openCryptoki applications
93 using them, but is usually relatively short, i.e. seconds up to a few minutes.
94 .PP
95 The system where openCryptoki runs may be restarted while a master key change
96 is ongoing, provided that the re-encipherment and finalization steps (steps 3
97 and 7) are not interrupted.
98 .PP
99 An ongoing master key change operation can be canceled using the
100 \fBpkcshsm_mk_change\fP tool, as long as for none of the APQNs the new master
101 key has been set/activated, that is up to step 5 from above.
102 .
103 .SH COMMANDS
104 .SS "Initiate a master key change for openCryptoki"
105 .
106 .B pkcshsm_mk_change reencipher
107 .RB [ \-\-apqns | \-a
108 .IR APQNS ]
109 .RB [ \-\-ep11\-wkvp | \-e
110 .IR WKVP ]
111 .RB [ \-\-cca\-sym\-mkvp | \-s
112 .IR MKVP ]
113 .RB [ \-\-cca\-asym\-mkvp | \-S
114 .IR MKVP ]
115 .RB [ \-\-cca\-aes\-mkvp | \-A
116 .IR MKVP ]
117 .RB [ \-\-cca\-apka\-mkvp | \-p
118 .IR MKVP ]
119 .RB [ \-\-verbose | \-v
120 .IR LEVEL ]
121 .PP
122 .
123 Use the \fBreencipher\fP command to initiate a master key change operation
124 for the specified APQNs and master key types and re-encipher all session and
125 token key objects of the affected tokens. For each master key type that is
126 changed, the verification pattern of the new, to be set master key must be
127 specified.
128 .PP
129 A CryptoExpress adapter in \fBCCA\fP coprocessor mode has 4 different master
130 keys: \fBSYM\fP, \fBASYM\fP, \fBAES\fP, and \fBAPKA\fP. The CCA token of
131 openCryptoki only uses SYM, AES, and APKA. Each master key type can be change
132 individually, or together with others. You can use the TKE or the
133 \fBpanel.exe\fP tool to query the master key verification patterns:
134 .B 'panel.exe --mk-query --mktype=<type> --mkregister=NEW'.
135 For master key types \fBSYM\fP and \fBASYM\fP, use the hex string under
136 \fB[RND]\fP, for types \fBAES\fP and \fBAPKA\fP use the hex string under
137 \fB[VER]\fP. For AES and APKA you can also find the master key verification
138 patterns in sysfs:
139 .B 'cat /sys/bus/ap/devices/<card>.<domain>/mkvps'.
140 .PP
141 A CryptoExpress adapter in \fBEP11\fP coprocessor mode has only one master key,
142 called the EP11 wrapping key (WK). You can use the TKE or the \fBep11info\fP tool
143 to query the current wrapping key verification pattern (WKVP) of an EP11 APQN:
144 .B 'ep11info -m <adapter> -d <domain> -D'.
145 You can also find the wrapping key verification pattern for EP11 APQNs in sysfs:
146 .B 'cat /sys/bus/ap/devices/<card>.<domain>/mkvps'.
147 .PP
148 the \fBpkcshsm_mk_change reencipher\fP command will query all available slots
149 and determine if the token in the slot is affected by the master key change,
150 based on the list of APQNs and master key types. For each affected slot, it
151 prompts for the \fBUSER pin\fP.
152 .PP
153 On successful completion, the id of the master key change operation is displayed.
154 This id must later be specified when finalizing or canceling the operation using
155 the \fBfinalize\fP or \fBcancel\fP command.
156 .
157 .SS "Finalize a master key change for openCryptoki"
158 .
159 .B pkcshsm_mk_change finalize
160 .RB [ \-\-id | \-i
161 .IR OPERATION-ID ]
162 .RB [ \-\-verbose | \-v
163 .IR LEVEL ]
164 .PP
165 .
166 Use the \fBfinalize\fP command to finalize a master key change operation when
167 the new master key has been activated on the APQNs. The id of the master key
168 change operation to finalize must be specified.
169 .
170 .SS "Cancel a master key change for openCryptoki"
171 .
172 .B pkcshsm_mk_change cancel
173 .RB [ \-\-id | \-i
174 .IR OPERATION-ID ]
175 .RB [ \-\-verbose | \-v
176 .IR LEVEL ]
177 .PP
178 .
179 Use the \fBcancel\fP command to finalize a master key change operation.
180 The id of the master key change operation to cancel must be specified.
181 A master key change operation can only be canceled as long as for none of the
182 APQNs the new master key have been set/activated.
183 .
184 .SS "List master key change operations"
185 .
186 .B pkcshsm_mk_change list
187 .RB [ \-\-id | \-i
188 .IR OPERATION-ID ]
189 .RB [ \-\-verbose | \-v
190 .IR LEVEL ]
191 .PP
192 .
193 Use the \fBlist\fP command to list currently active master key change
194 operations. If no operation ID is specified, all currently active master key
195 change operations are displayed, otherwise only the specified one is displayed.
196
197 .SH "OPTIONS"
198
199 .TP
200 .BR \-a ", " \-\-apqns\~\fIAPQNS\fP
201 Specifies a comma separated list of APQNs for which a master key change is to
202 be performed. Each APQN must be specified in the form \fB card.domain\fP, where
203 both \fBcard\fP and \fBdomain\fP are in hex, as displayed by the \fBlszcrypt\fP
204 command. Multiple APQNs are separated by a comma.
205 This options is only valid with the \fBreencipher\fP command.
206 .TP
207 .BR \-e ", " \-\-ep11\-wkvp\~\fIWKVP\fP
208 Specifies the EP11 wrapping key verification pattern (WKVP) of the new, to be
209 set EP11 wrapping key as a 16 bytes hex string.
210 This options is only valid with the \fBreencipher\fP command.
211 You can use the TKE or the \fBep11info\fP tool to query the current wrapping key
212 verification pattern (WKVP) of an EP11 APQN:
213 .B 'ep11info -m <adapter> -d <domain> -D'.
214 You can also find the wrapping key verification pattern for EP11 APQNs in sysfs:
215 .B 'cat /sys/bus/ap/devices/<card>.<domain>/mkvps'.
216 .TP
217 .BR \-s ", " \-\-cca\-sym\-mkvp\~\fIMKVP\fP
218 Specifies the CCA master key verification pattern (MKVP) of the new, to be
219 set CCA SYM master key as a 8 bytes hex string.
220 This options is only valid with the \fBreencipher\fP command.
221 You can use the TKE or the \fBpanel.exe\fP tool to query the master key
222 verification patterns:
223 .B 'panel.exe --mk-query --mktype=SYM --mkregister=NEW'.
224 Use the hex string under \fB[RND]\fP.
225 .TP
226 .BR \-S ", " \-\-cca\-asym\-mkvp\~\fIMKVP\fP
227 Specifies the CCA master key verification pattern (MKVP) of the new, to be
228 set CCA ASYM master key as a 8 bytes hex string.
229 This options is only valid with the \fBreencipher\fP command.
230 You can use the TKE or the \fBpanel.exe\fP tool to query the master key
231 verification patterns:
232 .B 'panel.exe --mk-query --mktype=ASYM --mkregister=NEW'.
233 Use the hex string under \fB[RND]\fP.
234 .TP
235 .BR \-A ", " \-\-cca\-aes\-mkvp\~\fIMKVP\fP
236 Specifies the CCA master key verification pattern (MKVP) of the new, to be
237 set CCA AES master key as a 8 bytes hex string.
238 This options is only valid with the \fBreencipher\fP command.
239 You can use the TKE or the \fBpanel.exe\fP tool to query the master key
240 verification patterns:
241 .B 'panel.exe --mk-query --mktype=AES --mkregister=NEW'.
242 Use the hex string under \fB[VER]\fP.
243 You can also find the AES master key verification patterns in sysfs:
244 .B 'cat /sys/bus/ap/devices/<card>.<domain>/mkvps'.
245 .TP
246 .BR \-p ", " \-\-cca\-apka\-mkvp\~\fIMKVP\fP
247 Specifies the CCA master key verification pattern (MKVP) of the new, to be
248 set CCA APKA master key as a 8 bytes hex string.
249 This options is only valid with the \fBreencipher\fP command.
250 You can use the TKE or the \fBpanel.exe\fP tool to query the master key
251 verification patterns:
252 .B 'panel.exe --mk-query --mktype=APKA --mkregister=NEW'.
253 Use the hex string under \fB[VER]\fP.
254 You can also find the APKA master key verification patterns in sysfs:
255 .B 'cat /sys/bus/ap/devices/<card>.<domain>/mkvps'.
256 .TP
257 .BR \-i ", " \-\-id\~\fIOPERATION-ID\fP
258 Specifies the id of the master key change operation for the \fBfinalize\fP,
259 \fBcancel\fP, or \fBlist\fP command. On successful completion of the
260 \fBreencipher\fP command, the id of the master key change operation is
261 displayed.
262 .TP
263 .BR \-v ", " \-\-verbose\~\fILEVEL\fP
264 Specifies the verbose level (optional): \fBnone\fP (default), \fBerror\fP,
265 \fBwarn\fP, \fBinfo\fP, \fBdevel\fP, or \fBdebug\fP.
266 .TP
267 .BR \-h ", " \-\-help
268 Displays help text and exits.
269
270 .SH SEE ALSO
271 .PD 0
272 .TP
273 \fBopencryptoki\fP(7)
274 .PD