Cookbook for Assignment 4 - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Cookbook for Assignment 4

Description:

To implement a primitive digital signature system using the RSA algorithm. 3 pieces of program ... Digital signature system. To allow the receiver to verify the ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 10
Provided by: csp19
Category:

less

Transcript and Presenter's Notes

Title: Cookbook for Assignment 4


1
Cookbook for Assignment 4
  • william_at_cs.pitt.edu

2
Outline
  • Overview of Assign 4
  • Concepts and Algorithm
  • Implementation Details

3
Overview
  • To implement a primitive digital signature system
    using the RSA algorithm
  • 3 pieces of program
  • RSA Envelop
  • Sending and Receiving emulator
  • Byte editor to tamper the file content

4
Concepts and Algorithm
  • Digital signature system
  • To allow the receiver to verify the authenticity
    of the message
  • Instead of decrypting the entire message, only
    the signature of the message is being decrypted
  • Procedure

"DECRYPTED" Signature
Signature
Signature
yes
DECRYPT
ENCRYPT
Digested

?
No
MESSAGE
MESSAGE
Signature
Digested
5
Concepts and Algorithm
  • RSA Algorithm
  • The well known algorithm in public key
    cryptography
  • E,D,NP,Q?N,(P,Q)??,E, (?,E)?D
  • Encryption and Decryption of M
  • Encryption C ME mod N
  • Decryption M CD mod N

6
Impl. Details
  • BigInteger
  • probablePrime() //to generate a prime
  • subtract(), multiply() //arithmetic ops
  • modInverse() //compute D from E and ?
  • modPow() //to encrypt and decrypt

7
Impl. Details
  • Objects and Bytes I/O
  • ObjectOutputStream.writeObject()
  • ObjectInputStream.readObject()
  • FileInputStream.read()
  • FileOutputStream.write()

8
Impl. Details
  • MessageDigest

byte contentsnew byte(int)orig_text.length()
MessageDigest m1 MessageDigest.getInstance("M
D5") in.read(contents) m1.update(contents) byte
digest m1.digest()
9
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com