27
Xu Bowen iple and Practice of Computer Algor Summer 2015 ple Implementation of Algori in Data Encryption

×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Embed Size (px)

Citation preview

Page 1: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Xu Bowen

Principle and Practice of Computer AlgorithmsSummer 2015

Simple Implementation of Algorithmin Data Encryption

Page 2: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Characteristics of Key:

Symmetric , Public

Processing of Plaintext :

Block (DES , Knapsack , RSA)Stream (RC4 , SEAL)

Categorization

Page 3: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

∆ Symmetric Key Cryptosystem

∆ Public Key Cryptosystem

∆ Authentication

Page 4: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Symmetric Key Cryptosystem

DES Algorithm --- Feistel Structure

Stream Cipher --- Exclusive OR

Page 5: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Symmetric Key Cryptosystem

Disadvantages :

× Key Distribution : Negotiation

× Key Management : N*(N-1)/2

Page 6: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Public Key Cryptosystem

Knapsack Algorithm

Page 7: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

In 1978 , Knapsack System, a public key cryptosystem, was raised by Merkle and Hellman based on its intractability

Page 8: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Given N+1 Positive integers :and

Decide the solution of where

() called the vectors of knapsack

Knapsack Problem (01)

Page 9: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Known , calculating is easy

Oppositely , known calculating is difficult

• f[i-1][j-a[i]] = true -> f[i][j] = true, recording : g[i][j] = true;

• F[i-1][j] = true -> f[i][j] = true, recording : g[i][j] = false;

Knapsack Problem (01)

Page 10: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

Special vectors of knapsack :

When given a positive integer , calculating is easy

Generally, when , calculating is also easy

This kind of knapsack is called Super Increasing Knapsack

Page 11: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

Generating the vectors of super increasing knapsack

Choose two integers ,, W < M and gcd(W, M) = 1

Calculating

Calculating

Page 12: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

Public Key : k = (

Private Key : k’ = ()*(, because it can be easily calculated)

Page 13: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

Encryption :

Plaintext : m = () where Public Key : k = ()

Page 14: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Knapsack Algorithm

Decryption :

mod M () mod M () mod M () mod M

Super Increasing Knapsack

Page 15: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Public Key Cryptosystem

RSA Algorithm

Page 16: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

RSA Algorithm

In 1978 , RSA System, a public key cryptosystem, was raised by Rivest , Shamire and Adleman based on Decomposition of BigNumber and Detection of Primes

Page 17: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

RSA Algorithm

Generating two big primes P, Q (PQ)

Let n = P*Q, (n) = (P-1)*(Q-1)

Choose an integer e, where 1<e<(n) and gcd((n), e) = 1

Calculating (existence : ax+by=1)

Page 18: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Public Key : k =

Private Key : k’ = (P, Q, )

RSA Algorithm

Page 19: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Encryption :

Plaintext : m , where m < nPublic Key : k =

RSA Algorithm

Page 20: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Decryption :

*()

RSA Algorithm

Page 21: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Why must we need authentication ?

Authentication

Page 22: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Attack to Information Security :

Passive Attack : Cut-Out & Analysis

Active Attack : Forge , Resend , Distort , Reject

Denial : deny the info sender sends

Authentication

Page 23: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Defense :

Passive Attack : Encryption

Active Attack , Denial : Digital Signature

Authentication

Page 24: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Reliability

Unforgeability

Nonduplication

Unchangeability

Nonrepudiation

Digital Signature

Page 25: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Digital Signature

Info Info

Summary Summary

Hash Hash

Digital signature

Encryption (RSA) Decryption (RSA)

AUTHENTICATION

Private Key Public Key

Page 26: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Q & A

Page 27: ×Key Distribution : Negotiation ×Key Management : N*(N-1)/2

Thx for listening

Xu Bowen