Symmetric Key Cryptography

Cihangir Tezcan
18 Oct 202322:36

Summary

TLDRThis script delves into the concept of block ciphers, a fundamental aspect of modern cryptography. It explains the evolution from historical ciphers to modern digital encryption, emphasizing the importance of encoding standards like UTF-8 over ASCII for comprehensive character representation. The speaker highlights the significance of block size in cipher security, advocating for a minimum of 128-bit keys for personal use and 256-bit for military applications. The script also introduces the principles of confusion and diffusion in cipher design, aiming to ensure that cipher text statistics are complex and that changes in plain text or key significantly affect the cipher text.

Takeaways

  • 🗝️ Block ciphers are an important topic in modern cryptography, which encrypt data in fixed-size blocks of bits instead of individual characters or pairs of characters.
  • 🔠 Historical ciphers were replaced due to their vulnerability to statistical techniques like frequency analysis, which is not a concern with block ciphers.
  • 🌐 Communication parties must agree on an encoding standard, such as UTF-8, to represent letters, numbers, and symbols as strings of bits for digital communication.
  • 📚 The ASCII encoding standard is widely known but does not include some special characters used in languages like Turkish, leading to the preference for UTF-8.
  • 🔢 The number of bits used to represent characters is crucial; for instance, 8 bits allow for 256 different characters, which is why block sizes of 64 or 128 bits are common for encryption.
  • 🔒 Block ciphers provide confidentiality by transforming plaintext into ciphertext using a secret key, which is essential for secure communication over potentially insecure channels.
  • 🔑 Symmetric key encryption algorithms, including block ciphers, use the same key for both encryption and decryption, whereas asymmetric key algorithms use a public key for encryption and a private key for decryption.
  • 🔄 Block ciphers involve a permutation of the input space (plaintext blocks) to the output space (ciphertext blocks), creating a complex relationship that is difficult for cryptanalysts to exploit.
  • 🔍 The design of a good block cipher aims to provide confusion and diffusion, making it challenging to deduce any relationship between the ciphertext and the plaintext or the key.
  • 🔧 The security of a block cipher is not absolute and can be compromised if a cryptanalyst develops a new technique to exploit weaknesses in the cipher.
  • 📈 The size of the key space (e.g., 2^128 for a 128-bit key) is vast, and a good block cipher should act as if it is a randomly selected permutation from this large set.

Q & A

  • What is the primary difference between historical ciphers and modern block ciphers?

    -Historical ciphers typically operated on individual characters or pairs of characters, which could be easily broken using frequency analysis. In contrast, modern block ciphers operate on pairs of bytes or larger blocks of bits, making them much more secure against such attacks.

  • Why is encoding important in cryptography, especially in digital communication?

    -Encoding is crucial because it ensures that both communicating parties agree on a common way to represent data, such as letters, numbers, and symbols, as a string of bits. This standardization is necessary for effective encryption and decryption.

  • What are the limitations of the ASCII encoding standard mentioned in the script?

    -The ASCII encoding standard is limited because it only supports 128 characters, which is insufficient for languages with special characters, such as Turkish. This limitation can cause incorrect character representation in digital communication.

  • What is the significance of block size in block ciphers, and what are the commonly used block sizes?

    -The block size in block ciphers is significant because it determines how much data is encrypted at a time. Commonly used block sizes are 64 or 128 bits, with 128 bits being preferred for stronger security. Smaller block sizes, like 32 bits, are less secure and more vulnerable to attacks.

  • What is the role of secret keys in symmetric key cryptography?

    -In symmetric key cryptography, the same secret key is used for both encryption and decryption. The security of the system relies on keeping this key confidential, even if the encryption and decryption algorithms are known.

  • How do public key cryptography and symmetric key cryptography differ in terms of key usage?

    -In symmetric key cryptography, both parties use the same secret key for encryption and decryption. In public key cryptography, one key (public key) is used for encryption, and a different key (private key) is used for decryption, with the private key being kept secret.

  • What is meant by confusion and diffusion in the context of block cipher design?

    -Confusion refers to making the relationship between the cipher text and the key complex and non-linear, while diffusion involves spreading the influence of each bit of the plaintext and the key over many bits of the ciphertext to obscure statistical patterns.

  • Why is the choice of key size important in encryption, and what key sizes are recommended for different use cases?

    -The key size is important because it determines the security level of the encryption. For personal use, a 128-bit key is recommended, while military applications typically require a 256-bit key for stronger security. A larger key size provides more protection against brute-force attacks.

  • How does block cipher encryption work at a high level?

    -Block cipher encryption works by dividing the plaintext into fixed-size blocks (e.g., 128 bits) and encrypting each block separately using a secret key. This process creates ciphertext blocks, which together form the encrypted message.

  • What is the importance of selecting a good permutation in block cipher design?

    -Selecting a good permutation is crucial because it ensures that the encryption process maps plaintext blocks to ciphertext blocks in a way that is secure and resistant to cryptanalysis. A good permutation makes it difficult to find any relationship between related keys or ciphertexts.

