Digital Signatures Assignment

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
Network Security: Lab#2 J. H. Wang Apr. 28, 2011.
1 Chapter 7-2 Signature Schemes. 2 Outline [1] Introduction [2] Security Requirements for Signature Schemes [3] The ElGamal Signature Scheme [4] Variants.
Digital Signatures and Hash Functions. Digital Signatures.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Lecture 13 Message Signing
Chapter 3 Encryption Algorithms & Systems (Part C)
Overview of Digital Signatures Introduction To Networks and Communications (CS 555) Presented by Bharath Kongara.
Csci5233 Computer Security1 GS: Chapter 5 Asymmetric Encryption in Java.
Security using Encryption Security Features Message Origin Authentication - verifying that the sender is who he or she says they are Content Integrity.
Csci5233 Computer Security1 GS: Chapter 6 Using Java Cryptography for Authentication.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
CS555Topic 211 Cryptography CS 555 Topic 21: Digital Schemes (1)
AQA Computing A2 © Nelson Thornes 2009 Section Unit 3 Section 6.4: Internet Security Digital Signatures and Certificates.
Secure r How do you do it? m Need to worry about sniffing, modifying, end- user masquerading, replaying. m If sender and receiver have shared secret.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Chapter 16 Security Introduction to CS 1 st Semester, 2012 Sanghyun Park.
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
Lecture 8 Overview. Secure Hash Algorithm (SHA) SHA SHA SHA – SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits.
What is Digital Signature Building confidentiality and trust into networked transactions. Kishankant Yadav
Privacy versus Authentication Confidentiality (Privacy) –Interceptors cannot read messages Authentication: proving the sender’s identity –The Problem of.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
1 CMPT 471 Networking II Authentication and Encryption © Janice Regan,
1 Session 4 Module 6: Digital signatures. Digital Signatures / Session4 / 2 of 18 Module 4, 5 - Review (1)  Java 2 security model provides a consistent.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
©Brooks/Cole, 2003 Chapter 16 Security. ©Brooks/Cole, 2003 Define four aspects of security in a network: privacy, authentication, integrity, and nonrepudiation.
Public / Private Key Example Dan Fleck CS 469: Security Engineering Coming up: Today 11.
Secure Instant Messenger in Android Name: Shamik Roy Chowdhury.
LAB#4 PROGRAMMING USING JAVA CRYPTOGRAPHIC LIBRARIES CPIT 425.
第五章 电子邮件安全. Security is one of the most widely used and regarded network services currently message contents are not secure –may be inspected.
Security Depart. of Computer Science and Engineering 刘胜利 ( Liu Shengli) Tel:
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Information and Computer Security CPIS 312 Lab 9
Java Assignment Related
Lab#7 Digital signature Cpit 425
Cryptography: an overview
Cryptography: an overview
Security is one of the most widely used and regarded network services
Unit 3 Section 6.4: Internet Security
Symmetric and Asymmetric Encryption
1. Public Key Encryption (A Simple Case)
Information Security message M one-way hash fingerprint f = H(M)
Cryptographic Hash Function
CSCE 715: Network Systems Security
Section 4.6: Digital Signatures
Chapter 5: The Art of Ensuring Integrity
Introduction Used for communication to verify
Instructor Materials Chapter 5: The Art of Ensuring Integrity
Practical work with PKI
S/MIME T ANANDHAN.
Information Security message M one-way hash fingerprint f = H(M)
NET 311 Information Security
Secure Electronic Transaction (SET) University of Windsor
Information Security message M one-way hash fingerprint f = H(M)
Cryptography: an overview
Digital Signatures…!.
Instructor Materials Chapter 5: The Art of Ensuring Integrity
Best Digital Signature Service in Noida. Electronic Record 1.Very easy to make copies 2.Very fast distribution 3.Easy archiving and retrieval 4.Copies.
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Secure How do you do it? Need to worry about sniffing, modifying, end-user masquerading, replaying. If sender and receiver have shared secret keys,
Chapter -8 Digital Signatures
Instructor Materials Chapter 5: Ensuring Integrity
Security: Integrity, Authentication, Non-repudiation
Chapter 8 roadmap 8.1 What is network security?
Digital Signature Standard (DSS)
Presentation transcript:

Digital Signatures Assignment - By Teja Shinde

Digital Signatures – Overview Basis – Sender A and Receiver B A encrypts the message with its private key and sends it to B. B decrypts the message with A’s public key. Hence, we achieve Integrity, Authentication and non-repudiation with Digital Signatures. Digital Signatures are very similar to the process of physically signing important documents to prove its validity.

Steps for Digital Signature Process RSA and Digital Signatures We can use RSA for performing digital signature over a message. Steps: Sender A uses SHA/MD5 algorithm to calculate the Message Digest(MD1) over the Original Message(M). Sender encrypts MD1 with her private key (Using RSA). The output of this step is the Digital Signature(DS) of A.

3. Sender A sends M + DS to B. 4. B uses same Message Digest Algorithm used by A to calculate its Message Digest(MD2) 5. Now B uses A’s public key to decrypt the DS. - Only A’s public key can perform decryption - Output of this step is the original MD – MD1. 6. B compares the calculated MD2 and retrieved MD1. If MD1 = MD2 – B is assured that OM is correct and unaltered and coming from A.

Program Implementation in Java. Packages to be imported Package – java.security Classes - Signature, SignatureException, KeyPair, KeyPairGenerator. Package – sun.misc.*

Program Logic Generate 1024 bit RSA Key Pair. Print Private Key KeyPairGenerator kpg=KeyPairGenerator.getInstance("RSA"); kpg.initialize(1024); KeyPair keypair = kpg.generateKeyPair(); Print Private Key PrivateKey pri = keypair.getPrivate(); Accept data to be signed in a byte array. Print Original Message in String format.

Get an instance of Signature Object using : Signature sig = Signature.getInstance("MD5WithRSA"); Initialize Digital Signature using Private Key sig.initSign(pri); Update signature Object with the no. of bytes of input. sig.update(data); Call sign() to generate Digital Signature. The output is stored in a byte array. Print the Digital Signature

10. Get the public key for Decryption - PublicKey pub = keypair.getPublic() 11. Initialize the Signature for Verification by using initVerify(pub) method. 12. Pass the signed data to be verified to the update() method. 13. Verify the Signature using verify(SignatureObject) – returns Boolean. - If the data was altered verification would fail, otherwise it is successful.

Expected Output Accept the data to be signed using command line argument and print it. Print Private Key. Print the Digital Signature. Print the Public Key. Print the Message Digest. (Check – The Message digest and the original data to be signed should be the same) Print if “Signature Verified” or “Not Verified”