Applied Cryptology 2.2: SPN and Feistel

Cihangir Tezcan
20 Oct 202029:07

Summary

TLDRThis script delves into the intricacies of block ciphers, focusing on two main types: SPN (Substitution-Permutation Network) and Feistel networks. It explains the structure and function of each, using AES and PRESENT as SPN examples, and highlighting their layers of encryption. It also touches on cipher design considerations, such as platform suitability, security vs. speed, and the evolution of encryption standards from DES to AES. The lecture underscores the importance of key length in security, illustrating the impracticality of brute force attacks on modern ciphers like AES-256, and briefly mentions cryptanalysis techniques.

Takeaways

  • 🔑 Block ciphers can be classified into two types: SPN (Substitution-Permutation Network) and Feistel networks, each with unique structures and characteristics.
  • 🔄 In an SPN cipher, the process involves key addition, substitution for confusion, permutation for diffusion, and repeated rounds to produce the ciphertext.
  • 🔒 AES (Advanced Encryption Standard) is an example of an SPN cipher widely used for its security and efficiency, with varying key lengths affecting the number of encryption rounds.
  • 🔑 The security of a block cipher is based on the secrecy of the key, assuming all details of the encryption algorithm are public, which is known as Kerckhoffs's principle.
  • 🛡️ Feistel ciphers, such as the DES (Data Encryption Standard), involve a round function and a swap operation, with the encryption and decryption processes being similar, differing only in the order of round keys.
  • 🔩 The design of block ciphers must consider factors like platform suitability (hardware vs. software), security vs. speed trade-offs, and the target application's specific requirements.
  • 🌐 Light-weight cryptography focuses on creating secure algorithms suitable for devices with limited memory and computational power, such as those used in IoT (Internet of Things).
  • 🚫 DES is no longer recommended for secure encryption due to its short key length of 56 bits, making it vulnerable to brute force attacks.
  • 🔍 Cryptanalysis techniques, such as differential cryptanalysis and linear cryptanalysis, are used to find weaknesses in cryptographic algorithms to improve their security.
  • 💡 The key length of a cipher is crucial for security; longer keys like those in AES (128, 192, 256 bits) provide a significantly higher number of possible keys and thus greater security.
  • ⏱️ The time complexity of breaking a cipher through exhaustive search increases exponentially with key length, making longer keys like AES-256 practically unbreakable with current technology.

Q & A

  • What are the two main types of block ciphers discussed in the script?

    -The two main types of block ciphers discussed are SPN (Substitution-Permutation Network) and Feistel ciphers.

  • What is the purpose of the key addition layer in an SPN cipher?

    -The key addition layer in an SPN cipher combines the key material with the plaintext, providing an initial mixing of the key into the data before the rounds of substitution and permutation.

  • Can you explain the role of the substitution layer in an SPN cipher?

    -The substitution layer in an SPN cipher provides confusion by substituting certain inputs with specific outputs, creating a complex relationship between the plaintext and the ciphertext.

  • What does the permutation layer in an SPN cipher achieve?

    -The permutation layer in an SPN cipher provides diffusion by rearranging the bits of the data, ensuring that changes in one bit of the plaintext affect multiple bits in the ciphertext.

  • Why is the round key addition after each round important in SPN ciphers?

    -The round key addition after each round is important because it prevents an attacker from easily reversing the cipher's operations without knowing the key, thus maintaining the security of the encryption.

  • What is the block size and key length of the PRESENT cipher mentioned in the script?

    -The block size of the PRESENT cipher is 64 bits, and the key length can be either 80 bits or 128 bits, although 128 bits is recommended for better security.

  • What is the main advantage of Feistel ciphers in terms of encryption and decryption processes?

    -The main advantage of Feistel ciphers is that the encryption and decryption algorithms are identical, with only the order of the round keys changing, which simplifies the implementation.

  • How does the security of a block cipher compare to an exhaustive search attack?

    -The security of a block cipher is upper-bounded by the exhaustive search attack, which requires 2^k encryptions for a k-bit key cipher. Any weakness that allows breaking the cipher with fewer operations is considered a successful cryptanalysis attack.

  • What is the significance of the DES (Data Encryption Standard) in the history of cryptography?

    -DES was a widely used encryption standard developed by IBM in the 1970s, but its key length was reduced to 56 bits by the NSA, making it vulnerable to brute force attacks. It was eventually replaced by the AES due to security concerns.

  • Why is the key length important in determining the security of a block cipher?

    -The key length is crucial for the security of a block cipher because it determines the number of possible keys an attacker must try in a brute force attack. A longer key length exponentially increases the difficulty of such attacks, thus enhancing security.

  • What are some of the hardware options available for performing exhaustive search attacks?

    -Some hardware options for performing exhaustive search attacks include CPUs, GPUs, FPGAs (Field Programmable Gate Arrays), and ASICs (Application-Specific Integrated Circuits), each with their own advantages in terms of speed, cost, and efficiency.

Outlines