Outlines

00:00

🔐 Understanding Block Ciphers and Data Encoding

This paragraph introduces the concept of block ciphers in cryptography, explaining the need to encrypt pairs of bytes instead of single characters in the modern era. The discussion highlights the importance of data encoding standards like ASCII and UTF-8, emphasizing their role in representing characters as bits for digital communication. The paragraph also addresses historical issues with encoding, particularly how ASCII failed to represent special characters in languages like Turkish. The explanation extends to the basics of data representation using bits and bytes, leading to a discussion on how block ciphers handle large amounts of data, such as megabytes or terabytes, in encryption.

05:01

🔑 Symmetric and Asymmetric Encryption Algorithms

This paragraph delves into the different types of cryptographic algorithms, focusing on symmetric key encryption, such as block ciphers and stream ciphers, and public key encryption, like RSA. It introduces the concept of authenticated encryption algorithms that provide both confidentiality and data authentication. The discussion includes the roles of hash functions and digital signatures in ensuring data integrity and origin non-repudiation. The paragraph outlines the broad scope of cryptography, touching on advanced topics like post-quantum cryptography and full homomorphic encryption, which are part of the larger cryptographic landscape.

10:04

🔍 Defining Cryptosystems and Cipher Text

This paragraph defines key cryptographic terms, such as plaintext, ciphertext, and cryptosystems. It clarifies the distinction between the terms 'cipher' and 'password,' which are often confused in some languages. The explanation covers the process of converting plaintext into ciphertext using encryption algorithms and the importance of keeping the decryption key secure. It also emphasizes that while the encryption algorithm can be public, the security of the system relies on the secrecy of the key, in line with Kerckhoffs's principle.

15:05

📦 How Block Ciphers Operate

This paragraph explains the operation of block ciphers, which encrypt fixed-size blocks of data using a secret key. It describes the importance of choosing an appropriate block size, such as 64 or 128 bits, to ensure security against attacks like frequency analysis. The discussion highlights how block ciphers map input blocks to output blocks through permutations, and the significance of designing a cipher that selects a secure subset of permutations. It introduces the concept of related-key attacks and stresses the need for different permutations when even a small change is made to the secret key.

20:07

🔐 Confusion and Diffusion in Cipher Design

This paragraph discusses the principles of confusion and diffusion, introduced by Claude Shannon, which are essential in designing secure block ciphers. Confusion makes the relationship between the plaintext, ciphertext, and key complex, preventing attackers from easily deducing the key. Diffusion ensures that a change in one part of the plaintext affects many parts of the ciphertext, making statistical attacks difficult. These abstract concepts are fundamental to creating effective cryptographic algorithms, although their security can't be definitively proven, only tested against known cryptanalysis techniques.

Mindmap

Keywords

💡Block Cipher

A block cipher is a method of encrypting text where a cryptographic key and algorithm are applied to a block of data (usually of fixed size) as a whole. This is a central concept in modern encryption, replacing earlier methods like character substitution. The video explains that block ciphers operate on b-bit blocks of data, transforming plain text into ciphertext using secret keys.

💡Encoding

Encoding is the process of converting data into a specific format for efficient transmission or storage. In the video, it refers to the agreement between communicating devices on how to represent data as bits. The choice of encoding, such as ASCII or UTF-8, impacts how characters are represented digitally, which is crucial for ensuring accurate communication and encryption.

💡ASCII

