Lightweight Block Cipher Design Gregor Leander DTU Mathematics, - - PowerPoint PPT Presentation

lightweight block cipher design
SMART_READER_LITE
LIVE PREVIEW

Lightweight Block Cipher Design Gregor Leander DTU Mathematics, - - PowerPoint PPT Presentation

Motivation Industry Academia We Start To Cheat... And Fail! Lightweight Block Cipher Design Gregor Leander DTU Mathematics, Denmark ECRYPT II summer school May/June 2011 G. Leander Lightweight Block Cipher Design Motivation Industry


slide-1
SLIDE 1

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Block Cipher Design

Gregor Leander

DTU Mathematics, Denmark

ECRYPT II summer school May/June 2011

  • G. Leander

Lightweight Block Cipher Design

slide-2
SLIDE 2

Motivation Industry Academia We Start To Cheat... And Fail!

Outline

1

Motivation

2

Industry

3

Academia

4

We Start To Cheat... And Fail!

  • G. Leander

Lightweight Block Cipher Design

slide-3
SLIDE 3

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

What is (not) Lightweight Cryptography Cryptography tailored to (extremely) constrained devices Not intended for everything Not intended for extremely strong adversaries Not weak cryptography Here we focus on block ciphers

  • G. Leander

Lightweight Block Cipher Design

slide-4
SLIDE 4

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

Figure: Upcoming IT-Landscape

  • G. Leander

Lightweight Block Cipher Design

slide-5
SLIDE 5

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

Question Why do we need Lightweight Crypto? Upcoming IT-Landscape is pervasive Many cheap devices (Extremely) constrained in

computational power battery memory

  • G. Leander

Lightweight Block Cipher Design

slide-6
SLIDE 6

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

Question What about standard algorithms? AES is great for almost everywhere Mainly designed for software It is too expensive for very small devices It protects data stronger than needed

  • G. Leander

Lightweight Block Cipher Design

slide-7
SLIDE 7

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

Why not simply wait 18 month? Moore’s Law Devices become cheaper. Conclusion There is a strong need for new algorithms

  • G. Leander

Lightweight Block Cipher Design

slide-8
SLIDE 8

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography

Figure: Tradeoffs between Security/Throughput/Area

  • G. Leander

Lightweight Block Cipher Design

slide-9
SLIDE 9

Motivation Industry Academia We Start To Cheat... And Fail!

Lightweight Cryptography: Industry vs. Academia

Industry Non-existence of lightweight block ciphers a real problem since the 90’s. Many proprietary solutions Often: not very good. Academia Research on Lightweight block ciphers started only recently. Several proposals available. Still: some open questions.

  • G. Leander

Lightweight Block Cipher Design

slide-10
SLIDE 10

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Examples

Algorithms Used In Real Products Keeloq DST DECT, C2, Mifare,... What they have in common: efficient proprietary/not public (violates Kerckhoffs’ principle) non standard designs not good A lot more out there...

  • G. Leander

Lightweight Block Cipher Design

slide-11
SLIDE 11

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Keeloq

Keeloq A 32 bit block-cipher with a 64 bit key. Developed by Gideon Kuhn (around 1985). Sold for 10M$ to Microchip Technology Inc (1995). Algorithm for remote door openers: Cars, Garage, ... Used by: Chrysler, Daewoo, Fiat, GM, Honda, Toyota, Volvo, Volkswagen Group,...

  • G. Leander

Lightweight Block Cipher Design

slide-12
SLIDE 12

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Keeloq: Overview

Figure: Overview of Keeloq

  • G. Leander

Lightweight Block Cipher Design

slide-13
SLIDE 13

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Design Principles of Keeloq

Keeloq Unbalanced Feistel-cipher. Many, very simple rounds. small block size. relatively small key.

  • G. Leander

Lightweight Block Cipher Design

slide-14
SLIDE 14

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Attacks on Keeloq

