How did you use the ICSF panels to create the key? If you used KGUP, you will 
need to refresh the CKDS to see the updates.

Also, once you get that sorted, the call is going to fail anyway. CSNBENC uses 
DES/TDES keys. It doesn't support AES keys. You will need to switch to CSNBSAE 
for AES key support.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Pierre Fichaud
Sent: Tuesday, October 11, 2022 2:15 PM
To: [email protected]
Subject: [EXTERNAL] CSNBENC rc=8 rsn=X'271C'

Using the ICSF panels, I created an AES DATA key (128 bits) called MY.DATA.KEY

I fed this into a CSNBENC call and got rc=8 rsn=x'271C'.
I'm not sure what I am doing wrong.

key-identifier (or label) is MY.DATA.KEY padded with blanks to 64 bytes 
init-vector is XL8'00'
rule array is IPS,INITIAL,TOKEN each 8-bytes and padded with blanks.

Regards, Pierre.

271C (10012) A key label was supplied for a key identifier parameter. This 
label is the label of a key in the in-storage CKDS or PKDS. A key record with 
that label (and the specific type if required by the ICSF callable service) 
could not be found. For a retained key label, this error code is also returned 
if the key is not found in the CCA coprocessor specified in the PKDS record.
User action: Check with your administrator if you believe that this key should 
be in the in-storage CKDS or the PKDS. The administrator may be able to bring 
it into storage. If this key cannot be in storage, use a different label.
REASONCODES: TSS 01E (030)

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

Reply via email to