Specifications

P25 Development Guide
www.bluebamboo.com
40
3.4.13 P25 MK (Master key)/SK (Session Key) Encrypt
The purpose to set MK and SK is to ensure the printing commands in P25 safer than before. The
user can set MK/SK according to their request.
1. Encrypt Algorism
MK/SK only use 3Des algorism, Make message padding to multiple of 8 bytes first then using
pkcs#5, for eg:
data FF FF FF FF FF FF FF FF FF
after padding FF FF FF FF FF FF FF FF FF 07 07 07 07 07 07 07
data FF FF FF FF FF FF FF FF
after padding FF FF FF FF FF FF FF FF 08 08 08 08 08 08 08 08
If the key length is 48(master key), first encrypt with the beginning 24 bytes key then encrypt with
the rest 24 bytes key.
2. Reference application example:
We provide P25EncryptApp as the example which can be compiled and run under cygwin
environment.
Compile:
1. Install cygwin develop enviroment (www.cygwin.com)
2. make
Before running p25EncryptApp, the user can edit P25EncryptApp.ini as you needed.
2. Download master key
Master key download use clear text and length should be 48 bytes. It will be saved in P25 printer
permanently once it downloaded successfully. Each P25 printer can load 16 master keys, which
has their own key ID separately.
oper:
Use command "./P25EncryptApp set_master_key_down"
--------------------------------------------------------------------------------------------------------
6 [00000004] IRP_MJ_WRITE Length: 0061
Data: C0 8B 36 30 30 35 31 01 01 01 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12 34
56 78 90 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12 34 56 78
90 12 34 56 08 E1 C1
7 [00000033] IRP_MJ_READ Length: 0014
Data: C0 8C 36 30 30 30 34 01 01 01 00 00 01 C1