00:00

🔒 Introduction to Block Ciphers and SPN Structure

This paragraph introduces the concept of block ciphers and delves into the Substitution-Permutation Network (SPN) structure. It explains that SPNs consist of three layers: key addition, substitution, and permutation, which are repeated multiple times to achieve encryption. The paragraph uses the AES and PRESENT ciphers as examples of SPNs. It also discusses the importance of the initial and final key addition layers in preventing attackers from easily reversing the encryption process. The security principle of Kerckhoffs's assumption is highlighted, which states that the encryption algorithm can be public knowledge, with only the key remaining secret.

05:03

🔄 Understanding the Permutation-Substitution Network (Feistel Ciphers)

The second paragraph explores the Feistel cipher structure, which is an alternative to SPNs. It describes the round function and the data swapping operation that characterizes Feistel ciphers. The paragraph provides an illustration of how data is divided, processed through a round function, and then swapped to provide confusion and diffusion. An example of a Feistel cipher, the CLAWIA block cipher, is given, showing how bits are manipulated across multiple rounds. The pros of Feistel ciphers are noted, such as the identical encryption and decryption algorithms, with only the order of round keys differing.

10:03

🛡️ Design Considerations for Block Ciphers

This paragraph discusses various factors to consider when designing block ciphers, such as the platform (hardware vs. software), the need for lightweight cryptography, and the trade-off between security and speed. It touches on the importance of cipher design in hardware implementation, affecting the number of gates and area required, and the impact on power and latency. The paragraph also mentions the significance of designing for specific use cases, such as the Internet of Things, where devices may have limited memory and computational power.

15:04

🚫 The Data Encryption Standard (DES) and Its Limitations

The fourth paragraph examines the history and shortcomings of the Data Encryption Standard (DES). Initially designed by IBM with a 128-bit key, the NSA reduced it to 56 bits, making it vulnerable to brute force attacks. The paragraph details the involvement of the NSA in modifying the S-boxes of DES and the subsequent discovery of cryptanalysis techniques like differential cryptanalysis. It emphasizes that DES is no longer considered secure and should not be used.

20:06

🔓 The Evolution of Cryptanalysis and the Rise of AES

This paragraph delves into the development of cryptanalysis, starting with the exhaustive search attack and moving on to more sophisticated techniques like differential and linear cryptanalysis. It discusses the impact of these techniques on the security of DES and the eventual introduction of the Advanced Encryption Standard (AES), which emerged from a competition and offers longer key lengths and a larger block size, making it more secure against known attacks.

25:09

💡 The Importance of Key Length in Block Cipher Security

The sixth paragraph emphasizes the significance of key length in determining the security of a block cipher. It provides a comparison of the number of possible keys for DES, PRESENT, and AES with different key lengths, illustrating the exponential increase in security with longer keys. The discussion includes the impracticality of brute force attacks on ciphers with sufficiently long keys, even with powerful computational resources like GPUs, and the potential for collaborative efforts to break weaker ciphers like PRESENT with 80-bit keys.

Mindmap

Keywords

💡SPN (Substitution-Permutation Network)

SPN, which stands for Substitution-Permutation Network, is a cryptographic concept that describes a type of block cipher structure. It consists of three layers: key addition, substitution, and permutation. The video script explains that SPN ciphers like AES or PRESENT are composed of these layers to provide confusion and diffusion, which are essential for the security of the encryption process. The script uses the example of the PRESENT cipher to illustrate how an SPN operates, emphasizing its simplicity and the role of the S-box in creating confusion.

💡Block Cipher

A block cipher is an encryption method that applies a deterministic algorithm along with a symmetric key to encrypt a block of text, rather than encrypting one bit at a time. The script discusses block ciphers in the context of SPN and Feistel networks, highlighting their use in secure communication. Block ciphers are fundamental to the video's theme, as they form the basis for the encryption algorithms being analyzed.

💡Feistel Cipher

A Feistel Cipher is a type of symmetric key block cipher that uses a repeating round function created by Horst Feistel. The script introduces this concept by explaining its structure, which includes a round function and a swap operation. It is used to contrast with SPN ciphers, showing an alternative approach to cryptographic design that also aims to provide security through confusion and diffusion.

💡Key Schedule

The key schedule in cryptography refers to the way in which a cipher generates round keys from a main key. The script mentions the key schedule algorithm, which provides round keys for each round of encryption in both SPN and Feistel ciphers. It is crucial for understanding how encryption keys are managed and used throughout the encryption process.

💡Confusion and Diffusion

Confusion and diffusion are two primary goals in the design of block ciphers. Confusion provides security by making the relationship between the key and the ciphertext as complex as possible, while diffusion spreads the influence of a single plaintext bit over many ciphertext bits. The script explains these concepts in the context of the SPN's substitution layer and permutation layer, respectively.

💡Ciphertext