Keeloq is broken (Biham, Dunkelman, Indesteege, Keller, Preneel 2008): Known plaintext: 216 plain-text/cipher-text pairs and 500 CPU days of computation. Chosen plaintext: 216 plain-text/cipher-text pairs and 200 CPU days of computation. Main weakness here: Key-scheduling is periodic. Side-Channel attack (Eisenbarth, Kasper, Moradi, Paar, Salmasizadeh, Shalmani 2008): 10 encryptions, negligible computation. Often: The master-key can be found. Summary Practical attacks with real consequences.

  • G. Leander

Lightweight Block Cipher Design

slide-15
SLIDE 15

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

DST

DST A 40 bit block cipher with a 40 bit key. Developed by Texas Instruments Used in Exxon-Mobil Speedpass payment system (approximately 7 million transponders) In vehicle immobilizer systems of Ford, Lincoln, Mercury, Toyota, Nissan. following Wikipedia: “one of the most widely-used unbalanced Feistel ciphers in existence”

  • G. Leander

Lightweight Block Cipher Design

slide-16
SLIDE 16

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

DST: Overview

Figure: Overview of DST

  • G. Leander

Lightweight Block Cipher Design

slide-17
SLIDE 17

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Design Principles of DST

DST Unbalanced Feistel-cipher. Many, very simple rounds. small block size. very small key. non-standard key mixing.

  • G. Leander

Lightweight Block Cipher Design

slide-18
SLIDE 18

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Attacks on DST

No attacks needed! Brute Force feasible. One a PC: Several weeks With specialized hardware (COPACOBANA 10kEUR): 9 min. Main weakness here: small key Question Is the design sound? Summary Practical attacks with real consequences.

  • G. Leander

Lightweight Block Cipher Design

slide-19
SLIDE 19

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

Why?

Question Why do they do that? Answer I They do not know better Answer II They have to. Often a combination of both.

  • G. Leander

Lightweight Block Cipher Design

slide-20
SLIDE 20

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

How?

Some common design principles: Relative small block-size Relative small key-size Many simple rounds We can learn from that! We will rediscover (some of) those in the modern lightweight block ciphers

  • G. Leander

Lightweight Block Cipher Design

slide-21
SLIDE 21

Motivation Industry Academia We Start To Cheat... And Fail! Keeloq DST What Can We Learn For Those?

How?

Some weaknesses: Overly simplified key scheduling Non-standard components We can learn from that!? We will rediscover (some of) those in the modern lightweight block ciphers

  • G. Leander

Lightweight Block Cipher Design

slide-22
SLIDE 22

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Why?

Question Why do they do that? Answer II They have to. We need secure well analyzed public ciphers for highly resource constrained devices.

  • G. Leander

Lightweight Block Cipher Design

slide-23
SLIDE 23

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

General Design Philosophy

Guidelines/Goals Efficiency: Here mainly area Simplicity Security

  • G. Leander

Lightweight Block Cipher Design

slide-24
SLIDE 24

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Considerations: Hardware

Hardware What do things cost in hardware? Suggestion Make it an interdisciplinary project!

  • G. Leander

Lightweight Block Cipher Design

slide-25
SLIDE 25

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Cost Overview

Question What should/should not be used? Rule of Thumb: NOT: 0.5 GE NOR: 1 GE AND: 1.33 GE OR: 1.33 XOR: 2.67 Registers/Flipflops: 6 − 12 GE per bit!

  • G. Leander

Lightweight Block Cipher Design

slide-26
SLIDE 26

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Decisions I

Question Block size/ Key size? Storage (FF) is expensive in hardware. Block size of 128 is too much. We do not have to keep things secret forever. Decision Relative Small Block Size: 32,48 or 64 Key size: 80 bit often enough

  • G. Leander

Lightweight Block Cipher Design

slide-27
SLIDE 27

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Decisions

Question Feistel vs. SP-Network?

  • G. Leander

Lightweight Block Cipher Design

slide-28
SLIDE 28

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Feistel Cipher

Figure: Feistel Cipher (DES)

  • G. Leander

Lightweight Block Cipher Design

slide-29
SLIDE 29

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