ASCII (American Standard Code for Information Interchange) is a character encoding standard that uses seven bits to represent text characters. The video mentions ASCII as a widely known standard but highlights its limitation in representing non-English characters, like certain Turkish letters, which is why UTF-8 is often preferred in modern applications.

💡Symmetric Key Cryptography

Symmetric key cryptography involves the use of the same key for both encryption and decryption. This method is foundational in the video’s discussion of block ciphers and other cryptographic techniques, where the security relies on keeping the shared key secret between the communicating parties.

💡Confusion and Diffusion

Confusion and diffusion are two principles introduced by Claude Shannon to design secure encryption algorithms. Confusion refers to making the relationship between the ciphertext and the key complex, while diffusion spreads the influence of each plaintext digit over many ciphertext digits. The video discusses how these principles are essential in the design of block ciphers to ensure security.

💡Permutation

In cryptography, a permutation refers to a rearrangement of elements in a set. The video explains that block ciphers operate by mapping input bits to output bits through a permutation, aiming to make it difficult to predict how the plaintext will be transformed into ciphertext. The concept is tied to the idea of creating a vast number of possible encryptions to ensure security.

💡Public Key Cryptography

Public key cryptography involves using two keys—a public key for encryption and a private key for decryption. Unlike symmetric key cryptography, the public key is openly shared, while the private key remains confidential. The video contrasts this method with symmetric key cryptography, highlighting its importance in modern secure communication, such as in the case of RSA.

💡Ciphertext

Ciphertext is the encrypted form of plaintext, which appears as a random sequence of bits. The video describes how encryption algorithms transform plaintext into ciphertext to protect data during transmission. Only someone with the correct decryption key can convert ciphertext back into its original plaintext form.

💡Message Authentication Code (MAC)

A Message Authentication Code (MAC) is used to verify the integrity and authenticity of a message, ensuring that it has not been altered. The video mentions MACs in the context of data authentication, distinguishing them from encryption algorithms and emphasizing their role in ensuring data security without necessarily encrypting the data.

💡Key Agreement Algorithm

A key agreement algorithm allows two parties to securely share a cryptographic key over an insecure channel. The video discusses the Diffie-Hellman key exchange as an example, explaining its significance in enabling secure communication over networks like the internet without prior sharing of secret keys.

Highlights

Introduction to block ciphers as a modern cryptographic technique to replace historical ciphers.

Explanation of the necessity to move from character pairs to bit pairs in encryption due to digital data handling.

The importance of agreeing on an encoding standard like UTF-8 for digital communication to avoid issues with character representation.

The limitations of ASCII encoding, particularly its inability to represent special characters in some languages like Turkish.

The concept of using bits to represent characters and the significance of the switch point at seven or eight bits for character representation.

The role of block ciphers in encrypting large amounts of data efficiently, such as one megabyte or even terabytes.

Cryptography's role in solving problems of confidentiality, authentication, and non-repudiation in digital communications.

Differentiation between symmetric key encryption algorithms like block and stream ciphers, and public key encryption algorithms like RSA.

The significance of choosing an appropriate block size in block ciphers to prevent vulnerability to frequency analysis.

The explanation of how block ciphers operate on fixed-size blocks of data, creating a permutation from input to output space.

The comparison of the vast number of possible permutations in block ciphers to the small subset actually used for encryption.

The importance of key size in block ciphers, with recommendations for different use cases, including personal and military standards.

The abstract concepts of confusion and diffusion in cipher design, introduced by Claude Shannon, to enhance security.

The definition of confusion as making the cipher text's relation to the key and plain text statistics complex for cryptanalysts.

The definition of diffusion as ensuring that changes in the plain text or key influence many bits in the cipher text.

The practical application of confusion and diffusion in the design of block ciphers to create a secure encryption method.

Transcripts

play00:01

all right so today's topic is very

play00:04

important which is called block ciphers

play00:06

so we have seen the historical ciphers

play00:09

so we understand why we need to replace

play00:13

a pair of characters instead of a single

play00:15

character right because it is easy to

play00:17

break by using statistical techniques

play00:20

like frequency analysis now uh we are in

play00:24

the modern AG so instead of uh

play00:26

encrypting pairs of characters we are

play00:29

actually going to pairs of bites right

play00:31

because we are dealing with zeros and

