hsm

Extract Key from a tr31 key block (exporting from HSM Thales 9000)


Using the HSM command A0 (Generate a Key), I am getting the below response.

HEADA100U7D4213E0422F4E08E9455D9837E09FDDRA0072B1TX00S000073C35FF96F7A8C7D35D440CCBDA06FFED3AC7017F27B0A0E8896FFC971F0B9
HEAD (Message Header)
A1   (Response Code)
00   (Error Code)
U7D4213E0422F4E08E9455D9837E09FDD (Key under LMK)
RA0072B1TX00S000073C35FF96F7A8C7D35D440CCBDA06FFED3AC7017F27B0A0E8896FFC9 (Key under TMK - export tr31 key block)
71F0B9 (Key Check Value)

My questions are:

How can I extract the key (under tmk) from tr31 key block?

Does anyone know how to decode the tr31 key block?


Solution

  • Take a look at the TR31 standard (which isn't legally available for free, because ANSI wants to make your life miserable).

    To go any further (decrypt the encrypted key) I would need the Key Block Protection Key (which is probably the TMK?).