User Guide
DDOC0108-000-A2
CNS4 CSfC
11 - 3
Command Line Interface
Revision 0.0
11.2.2
cm_crypto
Syntax:
cm_crypto [ -h | --help ] | [ -v | --version ]
cm_crypto [ -p <hex> | --plaintext <hex>] & [ -k <hex> | --key <hex> ]
cm_crypto [ -c <hex> | --ciphertext <hex> ] & [ -k <hex> | --key <hex> ]
cm_crypto [ -t <hex> | --text <hex> ] & [ -k <hex> | --key <hex> ]
Description:
The cm_crypto command provides the user the ability to perform cryptographic operations on data
of their choosing. More specifically the user may use this utility to decrypt KEKs, encrypt DEKS,
and generate HMAC-SHA256s.
Options:
-h, --help.............................. Help
-v, --version ......................... Show version information
-p, --plaintext <hex> ............ Data to be used to perform AES256 Keywrap on. Must be a 32 byte
value represented by 64 hex characters
-c, --ciphertext <hex> .......... Data to be used to perform AES256 KeyUnwrap on. Must be a 40
byte value represented by 80 hex characters
-t, --text <hex>..................... Data to be used when calculating HMAC-SHA-256. Must be less than
a 64 byte value represented by 128 hex characters
.-k, --key <hex> ................... Key to be used against AES256 Keywrap / KeyUnwrap and HMAC-
SHA-256. Must be a 32 byte value represented by 64 hex characters
Example 1. P
erform AES256 KeyUnWrap
Example 2.
Perform AES256 KeyWrap
cns>
cm_crypto -c
aa6db2ebee5438665f49d4b228942a2a53b78552b7f16be37c77508b596bdc5998e5ba844947227f -k
0000000000000000000000000000000000000000000000000000000000001234
[cm_crypto]
ciphertext=0xaa6db2ebee5438665f49d4b228942a2a53b78552b7f16be37c77508b596bdc5998e
5ba844947227f
Key=0x0000000000000000000000000000000000000000000000000000000000001234
keyunwrap_output=0xb68dc04ac3ade0e9f883eded13a9a90e7b86d7b6a4c22c4d26b7344e8ce2e
f9b
[!cm_crypto]
cns>
cm_crypto -p c213a1e6d0cc9f61d2e7777d0c1a3b5cb70a3342e70252ae0773cb326cf17da9 -
k 0c56d2e4fa740fcf92119502f8ca88378190dbfb63c545909a26d478c6f595d0
[cm_crypto]
plaintext=c213a1e6d0cc9f61d2e7777d0c1a3b5cb70a3342e70252ae0773cb326cf17da9
key=0c56d2e4fa740fcf92119502f8ca88378190dbfb63c545909a26d478c6f595d0
keywrap_output=0xe9ed6d1cd711600f8c7f8eea6f22d9199bf85698b86ac2a5f6bf3a8c5e5359a7b9c79b4d3a1
bb39e
[!cm_crypto]