play00:33

ones so first we have to agree on the

play00:36

encoding okay in order to people or to

play00:39

device to communicate they have to agree

play00:41

in the language right so here encoding

play00:44

is what we are going to tell it so

play00:46

historical sers mostly operate on

play00:48

letters since they are pen and paper

play00:50

methods when working with digital data

play00:52

we can represent letters number symbols

play00:54

Etc a string of bits right thus the

play00:58

communicating parties must first agree

play01:00

on an

play01:01

encoding this is why we have standards

play01:03

right ask is the best known because it

play01:05

is American Standard but generally we

play01:08

prefer utf8 because ASI doesn't contain

play01:11

the some of special Turkish characters

play01:14

right so for this reason we cannot use

play01:16

directly ask this is why years ago most

play01:19

probably you remember whenever you chat

play01:23

in a video game or in the general uh

play01:26

chat program you could when you press a

play01:29

Turkish character and send it you will

play01:31

see a different symbol there this is

play01:33

because of asky table okay they were

play01:35

using asky okay so let me show you uh

play01:41

the full ask key table so since we are

play01:44

representing data as bits you know

play01:47

Gathering bits together allows you to

play01:49

represent more characters like because

play01:51

with a single bit you can represent zero

play01:53

or one so you can only represent two

play01:56

character right you can say a is zero

play01:58

and B is one and that's it but your

play02:00

alphabet has more letters right so you

play02:02

have to use

play02:04

more uh bits so if you use two bits 2 to

play02:09

the two is four so you can represent

play02:11

four characters right so this way

play02:13

actually if you look at the powers of

play02:14

two you will realize that the switch

play02:17

spot is something like seven or eight

play02:19

because 2 to the 7 is

play02:20

128 which is enough actually this part

play02:23

of the table is 2 to the 7 which gives

play02:27

you 128 characters

play02:31

but if you add one more bit and make it

play02:34

eight bits you can actually represent

play02:37

two to

play02:38

256 different characters right we are

play02:41

starting from zero so this is why we end

play02:43

up with

play02:44

255

play02:46

so first you have to agree on the

play02:48

encoding and here as you can see uh

play02:52

capital letters and then small letters

play02:54

appear here we have the numbers and so

play02:57

on and so forth at this extended part we

play02:59

have have more Latin characters that are

play03:01

used especially in French right but as

play03:04

you can see we don't have some special

play03:07

Turkish characters like sh or soft G

play03:11

right this is why we cannot use it also

play03:14

this picture shows explains one of the

play03:17

problems when you see a list in a

play03:20

Turkish web page or a database however

play03:22

if your name starts with ch like

play03:26

here and when you see a alphabetical

play03:29

list you would expect to find your name

play03:32

after C right but sometimes you don't

play03:36

appear there the all alphabet ends with

play03:39

the name Z and then you appear below it

play03:42

this is because

play03:43

128 is larger than these numbers okay

play03:49

this is the whole reason they are using

play03:50

asky table so CH comes a lot later than

play03:54

Z this is the whole reason so this is

play03:57

wrong database design if if you are

play03:59

allowing Turkish characters then you

play04:01

should be using a different encoding

play04:03

this is the whole Li but here I'm only

play04:06

talking this to say that we are going to

play04:08

work on bits and we have a method to

play04:11

represent every character in terms of

play04:13

bits okay we agree on that then we will

play04:15

talk about how we encrypt them okay

play04:18

so in our case a single bite is 8 Bits

play04:23

you know 1,24 by is 1 kiloby and so on

play04:27

and so forth but uh we have very length

play04:30

input in our cases for instance we are

play04:32

going to encrypt maybe one megabyte or 2

play04:34

terabytes we should have a method to do

play04:37

that right block cers can do that this

play04:39

is the whole idea

play04:41

so let's remember where we are and then

play04:44

we are going to talk about how block

play04:47

ciphers work so as I mentioned before

play04:49

cryptography solves a lot of problems

play04:51

for the case of confidentiality which is

play04:54

our current topic today we can provide

play04:59

confidence confidentiality by encryption

play05:01

algorithms like blog sers stream cers

play05:03

these are symmetric key encryption

play05:05

algorithms or you can use public

play05:07

encryption algorithms like RSA or algama