Ciphertext, also known as enciphered text, is the output of an encryption algorithm. The script discusses how ciphertext is obtained at the end of the encryption process in both SPN and Feistel ciphers. It also touches on the security aspect, explaining how the use of round keys in the encryption process protects the ciphertext from being easily decrypted without the key.

💡Lightweight Cryptography

Lightweight cryptography refers to cryptographic algorithms designed to be efficient in terms of computation, power usage, and memory requirements, making them suitable for use in constrained environments like IoT devices. The script mentions lightweight cryptography when discussing the PRESENT and CLAWIA ciphers, which are designed for such applications.

💡Differential Cryptanalysis

Differential cryptanalysis is a form of cryptanalysis that attempts to exploit the probability of certain differences between the plaintexts to reveal the key. The script refers to this technique when discussing the security of the DES algorithm and how it was affected by the NSA's tweaking of the S-boxes, which was intended to counteract such attacks.

💡Exhaustive Search Attack

An exhaustive search attack, also known as a brute force attack, involves trying all possible keys until the correct one is found. The script explains this attack in the context of the security of block ciphers, stating that the security of a cipher is upper-bounded by the time it would take to perform an exhaustive search, which is 2^k encryptions for a k-bit key.

💡DES (Data Encryption Standard)

DES, or Data Encryption Standard, was a symmetric-key algorithm for the encryption of electronic data, which was originally designed by IBM and later became a standard after being modified by the NSA. The script discusses DES in the context of its historical significance and vulnerabilities, particularly due to its short key length, which made it susceptible to brute force attacks.

💡AES (Advanced Encryption Standard)

AES, or Advanced Encryption Standard, is a symmetric encryption standard adopted by the U.S. government. The script mentions AES as the successor to DES and highlights its use of longer key lengths and a larger block size, making it more secure against modern cryptographic attacks.

Highlights

Introduction of two types of block ciphers: SPN (Substitution Permutation Network) and Feistel ciphers.

Explanation of SPN's three layers: key addition, substitution, and permutation.

AES and PRESENT as examples of SPN ciphers.

Importance of round keys in preventing attackers from obtaining intermediate values.

The principle of Kerckhoffs's assuming all details of the encryption algorithm are public except the key.

PRESENT cipher as a standard for lightweight cryptography with a block size of 64 bits and key lengths of 80 or 128 bits.

The simplicity and hardware orientation of the PRESENT cipher.

Feistel ciphers introduced by Horst Feistel, consisting of a round function and a swap operation.

The encryption and decryption process of Feistel ciphers being identical except for the order of round keys.

Comparison of SPN and Feistel ciphers in terms of their pros and cons, including the impact of a single round on the input.

Considerations for block cipher design, such as platform, security versus speed, and hardware implementation.

The concept of lightweight cryptography and its focus on secure algorithms with minimal resource requirements.

The history and development of the Data Encryption Standard (DES), including NSA's involvement and its eventual deprecation.

Differential cryptanalysis as a technique to find weaknesses in cryptographic algorithms.

The impact of key length on security and the exponential increase in possible keys with longer key lengths.

The use of various computational devices for exhaustive search attacks, including CPUs, GPUs, FPGAs, and ASICs.

The impracticality of brute force attacks on ciphers with sufficiently long key lengths, even with modern computational power.

Transcripts

play00:02

so we said that there are

play00:03

uh two types that we can classify block

play00:06

ciphers into

play00:08

spn and face that so let's start with

play00:10

spn

play00:11

in other words substitution permutation

play00:13

network around

play00:15

a spn consists of three layers

play00:18

key addition which combines key material

play00:20

with the plain text

play00:22

substitution layer which provides

play00:24

confusion

play00:25

and permutation layer which provides

play00:27

diffusion block

play00:29

ciphers like aes or present are examples

play00:32

of

play00:32

spn which are going to be which we are

play00:35

going to

play00:37

analyze in this course frequently

play00:41

so i try to draw a picture of what an

play00:45

spn looks like

play00:46

so you have the plain text block here

play00:49

at first layer initially you have to

play00:52

combine it with the

play00:53

key so you have the key and the key

play00:56

schedule algorithm which provides round

play00:58

keys

play00:59

so you combine your first round key with

play01:02

your plain text block

play01:04

most of the time we use simple

play01:05

operations like xor operation here

play01:08

then the actual run starts which

play01:10

consists of substitution permutation and

play01:12

again add round key

play01:14

here again this is the confusion layer

play01:16

this is the permutation layer and this

play01:18

is the key addition layer

play01:20

so one round consists of these three

play01:22

layers you repeat it many times

play01:25

and at the end you obtain the cipher

play01:27

text so

play01:30

as you can see initially

play01:33

at the beginning and at the end you have

play01:35

the add run key because

play01:37

if you don't use this layer for instance

play01:40

assume that there is no add-on key here

play01:42

and you have the ciphertext block here

play01:45

and an adversary captures the ciphertext

play01:47

block

play01:48

they can go upwards and

play01:52

perform the inverse of the permutation

play01:54

and inverse of the substitution layer so

