Hello,
I am implementing a Key Security Module(KSM) for FairPlay.
For now I am working with the sample spc1.bin and ckc1.bin files while implementing KSM.
I decrypted spc1.bin and all the blocks are matched with the blocks on the programming guide.(FairPlayStreaming_PG.pdf)
So far everything is OK with the SPC data.
I have started CKC part, the first thing you should do is encrypting ContentKey with the SessionKey which is sent in the SPC SKR1 payload.
These are the keys which I decrypt the SPC payload and get this SessionKey from spc1.bin.
SessionKey= AF B4 6E 7B F5 F3 15 96 C1 C6 76 DC 15 E1 4D C6
And in the sdk folders there is a file (Key.txt) for ContentKey and Initialization Vector for Asset "Twelve"
For asset Id “twelve”
Key = {0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C},
IV = {0xD5,0xFB,0xD6,0xB8,0x2E,0xD9,0x3E,0x4E,0xF9,0x8A,0xE4,0x09,0x31,0xEE,0x33,0xB7}
For content key encryption I am using AES/ECB with no padding, with 0 InitializationVector like below. Because with ECB mode IV is ignored.
IV for AES/ECB= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
And with all these info, this is what I got when I encrypt the ContentKey with SessionKey:
41 FF 6A 67 CF C0 75 0E 08 42 29 1C F2 16 AC 8C
But on documentation(FairPlayStreaming_PG.pdf) it is:
3d 56 43 97 87 8b 70 43 e1 54 31 f1 f8 6b c5 62
Am I doing something wrong here or did they use another ContentKey for this documentation?
As I said above my Cryptography functions work as they should be because everything except ContentKey encryption works as expected and matches with the documentation.
Best regards,
Barbaros.