qistoph / arduinoaes256 Goto Github PK
View Code? Open in Web Editor NEWIlya's byte-oriented AES-256 implementation implemented for Arduino
Ilya's byte-oriented AES-256 implementation implemented for Arduino
Hi, is there some data available about the memory usage of this nice code?
Perhaps I want to use it on an ATmega328p with 32k flash and 2k RAM.
Thanks in advance, Karl
If I change the data
in the examples to 32 bytes, for instance:
uint8_t data[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
};
the output on the serial monitor is:
Key:
0001020304050607000102030405060700010203040506070001020304050607
Unencrypted data:
000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F
Encrypted data:
7EE7EF984D51B1E3E1A31F8559988CF2000102030405060708090A0B0C0D0E0F
Back decrypted data:
000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F
As you can see, only the first 16 bytes are being encrypted (7EE7EF984D51B1E3E1A31F8559988CF2
); the rest is still cleartext. Why is that?
The library works great on a single processor. However if you encrypt the same string with the same keys, each processor (a duo and a pro mini), will generate a slightly different encrypted data array.
Is there something I am missing, or can do in order to "sync" the encription/ decription across multiple processors on a i2c bus?
Hi, when i try the example code it gives me this. The encrypted data is not normal, and more than 32byte because of the FFFFFF's. What are they ? I couldn't understand the problem. When i tried to write bytes one by one ( by doing a for loop ) i didn't get them.
Initializing AES256...
Key:
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Unencrypted data:
61736466617364666173646661736466
Encrypted data:
024117FFFFFFFD2E737145582CFFFFFF976F47FFFFFFBEFFFFFFDA20
Back decrypted data:
61736466617364666173646661736466
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.