play01:57

they can reach to here so this means

play01:59

that these layers has no effect

play02:01

but once you use the round key here and

play02:03

since the attacker does not know this

play02:05

value

play02:06

they cannot obtain the value here so

play02:08

they cannot capture the intermediate

play02:10

values

play02:11

uh going upwards or even if they know

play02:13

what the plaintext block is

play02:15

they cannot go forward since they don't

play02:17

know the key so this is why we are

play02:19

using the cachos principle we are

play02:22

assuming that

play02:22

all of the details of the encryption

play02:25

algorithm is

play02:26

public and only secret information is

play02:29

the key

play02:30

so this is why the attacker cannot

play02:33

capture

play02:34

plain text block from ciphertext or

play02:36

intermediate values and so on

play02:37

or the key so

play02:41

here's an example for an spn cipher

play02:45

this is present which is iso iec

play02:48

standard for lightweight cryptography

play02:52

this standard contains only two block

play02:55

ciphers present

play02:56

and clavia so present cipher is really

play03:00

simple

play03:01

it is designed for hardware the block

play03:03

size is 64 bits

play03:05

and in this picture each line actually

play03:07

represents a single bit so there are 64

play03:10

lines here

play03:12

key length is 80 bits or 128 bits

play03:16

it depends on the user but the algorithm

play03:20

doesn't change much the key schedule

play03:22

algorithm is very similar in both cases

play03:25

so

play03:26

in my opinion there is no point of using

play03:28

the 80 bit key because

play03:30

you will be losing a lot of security at

play03:32

this point because

play03:34

uh i believe that it is not that hard

play03:37

to perform brute force attacks for the

play03:40

8-bit key which

play03:41

i will be briefly mention this

play03:46

briefly mentioning this before the end

play03:47

of this lecture

play03:49

so you have a

play03:52

key but here you will be using 64 bits

play03:56

of that key which is the round key and

play04:00

you have an s box here this is

play04:03

actually the confusion layer you have

play04:06

the same

play04:07

box which has four bits of input and

play04:10

four bits of

play04:11

output and you repeat this operation 16

play04:14

times

play04:14

and the definition of this box is given

play04:17

here in the hexadecimal notation

play04:19

so for instance if the input of this s

play04:22

box

play04:22

is zeros here so you have zero zero zero

play04:27

0 this means that in hexadecimal

play04:29

notation your input is 0.

play04:31

so the output will be c in the

play04:35

integer notation this is 12 but in the

play04:38

bit notation if the rightmost

play04:40

bit is the least significant bit which

play04:42

is the case most of the time in

play04:44

cryptography

play04:45

this means that 12 will be represented

play04:48

as

play04:49

one one zero zero so if your input is

play04:53

all zeros you end up with one one zero

play04:55

zero

play04:56

so you repeat this process 16 times

play05:00

so this is your confusion layer because

play05:02

you're substituting some input with some

play05:04

odd with an output so you create some

play05:07

confusion here

play05:08

but as you can see the these four bits

play05:12

only affect these four bits

play05:14

so there's not much of a diffusion here

play05:16

this is the reason

play05:17

why we have we are having a permutation

play05:20

layer

play05:21

afterwards so this line saying that this

play05:24

bit

play05:24

goes here but this bit goes here

play05:28

and this one goes there and so on so

play05:30

you're kind of

play05:31

shuffling the places of bits so this is

play05:34

your just one rod so after the end of

play05:38

this one round you have 64 bits here

play05:40

take it put the top now exercise with

play05:44

the next front key

play05:45

perform the s box operations again and

play05:48

perform the permutations and so on and

play05:49

so forth

play05:50

how many times for this cipher it is

play05:53

chosen as 31.

play05:55

so take this picture and repeat it 31

play05:58

times

play05:59

from top to the bottom and at the end of

play06:02

course at the final

play06:03

round key edition and this is your

play06:07

blog cipher presence so this is a very

play06:10

simple

play06:11

and a good example for the spn site

play06:14

of course we haven't mentioned the

play06:16

details of the key schedule

play06:18

but we will be talking about it next

play06:20

week so we are just

play06:22

trying to see the main idea here

play06:25

let's move on to phase star ciphers

play06:29

these ciphers are introduced by

play06:30

horseface that

play06:32

a round of a face down network consists

play06:34

of a run function

play06:36

and the swept operation so the b bits

play06:39

input is divided into two halves run

play06:42

function is applied to one house and the

play06:44

other

play06:44

the output is exhored to the other half

play06:47

and the places of this

play06:48

house are swapped key material is used

play06:51

inside the run function most of the time

play06:54

so again i try to draw a picture for you

play06:58

so the main idea for the general

play07:01

face style ciphers you have the plain

play07:03

text block and you divided

play07:05

it into into two so left part and the

play07:08

right part

play07:09

so you have the key schedule algorithm

play07:11

again so you have the key which provides

play07:13

round keys

play07:14

so in a single round you take the right

play07:17

part

