5.1.4.2 Decryption Example
This section provides an example of how the decrypt_secret routine defined in section 5.1.2 decrypts a given ciphertext value into cleartext using a session key, and given the following parameters:
|
Parameters |
Value |
|---|---|
|
Input |
af 78 44 03 fb a0 92 27 8c 95 fc 7e 88 56 4c cd 7c d0 c2 41 da 6f 14 41 56 26 cd a5 81 e9 22 3d |
|
sessionkey |
4e 98 c9 10 b2 a9 88 d7 92 fb 5a a3 3e 8e f7 86 |
The following table describes the values keyindex (defined in decrypt_secret) and input, InputKey, OutputKey, and output (defined in des_ecb_lm) after successive calls to des_ecb_lm_dec.
|
keyindex |
input |
InputKey |
OutputKey |
output |
|---|---|---|---|---|
|
0 |
af 78 44 03 fb a0 92 27 |
4e 98 c9 10 b2 a9 88 |
4f 4c 32 23 0b 94 a7 10 |
16 00 00 00 01 00 00 00 |
|
7 |
8c 95 fc 7e 88 56 4c cd |
d7 92 fb 5a a3 3e 8e |
d6 c8 bf 6b ab 19 fb 1c |
50 00 61 00 73 00 73 00 |
|
2 |
7c d0 c2 41 da 6f 14 41 |
c9 10 b2 a9 88 d7 92 |
c8 89 2c 54 98 46 5e 25 |
77 00 6f 00 72 00 64 00 |
|
9 |
56 26 cd a5 81 e9 22 3d |
fb 5a a3 3e 8e f7 86 |
fb ad a8 67 e9 76 df 0d |
31 00 32 00 33 00 00 00 |
The output variable fields are:
|
Parameters |
Value |
|---|---|
|
output->buffer |
50 00 61 00 73 00 73 00 77 00 6f 00 72 00 64 00 31 00 32 00 33 00 00 00 |
|
output->length |
0x16 |