Public-key Infrastructure. Computer Center, CS, NCTU 2 Public-key Infrastructure  A set of hardware, software, people, policies, and procedures.  To.

Slides:



Advertisements
Similar presentations
Key Management. Shared Key Exchange Problem How do Alice and Bob exchange a shared secret? Offline – Doesnt scale Using public key cryptography (possible)
Advertisements

HTTPS/SSL Oleh: Idris Winarno. Persiapan Pastikan repository debian # vim /etc/apt/sources.list deb etch main contrib non-freehttp://kebo.vlsm.org/debian.
Apache2 HTTPS. 1. Install webserver Apache # apt-get install apache2 2. Buat direktori untuk menyimpan file https # mkdir /var/www/secure 3. Instalasi.
Public Key Infrastructure (PKI)
Grid Computing Basics From the perspective of security or An Introduction to Certificates.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
 A public-key infrastructure ( PKI ) is a set of hardware, software, people, policies, and procedures needed to create, manage, distribute, use, store,
1 Pertemuan 12 Authentication, Encryption, Digital Payments, and Digital Money Matakuliah: M0284/Teknologi & Infrastruktur E-Business Tahun: 2005 Versi:
Authentication Cristian Solano. Cryptography is the science of using mathematics to encrypt and decrypt data. Public Key Cryptography –Problems with key.
Public Key Infrastructure (PKI) Providing secure communications and authentication over an open network.
Apache ssl Objectives Contents Practical Summary Setup Apache + ssl
Homework 5a: Installing Webservers Apache (or Lighttpd) MySQL PHP CGI and Dynamic Pages.
16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
Technology – Broad View1 Networks  For the most part, not a technology, but political/financial issue Available bandwidth continuously increasing (“√2-rule”
Introduction to PKI Seminar What is PKI? Robert Brentrup July 13, 2004.
1 Key Establishment Symmetric key problem: How do two entities establish shared secret key in the first place? Solutions: Deffie-Hellman trusted key distribution.
CMSC 414 Computer and Network Security Lecture 19 Jonathan Katz.
1 Key Establishment Symmetric key problem: How do two entities establish shared secret key over network? Solution: trusted key distribution center (KDC)
Christopher Chapman | MCT Content PM, Microsoft Learning, PDG Planning, Microsoft.
Zach Miller Condor Project Computer Sciences Department University of Wisconsin-Madison Lockdown of a Basic Pool.
Computer Science Public Key Management Lecture 5.
14 May 2002© TrueTrust Ltd1 Privilege Management in X.509(2000) David W Chadwick BSc PhD.
Zach Miller Condor Project Computer Sciences Department University of Wisconsin-Madison Securing Your Condor Pool With SSL.
Chapter 31 Network Security
Digital Certificates With Chuck Easttom. Digital Signatures  Digital Signature is usually the encryption of a message or message digest with the sender's.
Network Security. An Introduction to Cryptography The encryption model (for a symmetric-key cipher).
Chapter 14 Encryption: A Matter Of Trust. Awad –Electronic Commerce 2/e © 2004 Pearson Prentice Hall 2 OBJECTIVES What is Encryption? Basic Cryptographic.
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.
Secure Socket Layer (SSL)
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
E-Commerce Security Technologies : Theft of credit card numbers Denial of service attacks (System not availability ) Consumer privacy (Confidentiality.
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
1 Apache and Virtual Sites and SSL Dorcas Muthoni.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
Unit 1: Protection and Security for Grid Computing Part 2
Chapter 23 Internet Authentication Applications Kerberos Overview Initially developed at MIT Software utility available in both the public domain and.
SECURITY MANAGEMENT Key Management in the case of public-key cryptosystems, we assumed that a sender of a message had the public key of the receiver at.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
Types of Electronic Infection
Hands On Networking Network Applications Ram P Rustagi, ISE Dept Kundan Kumar, MCA Dept Manini Sahoor, MCA Dept Ravi Teja, MCA Dept Sourav.
Module 9: Fundamentals of Securing Network Communication.
Data Encryption using SSL Topic 5, Chapter 15 Network Programming Kansas State University at Salina.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
/etc/apache2/apache2.conf # Porneste gazduirea virtuala pe http NameVirtualHost :80 # Porneste gazduirea virtuala pe https NameVirtualHost :443.
Who’s watching your network The Certificate Authority In a Public Key Infrastructure, the CA component is responsible for issuing certificates. A certificate.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
Public-key Infrastructure. Computer Center, CS, NCTU 2 Cryptosystems  Cryptosystems Symmetric Asymmetric (public-key)  RSA Public key: n=3233, e=17.
X.509 Topics PGP S/MIME Kerberos. Directory Authentication Framework X.509 is part of the ISO X.500 directory standard. used by S/MIME, SSL, IPSec, and.
Washington System Center © 2005 IBM Corporation August 25, 2005 RDS Training Secure Socket Layer (SSL) Overview z/Series Security (Mary Sweat, Greg Boyd)
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Public-key Infrastructure. Computer Center, CS, NCTU 2 Public-key Infrastructure  A set of hardware, software, people, policies, and procedures.  To.
Digital Signatures and Digital Certificates Monil Adhikari.
X509 Web Authentication From the perspective of security or An Introduction to Certificates.
Trusted Organizations In the grid world one single CA usually covers a predefined geographic region or administrative domain: – Organization – Country.
Prof. Reuven Aviv, Nov 2013 Public Key Infrastructure1 Prof. Reuven Aviv Tel Hai Academic College Department of Computer Science Public Key Infrastructure.
Key management issues in PGP
Public-key Infrastructure
SSL Certificates for Secure Websites
Unix System Administration
Public-key Infrastructure
CIS5930 Internet Computing
Homework #05 SSL and TLS Announce: Due:
Public-key Infrastructure
Public-key Infrastructure
PKI (Public Key Infrastructure)
Advanced Computer Networks
Presentation transcript:

Public-key Infrastructure

Computer Center, CS, NCTU 2 Public-key Infrastructure  A set of hardware, software, people, policies, and procedures.  To create, manage, distribute, use, store, and revoke digital certificates.  Encryption, authentication, signature  Bootstrapping secure communication protocols.

Computer Center, CS, NCTU 3 CA: Certificate Authority (1)  In God We Trust

Computer Center, CS, NCTU 4 CA: Certificate Authority (2)  Certificate Contains data of the owner, such as Company Name, Server Name, Name, , Address,… Public key of the owner. Followed by some digital signatures.  Sign for the certificate. In X.509  A certificate is signed by a CA.  To verify the correctness of the certificate, check the signature of CA.

Computer Center, CS, NCTU 5 CA: Certificate Authority (3)  Certificate Authority (CA) “ 憑證授權 ” in Windows CHT version. In X.509, it is itself a certificate.  The data of CA.  To sign certificates for others. Each CA contains a signature of Root CA. To verify a valid certificate  Check the signature of Root CA in the certificate of CA.  Check the signature of CA in this certificate. Reference:

Computer Center, CS, NCTU 6 What is a CA ? (1)  Certificate Authority ( 認證中心 )  Trusted server which signs certificates  One private key and relative public key  Tree structure of X.509 Root CA

Computer Center, CS, NCTU 7 What is a CA ? (2)  Root CA ( 最高層認證中心 ) In Micro$oft: 「根目錄授權憑證」 Root CA do not sign the certificates for users.  Authorize CA to sign the certificates for users, instead. Root CA signs for itself.  It is in the sky. To trust Root CA  Install the certificate of Root CA via secure channel.

Computer Center, CS, NCTU 8 What is a CA ? (3)  Tree structure of CA  Cost of certificate HiTrust : NT $30,000 / per year / per host Myself : NT $0

Computer Center, CS, NCTU 9 Certificate (1)  Digital Certificate, Public-key Certificate, Network Identity  A certificate is issued by a CA X  A certificate of a user A consists: The name of the issuer CA X His/her public key A pub The signature Sig(X priv, A, A pub ) by the CA X The expiration date Applications  Encryption / Signature

Computer Center, CS, NCTU 10 Certificate (2) Alice: (1)Generate A pub, A priv CA X: (3) Generate Sig( X priv, Alice, A pub, T ) (2) Alice, A pub, ID proof (4) Sig(X priv, Alice, A pub, T) Cert A,X =[Alice, A pub, Sig(X priv, Alice, A pub, T) ] Note Note: CA does not know A priv

Computer Center, CS, NCTU 11 Certificate (3)  Guarantee of CA and certificate Guarantee the public key is of someone Someone is not guaranteed to be safe  Security of transmitting DATA Transmit session key first  Public-key cryptosystem Transmit DATA by session key  Symmetric-key cryptosystem

OpenSSL

Computer Center, CS, NCTU 13 OpenSSL   In system /usr/src/crypto/openssl  In ports security/openssl

Computer Center, CS, NCTU 14 ports/Mk/bsd.openssl.mk # WITH_OPENSSL_BASE=yes - Use the version in the base system. # WITH_OPENSSL_PORT=yes - Use the port, even if base is up to date # WITH_OPENSSL_BETA=yes - Use a snapshot of recent openssl # WITH_OPENSSL_STABLE=yes - Use an older openssl version …… # if no preference was set, check for an installed base version # but give an installed port preference over it..if !defined(WITH_OPENSSL_BASE) && \ !defined(WITH_OPENSSL_BETA) && \ !defined(WITH_OPENSSL_PORT) && \ !defined(WITH_OPENSSL_STABLE) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) WITH_OPENSSL_BASE=yes.endif

Example: Apache SSL settings

Computer Center, CS, NCTU 16 Example: Apache SSL settings – Flow  Flow Generate random seed Generate RootCA  Generate private key of RootCA  Fill the Request of Certificate.  Sign the certificate itself. Generate certificate of Web Server  Generate private key of Web Server  Fill the Request of certificate  Sign the certificate using RootCA Modify apache configuration  restart apache

Computer Center, CS, NCTU 17 Example: Apache SSL settings – Generate random seed  openssl rand -out rnd-file num % openssl rand -out /etc/ssl/RootCA/private/.rnd 1024  chmod go-rwx rnd-file % chmod go-rwx /etc/ssl/RootCA/private/.rnd

Computer Center, CS, NCTU 18 Example: Apache SSL settings – Generate private key of RootCA  openssl genrsa -des3 -rand rnd-file -out rootca-key-file num % openssl genrsa -des3 -rand /etc/ssl/RootCA/private/.rnd \ -out /etc/ssl/RootCA/private/rootca.key.pem 2048 Note: phrase are asked (something like password)  chmod go-rwx rootca-key-file % chmod go-rwx /etc/ssl/RootCA/private/rootca.key.pem

Computer Center, CS, NCTU 19 Example: Apache SSL settings – Fill the Request of Certificate  openssl req -new -key rootca-key-file -out rootca-req-file % openssl req -new -key /etc/ssl/RootCA/private/rootca.key.pem \ -out /etc/ssl/RootCA/private/rootca.req.pem  chmod go-rwx rootca-req-file % chmod go-rwx /etc/ssl/RootCA/private/rootca.req.pem Enter pass phrase for rootca-key-file: Country Name (2 letter code) [AU]:TW State or Province Name (full name) [Some-State]:Taiwan Locality Name (eg, city) []:HsinChu Organization Name (eg, company) [Internet Widgits Pty Ltd]:NCTU Organizational Unit Name (eg, section) []:CS Common Name (eg, YOUR name) []:nasa.cs.nctu.edu.tw Address A challenge password []: (No need , Enter please) An optional company name []: (Enter please)

Computer Center, CS, NCTU 20 Example: Apache SSL settings – Sign the certificate itself  openssl x509 -req -days num -sha1 -extfile path_of_openssl.cnf -extensions v3_ca -signkey rootca-key-file -in rootca-req-file -out rootca-crt-file % openssl x509 -req -days sha1 -extfile /etc/ssl/openssl.cnf -extensions v3_ca -signkey /etc/ssl/RootCA/private/rootca.key.pem -in /etc/ssl/RootCA/private/rootca.req.pem -out /etc/ssl/RootCA/private/rootca.crt.pem  rm -f rootca-req-file %rm -f /etc/ssl/RootCA/private/rootca.req.pem  chmod go-rwx rootca-crt-file %chmod go-rwx /etc/ssl/RootCA/private/rootca.crt.pem

Computer Center, CS, NCTU 21 Example: Apache SSL settings – Generate private key of Web Server  openssl genrsa -out host-key-file num %openssl genrsa -out /etc/ssl/nasa/private/nasa.key.pem 2048  chmod go-rwx host-key-file %chmod go-rwx /etc/ssl/nasa/private/nasa.key.pem

Computer Center, CS, NCTU 22 Example: Apache SSL settings – Fill the Request of Certificate  openssl req -new -key host-key-file -out host-req-file % openssl req -new -key /etc/ssl/nasa/private/nasa.key.pem -out /etc/ssl/nasa/private/nasa.req.pem  chmod go-rwx host-req-file % chmod go-rwx /etc/ssl/nasa/private/nasa.req.pem

Computer Center, CS, NCTU 23 Example: Apache SSL settings – Sign the certificate using RootCA  Tramsmit host-req-file to Root CA, and do following steps in RootCA openssl x509 -req -days num -sha1 -extfile path_of_openssl.cnf -extensions v3_ca -CA rootca-crt-file -CAkey rootca-key-file -CAserial rootca-srl-file -CAcreateserial -in host-req-file -out host-crt-file % openssl x509 -req -days 365 -sha1 -extfile /etc/ssl/openssl.cnf -extensions v3_ca -CA /etc/ssl/RootCA/private/rootca.crt.pem -CAkey /etc/ssl/RootCA/private/rootca.key.pem -CAserial /etc/ssl/RootCA/private/rootca.srl -CAcreateserial -in /etc/ssl/nasa/private/nasa.req.pem -out /etc/ssl/nasa/private/nasa.crt.pem rm -f host-req-file ( in both RootCA and Web Server) % rm -f /etc/ssl/nasa/private/nasa.req.pem Transmit host-crt-file back to Web Server

Computer Center, CS, NCTU 24 Example: Apache SSL settings – Certificate Authority (8) Include etc/apache22/extra/httpd-ssl.conf ## ## SSL Virtual Host Context ## # General setup for the virtual host DocumentRoot /home/wwwadm/data Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all ServerName nasa.cs.nctu.edu.tw:443 ServerAdmin ErrorLog /var/log/httpd/nasa.cs-error.log CustomLog /var/log/httpd/nasa.cs-access.log common SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:!SSLv2:+EXP:+eNULL SSLCertificateFile /etc/ssl/nasa/nasa.crt.pem SSLCertificateKeyFile /etc/ssl/nasa/private/nasa.key.pem

Appendix: PGP

Computer Center, CS, NCTU 26 PGP  Pretty Good Privacy  Public key system Encryption Signature  security/gnupg  Will talk more in Network Administration  Ref: