- Zone C
the bytes in this zone gives the offset to the digest with the formula:
uint32_t offset = b[0] + b[1] + b[2] + b[3];
offset = offset % 728;
offset = offset + 12;
利用C区域的四个字节之和来计算出digest
的offset
.
- Zone E
HMACsha256 over enUre 1536 bytes except zone E (the digest itself) using fisrt 30 bytes from genuineFPKey as key.
uint8_t BaseRTMPProtocol::genuineFPKey[] = {
0x47, 0x65, 0x6E, 0x75, 0x69, 0x6E, 0x65, 0x20,
0x41, 0x64, 0x6F, 0x62, 0x65, 0x20, 0x46, 0x6C,
0x61, 0x73, 0x68, 0x20, 0x50, 0x6C, 0x61, 0x79,
0x65, 0x72, 0x20, 0x30, 0x30, 0x31, // Genuine Adobe Flash Player 001
0xF0, 0xEE, 0xC2, 0x4A, 0x80, 0x68, 0xBE, 0xE8,
0x2E, 0x00, 0xD0, 0xD1, 0x02, 0x9E, 0x7E, 0x57,
0x6E, 0xEC, 0x5D, 0x2D, 0x29, 0x80, 0x6F, 0xAB,
0x93, 0xB8, 0xE6, 0x36, 0xCF, 0xEB, 0x31, 0xAE
}; // 62
HMACsha256 利用以下部分进行加密:
除了E区域的所有部分
+ genuineFPKey的前30个字节
输出的256字节的密文,利用其前32位于E区域逐字节比较.
如果完全相同,则通过验证.
不过存在不相同,则不通过验证.
- Zone I
I: the client's public key from the DH key pair
- Zone L
The locaUon of the client's public key computed with this formula:
uint32_t offset = b[0] + b[1] + b[2] + b[3];
offset = offset % 632;
offset = offset + 772;
利用L区域的4个字节可计算出DH offset.
References:
RTMPEHandshake.pdf