1

I need a very light encryption scheme which costs almost no performance during encryption (while decryption may be slow).

I found 5 algorithms: RC4, DES, LED, PRESENT, and Piccolo.

But how do I pick one that's faster than AES on my platform?

enter image description here

Maarten Bodewes
  • 92,551
  • 13
  • 161
  • 313
Maestro
  • 1,069
  • 1
  • 10
  • 16
  • 4
    What are your actual limitations? The answer(s) to your question greatly depend on your platform, and how limited your ROM and RAM are. – Polynomial Mar 16 '15 at 14:26
  • And the requirements for the crypto of course. – Maarten Bodewes Mar 16 '15 at 15:26
  • What's your CPU? How much RAM and ROM do you have? How many CPU cycles can you afford for each byte of the message? – CodesInChaos Mar 16 '15 at 16:00
  • 3
    Also, what exactly do you mean by "lightweight?" It seems like it could refer to any of throughput, memory requirements (if it's implemented in software), code size (in software), power requirements, or size of a hardware implementation (in gates). Which of those things are you worried about? Different algorithms optimize for different ones of those. – cpast Mar 17 '15 at 02:00
  • Incidentally, this seems related to his other post, which has more details on his exact situation. – cpast Mar 17 '15 at 02:05
  • So your platform is ARM Cortex-M0 LPC11A14 at 48 MHz or similar? – LightBit Mar 18 '15 at 18:41
  • @LightBit Yes, but I underclocked to 12 Mhz instead of 48, and Im not running from RAM but from FLASH, so I will never reach those numbers. – Maestro Mar 19 '15 at 08:47
  • @cpast I mean power+memory requirements. Decryption can be very slow, but encryption (which is done on the device) must almost be costless like Virgene cipher. – Maestro Mar 19 '15 at 08:49
  • @Muis I think ChaCha is the best choice for this CPU. DES, LED, PRESENT, and Piccolo are fast in hardware, but slow in software. RC4 is good for 8-bit CPUs. – LightBit Mar 20 '15 at 21:40

1 Answers1

3

Salsa/ChaCha and the other eSTREAM winners are likely to be the "fastest but still secure" options today.

Don't forget authentication of course. Reduced-round ChaCha/Poly1305 is likely to be the fastest software-only option, due to tuned implementations in the libsodium and NaCl libraries.

UPDATED: The following slide deck has good info on state of the art lightweight block ciphers vs. legacy (along with source code links). Considers code size, RAM, and cycles/byte metrics for many algorthims).

Stream ciphers such as those from eSTREAM may be a better option than block ciphers. Even choosing RC4 and hardening it by dropping the first 512 bytes may be a good solution; code size doesn't get much smaller than RC4.

rmalayter
  • 2,297
  • 16
  • 24