Closed wiryonolau closed 5 months ago
This is indeed error from secure coding perspective, however in this case it is intentional to have the static IV.
Updated the simulation Apparently when calling encrypt , aeslib change the iv variable. So I have to copy it first before doing encrypt.
The IV is supposed to be rolling. Just examples are resetting it for simplicity so it doesn’t have to be transferred. uint32 is too short for block cipher. You should use stream cipher (ChaCha/Poly kind).M. 11. 6. 2024 v 3:22, Sakya @.***>: Updated the simulation Apparently when calling encrypt , aeslib change the iv variable. So I have to copy it first before doing encrypt.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
The IV is supposed to be rolling. Just examples are resetting it for simplicity so it doesn’t have to be transferred. uint32 is too short for block cipher. You should use stream cipher (ChaCha/Poly kind).M. 11. 6. 2024 v 3:22, Sakya @.***>: Updated the simulation Apparently when calling encrypt , aeslib change the iv variable. So I have to copy it first before doing encrypt.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
I see. My message is short max at 4 byte, so uint32 is suffice.
it is working ok if I copy the iv to other variable before encrypt.
Thanks.
Just set the same IV before each encrypt, as in examples. It’s not 100% secure, but still better than sending plaintext.
Cheers, Matej
On 13. 6. 2024, at 1:18, Sakya @.***> wrote:
The IV is supposed to be rolling. Just examples are resetting it for simplicity so it doesn’t have to be transferred. uint32 is too short for block cipher. You should use stream cipher (ChaCha/Poly kind).M. 11. 6. 2024 v 3:22, Sakya @.***>: Updated the simulation Apparently when calling encrypt , aeslib change the iv variable. So I have to copy it first before doing encrypt.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
I see. My message is short max at 4 byte, so uint32 is suffice.
it is working ok if I copy the iv to other variable before encrypt.
Thanks.
— Reply to this email directly, view it on GitHub https://github.com/suculent/thinx-aes-lib/issues/76#issuecomment-2164047192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWFRYMB3PG4CSM6K2AFETZHDJKZAVCNFSM6AAAAABJCPKVGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGA2DOMJZGI. You are receiving this because you commented.
Hi , I have problem encrypting uint32_t message
wokwi simulation
Is there an error in my code
Here is example result Encrypted message always equal iv