IBM 2 Computer Hardware User Manual


 
CCA Release 2.54
PKA92 Key Format and Encryption Process
The PKA_Symmetric_Key_Export, PKA_Symmetric_Key_Generate, and the
PKA_Symmetric_Key_Import verbs optionally support a PKA92 method of
encrypting a DES or CDMF key with an RSA public key. This format is adapted
from the IBM Transaction Security System (TSS) 4753 and 4755 product's
implementation of “PKA92.” The verbs do not create or accept the complete PKA92
AS key token as defined for the TSS products. Rather, the verbs only support the
actual RSA-encrypted portion of a TSS PKA92 key token, the AS External Key
Block.
Forming an External Key Block: The PKA96 implementation forms an AS
External Key Block by RSA-encrypting a key block using a public key. The key
block is formed by padding the key record detailed in Figure C-5 with zero bits on
the left, high-order end of the key record. The process completes the key block
with three sub-processes: masking, overwriting, and RSA encrypting.
Masking Sub-process: Create a mask by CBC encrypting a multiple of 8 bytes of
binary zeros using K as the key and IV as the initialization vector as defined in the
key record at offsets 45 and 53. Exclusive-OR the mask with the key record and
call the result PKR.
Overwriting Sub-process: Set the high-order bits of PKR to B'01', and set the
low-order bits to B'0110'.
Exclusive-OR K and IV and write the result at offset 45 in PKR.
Write IV at offset 53 in PKR. This causes the masked and overwritten PKR to have
IV at its original position.
Encrypting Sub-process: RSA encrypt the overwritten PKR masked key record
using the public key of the receiving node.
Recovering a Key from an External Key Block: Recover the encrypted DES key
from an AS External Key Block by performing decrypting, validating, unmasking,
and extraction sub-processes.
Figure C-5. PKA96 Clear DES Key Record
Offset
(Bytes)
Length
(Bytes)
Description
Zero-bit padding to form a structure as long as the length of the public key modulus. The
implementation constrains the public key modulus to a multiple of 64 bits in the range of 512 to
1024 bits. Note that governmental export or import regulations can impose limits on the modulus
length. The maximum length is validated by a check against a value in the Function Control Vector.
000 005 Header and flags: X'01 0000 0000'
005 016 Environment Identifier (EID), encoded in ASCII
021 008 Control vector base for the DES key
029 008 Repeat of the CV data at offset 021
037 008 The single-length DES key or the left half of a double-length DES key
045 008 The right half of a double-length DES key or a random number. This value is
locally designated, K.
053 008 Random number, IV
061 001 Ending byte, X'00'
C-14 IBM 4758 CCA Basic Services, Release 2.54, February 2005