-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Made the key const, since it could be in ROM. Made 'Multiply' a function... #3
Conversation
…ion instead of a macro, this reduces the code size. Corrected the test vectors in the comments.
Hey dude, I'm glad you like the code! And thanks for improving on it :) From ~2K to 1268 bytes is really a big improvement! Kind regards /Mikkel On 04/12/14 13:28, jcallan wrote:
|
I can't reproduce the size improvements you've made with your additions. Actually, moving Multiply into a function increases code size here, from 2087 bytes to 2131 bytes.
I know the IAR compiler has a rep for generating tight code. Which version are you using? |
Interesting! I am using Keil armcc.exe v4.1.0. Which is quite old now (2011). My version:
Your version:
|
I am really impressed by the output of your compiler! :) What about you add a #define and a comment with a link to this issue so people can make a qualified decision. What do you think about that? Then I'll merge. Oh and by the way, I misread Keil as IAR when I read your first post. So when I was referencing IAR, I was talking about your Keil compiler. For the record I am using the free Mentor Graphics / GCC ARM toolchain. Sorry about the misunderstanding. |
Yes, perfect! |
@jcallan Okay since I have a few hours on my hand tonight, I became impatient and decided to add some of the revisions you've proposed. I'll commit them in a few minutes. |
Mikkel, I am not declaring key as const - it is a pointer to something that is const. So I am saying to the compiler "don't allow writes to the data that key points to". A constant pointer would be |
Okay, that makes sense. The pointer points to const data, but is not const itself. Will add it right away. Thanks for improving the code base :) |
@jcallan I've added your proposed edits, so unless you have any objections, I'll close this issue. |
That's great, thanks. |
Hi Kokke, Btw, I only use cbc, because ebc is almost every time prone to replay or chosen plaintext (and more) attacks. Therefore I was disappointed by TI's solution (which was mentioned above). Thanks again, for the good job. |
Great work, I compiled for atmega, atxmega E5 series, it works perfectly. |
Just a note as reference for others. |
hello friends, any one help me for tiny-AES128CBC library how to used in this library salt and iteration count. |
Hi Kokke, thanks for writing such a small AES! I have made a few little changes which (hopefully) improve it even more. When I compile it using the ARM Keil compiler it now only uses 1268 bytes total.
Jon.