play07:19

and you move it to the left part

play07:22

also you'd have the right part and have

play07:24

a round function here you are performing

play07:27

a substitution and permutation

play07:29

operations so that you provide

play07:32

uh confusion and diffusion here and the

play07:34

output is the exhort to the left part

play07:36

but left part becomes the right part for

play07:39

the next round

play07:40

so each round one half is not affected

play07:43

moves to the second round but the other

play07:46

half is

play07:46

modified and goes to the other house so

play07:50

this is your select operation

play07:52

here's an example but this is an example

play07:55

for a generalized

play07:56

face stud network so instead of two

play07:58

lines

play07:59

you can see that there are four lines

play08:01

here so this

play08:03

this is the picture of the clavia block

play08:06

cipher which is again the

play08:08

iss standard for lightweight

play08:10

cryptography

play08:12

this cipher has a block size of 128 bits

play08:15

so each line here

play08:16

actually represents 32 bits of

play08:18

information

play08:19

so as you can see the leftmost parts

play08:23

these 32 bits goes to right most part

play08:26

without any effect but it affects the

play08:31

second line here and this one goes

play08:34

here without taking an effect on it but

play08:38

it affects the

play08:39

right most part and it goes here and so

play08:41

on so you repeat this process

play08:44

many times depends on how many runs the

play08:47

cipher is

play08:50

generally in the face cyphers most of

play08:53

the time we

play08:54

don't perform the final swap operation

play08:56

in the final round

play08:58

because uh that has no cryptographic

play09:01

importance to us

play09:04

so there is no

play09:07

answer for which one is better it

play09:09

depends on

play09:11

your application actually but if you

play09:14

need to

play09:14

compare these two types

play09:17

let's look at the pros for the face

play09:20

style ciphers

play09:21

encryption algorithm is identical to the

play09:23

decryption algorithm

play09:24

only the order of the round keys change

play09:27

this is important because if we go back

play09:29

to the picture here

play09:31

for instance in the encryption part you

play09:34

have the plain text block so you follow

play09:36

this picture from top to bottom

play09:38

so you have a run function here so this

play09:41

right part goes inside this function and

play09:44

you

play09:44

obtain the output but when you are

play09:47

decrypting

play09:48

you have the ciphertext parts left and

play09:50

right this right part

play09:53

also goes to the run function in this

play09:55

way so the

play09:57

direction of the arrows does not change

play09:59

when you are encrypting or decrypting so

play10:01

this is the

play10:02

uh plural of the phase the cipher

play10:06

but this is not for valid for

play10:09

substitution permutation networks

play10:10

because

play10:12

uh look at the picture here once you're

play10:14

at the top you are going

play10:15

the encryption goes in this direction

play10:17

but the person who is decrypting has the

play10:19

ciphertext so

play10:20

in order to go to from bottom to top

play10:24

you need the inverses of all of these

play10:26

operations

play10:31

uh a pro for the spn is a single round

play10:34

affects the whole

play10:35

input but so this

play10:39

we will have the inverses of these

play10:41

statements in the cons

play10:43

for the phase star a single round only

play10:45

affects the half of the input

play10:47

and for the spn decryption procedure

play10:50

requires the inverses of the

play10:51

substitution and permutation layers

play10:54

so this might take

play10:58

more uh i mean this can produce

play11:01

larger code size if you are performing

play11:04

this operation in software

play11:05

or this may might mean that you need

play11:08

more gates if you are

play11:09

doing it on a hardware but of course uh

play11:13

this is not always the case because this

play11:15

also depends on the mode of operation

play11:17

that you are going to use

play11:19

in the real world so we haven't talked

play11:21

about mode of operations yet

play11:23

uh but we will be talking about them

play11:28

i think two weeks later so this uh

play11:31

mean will mean uh more sense

play11:34

at that point currently we are focused

play11:37

on b bits input and b with output

play11:39

but when we are going to be working on

play11:42

larger

play11:43

inputs like one gigabyte for instance we

play11:45

need to

play11:46

talk about mode of operations and again

play11:48

this will be

play11:51

in two weeks

play11:54

another thing to consider when we are

play11:57

designing a block cipher is that

play11:59

the the platform that we are going to

play12:01

use these

play12:02

algorithms and

play12:04

[Music]

play12:05

we might maybe divide it into hardware

play12:08

versus software

play12:10

hardware implementations can easily work

play12:13

on bits

play12:15

but since most programming languages

play12:17

focus on bytes

play12:18

bit operations are more costly on

play12:21

software because

play12:22

getting the information about the single

play12:24

bit or shifting the

play12:26

bits and so on is not that easy on

play12:28

software but it is much

play12:29

easier on hardware cipher design also

play12:32

determines the number of cases required

play12:34

to perform encryption on hardware

play12:36

so a number of gates determine the area

play12:39

required so

play12:40

the cost of this implementation on

play12:43

hardware

play12:45

will depend on your design so it is

play12:48

important

play12:49

