Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is possible to implement AES on 4-bit microcontroller? As far as I know, AES on 8-bit microcontroller are common especially for light weight application such as the RFID.

I have yet to come across AES been employed on 4-bit microcontroller, therefore I have been wondering whether such implementation is feasible.

share|improve this question
Using two 4 bit data structures you can construct an 8 bit data structure. So in that manner it is definitely possible to put AES on a 4-bit microcontroller. – mikeazo Feb 3 '12 at 15:53
can you elaborate more? – cLaRe Feb 3 '12 at 15:58
it would be similar to multiple precision integer arithmetic (see for details). – mikeazo Feb 3 '12 at 21:26

The paper Enabling Standardized Cryptography on Ultra-Constrained 4-bit Microcontrollers (page 255) describes such an implementation.

share|improve this answer
That's a good reading there... With a practical approach.. – uygar.raf Feb 17 '12 at 21:52

Yes, AES could be implemented on a 4-bit micro-controller such as this EM6626, and that would not be rocket science or stupidly slow. This application note illustrates that all kind of 8-bit operations are simple, and table lookups are possible.

In fact, tables are not even indispensable if performance is non-critical; see this minimalist AES source code in C which has a compilation option to avoid any table.

The most serious issue is the amount of RAM required: current 128-bit subkey and 128-bit data will eat half of the total 512-bit RAM of the above device.

Also worrying is the security: I know no 4-bit micro-controller with any kind of security evaluation. Thus I would trust such an implementation only if it is operated in a secure environment, and with a key that vanishes from the device after use. That's an appropriate security model for an enciphering machine, but not a copy-protection dongle.

share|improve this answer
thanks for the information. by any chance that AES in the field of GF((2^4)^2) would be efficient for 4-bit MCU in comparison to the AES in the field of GF((2^2)^4) and GF(((2^2)^2)^2)? – cLaRe Feb 6 '12 at 13:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.