SP-Network

Figure: SP-Network (AES)

  • G. Leander

Lightweight Block Cipher Design

slide-30
SLIDE 30

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Decisions

Question Feistel vs. SP-Network? Pro-Feistel: Potentially Reduced complexity. (Strongly) unbalanced Feistel. Decryption can be almost free. Pro-SP: Often: Encryption only. Less rounds/Easier to analyze? Decision Both reasonable.

  • G. Leander

Lightweight Block Cipher Design

slide-31
SLIDE 31

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

SP-Network

SP-Network We have to design S-Layer P-Layer Key-scheduling Here we focus on the S-Layer and the P-Layer.

  • G. Leander

Lightweight Block Cipher Design

slide-32
SLIDE 32

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Issues

Design Issues The S-Layer has to maximize nonlinearity. It has to be cheap. The S-Layer consist of a number of Sboxes executed in parallel Si : Fb

2 → Fb 2

In hardware realized as Boolean functions.

  • G. Leander

Lightweight Block Cipher Design

slide-33
SLIDE 33

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Issues

Question Different Sboxes vs. all Sboxes the same? A serialized implementation becomes smaller if all Sboxes are the same. Decision Only one Sbox.

  • G. Leander

Lightweight Block Cipher Design

slide-34
SLIDE 34

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Design Issues

Question What size of Sbox? In general: The bigger the Sbox the more expensive it is in hardware.

  • G. Leander

Lightweight Block Cipher Design

slide-35
SLIDE 35

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Sbox Costs

Figure: Comparison of Sboxes

  • G. Leander

Lightweight Block Cipher Design

slide-36
SLIDE 36

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

P-Layer

Design Issues The P-Layer has to maximize diffusion. It has to be cheap. Many modern ciphers: MDS codes (great diffusion!) DES: Bit permutation (no cost!) Design Decision Use less diffusion per round Use more rounds

  • G. Leander

Lightweight Block Cipher Design

slide-37
SLIDE 37

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Feistel Cipher

Feistel Cipher We have to design a function F : Fn

2 → Fm 2

Inspired by practice: Make m small! (Highly) unbalanced Feistel cipher. Mix with m key bits.

  • G. Leander

Lightweight Block Cipher Design

slide-38
SLIDE 38

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

How far can you go?

Memory Given a block-size and a key-size the (minimal) memory requirements are fixed. Focus on Area Minimize the overhead to this. PRESENT: 80 percent memory KATAN: ≈ 90 percent memory Even doing nothing is not a lot cheaper!

  • G. Leander

Lightweight Block Cipher Design

slide-39
SLIDE 39

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

How far can you go?

Even doing nothing is not a lot cheaper! Good or Bad? In terms of area: Good In terms of battery: Bad

  • G. Leander

Lightweight Block Cipher Design

slide-40
SLIDE 40

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Examples

Modern Lightweight block ciphers SEA DESL PRESENT KATAN/ KTANTAN HIGHT PrintCIPHER A lot more out there...

  • G. Leander

Lightweight Block Cipher Design

slide-41
SLIDE 41

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

A comparison: (To be taken with care)

A fair comparison is difficult Many dimensions Depends on the technology

  • G. Leander

Lightweight Block Cipher Design

slide-42
SLIDE 42

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

First Example: PRESENT

PRESENT (CHES 2007) A 64 bit block cipher with 80/128 bit key and 31 rounds. Developed by RUB/DTU/ORANGE SP-network 4 bit Sbox Bit permutation as P-layer

  • G. Leander

Lightweight Block Cipher Design

slide-43
SLIDE 43

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

PRESENT: Overview

Figure: Overview of PRESENT

  • G. Leander

Lightweight Block Cipher Design

slide-44
SLIDE 44

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Security of PRESENT

Security Results (a result of simplicity): Theorem Any differential characteristic over 5 rounds involves at least 10 active Sboxes. Theorem Any linear trail over 4 rounds has an absolute bias less than 2−7.

  • G. Leander

