Network Security: Lab#2 J. H. Wang Apr. 28, 2011.

Slides:



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

Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
SSL Implementation Guide Onno W. Purbo
Presented by Fengmei Zou Date: Feb. 10, 2000 The Secure Sockets Layer (SSL) Protocol.
Digital Signatures and Hash Functions. Digital Signatures.
An Introduction to Security Concepts and Public Key Infrastructure (PKI) Mary Thompson.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
Cryptography Basic (cont)
Symmetric Key Distribution Protocol with Hybrid Crypto Systems Tony Nguyen.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
Henric Johnson1 Chapter3 Public-Key Cryptography and Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden
Chapter 3 Encryption Algorithms & Systems (Part C)
Feb 19, 2002Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Overview of Digital Signatures Introduction To Networks and Communications (CS 555) Presented by Bharath Kongara.
Linux Cryptography overview and How-to’s using OpenSSL
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Secure Systems Research Group - FAU Patterns for Digital Signature using hashing Presented by Keiko Hashizume.
PKI Processing with OpenSSL Rodney Thayer
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Csci5233 Computer Security1 GS: Chapter 6 Using Java Cryptography for Authentication.
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
.Net Security and Performance -has security slowed down the application By Krishnan Ganesh Madras.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
Linux Networking and Security Chapter 8 Making Data Secure.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
Security+ Guide to Network Security Fundamentals, Third Edition Chapter 11 Basic Cryptography.
Security.  is one of the most widely used and regarded network services  currently message contents are not secure may be inspected either.
SECURITY Chapter 7.3 – 7.5 Presentation by Deepthi Reddy.
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.
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 31 Omar Meqdadi Department of Computer Science and Software Engineering.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
BASIC CRYPTOGRAPHIC CONCEPTS. Public Key Cryptography  Uses two keys for every simplex logical communication link.  Public key  Private key  The use.
Chapter 21 Public-Key Cryptography and Message Authentication.
1 Securing Data and Communication. 2 Module - Securing Data and Communication ♦ Overview Data and communication over public networks like Internet can.
Cryptography and Network Security (CS435) Part Twelve (Electronic Mail Security)
Cosc 4765 Trusted Platform Module. What is TPM The TPM hardware along with its supporting software and firmware provides the platform root of trust. –It.
Internet-security.ppt-1 ( ) 2000 © Maximilian Riegel Maximilian Riegel Kommunikationsnetz Franken e.V. Internet Security Putting together the.
1 Information Security Practice I Lab 5. 2 Cryptography and security Cryptography is the science of using mathematics to encrypt and decrypt data.
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
Symmetric Cryptography, Asymmetric Cryptography, and Digital Signatures.
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.
A Quick Tour of Cryptographic Primitives Anupam Datta CMU Fall A: Foundations of Security and Privacy.
Authentication. Goal: Bob wants Alice to “prove” her identity to him Protocol ap1.0: Alice says “I am Alice” Failure scenario?? “I am Alice”
A A E E D D C C B B # Symmetric Keys = n*(n-1)/2 F F
Security Using PGP - Prajakta Bahekar. Importance of Security is one of the most widely used network service on Computer Currently .
1 Thuy, Le Huu | Pentalog VN Web Services Security.
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.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Public / Private Key Example Dan Fleck CS 469: Security Engineering Coming up: Today 11.
DIGITAL SIGNATURE IMPLEMENTATION
Network Security: Lab#2 J. H. Wang Oct. 9, Objectives To learn to use message digests –MD5 To learn to use secure hash functions –SHA-1, SHA-2 To.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Secure Instant Messenger in Android Name: Shamik Roy Chowdhury.
ENGR 101 Compression and Encryption. Todays Lecture  Encryption  Symmetric Ciphers  Public Key Cryptography  Hashing.
NET 311 Information Security
The Secure Sockets Layer (SSL) Protocol
Presentation transcript:

Network Security: Lab#2 J. H. Wang Apr. 28, 2011

Objectives To learn to use message digest –MD5 To learn to use secure hash functions –SHA-1, SHA-2 To learn to use one of the public-key cryptography standards –RSA To learn to use digital signatures

Libraries Used in this Lab OpenSSL: an open source implementation of SSL and TLS protocols –Widely used on various platforms UNIX-like: Linux, Solaris, Mac OS X, BSD Windows –Cryptographic algorithms supported MD5, SHA-1, SHA-2 RSA –(Installation skipped: the same as in Lab#1)

OpenSSL Command-Line Tools OpenSSL command-line tool –MD5: openssl md5 –SHA: (-224, -256, -384, -512) SHA: openssl sha SHA-1: openssl dgst -sha1

OpenSSL Command-Line Tools Alternative commands –MD5: openssl dgst -md5 –SHA: SHA: openssl dgst -sha SHA-1: openssl dgst -sha1

Experiment Scenario Prepare a file to be encrypted or signed, say “original.txt” First, we encrypt the file into encrypted file “enc.txt” (using receiver’s public key) Then, we decrypt it and get another file “dec.txt” (using receiver’s private key) Finally, we check if the decrypted file is the same as the original file

Limitations of the Tool File size: cannot be larger than 64 bytes –It depends on the key size (default: 512 bits) –We can set a larger key size E.g. for generating private key of 1024 bits: –openssl genrsa -out key.s 1024 –Still a serious limitation

Real Application Scenario For each person, a pair of keys is first generated To send a large file, it must be first divided into pieces before encryption (in a program) The decryption process is also followed by a merge of decrypted pieces

OpenSSL Command-Line Tools OpenSSL command-line tool for RSA –Notation: : secret key : public key –Key management: Private key generation: openssl genrsa -out To output public key: openssl rsa -in -pubout -out –Encryption/decryption: Encrypt with public key: openssl rsautl -encrypt -pubin -inkey -in -out Decrypt with private key: openssl rsautl -decrypt -inkey -in -out

OpenSSL Command-Line Tools Alternative commands for RSA: (using pkeyutl) –Encryption/decryption: Encrypt with public key: openssl pkeyutl -encrypt -pubin -inkey -in -out Decrypt with private key: openssl pkeyutl -decrypt -inkey -in -out

OpenSSL command-line tool for Digital Signature –Notation: : original file : signature file –Digital signature: Sign: openssl rsautl -sign -inkey -in -out Verify: openssl rsautl -verify -pubin -inkey -in –Alternative commands: Sign: openssl pkeyutl -sign -inkey -in -out Verify: openssl pkeyutl -verify -inkey -sigfile -in Recover: openssl pkeyutl -verifyrecover -pubin -inkey - in

OpenSSL Libraries for Message Digests OpenSSL crypto library –MD5: 128-bit #include Initialize a MD5_CTX structure: MD5_Init() MD5_Update() MD5_Final() Computes the message digest: MD5()

OpenSSL Libraries for Secure Hash Functions –SHA1: 160-bit #include Initialize a SHA_CTX structure: SHA1_Init() SHA1_Update() SHA1_Final() Computes the message digest: SHA1() –EVP: high-level interface to cryptographic functions #include EVP_Digest…() functions: message digests

OpenSSL Libraries for Public-Key Cryptography –RSA: #include RSA structure RSA_...() functions –EVP: high-level interface to cryptographic functions #include EVP_Seal…(), EVP_Open…(): public key encryption/decryption EVP_PKEY…() functions: asymmetric algorithms

OpenSSL Libraries for Digital Signature –EVP: high-level interface to cryptographic functions #include EVP_Sign…(), EVP_Verify…(): digital signature

Summary Key generation Encrypting a file (using public-key cryptography) Decrypting a file (using public-key cryptography) Signing a file Verifying a file