I can find several whitebox AES 128 implementations on Github, such as wbaes-1, wbaes-2, wbaes-3, etc. All of them are developed based on WB AES encryption. Ideally, most implementations include two parts:
(1). Table_Generator.c (or .cpp, .h ...). Input: 16-byte key; Output: a big lookup table (e.g., table.h), where the key information is already hidden in this lookup table
(2). AES_Encrypt.c. Input: plain text & table generated from (1); Output: cipher text
But I need decryption implementation as well.
First, let me confirm one basic question:
- Encryption table & decryption table are generated separately, using one same key (e.g., 16 byte key for AES128)? Correct? which means there are two table generation algorithms (and hence two separate lookup tables) - one encryption, one for decryption.
Then, the main questions:
- What are the important steps to modify an WB encryption project into a WB decryption project?
- Is there any WB AES decryption implementation for me to read?