"SA" command

Mar 2, 2016 at 10:15 AM
Does any one know how the SA (SB) command works? Cannot find any information on it, and cannot figure out myself, any help appreciated.
Editor
Mar 9, 2016 at 2:25 PM
Hi,

SA/SB command is a customisation added to 1141-0802 HSM8000 firmware - Export a key using 3DES/CBC mode. The structure of command is as follows:
Command:
Header - m A - command header
Command code - 2 A - value 'SA'
Key tyoe - 3 H - key from key type table 
ZMK - 32 H or 1A + 32 H or 1 A + 48 H - ZMK key (000)
Key to be exported - 1A + 32 H or 1 A + 48 H - Key under LMK
IV - 16 H - Initial vector
Atalla Variant - 1 N or 2 N - optional, Atalla Variant, if it is enabled in CS
Delimiter - 1 C - optional, value 0x19
Message Trailer - n A - optional 

Response:
Header - m A - response header, the same as in command
Response code - 2 A - value 'SB'
Error code - 2 N - error code as in error code table in Host Command Reference Manual
Key under ZMK - 32 H or 48 H - key under ZMK
KCV - 6 H - key check value
Delimiter - 1 C - optional, value 0x19
Message trailer - n A - optional, as in commnad
Regards,
Juris
Mar 9, 2016 at 5:55 PM
Thank you so much! Unfortunately, what I found just recently, that it looks like, the same command can be customized differently for different customers (upon request), so the same SA/SB and SC/SD commands can have completely different functions for two different HSM modules, depending on what kind of customization were made. I'm sorry I did not know that when I asked the question.