-
Notifications
You must be signed in to change notification settings - Fork 0
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
if char 'd' 0x64 first in block - crypt string is broken #1
Comments
Hi Den, do you happen to have any more details? Maybe some sample code to reproduce failure? I haven't touched this project in a while but I'll see what I remember. |
ok, problem is char expect to replace 0x00, string end : )
is 0x00 0x2F 0xED 0x95 - trouble, is copy result to unsigned char or convert to char* decode is broken.. is code:
|
And where is plan of key size - 128,192,256 bits ? in code:
where is use 256 bit key ? |
Looks like i didn't bother to implement any more than 128 bit key :/. Shouldn't be too terrible to add the rest, I don't think. With respect to the sample above, do you have any more details? Inputs & expected outputs? Also note I tink the following code from your sample (when uncommented) overflows state and would break the pointer to the key.
|
Ok, test input string:
|
Gave the following a quick test and it seemed to work fine: void test_encrypt_decrypt() {
aes_t aes;
uint8_t key[] = "Hello world12345";
uint8_t plaintext[] = "{\"id\":94220,ddddddddddddddd\"\"dddddddddddddd,\"ip\"a:\"5,6,1,1,1,5,6\"ddddddddddddddddddddddddddddddddddddddddddddddddddda";
uint8_t encd[128];
uint8_t result[128];
aes_init(&aes, AES_128, key, sizeof(key)-1);
aes_encrypt(&aes, plaintext, sizeof(plaintext)-1, encd);
aes_init(&aes, AES_128, key, sizeof(key)-1);
aes_decrypt(&aes, encd, 128, result);
assert(memcmp(plaintext, result, sizeof(plaintext) - 1) == 0);
} That being said my C is a bit rusty so it could be wrong. Do you have any more details or perhaps an idea what the exact issue is? I'm open to pull requests. |
Hi!,
if char 'd' 0x64 first in block - next crypt string is broken..
where is fix? in rcon or sbox table?
The text was updated successfully, but these errors were encountered: