28
Lightweight Cryptography From an Engineers Perspective Axel Poschmann ECC 2007

Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

Lightweight CryptographyFrom an Engineers Perspective

Axel Poschmann

ECC 2007

Page 2: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20072Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Acknowledgement

• Christof Paar• A. Bogdanov, L. Knudsen, G. Leander, M. Robshaw,

Y. Seurin, C. Vikkelsoe• S. Kumar

Page 3: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20073Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Outline

MotivationHardware vs. SoftwareSymmetric Lightweight CryptographyAsymmetric Lightweight CryptographyConclusion

Page 4: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20074Lightweight Cryptography From An Engineers Perspective Axel Poschmann

What is Lightweight Cryptography?

[Gligor05]:• Cryptography tailored to (extremely) constrained

devices • Not weak crypto• Not intended for all-powerful adversaries • Not intended to replace traditional cryptography

– But LWC should influence new algorithms• Also dubbed low-cost cryptography (Robshaw)

“As light as a feather and as hard as dragon scales”

Page 5: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20075Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Why Lightweight?

past

Mainframe(n : 1)

Personal (1 : 1)

Pervasive(1 : n)

present future

Pervasive = wireless + embedded + cheap = ASIC= constrained in CPU, memory, battery

Page 6: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20076Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Standard vs. Lightweight Cryptography

crypto =

footwear

ServerHighHighHigh

RFIDLowLow (few µW)Low

Standard Lightweightvs.App. scenario:

Throughput:Max. power:

Price:

Page 7: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20077Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Metric and Tradeoffs for LWC

Resistance against attacks

1

2 3

256 bits

80 bits

48 rounds

16 rounds

Throughput,Energy

Area,Power

parallelserial

Page 8: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20078Lightweight Cryptography From An Engineers Perspective Axel Poschmann

02468

10

Time (sec) Code size(KB)

Data RAM(KB)

Softw are

ISE

• SW is flexible…• But pervasive implies:

– High volumes => cheap devices– Power/Energy constraints

• Example: 160*160 bit multiplication-

36x faster

4x smaller

1.3x smaller

36x

faster

Source: [KP04]

Why Hardware?

Page 9: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.20079Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Outline

MotivationHardware vs. SoftwareSymmetric Lightweight CryptographyAsymmetric Lightweight CryptographyConclusion

Page 10: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200710Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Gate Equivalent

A1 A2 Z0 0 10 1 11 0 11 1 0

HDNAN2D19.677 µm²

NAND Standard CellsUMCL18G212T31

0

1 GENote for Mathematicians: NAND + constants = base

13.24 Mio GE

Athlon XP

Page 11: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200711Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Basic Gates

Gate GENOT 0.5NOR 1AND 1.33OR 1.33XOR 2.672-1-MUX 2.67

GF(2) ADD

GF(2) MUL

If(sel)

Page 12: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200712Lightweight Cryptography From An Engineers Perspective Axel Poschmann

S-Boxes in Hardware

AES-LUT 1000

AES-CF 300

DES 120

PRESENT 286 x 4

4 x 4

8 x 8

• LUT are realized as boolean functions

• Highly non-linear• High boolean

complexity• Big area

Page 13: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200713Lightweight Cryptography From An Engineers Perspective Axel Poschmann

S-Boxes in Software

6 x 4

4 x 4

8 x 8

const uint8_t PRESENT_Sbox[16] = {

...};

const uint8_t DES_SBox[64] ={

…};

256 B ROMconst uint8_t AES_Sbox[256] = {

....};

64 B ROM

16 B ROM

SW HW

Page 14: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200714Lightweight Cryptography From An Engineers Perspective Axel Poschmann

for ( PBit = 0, out = 0; PBit<64; PBit++ ){

out = rotate1l_64(out);out |= ( ( text >> 63-Pbox[PBit] ) & 1 );

}const uint8_t Pbox[64] ={0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60,1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49,53, 57, 61,2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46,50, 54, 58, 62,3, 7, 11, 15, 19, 23, 27, 31,35, 39, 43, 47, 51, 55, 59, 63

};

Hardware Software

PRESENT Permutation

– Just wires– No delay– 0 GE (some wiring)

– Cumbersome bit operations– 64 cycles– 64 B ROM

Page 15: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200715Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Flipflops/Register

6 - 12 GE per bit

Storage is very expensive in HW

55%29% 3%

11%

Minimum: state (64) + key (80) = 144*6 = 864 GE

Page 16: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200716Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Outline

MotivationHardware vs. SoftwareSymmetric Lightweight CryptographyAsymmetric Lightweight CryptographyConclusion

Page 17: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200717Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Evolution of LW Block Ciphers

Starting Point• AES [FWR05]• DES [VHV+88]

34003000

2309 2168

1570

1200

0

500

1000

1500

2000

2500

3000

3500

AES DES ser. DES DESXL PRESENT ser.PRESENT

Page 18: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200718Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Evolution of LW Block Ciphers

1. Step: Serialization• Serialized DES [LPP+07]2. Step: new S-layer• DESXL [LPP+07]

34003000

2309 2168

1570

1200

0

500

1000

1500

2000

2500

3000

3500

AES DES ser. DES DESXL PRESENT ser.PRESENT

Page 19: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200719Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Evolution of LW Block Ciphers

3. step: new cipher• PRESENT [BKL+07]Next step. • Serialized PRESENT

34003000

2309 2168

1570

1200

0

500

1000

1500

2000

2500

3000

3500

AES DES ser. DES DESXL PRESENT ser.PRESENT

TRIVIUM2599

GRAIN1294

Page 20: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200720Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Outline

MotivationHardware vs. SoftwareSymmetric Lightweight CryptographyAsymmetric Lightweight CryptographyConclusion

Page 21: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200721Lightweight Cryptography From An Engineers Perspective Axel Poschmann

ECC Implementations

3400 3000 2309 2168 1570 12000

5000

10000

15000

20000

25000

AES DES ser. DES DESXL PRESENT ser.PRESENT

23000

1294410113

0

5000

10000

15000

20000

25000

GF(2^191) GF(2^67)^2 GF(2^113)

[W04] [BGK+07] [KP06]

ECC 5-10 x bigger than block ciphers

Page 22: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200722Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Alternatives?

• NTRU• Very efficient in HW 3000 GE• Not yet stable => flexibility required

• MQ Algorithms • Yet another MQ algorithm broken (SFLASH 2007)• Have huge keys • eTTS 1KB• Quartz 70KB!!! => high storage effort => expensive

Page 23: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200723Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Why ECC?

ECC…• Has short key length• Has short processing time on 8-bit µC• Has short signatures

ECC is best suited for pervasive computing

Page 24: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200724Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Outline

MotivationHardware vs. SoftwareSymmetric Lightweight CryptographyAsymmetric Lightweight CryptographyConclusion

Page 25: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200725Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Conclusion

• Pervasive Computing implies severe constraints:• Small area• Low power• Low energy• Short messages

• S-boxes are expensive in HW…• …but cheap in SW (smaller are better)• Permutations can be very efficient in HW…• …and very cumbersome in SW• Storage is the most expensive part in hardware

Page 26: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200726Lightweight Cryptography From An Engineers Perspective Axel Poschmann

Conclusion

• Lightweight algorithms should…• Have a short internal state (to lower area)• Allow serialization (to lower power)• Have a short processing time (to lower energy)• Have a short output (to lower communication cost)• Should be based on the same primitive

• Lightweight block ciphers have similar footprint as stream ciphers

• NTRU might be an alternative to ECC if it becomes stable

• ECC is best suited for pervasive computing

Page 27: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

05.09.200727Lightweight Cryptography From An Engineers Perspective Axel Poschmann

References

[FWR05] M. Feldhofer, J. Wolkerstorfer, V. Rijmen, AES Implementation on a Grain of Sand, Information Security, IEE Proceedings, Vol. 152, Nr. 1, pp. 13-20, 2005

[BKL+07] Bogdanov, L.R. Knudsen, G. Leander, C. Paar, A. Poschmann, M.J.B. Robshaw, Y. Seurin, and C. Vikkelsoe"PRESENT: An Ultra-Lightweight Block Cipher". Cryptographic Hardware and Embedded Systems - CHES 2007, 9. International Workshop, Vienna, Austria, Proceedings. LNCS, Springer-Verlag, September 10 - 13, 2007

[LPP+07] Leander, C. Paar, A. Poschmann, K. Schramm "New Lightweight DES Variants". Fast Software Encryption 2007 - FSE 2007, Luxembourg City, Luxembourg, März 26-28, 2007.A.

[VHV+88] I. Verbauwhede, F. Hoornaert, J. Vandewalle, and H. De Man. Security and Performance Optimization of a New DES Data Encryption Chip. IEEE Journal of Solid-State Circuits, 23(3):647?656, 1988.

[KP04] Sandeep Kumar, Christof Paar, "Reconfigurable Instruction Set Extension for enabling ECC on an 8-bit Processor", International Conference on Field-Programmable Logic and Applications (FPL) 2004, Antwerp, Belgium, August 30 - September 1, 2004

[KP06] Sandeep Kumar and Christof Paar, Are Standards Compliant Elliptic Curve Cryptosystems feasibe on RFID?, Workshop on RFID Security 2006, Graz, Austria, Juli 2006

[BGK+07] L. Batina, J. Guajardo, T. Kerins, N. Mentens, P. Tuyls, and I. Verbauwhede, ``Public-Key Cryptography for RFID-Tags'', Proceedings of IEEE International Workshop on Pervasive Computing and Communication Security 2007, New York, USA 2007

[W04] Johannes Wolkestorfer, Hardware Aspects of Elliptic Curve Cryptography, Phd Thesis, Graz University of Technology, Graz, Austria, 2004

Page 28: Lightweight Cryptography - University College Dublingmg/ECC2007Talks/poschmann_LWC.pdf · 05.09.2007 Lightweight Cryptography From An Engineers Perspective Axel Poschmann 26 Conclusion

Questions?www.crypto.rub.de

[email protected]

Thank you!