how you design the cipher so actually

play12:51

for this reason we have the lightweight

play12:53

cryptography area

play12:55

where you're trying to

play12:58

[Music]

play12:59

design secure algorithms secure

play13:01

encryption algorithms that require

play13:04

less number of cases let's say but also

play13:07

you are focusing on the

play13:09

power and energy needs of this algorithm

play13:11

the latency and troops and so on

play13:14

but this is uh the topic of another

play13:17

course

play13:17

actually i'm teaching it this semester

play13:19

also so if you're interested

play13:21

you can watch the uh videos of that

play13:24

course too

play13:25

which is available again in this

play13:27

platform

play13:28

and that course is titled uh lightweight

play13:31

cryptography for the internet of things

play13:34

code size or record memory is not a big

play13:36

problem for software

play13:37

implementations due to the fast cpus and

play13:39

large ram again

play13:40

our desktop computers laptops

play13:44

smartphones or tablets has huge

play13:48

amount of computational power and all of

play13:50

them comes with more than one or two

play13:52

gigabytes of

play13:53

memory but again for lightweight

play13:55

cryptography

play13:56

we have very small devices that has like

play14:00

64 bytes of memory and so on so your in

play14:04

design should depend on the platform

play14:06

that you are going to use it

play14:09

security versus speed is another design

play14:11

consideration

play14:12

speed is generally measured as

play14:14

throughput

play14:16

adding more security measures for

play14:17

instance increasing the number of runs

play14:19

increases the security but reduces the

play14:22

speed

play14:23

cyphers performing well on hardware or

play14:25

software may not be suitable for

play14:27

constraint devices for rfid systems or

play14:30

sensor networks due to the limited

play14:32

memory battery or computational power

play14:35

hence we also need lightweight cyphers

play14:37

ciphers for this kind of platforms

play14:40

and currently needs this performing a

play14:44

standardization process so there's a

play14:46

competition going on

play14:48

and at the end one or more lightweight

play14:51

ciphers

play14:51

will be standardized by nist which

play14:55

probably will end in two or three years

play15:00

so let's move to uh probably the most

play15:03

hurt

play15:04

encryption algorithm which is this short

play15:07

for data encryption standard

play15:09

it was designed by ibm in 1970s it was

play15:12

based on an earlier design by faceta

play15:15

in 1976 nsa tweaked the algorithm by

play15:19

changing its

play15:20

s-boxes and after that

play15:23

it became a standard so an essays

play15:26

tweak here is actually a good

play15:29

tweak because this way uh the cipher

play15:33

becomes

play15:34

more secure we will talk about it when

play15:37

we are talking about differential

play15:38

cryptanalysis

play15:40

but nsa also shortens the key of the

play15:42

algorithm

play15:43

ibm was using algorithms that has

play15:46

key length of 128 bits at the time

play15:49

but after this tv key length beca became

play15:53

56 bits which is very short even for

play15:55

that time

play15:56

which actually allows brute force

play15:58

attacks that that i'm going to mention

play16:01

in a few minutes

play16:02

so uh this is why we have to

play16:05

[Music]

play16:07

stop using this algorithm in 1990s

play16:11

so this algorithm is currently known as

play16:13

data encryption algorithm dea

play16:15

since it is no longer a standard and

play16:17

actually this is a very important topic

play16:20

a lot of people still think that this is

play16:22

a standard and

play16:23

it is secure i know a lot of people

play16:25

still using this algorithm

play16:28

but it hasn't it provides no security at

play16:31

all

play16:31

it became useless after 1990s since

play16:34

its short key is susceptible to brute

play16:36

force attacks which i haven't mentioned

play16:39

in a few minutes so let's look at nsa's

play16:42

involvement

play16:43

in 1976 nsa tv i tweaked ibm's initial

play16:47

design by changing

play16:48

the s-boxes but didn't explain to ibm

play16:52

why

play16:52

they made such a change ibm people

play16:55

analyzed this tv and they discovered an

play16:57

attack that breaks their initial design

play16:59

and they called it t attack they shared

play17:02

their discovery with nsa

play17:04

and they say ask them not to share this

play17:05

knowledge with public for they had known

play17:07

this

play17:08

attack type for some time and were using

play17:11

it to listen

play17:12

other countries and uh

play17:15

biham and xiaomi's rediscovery of

play17:17

differential cryptanalysis in 1990s is

play17:19

the first

play17:20

public announcement of this technique

play17:23

and later on we

play17:25

we learned that even a japanese people

play17:29

even knew it

play17:31

during second world war uh this

play17:34

technique

play17:35

they were using this kind of techniques

play17:36

in second world war

play17:38

but uh every country kept this

play17:42

information to themselves

play17:44

so biham and xiaomi's discovery of

play17:46

differential cryptanalysis was the first

play17:48

public announcement

play17:49

of this technique actually biham

play17:51

received a

play17:54

fellowship from iacr

play17:58

uh

play18:02

international association of

play18:03

cryptographic research a few years ago