play05:10

which will'll be talking Weeks

play05:12

Later nowadays we are we have

play05:15

authenticated encryption algorithms

play05:17

which provide both confidentiality but

play05:20

also data

play05:22

authentication also you can provide data

play05:24

authentication with hash functions

play05:26

message authentication codes moreover

play05:29

you can obtain anti authentication with

play05:31

digital signature zero knowledge proofs

play05:34

or with digital signatures we also solve

play05:36

the problem of origin non reputation so

play05:39

this is actually the small picture of

play05:41

all cryptography it doesn't contain

play05:43

everything in order to talk about

play05:45

everything in cryptography actually the

play05:47

picture has to be a lot larger because a

play05:50

lot of things are missing in this

play05:51

picture like postquantum cryptography

play05:53

full homomorphic full homomorphic

play05:56

encryption multiparty computation

play05:58

Randomness and so on and so forth so it

play06:00

is a huge list and we are going to

play06:03

actually cover almost everything that is

play06:05

in this picture and some more

play06:09

okay so let's talk about cryptographic

play06:13

algorithms some algorithms use key and

play06:16

some do not for instance cryptographic H

play06:18

functions are keyless algorithms so you

play06:20

don't have a secret information that is

play06:22

shared between parties but for the case

play06:25

of encryption we need keys so that

play06:28

communic parties can agree right or for

play06:31

also for message authentication and so

play06:35

so we divide these key algorithms as

play06:37

symmetric and asymmetric or secret key

play06:39

and public key in the secret key case

play06:43

secret key algorithms use the same key

play06:45

material for both encryption and

play06:46

decryption hence the name symmetric key

play06:48

cryptography there are three types of

play06:50

algorithms in this category blog ciphers

play06:53

which is today's topic stream sers and

play06:56

another way of encryption and message

play06:59

authentication C this is not an

play07:01

encryption algorithm as I mentioned this

play07:03

is for data authentication okay here

play07:06

you're not encrypting anything but you

play07:08

are proving that the data didn't change

play07:12

after you the person received okay so we

play07:16

will see all of

play07:18

them although these algorithms look very

play07:21

different like log ciphers stream

play07:23

ciphers they can actually uh in order to

play07:26

understand one of them you have also

play07:28

need to know the other so you cannot

play07:30

simply learn block cers without learning

play07:33

steam ciphers or hash functions and so

play07:35

on so block ciphers and steam ciphers as

play07:37

I mentioned are encryption Primitives

play07:39

while the message authentication code is

play07:41

used for data and data origin

play07:45

authentication however as I mentioned

play07:47

these topics are not completely

play07:49

unrelated we can use a block CER to

play07:51

build a b stream CER and the message

play07:54

authentication code even we can turn a

play07:57

block Cipher into a hash function

play08:00

okay there are methods for that which

play08:01

we'll be talking about when we talk

play08:03

about HH functions a symmetri key crypto

play08:06

system

play08:07

part is uh relatively new compared to

play08:10

symmetric key crypto systems because

play08:13

symmetric key crypto systems actually

play08:15

dates back to the invention of the you

play08:17

know maybe the letters right but

play08:19

asymmetric key cryptography thanks to Dy

play08:23

Helman uh became famous around

play08:28

1976 so there are different types of

play08:30

algorithms here one of them is key

play08:32

agreement algorithms like def key

play08:34

exchange algorithm so this is important

play08:36

because in key crypto systems we start

play08:39

with the assumption that communicating

play08:41

parties both securely shared the secret

play08:44

key between each other right so they

play08:47

need a secure channel to do that in the

play08:50

key agreement algorithm we will do it on

play08:52

an insecure Channel this is the nice

play08:54

thing okay the whole internet actually

play08:57

works with this principle okay okay and

play09:01

imagine that you are adding a new device

play09:03

to a network right so you initially want

play09:06

to start communicating in an encrypted

play09:08

way but you don't know other devices yet

play09:11

so this is very very

play09:14

important we have public encryption

play09:16

algorithms like RSA or

play09:19

ALG uh we have digital signature

play09:22

algorithms like DSA which is digital

play09:24

signature algorithm or standard DSS or

play09:28

you can use the elliptic curve version

play09:30

and you have ecdsa elliptic curve

