You are on page 1of 51

FROM THE PREVIOUS COURSE

ENCRYPTION TECHNIQUES

RSA

DES, TDES

GALOIS FIELDS

11/6/2018 Luminita Scripcariu 1


QUESTION 1
Which of the following algorithms use
private encryption keys?
 AES
 DES
 IDEA
 RSA

11/6/2018 Luminita Scripcariu 2


QUESTION 1
Which of the following algorithms use
private encryption keys?
AES
DES
IDEA
 RSA

11/6/2018 Luminita Scripcariu 3


QUESTION 2
How many iterations does DES algorithm run?
 1
 4
 10
 16

11/6/2018 Luminita Scripcariu 4


QUESTION 2
How many iterations does DES algorithm run?
 1
 4
 10
 16

11/6/2018 Luminita Scripcariu 5


QUESTION 3
Which of the following statements are true?
 RSA is a loss compression technique
 RSA uses public encryption keys
 RSA processes decimal values
 RSA is used by JPEG

11/6/2018 Luminita Scripcariu 6


QUESTION 3
Which of the following statements are true?
 RSA is a loss compression technique
RSA uses public encryption keys
RSA processes decimal values
 RSA is used by JPEG

11/6/2018 Luminita Scripcariu 7


QUESTION 4
Which of the following codes is applied on
binary sequences?
 ASCII
 AES
 DES
 RSA

11/6/2018 Luminita Scripcariu 8


QUESTION 4
Which of the following codes is applied on
binary sequences?
 ASCII
 AES
 DES
 RSA

11/6/2018 Luminita Scripcariu 9


QUESTION 5
Which of the following values can be used
as an RSA encryption exponent when
p=7 and q=11?
 3
 5
 7
 11

11/6/2018 Luminita Scripcariu 10


QUESTION 5
Which of the following values can be used
as an RSA encryption exponent when
p=7 and q=11?
 3
 5
 7
 11

11/6/2018 Luminita Scripcariu 11


PROPOSED EXERCISE

• Calculate the decryption exponent of RSA


algorithm for the public key (3, 85).

11/6/2018 Luminita Scripcariu 12


QUESTION 6
How do we calculate the multiplication of
two symbols in GF(2m):
 by multiplying the symbols’ polynomials
and reducing the result modulo-p(x) (p(x)
is the m-order primitive polynomial)
 modulo-2 bit-by-bit
 modulo-m
 using the exponential expression of the
symbols
11/6/2018 Luminita Scripcariu 13
QUESTION 6
How do we calculate the multiplication of
two symbols in GF(2m):
 by multiplying the symbols’ polynomials
and reducing the result modulo-p(x) (p(x) is
the m-order primitive polynomial)
 modulo-2 bit-by-bit
 modulo-m
using the exponential expression of the
symbols
11/6/2018 Luminita Scripcariu 14
REMEMBER: GF(8)

• GF(8) = {0, 1, 2, 3, 4, 5, 6, 7}
• p(x)=x3 +x +1
• m=3 (bits/symbol)

11/6/2018 Luminita Scripcariu 15


QUESTION 7
Calculate 5+6 in GF(8) and tick the result:
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 16
QUESTION 7
Calculate 5+6 in GF(8) and tick the result:
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 17
QUESTION 8
Calculate 2x7 in GF(8) and tick the result:
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 18
QUESTION 8
Calculate 2x7 in GF(8) and tick the result:
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 19
QUESTION 9
What is the value of the expression 2+3*5 in GF(8)?
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 20
QUESTION 9
What is the value of the expression 2+3*5 in GF(8)?
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 21
QUESTION 10
What is the value of 6/5 in GF(8)?
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 22
QUESTION 10
What is the value of 6/5 in GF(8)?
 0
 1
 2
 3
 4
 5
 6
 7
11/6/2018 Luminita Scripcariu 23
SOLVED EXERCISE
• Calculate the value of the following
expression in GF(8):

(5+3*4+6^7)/2

ANSWER KEY: 3*4=2^3*2^2=2^5=7 ,


6^7=1, 5+7+1=101+111+001=011=3

3/2=(2^3)*2^(-1)=2^2=4
11/6/2018 Luminita Scripcariu 24
PROPOSED EXERCISE

• Calculate 7-DFT of the vector

[1, 0,0,2,0,0,3], in GF(8).

11/6/2018 Luminita Scripcariu 25


W7 Matrix
Omega7 = [1 1 1 1 1 1 1;
1 2 4 3 6 7 5;
1 4 6 5 2 3 7;
1 3 5 4 7 2 6;
1 6 2 7 4 5 3;
1 7 3 2 5 6 4;
1 5 7 6 3 4 2];

11/6/2018 Luminita Scripcariu 26


Remark
• All the arithmetic operations between
matrices and vectors are done by obeying
the rules of the Galois field, not like in the
case of decimal numbers!

11/6/2018 Luminita Scripcariu 27