play18:06

and during his keynote speech he thanked

play18:09

all of the

play18:10

secrecy services who has known this

play18:12

technique and kept it to themselves

play18:14

so that biham and shamir can

play18:18

present it for the first time publicly

play18:22

main idea in differential crypt analysis

play18:24

is to find the weakness so that a small

play18:26

change in the

play18:27

input provides an anticipated change in

play18:29

the output with high probability

play18:32

and we will be actually talking about

play18:34

this

play18:35

uh in the week that we are

play18:38

talking about cryptanalysis so the main

play18:41

picture of

play18:43

this is as follows you have the key and

play18:45

key schedule algorithm which

play18:47

only contains permutations and rotations

play18:52

and as i told you that this is a face

play18:56

style cipher you have left and right

play18:58

part you have an initial permutation

play19:00

which is

play19:01

which has no cryptographic importance it

play19:03

is just used for the

play19:05

receiving the data from the hardware in

play19:07

a

play19:09

good way let's say so you have some

play19:11

functions like expansion and so on

play19:14

and you have here s boxes and the

play19:16

permutation

play19:18

so you have 16 rounds for this

play19:27

so what should be the key size

play19:30

this is a good question uh an attacker

play19:32

that captures a single ciphertext

play19:35

can try to decrypt it with every

play19:37

possible key to check

play19:38

if it is if it provides a meaningful

play19:40

plain text

play19:42

such an attack is called exhaust

play19:43

research or brute force attack so this

play19:46

attack does not use any weakness in the

play19:49

design

play19:50

so it is just a brute force attack by

play19:52

trying every possible key

play19:55

exhaustive search is a generic attack in

play19:57

other words valid for every cipher

play19:59

for a key bit key cipher the attacker is

play20:02

required to perform

play20:03

at most 2k encryptions and decryptions

play20:06

or decryptions sorry

play20:07

so i mean you can capture plain text

play20:09

below can perform the brute force

play20:11

attacks but most of the time

play20:12

most probably you will get a plain text

play20:15

block and the corresponding ciphertext

play20:17

block so

play20:18

all you need to do is to perform two to

play20:20

decay encryptions and check if the

play20:22

ciphertext

play20:23

you obtained is the same as the one you

play20:26

captured

play20:27

the security of a block cipher is upper

play20:30

bounded by

play20:30

exhaustive search attack which is to

play20:33

decay

play20:34

encryptions so this quantity is referred

play20:36

to as time complexity

play20:38

so you can break every cipher with two

play20:41

to the k encryptions

play20:43

so any weakness that you find that makes

play20:46

it

play20:47

easier to break the cipher that requires

play20:49

less than 2 to decay encryptions

play20:51

is a

play20:54

cryptanalysis attack actually so which

play20:57

is which would be better than

play20:58

brute force so let's look at

play21:02

the security of deaths bihar and xiaomi

play21:04

provided the first hierarchical attack

play21:06

in 1992

play21:08

the differential crypto analysis but

play21:11

this required this was better than

play21:14

exhaust distort but however the

play21:16

attack required two to the four to seven

play21:18

chosen plaintext to be captured

play21:20

which is actually unrealistic in real

play21:22

life

play21:23

so attack wasn't that successful as

play21:27

expected because of the nsa's tv of the

play21:30

s boxes

play21:31

massive provided the first experimental

play21:34

cryptons of tests by introducing linear

play21:36

cryptanalysis

play21:38

and in 1997 industrial project

play21:42

which is around seven to eight thousand

play21:45

pieces connected by the internet breaks

play21:47

a message

play21:48

encrypted with test for the first time

play21:49

in public

play21:51

in 1998 eff's desk record which is a

play21:55

machine containing

play21:57

around 2000 custom chips which can break

play22:01

a

play22:01

desky in 56 hours

play22:05

and so which is very practical so in

play22:08

1999

play22:10

this is only allowed in legacy systems

play22:12

and

play22:13

uh a transition to triple desks which is

play22:16

just using the des algorithm

play22:19

three times is suggested so

play22:24

but uh at those times a competition

play22:28

is made and which was called advanced

play22:30

encryption competition

play22:32

and the winner of that competition

play22:34

become became the advanced encryption

play22:36

standard

play22:37

aes in short and uh

play22:41

we always encourage people to use aes

play22:43

instead of

play22:44

triple dash so aes

play22:48

is advanced encryption standard uh the

play22:51

original name of the algorithm is random

play22:53

but

play22:54

which was designed by john damon and

play22:56

vincent raymond uh

play22:58

it was one of the finalists together

play23:00

with sarpan two fish

play23:01

rc-6 and mars but randolph won the

play23:05

competition so

play23:06

it is now known as the aes advanced

play23:09

encryption standard

play23:10

this time the key lengths are

play23:14

longer than or larger than this you have

play23:17

three options 128

play23:20

192 and 256 bits

play23:24

again as i told you this is good for

play23:26

personal security this is

play23:28