play09:32

digital signature algorithm which is

play09:35

again very important and all Bitcoin or

play09:38

cryptocurrency transactions are actually

play09:40

elliptic C digital signature

play09:43

okay so these are important

play09:47

topics so let's remember the basic

play09:49

definitions and terms we are going to

play09:51

talk about the cipher or a crypto system

play09:54

both are the same in my case but Cipher

play09:58

is translated into Turkish in a wrong

play10:01

way because whenever we say shifra which

play10:03

is the Turkish translation of Cipher

play10:06

actually people talk about

play10:09

passwords okay here we are talking about

play10:12

crypto systems this is

play10:14

important so that mistake is actually

play10:17

originating from maybe aund years ago

play10:21

because whenever there's something

play10:23

unknown people refer it to as shifra

play10:26

Cipher but actually it is not so here

play10:29

I'm going to talk about Cipher text in a

play10:32

second we also call it the shif and so

play10:35

so it is not in Turkish the there's a

play10:37

confusion and I hope at one

play10:40

point uh it will be corrected by

play10:44

authorities okay so what is a crypto

play10:47

system PL Tex is what you want to

play10:49

protect so PL Tex can be an SMS message

play10:51

a WhatsApp message a file in your

play10:54

computer or your voice while you are

play10:56

calling somebody and you're talking okay

play10:59

so that is the plain text that is the

play11:00

thing that you want to

play11:03

protect a crypto system or a CER is just

play11:06

a pair of algoritms that convert plain

play11:08

text to Cipher text and back okay so a

play11:11

cipher is not something that you can

play11:13

press on your phone buttons and enter

play11:15

that's is password okay this is cipher

play11:18

so Cipher text is the encrypted version

play11:21

of the plain text and Cipher text should

play11:23

appear like a random sence so this is

play11:25

the idea you have a plain text you want

play11:28

to communicate or store that data but

play11:31

you don't trust the medium that you are

play11:33

using the communication Channel we

play11:35

always assume that is insecure okay so I

play11:39

need an

play11:40

algorithm which we call encryption that

play11:43

turns this plain text into Cipher text

play11:45

which looks like just random zeros and

play11:47

ones so in the communication Channel you

play11:51

send this data and people receive that

play11:54

every enemy or other people can listen

play11:58

to this Communication channel and obtain

play12:00

this but you still feel secure because

play12:03

you know that if your algorithm is good

play12:06

nobody can learn anything about the

play12:08

plain text just by looking at the cipher

play12:11

text okay but when you're the person you

play12:14

want to communicate receive the cipher

play12:16

text they have the decryption algorithm

play12:19

and the secret key that they can decrypt

play12:21

that is the whole idea

play12:24

okay this is the nice thing so in the

play12:26

symmetri key crypto systems you have a a

play12:29

secret key and this is used for both

play12:32

encryption and decryption sometimes you

play12:34

use the identical key for encryption or

play12:36

decryption sometimes you use in a

play12:38

reverse order but important thing is

play12:41

that encryption and decryption algorithm

play12:43

are identical or closely related or if

play12:46

we want a more scientific term we say

play12:49

that one can be obtained from the other

play12:51

in polinomial time okay in public key

play12:53

cryptography this won't be the case Okay

play12:56

because everybody will know the public

play12:58

key and they will be allowed to encrypt

play13:01

any message and sent to you but only you

play13:03

have the private key where you can

play13:05

decrypt it okay that's completely a

play13:08

different scenario so symmetri case you

play13:11

have to securely share this key between

play13:14

parties before you want to communicate

play13:16

maybe meet in person you know write it

play13:19

into a paper and give it to them and so

play13:22

but

play13:24

uh however you do it we assume that the

play13:28

both party have the secret key and also

play13:31

this is the only thing that we keep

play13:32

secret okay we don't care if the

play13:35

algorithm is lost I mean if enemy knows

play13:39

the this encryption and decryption

play13:40

algorithm we don't care actually this is

play13:42

casual principle saying that it should

play13:45

be freely uh left to the uh enemy okay

play13:50

we do we don't care as long as your

play13:52

secret key is kept secure and secret

play13:56

then enemy knowing everything about

play13:58

about the algorithm shouldn't be a

play14:00

problem and this is actually how modern

