Classification: Confidential

AFAIK, you do not want to use the CKDS. IIRC,  the CKDS is "Clear Key" .
You most likely would use the PKDS or TKDS;

Check the fine manuals. I may be all wet here.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Isabel
Sent: Friday, August 13, 2021 2:17 PM
To: [email protected]
Subject: ICSF Hash with a certain seed (Key)

[CAUTION: This Email is from outside the Organization. Unless you trust the 
sender, Don't click links or open attachments as it may be a Phishing email, 
which can steal your Information and compromise your Computer.]

Hello!

Our scenario:
We are running z/OS 2.2, Crypto Express 5 and FMID=HCR77B0

We want to calculate a hash using sha-256 with a certain secret key (or
seed) that is provided by someone external (and given to us). We are not sure 
how to store that key in the CKDS Dataset. The length of the key is 32 bits and 
has the form of n(1)n(2)....n(32) where each n(i) is an hexadecimal character 
(I don't know why...)

We already created and stored an AES master key in the cryptographic hardware 
and we also changed the format of our CKDS in order to use HMAC.

We tried different ways of putting this key in the CKDS using different verbs, 
like using a REXX example from the web (HMAC Generation from a Clear Key )

 In our mainframe we want to use the callable service (verb) CSNBHMG in a Cobol 
program to calculate the hash using the key stored in the CKDS. This output 
should be the same as the output using
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.freeformatter.com%2Fhmac-generator.html%23ad-output&amp;data=04%7C01%7Callan.staller%40HCL.COM%7C26b5cd1d2a284a35608e08d95e8ef12e%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637644790303663384%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sasJyU4SUgXiJGNCZuMx6ferZERdTxgMvDs7kgYWJos%3D&amp;reserved=0
 (with the same key).

Our biggest issue is how to put this secret key (or seed) in the CKDS dataset.

Any help will be appreciated,
Thanks in advance,
Andrea!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. E-mail transmission is not guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or may contain viruses in transmission. 
The e mail and its contents (with or without referred errors) shall therefore 
not attach any liability on the originator or HCL or its affiliates. Views or 
opinions, if any, presented in this email are solely those of the author and 
may not necessarily reflect the views or opinions of HCL or its affiliates. Any 
form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of this message without the prior written 
consent of authorized representative of HCL is strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any email and/or attachments, please check them for 
viruses and other defects.
________________________________

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to