good for military use and as far as i

play23:30

know no one uses this

play23:32

uh middle value but

play23:35

depending on the choice of the key

play23:38

length

play23:39

the number of rounds changes so if you

play23:41

are using a longer key the number of

play23:43

runs also increases so you obtain like

play23:45

you get a performance drop

play23:51

like from 10 rounds to 14 so you

play23:54

get like 40 percent of

play23:57

extra

play24:00

competition block size is larger

play24:04

128 bits there are many cryptanalysis

play24:07

results on

play24:08

aes but none of the known attacks

play24:11

are effective so we believe that aes is

play24:15

secure to use

play24:17

so why are we interested in this key

play24:20

length so if you look at 2 to the 56

play24:23

which is the size of the possible

play24:27

keys for the desk the number is this

play24:31

and for present if you are using 80-bit

play24:34

key this is the number of possible keys

play24:36

and for aes 128 it is this

play24:40

for 192-bit key it is this and

play24:43

for 256 bits it is this

play24:47

since this is an exponential increase

play24:50

uh even if a technological breakthrough

play24:53

happens that

play24:54

somebody can break aes 128 in a single

play24:59

second

play24:59

which means that you can perform 2 to

play25:02

the 128

play25:04

as encryptions in one second such a

play25:09

person would not be able to break as

play25:13

256 because

play25:16

if you can perform this many operations

play25:18

in a second

play25:19

this means that and in a year there is

play25:22

around

play25:23

2 to the 27 seconds so

play25:26

this would mean that you need two to the

play25:29

100 years

play25:30

to break aes 256 and

play25:33

2 to the 100 years is way longer than a

play25:37

human lifetime so

play25:40

how can we perform this exhaustive

play25:43

search attacks

play25:44

uh you can use cpus we have

play25:47

uh everybody nowadays a desktop or

play25:50

laptop computer so

play25:51

these are the easiest computational

play25:53

devices that we can

play25:55

obtain gpus which were mainly used for

play25:59

gaming today is very good for

play26:02

scientific computing paralyzable

play26:04

algorithms becomes faster compared to

play26:06

cpus

play26:07

depending on the algorithm you can get a

play26:10

speed of

play26:11

up to 10 or 100 times it depends on the

play26:15

gpu and the

play26:16

algorithm we you can also use fpgas

play26:20

field programmable gateways for

play26:23

exhaustive search

play26:24

or you can use asics which are dedicated

play26:26

hardwares

play26:27

these can only perform the implemented

play26:29

algorithm but they are

play26:31

cost effective compared to fpgas or any

play26:33

other devices in the list

play26:36

so i just uh

play26:41

calculated the performance of my cpus

play26:44

and gpus for

play26:45

uh for a brute force attack on present

play26:48

80.

play26:49

so a very old computer a laptop computer

play26:52

has four cores

play26:53

as you can see here which has clocked as

play26:56

two gigahertz

play26:57

by using this laptop from 2010 i can

play27:00

perform

play27:02

15 million present encryptions in a

play27:05

second

play27:06

so in order to perform two to the eight

play27:08

encryptions i need

play27:09

this many years for this laptop

play27:12

to run itself and for a desktop computer

play27:15

from those times the clock speed is

play27:18

higher so you can perform

play27:22

twice more encryptions in a second so it

play27:25

will take this many years

play27:26

for this cpu to break present

play27:30

80. but if you look at the gpus

play27:34

this laptop from 2010 has a gpu which

play27:37

has

play27:38

96 cores so as you can see even from

play27:41

those dates

play27:42

gpus were faster than cpus when

play27:46

you're doing parallel computations

play27:50

but if you use a again old but

play27:53

a good gpu which has 1664 cores

play27:58

and nowadays we have gpus that has more

play28:01

than three thousand cores

play28:02

and clocked as 2g guys but even for this

play28:05

gpu

play28:06

you need 84 million years

play28:10

but again with a modern gpu

play28:14

you can reduce this number to actually

play28:16

10

play28:17

million years and you might say that

play28:19

still

play28:20

you cannot break it 10 million years is

play28:23

a long time

play28:24

but this means that if video gamers on

play28:27

the internet decides to break present

play28:29

instead of playing a video game

play28:31

they can break a present via brute force

play28:34

attacks

play28:36

in a in some days so for this reason

play28:40

i never suggest use of 80-bit

play28:43

keys for security because even if

play28:46

video gamers can gather around on the

play28:48

internet and break the cipher

play28:51

secrecy services can perform very much

play28:54

[Music]

play28:57

large number of encryptions and with

play28:59

dedicated devices you can

play29:02

actually perform 8-bit brute force

play29:04

attacks

play29:05

in a few days

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Block CiphersSPN NetworksFeistel NetworksCryptographyAES EncryptionDES AlgorithmSecurity AnalysisBrute Force AttacksLightweight CryptographyCryptanalysis TechniquesCipher Design
Benötigen Sie eine Zusammenfassung auf Englisch?