Airkiss
Airkiss copied to clipboard
Airkiss: add aes-cbc-128 decryption
Use AES-CBC mode for decryption after hack of wechat official AES lib, and the AES-key and IV is the same verfied and confirmed by test vector:
struct cbc_test {
u8 key[16];
u8 iv[16];
u8 plain[32];
u8 cipher[32];
size_t len;
} cbc = {
{
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38
},
{
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38
},
{
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x31, 0x01
},
{
0xb7, 0xfc, 0x2b, 0x0e, 0xa4, 0x78, 0x01, 0xd2,
0x4a, 0x1f, 0x04, 0x9e, 0xb2, 0x9c, 0xbe, 0x84
},
16
};
Signed-off-by: Peiyong Feng [email protected]