Docsity

Types Cryptosystem: Implementation Security Services - Lecture Slides | ECE 646, Study notes of Cryptography and System Security

Partial preview of the text

Download Types Cryptosystem: Implementation Security Services - Lecture Slides | ECE 646 and more Study notes Cryptography and System Security in PDF only on Docsity!

Types of Cryptosystems

ECE 646 - Lecture 3

Implementation of

Security Services

Block vs. stream ciphers

Types of Cryptosystems (1)

Cryptosystem (Cipher)

message

ciphertext

cryptographic

key

n bits

m bits

k bits

Block vs. stream ciphers

Stream

cipher

memory

Block

cipher

K K

M 1 , M 2 , …, Mn m 1 , m 2 , …, mn

C 1 , C 2 , …, Cn c 1 , c 2 , …, cn

Ci=fK(Mi) Ci = fK(mi, mi-1, … , m 2 , m 1 )

Every block of ciphertext is a function of only one corresponding block of plaintext

Every block of ciphertext is a function of the current and all proceeding blocks of plaintext

Substitution Cipher

Key =

a b c d e f g h i j k l m n o p q r s t u v w x y z f q i s h n c v j t y a u w d r e x l b m z o g k p

TO BE OR NOT TO BE

BD QH DX WDB BD QH

TO BE OR NOT TO BE

enciphering

deciphering

Number of keys = 26! ≈ 4 ⋅ 1026

Definition of a cryptosystem (cipher)

M C

family of enciphering transformations

family of deciphering transformations

K key K

message space key space ciphertext space

enciphering transformation EK(M)

deciphering transformation DK(C)

K ∈ K M ∈ M DK(EK(M)) = M

Key Distribution Problem

N - Users N · (N-1) 2

Keys

Users Keys

100 5, 1000 500,

Digital Signature Problem

Both corresponding sides have the same information

and are able to generate a signature

There is a possibility of the

  • receiver falsifying the message
  • sender denying that he/she sent the message

Public Key (Asymmetric) Cryptosystems

Public key of Bob - KB Private key of Bob -^ kB

Alice Bob

Network

Encryption Decryption

Classification of cryptosystems Terminology

secret-key

symmetric

symmetric-key

classical

conventional

public key

asymmetric

One-way function

X f(X) Y

f-1(Y)

EXAMPLE:

f: Y=f(X) = AX^ mod P

where P and A are constants, P is a large prime, A is an integer smaller than P

Number of bits of P Average number of multiplications necessary to compute f f - 1000 1500 1030

Trap-door one-way function

X f(X) Y

f-1(Y)

Whitfield Diffie and Martin Hellman

“ New directions in cryptography ,” 1976

PUBLIC KEY

PRIVATE KEY

Message

Hash function

Public key cipher

Alice

Signature

Alice’s private key

Bob

Hash function

Alice’s public key

Non-repudiation

Hash value 1

Hash value 2

Hash value

Public key cipher

yes no

Message Signature

Hash function

arbitrary length

message

hash function

h(m) hash value

h

m

fixed length

Hash functions Basic requirements

  1. Public description, NO key
  2. Compression

arbitrary length input → fixed length output

  1. Ease of computation

Hash functions Security requirements

It is computationally infeasible

Given To Find

h(m) m

m and h(m)

m ’ ≠ m , such that

h(m’) = h(m)

m ’ ≠ m , such that

h(m’) = h(m)

Message

Hash function

Public key cipher

Alice

Signature

Alice’s private key

Bob

Hash function

Alice’s public key

Non-repudiation

Hash value 1

Hash value 2

Hash value

Public key cipher

yes/no

Message Signature

Message

Hash function

Public key cipher

Alice

Signature

Alice’s private key

Bob

Hash function

Alice’s public key

Non-repudiation

Hash value 1

Hash value 2

Hash value

Public key cipher

yes/no

Message Signature

Signature generation function

Signature verification function

MAC functions Security requirements

Given zero or more pairs

mi, MAC(mi) i = 1..k

it is computationally impossible to find any new pair

m’, MAC(m’)

such that

m’ ≠ mi i = 1..k

CBC-MAC (Cipher Block Chaining MAC)

Secret-key cipher

KAB

M 1

KAB

M 2

KAB

Mt

Message MAC

Secret-key cipher

Secret-key cipher

Relations among security services

INTEGRITY

AUTHENTICATION

NON-REPUDIATION

CONFIDENTIALITY

Message

Hash function

Public key cipher

Alice

Signature

Alice’s private key

Bob

Hash function

Alice’s public key

Non-repudiation

Hash value 1

Hash value 2

Hash value

Public key cipher

yes no

Message Signature

Message

Secret key algorithm

Alice

MAC

Secret key of Alice and Bob

Bob

Secret key algorithm

Authentication

MAC’

MAC

yes no

Message MAC

Secret key of Alice and Bob

KAB KAB

Hybrid Systems

Average Decryption Speed

for implementations based on the same technology

Triple DES deciphering speed

RSA-1024 deciphering speed

≈ (^100) ≈ 1000

software hardware

Basic operations of secret key ciphers - S-box

S-box n x m

ROM

Software Hardware

C

ASM

WORD S[1<<n]= { 0x23, 0x34, 0x

.............. }

S DW 23H, 34H, 56H … ..

direct logic

n

m

2 n^ words

n- bit address

m- bit output

x x (^12) ...

xn

...^ y y^12 ym

S

Substitution

Permutation

C

order of wires

P

Software Hardware

ASM

sequence of instructions <<, |, &

sequence of instructions ROL, OR, AND

n

n

x 1 x 2 x 3 x n -1x n

...

y 1 y 2 y 3 y n -1y n

Basic operations of secret key ciphers - P-box

P-box n x n

Basic Operations of the Public Key Cryptosystem RSA

Encryption

Decryption

ciphertext (^) = plaintext (^) mod public key modulus

public key exponent

ciphertext = plaintext mod private key modulus

private key exponent

k -bits k -bits k -bits

k -bits k -bits^ k -bits

Alice Bob

session key ( random secret-key )

Bob’s public key

Hybrid Systems

Bob’s private key

Network

Session key encrypted using Bob’ s public key

Message encrypted using session key

Hybrid Systems - Sender’s Side (2)

Alice

session key random

Bob’s public key

message

Secret key cipher

Public key cipher

Session key encrypted using Bob’ s public key

Message encrypted using session key

Classification of attacks (2)

Known plaintext attack

Given:

Looked for:

Example:

remaining plaintext

ciphertext

or key

guessed fragment of the plaintext

exhaustive key search

(brute-force ) attack

successive

keys

cipher

Classification of attacks (3)

Chosen plaintext attack

Given:

Looked for:

Example:

key

Differential cryptanalysis

Encryption module (^) key

Capability to encipher

an arbitrarily chosen

fragment of the plaintext

Encryption module (^) key

Mi Mi*

Ci Ci

i=1..N

Classification of attacks (4)

Chosen ciphertext attack

Given:

Looked for:

key

Encryption module (^) key

Capability to decipher

an arbitrarily chosen

fragment of the ciphertext