real time image encryption with rsa algorithmpeople.bu.edu/tyyang/rsa.pdfboston university slideshow...

Post on 09-Mar-2018

227 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Real Time Image Encryption with

RSA Algorithm RSA Group

Final Presentation Date: 4/30/2014

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

2

9/19/14

Team Members

§  Jing Zheng §  Abantika Ghosh §  Akash Kadakia §  Tianyu Yang §  Sumeet Sharma

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

3

9/19/14

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

4

9/19/14

BASIC FUNCTIONALITY

Milestone 1 Milestone 2

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

5

9/19/14

RSA ALGORITHM KEY GENERATION

•  PUBLIC KEY 1: N=P*Q will be calculated.

•  PUBLIC KEY 2: Calculate Euler’s Totient Z=(P-1)*(Q-1). Choose any number e such that 1 < e < Z and e is coprime to Z.

•  PRIVATE KEY:

ENCRYPTION

d.e=1(modφ(n)))  

DECRYPTION

•  c=m^e (mod n)

•  m=c^d (mod n)

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

6

9/19/14

VERILOG STRUCTURE

MODULE GEN_KEY

MODULE ENCRYPTION

MODULE

DECRYPTION

MODULE DIVISION

MODULE POWER

MODULE MOD

PUB_KEY1

PUB_KEY1

PUB_KEY2

PRI_KEY

𝑐= 𝑚↑𝑒 (mod  n)

𝑚= c↑𝑑 (mod  n)

PRI_KEY

PUB_KEY2

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

7

9/19/14

MODULE GEN_KEY INPUTS •  CLOCK •  RESET •  P (prime no.1) •  Q (prime no.2) OUTPUTS •  PUBLIC KEY 1 •  PUBLIC KEY 2 •  PRIVATE KEY •  READY

Behavior simulation result of GEN_KEY

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

8

9/19/14

SUB MODULES GEN_KEY

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

9

9/19/14

MODULE ENCRYPTION INPUTS •  CLK,RST,ENABLE •  DATA_IN •  PUBLIC KEY 1 •  PUBLIC KEY 2 •  PRIVATE KEY

OUTPUTS •  DATA_OUT •  READY Behavior simulation result of Encryption

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

10

9/19/14

MODULE DECRYPTION INPUTS •  CLK,RST,ENABLE •  DATA_IN •  PUBLIC KEY 1 •  PUBLIC KEY 2 •  PRIVATE KEY

OUTPUTS •  DATA_OUT •  READY Behavior simulation result of Decryption

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

11

9/19/14

SUB MODULES ENCRYPTION

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

12

9/19/14

MODULE POWER INPUTS •  CLOCK,RESET •  BASE •  EXPONENT

OUTPUTS •  DATA_OUT •  READY

Behavior simulation result of Power Function

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

13

9/19/14

SUB MODULES POWER

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

14

9/19/14

MODULE MOD INPUTS •  CLOCK,RESET •  DIVIDEND •  DIVIDER

OUTPUTS •  DATA_OUT •  READY

Behavior simulation result of MODULUS

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

15

9/19/14

SUB MODULES MOD

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

16

9/19/14

MODULE DIV INPUTS •  CLOCK,RESET •  DIVIDEND •  DIVIDER

OUTPUTS •  QUOTIENT •  REMAINDER •  READY Behavior simulation result of DIVIDE

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

17

9/19/14

PUTTING IT ALL TOGETHER

•  All the sub-modules were tested individually. •  The input data vector is loaded into the top module from a .txt file. •  The test bench stores the output in another .txt file. •  To test our design we input all numbers from 0 to 15. •  The input and output text file consist of an image stored in binary

format. •  This is done using two functions in MATLAB to convert an image into

it’s binary equivalent and vice-versa. •  One function converts the image into binary from and acts as the input

which is then encrypted. •  Another function converts the decrypted text output into an image.

Boston University Slideshow Title Goes Here

Matlab functions

00000110 00000100 00000100 00001010 00010010 00100100 00100010 10010110 10101010 00101101 11001000 00101001

; ; ;

Trustees Presentation

18

9/19/14

Function: Image2Data

Function: Data2Image

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

19

9/19/14

MODULE RSA ENCRYPTION INPUTS •  CLOCK,RESET •  ENABLE •  DATA_IN •  P •  Q

OUTPUTS •  READY •  DATA_OUT

Behavior simulation result of RSA ENCRYPTION

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

20

9/19/14

MODULE RSA DECRYPTION INPUTS •  CLOCK,RESET •  ENABLE •  DATA_IN •  P •  Q

OUTPUTS •  READY •  DATA_OUT

Behavior simulation result of RSA DECRYPTION

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

21

9/19/14

RESULT

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 1 8 24 13 11 39 31 2 15 37 29 6 4 44 9

DATA IN ENCRYPTED DATA DECRYPTED DATA

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

22

9/19/14

RSA CHIP GRAPH

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

23

9/19/14

POST-ROUTE CLOCK TREE

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

24

9/19/14

CLOCK TREE WITH DELAY

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

25

9/19/14

CLOCK TREE WITH DELAY

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

26

9/19/14

CLOCK TREE MIN MAX DELAY

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

27

9/19/14

CHIP LAYOUT

Chip size :

145.725 um * 144.185 um

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

28

9/19/14

PERFORMANCE ANALYSIS

Critical Path

Other end arrival time 0.245

Setup 0.292

Phase Shift 20

Required time 19.953

Arrival Time 19.772

Slack Time 0.181

Clock Rise Edge 0.000

Clock Network Latency(Pro) 0.272

Begin point Arrival Time 0.272 ������

Critical path of the Design

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

29

9/19/14

CHALLENGES FACED

•  Calculating the modulus of equal values was giving erroneous results. This bug was later fixed.

•  Very long time to process a number as big as 255.

•  Small glitch in the divide module during synthesis.

•  And of course, the NANGATE Library.

Boston University Slideshow Title Goes Here

Real Time Image Encryption with RSA Algorithm

30

9/19/14

top related