play14:02

cryptography works because we have all

play14:05

of these algorithms encryption and

play14:07

decryption algorithms completely

play14:09

detailed in the standard so you know how

play14:12

the algorithm works it is not a secret

play14:15

okay so how the block ciphers work block

play14:18

ciphers operate on B bit blocks of data

play14:22

so it is

play14:23

fixed plain text is divided into b-bit

play14:26

blocks each block is encrypted by secret

play14:29

key K to produce B bit

play14:31

output output blocks form the cipher

play14:34

text so this is the whole idea instead

play14:36

of working with a variable length data

play14:38

you divide it into B bit blocks and then

play14:41

work on

play14:42

that th if you look at it in a

play14:44

mathematical way a block Cipher and the

play14:47

key you choose is actually a permutation

play14:50

from 2 to the B elements to the two to

play14:52

the B elements okay because you are your

play14:56

input is bbits and you are mapping it to

play14:58

to another bbits okay so you are

play15:01

actually your input space is two to the

play15:02

B output space is the same you are

play15:05

mapping actual elements to each other so

play15:07

this is just a

play15:09

permutation nowadays we choose b as 64

play15:12

or 128 depends actually on the use case

play15:16

sometimes you can even choose as small

play15:18

as 32 in some lightweight ciphers but if

play15:21

you choose the block size as small as

play15:24

that recall our historical ciphers we

play15:26

said that you know replacing one bit

play15:29

sorry one character with one character

play15:31

didn't work due to frequency analysis

play15:33

right so if you're choosing your bs32

play15:38

bits divided by8 this means four bytes

play15:41

right you are replacing four byes with

play15:42

four bytes so as you can

play15:45

imagine uh it is not that hard to attack

play15:49

that kind of thing also you have to you

play15:51

shouldn't be using that uh

play15:54

Cipher for a very long time because

play15:56

attacker May capture a lot of Cipher Tex

play15:59

and pl Tex which actually covers the

play16:01

whole Space so block size should be

play16:04

large 64 is acceptable but generally we

play16:08

use 128 so secret key size today we use

play16:13

for instance Advanced encryption

play16:15

standard allows three choices

play16:18

128 this is for personal use so as a

play16:22

individual person you shouldn't be

play16:24

accepting any algorithm that has

play16:27

security less than one 128 bits okay but

play16:31

if you are military you should be using

play16:33

256 bits and shouldn't accept anything

play16:36

less

play16:37

standard so you might ask what is the

play16:41

point for 100 9 to2 nobody using it okay

play16:45

so either choose this or CH choose that

play16:47

you know I mean in libraries it is

play16:49

implemented but nobody is using okay

play16:52

even in papers when we obtain results

play16:54

for all three cases we provide them in

play16:57

the paper for 128 and 256 and put 192 K

play17:03

in the appendix because of the page

play17:06

limits okay so let's go back to our

play17:10

initial claim I said that this is a

play17:12

mapping from 2 to the B elements to the

play17:14

two to the B element so this is just a

play17:16

permutation so question is how many

play17:18

permutations can you have and this

play17:21

number is really huge you can have 2 to

play17:23

the B factorial permutations mapping 2

play17:27

to the B elements to the 2 to the B

play17:28

elements and this number is really

play17:31

really just imagine b equal to 128 right

play17:34

2 to the power of 2 to the B is a huge

play17:37

number so there are a huge number of

play17:41

permutations but when you design a block

play17:44

CER and when you choose a key you are

play17:47

actually choosing a small sets from this

play17:49

huge sets Okay so a block Cipher will

play17:53

provide only a tiny fractional of all

play17:56

these available permutations for typical

play17:59

values of B and K namely 2 to the K so 2

play18:02

to the

play18:04

128 is a very small number compared to

play18:07

two to the 2 to the

play18:09

120 right so there are a huge number of

play18:13

permutations in which looks like

play18:16

Infinity a huge space so you're are

play18:18

trying to design a cipher which actually

play18:20

chooses a good subset of it for security

play18:25

for any chosen key we expect a good

play18:27

block Cipher to act like as if it is a

play18:30

randomly selected permutation so encrypt

play18:33

analysis this will make more

play18:36

sense even more we expect no relation

play18:39

between permutations that are obtained

