Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airkiss: add aes-cbc-128 decryption #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bigfeng12
Copy link

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 peiyong.feng@outlook.com

Use AES-CBC mode for decryption.

Signed-off-by: Peiyong Feng <peiyong.feng@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant