JSSE API University of Palestine Eng. Wisam Zaqoot April 2010.

Slides:



Advertisements
Similar presentations
Internet Protocol Security (IP Sec)
Advertisements

CP3397 ECommerce.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Cryptography Chapter 7 Part 4 Pages 833 to 874. PKI Public Key Infrastructure Framework for Public Key Cryptography and for Secret key exchange.
Cryptography and Network Security
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Socket Layer Security. In this Presentation: need for web security SSL/TLS transport layer security protocols HTTPS secure shell (SSH)
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
SSL (Secure Socket Layer)
Module 5: TLS and SSL 1. Overview Transport Layer Security Overview Secure Socket Layer Overview SSL Termination SSL in the Hosted Environment Load Balanced.
SSL : An Overview Bruhadeshwar Bezawada International Institute of Information Technology, Hyderabad.
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
Java Security CS-328. JDK 1.0 Security Model Sandbox Java Virtual Machine Local Code Remote Code Local Host System Resources (File System, Sockets, Printers…)
Grid Security Infrastructure Tutorial Von Welch Distributed Systems Laboratory U. Of Chicago and Argonne National Laboratory.
Web Security CS-431. HTTP Authentication Protect web content from those who don’t have a “need to know” Require users to authenticate using a userid/password.
Lecture 23 Internet Authentication Applications
Mar 19, 2002Mårten Trolin1 This lecture On the assignment Certificates and key management SSL/TLS –Introduction –Phases –Commands.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Security Overview Hofstra University University College for Continuing Education - Advanced Java Programming Lecturer: Engin Yalt May 24, 2006.
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)
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
Introduction to PKI Seminar What is PKI? Robert Brentrup July 13, 2004.
SSL By: Anthony Harris & Adam Shkoler. What is SSL? SSL stands for Secure Sockets Layer SSL is a cryptographic protocol which provides secure communications.
Certificates, SSL and IPsec Ahmed Muaydh Sara Bin Saif Shi-Jey Chou Advisor:Dr. Leszek Lilien.
Topic 11: Key Distribution and Agreement 1 Information Security CS 526 Topic 11: Key Distribution & Agreement, Secure Communication.
Chapter 8 Web Security.
SSL Technology Overview and Troubleshooting Tips.
CS 255 – Cryptography & Computer Security Programming Project 2 – Winter 04 Priyank Patel
Softsmith Infotech Secure Socket Layer (SSL) and Tomcat.
CSCI 6962: Server-side Design and Programming
CRYPTOGRAPHY PROGRAMMING ON ANDROID Jinsheng Xu Associate Professor North Carolina A&T State University.
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Secure Socket Layer (SSL)
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
每时每刻 可信安全 1The DES algorithm is an example of what type of cryptography? A Secret Key B Two-key C Asymmetric Key D Public Key A.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Cosc 4765 SSL/TLS and VPN. SSL and TLS We can apply this generally, but also from a prospective of web services. Multi-layered: –S-http (secure http),
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
Security Protocols and E-commerce University of Palestine Eng. Wisam Zaqoot April 2010 ITSS 4201 Internet Insurance and Information Hiding.
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.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
Web Security : Secure Socket Layer Secure Electronic Transaction.
Module 9: Fundamentals of Securing Network Communication.
Digital Envelopes, Secure Socket Layer and Digital Certificates By: Anthony and James.
Internet Security. 2 PGP is a security technology which allows us to send that is authenticated and/or encrypted. Authentication confirms the identity.
1 SSL - Secure Sockets Layer The Internet Engineering Task Force (IETF) standard called Transport Layer Security (TLS) is based on SSL.
1 Security Protocols in the Internet Source: Chapter 31 Data Communications & Networking Forouzan Third Edition.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
Topic 14: Secure Communication1 Information Security CS 526 Topic 14: Key Distribution & Agreement, Secure Communication.
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
1 Thuy, Le Huu | Pentalog VN Web Services Security.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
Secure Socket Layer SSL and TLS. SSL Protocol Peer negotiation for algorithm support Public key encryptionPublic key encryption -based key exchange and.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
LAB#8 PKI & DIGITAL CERTIFICATE CPIT 425. Public Key Infrastructure PKI 2  Public key infrastructure is the term used to describe the laws, policies,
IP Security (IPSec) Matt Hermanson. What is IPSec? It is an extension to the Internet Protocol (IP) suite that creates an encrypted and secure conversation.
Lecture 6 (Chapter 16,17,18) Network and Internet Security Prepared by Dr. Lamiaa M. Elshenawy 1.
Web Security CS-431.
Secure Sockets Layer (SSL)
The Secure Sockets Layer (SSL) Protocol
Presentation transcript:

JSSE API University of Palestine Eng. Wisam Zaqoot April 2010

Secure Sockets Layer (SSL)  Invented by Netscape and made public domain for everyone’s use  An additional layer to the TCP/IP stack that sits between the Application and Transport layers ensures that all application data is encrypted but TCP/IP headers are not usually run on port 443 (default HTTPS port)

Digital Certificates  issued by a trusted disinterested third party (ex. VeriSign)  the Certificate contains the public-key for the specific Web Server and a digital signature of the certifying authority

Secure Sockets Layer (SSL) Once a secure session is established the source requests the destinations certificate ( sent in the http header (unencrypted)) once the source accepts the authenticity of the certificate it uses the public-key from the certificate to encrypt the generated session key for protecting the conversation between the source and destination. its done this way to speed up overall communications, strong encryption (slow) is used as little as possible while weaker encryption is used for most exchanges actual cipher algorithms are negotiated on a per- session basis

Security packages in Java Separate packages that are included as part of JDK:  JCE - Java Cryptography classes  JAAS - Java Authentication and Authorization Services  Java GSS API - Java Generic Security Services API  Java Certification Path API  JSSE - Java Secure Sockets Extension

JCE JCE covers  encryption and decryption symmetric bulk encryption, such as DES, RC2, and IDEA Symmetric stream encryption, such as RC4 Asymmetric encryption, such as RSA Password-based encryption (PBE)  key agreement  Message Authentication Code (MAC)

JAAS JAAS provides for the authentication of users and the authorization of tasks based upon that authentication Previously, anyone authenticated had access to the same security restrictions. Now, you can control what tasks are available for a specific authenticated user requires modification of security policies

Java GSS-API adds Kerberos V5 support to the Java platform. Kerberos originated at the Massachusetts Institute of Technology (MIT) as project Athena back in Essentially, a network authentication protocol.  Defined in RFC 1510 from 1993  biggest draw is not having to send passwords over the net.  offers single sign-on within one domain -- if everything within the domain has been Kerberos-enabled.  support is also provided for single sign-on across different security realms over a network.  Used in conjunction with JAAS, once a user's identity is established, future authentication requests are no longer necessary.

Java Certification Path API Certification Path API provides classes for building and validating certificate chains, an important requirement of a Public Key Infrastructure (PKI). These certificates provide for the storage of security keys for users. By trusting the issuer of a certificate that holds the keys, and trusting the issuer of the certificate that trusts the original certificate, you establish chains of trust Building and validating certification paths is an important part of many standard security protocols, such as SSL/TLS, Secure/MIME (S/MIME), and IP Security (IPsec). certification path from a most-trusted CA to the target subject (Ali)

JSSE Provides support for communications using SSL (Secure Sockets Layer) and TLS (Transport Layer Security)  commonly thought of as HTTPS part of javax.net SSL (and thus HTTPS) permits encrypted traffic to be exchanged between the client and server.  After an SSL client initiates a conversation with an SSL server, the server sends an X.509 certificate back to the client for authentication. The client then checks the validity of the certificate. Assuming the server is verified, the client generates a session secret key. After some basic handshaking, the encrypted exchange can commence. The JSSE library hides these inner workings of the SSL protocol from you.

JSSE API

JSSE encompasses many of the same concepts and algorithms as those in JCE but automatically applies them underneath a simple stream socket API. JSSE includes many important features. For example:  it is implemented in 100% Pure Java.  It provides API support and an implementation for TLS version 1.0 and some SSL versions. I  It includes classes that can be instantiated to create secure channels (SSLSocket and SSLServerSocket).  It provides support for Hypertext Transfer Protocol (HTTP) encapsulated in the SSL protocol (HTTPS), which allows access to data such as web pages using HTTPS.  It provides support for several cryptographic algorithms commonly used, including, RSA, DES, Triple DES and many others, with the ability that third parties provide additional cryptographic algorithms.  JSSE API includes factories for creating sockets, server sockets, SSL sockets, and SSL server sockets. Using socket factories you can encapsulate socket creation and configuration behavior.

keytool keytool – command line utility  organizes key material into keystores  one keystore file for each entity  initially keystore contains the public/private key pair and a self-signed certificate  allows storage of trusted certificate entries and trusted certificate chains

Simple JSSE example Next, we will see a simple JSSE example. This example is about a client and a server who want to communicate securely. The client sends his username and password to the server over a secure communication. The server will decrypt the received data, process it, and sends the login result to the client again over a secure communication.

The server:

The server (contd.)

The client

The client (contd.)

Running the example Enabling SSL requires that LoginServer uses a certificate that LoginClient trusts. To generate a keystore and a certificate for this purpose we have to use one of the Java powerful tools called Keytool as follows: keytool -genkey -alias OurKeys -keystore OurStore keytool -export -alias OurKeys -keystore OurStore -file admin.cer - The first line generates public and private key pair, ' OurKeys ' is the alias for the public and private key pair. The alias simply identifies a particular public and private key pair for later use. These data will be stored in a keystore called 'OurStore'. You will be asked for some identification data like your name, organization and address. - The second line uses the public and private key pair to create a certificate file called 'admin.cer'.

Running the example On the client side, this certificate should be imported by clients into their trusted keystores in order to enable them to use this certificate to validate the server's signature. This is done by client using the command: keytool -import -alias mycer -file admin.cer -keystore trust

Running the example Next, launch LoginServer and specify the keystore that contains the LoginServer's certificate as follows: java -Djavax.net.ssl.keystore = OurStore -Djavax.net.ssl.keyStorePassword = password LoginServer where password is the password we specified for ' OurStore ' keystore.

Running the example Now we have to launch the LoginClient and specify the truststore for that client. The truststore contains certificates that the client trusts for the purpose of digital signature validation. For simplicity in this example, we will use the client's keystore 'trust' we created above as the truststore of the client. In real world, the client's truststore should contain trusted certificates such as certificates from CAs. launching the client is done as follows: java -Djavax.net.ssl.trustStore = trust -Djavax.net.ssl.trustStorePassword = password LoginClient

Running the example The execution of the program with correct and incorrect input