Lightweight Block Cipher Design

slide-45
SLIDE 45

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Known Attacks on PRESENT

Rounds Attack Complexity 16 DC 264 texts 17 RKR 263 texts 24 SSA ≥ 263 texts 26 LH 264 texts 26 MLC 264 texts

  • G. Leander

Lightweight Block Cipher Design

slide-46
SLIDE 46

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Second Example: KATAN

KATAN (CHES 2009) A 32/48/64 bit block cipher with 80 bit key and 254 rounds. Developed by KUL A (kind of) Feistel-cipher Highly unbalanced Inspired by Trivium Very simple non-linear function

  • G. Leander

Lightweight Block Cipher Design

slide-47
SLIDE 47

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

KATAN: Overview

Figure: Overview of KATAN

  • G. Leander

Lightweight Block Cipher Design

slide-48
SLIDE 48

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Security of KATAN

Security Results (a result of simplicity): Theorem For an n-bit block size, no differential characteristic with probability greater than 2−n exists for 128 rounds. Theorem For an n-bit block size, no linear approximation with bias greater than 2−n/2 exists for 128 rounds.

  • G. Leander

Lightweight Block Cipher Design

slide-49
SLIDE 49

Motivation Industry Academia We Start To Cheat... And Fail! Why? Design Considerations Examples

Known Attacks on KATAN

Rounds Attack Complexity 78 Conditional-DC 222 texts 110 Multi-DC 232 texts

  • G. Leander

Lightweight Block Cipher Design

slide-50
SLIDE 50

Motivation Industry Academia We Start To Cheat... And Fail!

Remember: How far can you go?

Memory Given a block-size and a key-size the (minimal) memory requirements are fixed. But maybe the key is fixed... Fixed Key A fixed key saves a lot of GE! To make optimal use of this, we need a (very) simple key-scheduling KTANTAN PrintCIPHER

  • G. Leander

Lightweight Block Cipher Design

slide-51
SLIDE 51

Motivation Industry Academia We Start To Cheat... And Fail!

Third Example: KTANTAN

KTANTAN (CHES 2009) A 32/48/64 bit block cipher with 80 bit key and 254 rounds.

Figure: Overview of KTANTAN

Can you see the difference?

  • G. Leander

Lightweight Block Cipher Design

slide-52
SLIDE 52

Motivation Industry Academia We Start To Cheat... And Fail!

Third Example: KTANTAN

Can you see the difference? No, it is in the key-scheduling Round-key-bits selected from the master-key Very efficient in hardware Generalized Meet-In-The-Middle Attack (Bogdanov-Rechberger+Improvements) Selection not well distributed. KTANTAN can be broken in ≈ 275. Can be fixed with little overhead.

  • G. Leander

Lightweight Block Cipher Design

slide-53
SLIDE 53

Motivation Industry Academia We Start To Cheat... And Fail!

Fourth Example: PrintCIPHER

PrintCIPHER (CHES 2010) A 48/96 bit block cipher with 80/160 bit key and 48/96 rounds.

Figure: Overview of PrintCIPHER

  • G. Leander

Lightweight Block Cipher Design

slide-54
SLIDE 54

Motivation Industry Academia We Start To Cheat... And Fail!

Fourth Example: PrintCIPHER

Again, very simple key-scheduling All round-keys are the same. Invariant Subspace Attack (to appear) 251 (resp. 2102) weak keys. For those: Distinguisher for PrintCIPHER using a few texts. Can be fixed with little overhead.

  • G. Leander

Lightweight Block Cipher Design

slide-55
SLIDE 55

Motivation Industry Academia We Start To Cheat... And Fail!

Conclusions

Challenging research area Many interesting proposals available Inter-disciplinary research Chance to be applied Key-scheduling design non-trivial The future: even more tailored?

  • G. Leander

Lightweight Block Cipher Design

slide-56
SLIDE 56

Motivation Industry Academia We Start To Cheat... And Fail!

Fin

Thanks a lot!

  • G. Leander

Lightweight Block Cipher Design