play18:41

by keys that are related

play18:43

somehow we will return to this when we

play18:46

are talking about related key Crypt

play18:48

analysis but here the IDE is as follows

play18:50

so you design the block Cipher you chose

play18:53

a key so this key and the cipher

play18:55

actually Maps two to the B elements to

play18:57

the two to the B element right this is a

play18:59

permutation if you make a small change

play19:01

to your secret key maybe flipping the

play19:03

rightmost bit let's say then it will

play19:06

give you a completely different

play19:08

permutation there shouldn't be a

play19:10

relation between these two cases okay

play19:12

that is the idea and if there is such a

play19:15

relation then we can perform a related

play19:17

key attack which breaks the system

play19:20

okay so before moving on to uh examples

play19:25

and see what kind of ciphers we have to

play19:28

today we have to understand how we

play19:30

design them or what makes a block

play19:33

ciphers a good Cipher so there are some

play19:36

abstract Concepts and there's not an

play19:39

actually

play19:40

a mathematical way to actually show that

play19:44

this uh Cipher is good or not currently

play19:46

what we are doing is when we design a

play19:49

cipher we actually try to break it with

play19:51

every non Crypt analysis techniques and

play19:53

see if it is secure or not okay you

play19:56

cannot prove that it is secure maybe one

play19:58

year later somebody may come up with a

play20:01

new crypto analysis technique and break

play20:03

the

play20:04

cipher so let's look at this abstract

play20:06

Concepts K Channon is considered as the

play20:08

father of information Theory and

play20:10

contribut to the field of Crypt analysis

play20:12

for USA defense during World War II his

play20:16

Landmark paper communication theory of

play20:18

secrecy systems introduced the t ideas

play20:20

of confusion and diffusion for practical

play20:22

Cipher design so we will be talking

play20:25

about sboxes permutations and so on all

play20:28

those come from these confusion and

play20:29

diffusion ideas okay our aim is to

play20:32

provide confusion and

play20:34

diffusion confusion is defined by him as

play20:37

follows to make the relation between the

play20:39

simple statistics of the cipher text and

play20:41

the simple description of the key a very

play20:43

complex and invol

play20:45

one and for the diffusion the

play20:48

statistical structure of the plain text

play20:50

which leads to its redundancy is

play20:51

dissipated into long range statistics in

play20:54

the

play20:55

cryptogram so note that this concept

play20:58

concepts of confusion and diffusion are

play20:59

not measurable Concepts they're absolute

play21:02

Concepts right they're abstract so must

play21:06

try to give alternative definitions for

play21:09

this so confusion the cipher T

play21:11

statistics should depend on the plain T

play21:13

statistics in a manner too complicated

play21:15

to be exploited by the Crypt

play21:18

analyst diffusion each digit of the pl

play21:21

text and each digit of the secret key

play21:23

should influence many digit of the cyer

play21:25

text so these definitions are a lot

play21:27

better or easier to understand let's say

play21:30

because our aim is to you know map bbits

play21:33

to bbits right so by confusion we are

play21:36

trying to design it so that by looking

play21:38

at the cipher text for instance last

play21:41

bite of the cipher Tex this shouldn't

play21:43

give you an idea about the last bite of

play21:45

the pl text right you are causing a

play21:47

confusion so you are

play21:50

actually making some modifications like

play21:52

substitutions so this try creates a

play21:55

confusion but if you work on bytes for

play21:57

instance then you'll be working on

play21:59

individual B right diffusion says that

play22:02

if you make a small change of one part

play22:04

of the cipher like one bit it should

play22:07

affect as many bits as possible so this

play22:11

is the whole idea

play22:13

actually uh in terms of mathematics when

play22:16

we assume that you have a plain text and

play22:18

we encrypted and obtain a cipher text so

play22:21

if you flip one bit of the plain text we

play22:24

actually expect half of the cipher text

play22:27

bits to be changed this is the actually

play22:31

uh how we Define it

play22:35

okay

Rate This

5.0 / 5 (0 votes)

相关标签
Block CiphersCryptographyData EncryptionSecurityEncoding StandardsConfidentialityKey AlgorithmsSymmetric KeyAsymmetric KeyCryptanalysisModern Cryptography
您是否需要英文摘要?