MULTIPLICATION MATRIX IN
GF(8)
PGF8 = [ 0 0 0 0 0 0 0 0;
0 1 2 3 4 5 6 7;
0 2 4 6 3 1 7 5;
0 3 6 5 7 4 1 2;
0 4 3 7 6 2 5 1;
0 5 1 4 2 7 3 6;
0 6 7 1 5 3 2 4;
0 7 5 2 1 6 4 3];

11/6/2018 Luminita Scripcariu 28


GF(16)
• GF(16) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15}
• p19(x)=x4 +x +1
• m=4 (bits/symbol)
• Any symbol raised to the power of 15 is 1.
• It may be used 3-DFT, 5-DFT,15-DFT.

11/6/2018 Luminita Scripcariu 29


Powers of 2 in GF(16)

1 2 4 8 3 6 12 11

5 10 7 14 15 13 9 1

11/6/2018 Luminita Scripcariu 30


SOLVED EXERCISE

• Calculate the following expression in


GF(16):

(15+4*6+2^4)/5

11/6/2018 Luminita Scripcariu 31


PROPOSED EXERCISE

• Calculate the following expression in


GF(16):

(9+3*5+10^2)/8

11/6/2018 Luminita Scripcariu 32


Example
• Calculate 3-IDFT of the vector [0 1 2] in GF(16),
using 6 as the 3rd root of 1 and the primitive
polynomial p(x)=x4+x+1.

Tips: Write the inverted matrix Omega-3 for 3-IDFT


in GF(16) and multiply it with the input vector.
Use the powers of 2: [ 1 2 4 8 3 6
12 11 5 10 7 14 15 13 9 1]

11/6/2018 Luminita Scripcariu 33


AES

11/6/2018 Luminita Scripcariu 34


About AES
• AES - Advanced Encryption Standard
• Created by RIJNDAEL
• Defined in GF(256)
• Private-key: 128, 192, 256 bits
• Robust (it resists against cryptographic attacks)
• Low cost (the algorithm is computational efficient,
it has low complexity and free license)
• It is flexible, simple, easy to implement both as
software and hardware application.
11/6/2018 Luminita Scripcariu 35
AES Steps
Each group of 16 bytes of data is written in
the 4-by-4 state matrix.
• Bytes Substitution (SubBytes step)
• Shift Rows
• Mix Columns
• Add Round Key
These steps are made for several iterations.

11/6/2018 Luminita Scripcariu 36


AES - 128

11/6/2018 Luminita Scripcariu 37


1. SubBytes

11/6/2018 Luminita Scripcariu 38


Remarks
• bi is the bit at position i in the date byte a.
• ci is the bit at position i in the constant byte
01100011 = 0x63.
• Substitution step is non linear.

11/6/2018 Luminita Scripcariu 39


2. ShiftRows

11/6/2018 Luminita Scripcariu 40


3. MixColumns

11/6/2018 Luminita Scripcariu 41


Polynomial Column Encoding

11/6/2018 Luminita Scripcariu 42


4. AddRoundKey

It includes Key Schedule.

11/6/2018 Luminita Scripcariu 43


AES Features
• AES run for 10 iterations if the key is 128
bits long, 12 iterations for 192-bit key and
14 iterations for 256-bit key.
• AES attacks are successful for 7, 8 and 9
iterations depending on the key length.
• AES is the most robust encryption
algorithm used at present.
• Another efficient and robust encryption
algorithm comparable to AES is SAFER+.
11/6/2018 Luminita Scripcariu 44
Proposed Exercise
Calculate the substitution value of 132 in AES.

Tips:
a. Express the number in binary form.
b. Denote the bits: b0 (MSB), b1, ...b7 (LSB).
c. Calculate the values of the bits using the formula:

ci = 0110.0011

11/6/2018 Luminita Scripcariu 45


DATA ENCODING
TECHNIQUES
• COMPRESSION
• ENCRYPTION
• ERROR CORRECTION
• LINE CODES

11/6/2018 Luminita Scripcariu 46


ERROR-CORRECTION
DATA CODING TECHNIQUES

11/6/2018 Luminita Scripcariu 47


ADVANTAGES
An error-correcting code:
• Decreases the effects of additive noise
and fading phenomenon
• Compensates the effects of interferences
and distortions produced by the
communication channel
• Allows the using of a low transmission
power and low-size equipment and
antenna at the same received signal
quality (related to BER).
11/6/2018 Luminita Scripcariu 48
OPERATIONS OF ERROR-
CORRECTING DECODER
1. Detects the errors
2. Finds the locations of errors
3. Corrects the erroneous symbols.
4. Extracts data (data decoding).

11/6/2018 Luminita Scripcariu 49


Definition
• Hamming distance between two binary
sequences is equal to the number of
positions corresponding to different bit
values in the two sequences.

• Example: 1110 and 1011 are different on


two positions:
dH = 2

11/6/2018 Luminita Scripcariu 50


PROPOSED EXERCISE

• Calculate the Hamming distance between


the 7-bit sequences corresponding to the
numbers 120 and 56.

11/6/2018 Luminita Scripcariu 51

You might also like