12

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.

Ilmari Karonen
  • 46,120
  • 5
  • 105
  • 181
cLaRe
  • 171
  • 3
  • 2
    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 03 '12 at 15:53
  • can you elaborate more? – cLaRe Feb 03 '12 at 15:58
  • 1
    it would be similar to multiple precision integer arithmetic (see http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf for details). – mikeazo Feb 03 '12 at 21:26

2 Answers2

12

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.

fgrieu
  • 140,762
  • 12
  • 307
  • 587
  • 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 06 '12 at 13:21
12

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

Conrado
  • 6,414
  • 1
  • 29
  • 44