1 Session 3 Module 4: Java Security Module 5: Cryptography.

Slides:



Advertisements
Similar presentations
Copyright © 2005 David M. Wheeler, All Rights Reserved Desert Code Camp: Introduction to Cryptography David M. Wheeler May 6 th 2006 Phoenix, Arizona.
Advertisements

II.I Selected Database Issues: 1 - SecuritySlide 1/20 II. Selected Database Issues Part 1: Security Lecture 2 Lecturer: Chris Clack 3C13/D6.
Transport Layer Security (TLS) Protocol Introduction to networks and communications(CS555) Prof : Dr Kurt maly Student:Abhinav y.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
WAP Public Key Infrastructure CSCI – Independent Study Fall 2002 Jaleel Syed Presentation No 5.
16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
Principles of Information Security, 2nd edition1 Cryptography.
Security Overview Hofstra University University College for Continuing Education - Advanced Java Programming Lecturer: Engin Yalt May 24, 2006.
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.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 5 Database Application Security Models.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Edward Tsai – CS 239 – Spring 2003 Strong Security for Active Networks CS 239 – Network Security Edward Tsai Tuesday, May 13, 2003.
Certificates By Purvi Shah. What is a Certificate A certificate is basically a digitally signed statement from one entity (person, company, etc.), saying.
Chapter 5 Database Application Security Models
Web services security I
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Csci5233 Computer Security1 GS: Chapter 5 Asymmetric Encryption in Java.
Key Management Guidelines. 1. Introduction 2. Glossary of Terms and Acronyms 3. Cryptographic Algorithms, Keys and Other Keying Material 4. Key Management.
Informatics and Control Systems Faculty. Student: Levan Julakidze Informatics and Control Systems Faculty Doctorate II year Leader: Zurab Kochladze TSU.
1 Homework Study Java Cryptography by Reading the rest of slides and accessing Sun ’ s Java website:
Cheng-Chia Chen September 1999
JSSE API University of Palestine Eng. Wisam Zaqoot April 2010.
Csci5233 Computer Security1 GS: Chapter 6 Using Java Cryptography for Authentication.
Java and Security Cryptography, Symmetric Key, Public Key, Authentication, Digital Signatures, Message Digests.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
1 Introduction to Security and Cryptology Enterprise Systems DT211 Denis Manley.
Security in Java Sunesh Kumra S
Java Security Shmuel Babad CEO MidLink Computing LTD
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
Database Application Security Models Database Application Security Models 1.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Cryptography  Why Cryptography  Symmetric Encryption  Key exchange  Public-Key Cryptography  Key exchange  Certification.
Chapter 8: Scrambling Through Cryptography Security+ Guide to Network Security Fundamentals Second Edition.
Cryptography, Authentication and Digital Signatures
Review of basic cryptographically algorithm Asymmetric encoding (Private and Public Keys), Hash Function, Digital Signatures and Certification.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
Chapter 31 Cryptography And Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Professional Encryption Software FINECRYPT 8.1. Contents Introduction Introduction Features Features Installation Installation Tests Tests Results Results.
1 Securing Data and Communication. 2 Module - Securing Data and Communication ♦ Overview Data and communication over public networks like Internet can.
JAVA SECURITY BASIC NETWORKING MULTITHREATING Deniz HASTORUN
Encryption. What is Encryption? Encryption is the process of converting plain text into cipher text, with the goal of making the text unreadable.
1. 2 Overview In Exchange security is managed by assigning permissions in Active Directory Exchange objects are secured with DACL and ACEs Permissions.
Middleware for Secure Environments Presented by Kemal Altıntaş Hümeyra Topcu-Altıntaş Osman Şen.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
COMPS311F Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
1 Session 2 Module 3: Scrollable Resultset and Rowsets.
Jaas Introduction. Outline l General overview of Java security Java 2 security model How is security maintained by Java and JVM? How can a programmer.
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
1 Thuy, Le Huu | Pentalog VN Web Services Security.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
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.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
8 Copyright © 2004, Oracle. All rights reserved. Making the Model Secure.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
TCS Internal Security. 2 TCS Internal Objective Objective :  Android Platform Security Architecture.
Java Cryptography Nick Pullman DSU-MSIA Citigroup Information Security
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
“Java Cryptography” By Karim Kilany CSCI 485 Presentation Dr.Sherif Aly.
CRYPTOGRAPHY Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
LAB#4 PROGRAMMING USING JAVA CRYPTOGRAPHIC LIBRARIES CPIT 425.
Basics of Cryptography
NETWORK SECURITY Cryptography By: Abdulmalik Kohaji.
Presentation transcript:

1 Session 3 Module 4: Java Security Module 5: Cryptography

Java Security and Cryptography / Session3 / 2 of 45 Module 3 - Review (1)  Scrollable result sets provide the ability to move the cursor forward and backward to a specified position or to a position relative to the current position  Updatable resultset is the ability to update rows in a result set using methods in the java programming language rather than SQL commands  A batch update is a set of multiple update statements that is submitted to the database

Java Security and Cryptography / Session3 / 3 of 45 Module 3 - Review (2)  Rowsets: a set of row from a source of tabular data like a result set. It is derived from the ResultSet interface.  A JDBCRowSet object is derived from ResultSet object. To make a ResultSet object scrollable and thereby make better use.  CachedRowSet stores/caches its data in memory so that it can operate on its own data rather than depending on the data stored in a DB.

Java Security and Cryptography / Session3 / 4 of 45 Module 4, 5 - Objectives  Java security architecture  Securing java applet  Securing java application  JAAS  Introduction to Cryptography  Java Cryptography Architecture (JCA)  Java Cryptography Extension (JCE)

Java Security and Cryptography / Session3 / 5 of 45 Introduction to security  The difference between security & safety  Evolution of Java Security JDK 1.0 – sandbox security model confine Java Applet JDK 1.1 – signed applet packaged as JAR file JDK 2 :  It provides for a consistent & flexible policy for applet & applications.  The concept Protection Domain: the security policy decoupled from its implementation.

Java Security and Cryptography / Session3 / 6 of 45 Introduction to security (2)

Java Security and Cryptography / Session3 / 7 of 45 Java 2 security (1)  Java 2 security model provides a consistent and flexible policy for applets and applications  Features of java 2 security model: Byte code verifier Class loader Code source  Feature of java 2 runtime environment (J2RE) Policy file Security manager Access controller Keystore

Java Security and Cryptography / Session3 / 8 of 45 Java 2 security (2)

Java Security and Cryptography / Session3 / 9 of 45 Goals of java security  Safe from malevolent programs  Non-intrusive  Authenticated  Encrypted  Audited

Java Security and Cryptography / Session3 / 10 of 45 Java security model  Impact of: Object-orientation Modern memory model on Java security enabling to achieve the goal.  Built-in access level in Java: Every member of an object in Java has an access level : private protected default public

Java Security and Cryptography / Session3 / 11 of 45 Securing applet  Types of Security Restrictions:  File Access Restrictions  Network Restrictions  Other Security Restrictions

Java Security and Cryptography / Session3 / 12 of 45 Setting up a Policy File  Start Policy Tool  Grant the required permission  Save the Policy File A policy file is an ASCII text file and can be composed via a text editor or the graphical Policy Tool utility. There are three steps to create and modify a policy file:

Java Security and Cryptography / Session3 / 13 of 45 Start Policy Tool

Java Security and Cryptography / Session3 / 14 of 45 Granting the required permission

Java Security and Cryptography / Session3 / 15 of 45 Granting the Permission

Java Security and Cryptography / Session3 / 16 of 45 Updating Policy Entry

Java Security and Cryptography / Session3 / 17 of 45 Save the Policy File

Java Security and Cryptography / Session3 / 18 of 45 Policy File Effects  When you run an applet, the security file named java.security specified the policy files that are loaded & used by default.  2 approaches to ensure policy file Effects Specify the policy file as an argument to appletviewer command Add a line in the java.security file specify the additional policy file  An entry for a policy file takes following form: policy.url.n = URL (n indicates a number, URL is a path of policy file)

Java Security and Cryptography / Session3 / 19 of 45 Securing application  Application freedom An application trying to access system properties such as os.name, java.version, user.home..

Java Security and Cryptography / Session3 / 20 of 45 Restricting Applications

Java Security and Cryptography / Session3 / 21 of 45 Setting up the policy file (1)  Three steps to set up the policy file to grant the required permissions: Start the Policy Tool Grant the required permission Save the Policy File 12/5/2015

Java Security and Cryptography / Session3 / 22 of 45 Setting up the policy file (2)  Step 1 – Start the Policy Tool.  Step 2 – Granting the required permissions: Adding a Policy Entry Granting Permission Adding another Policy Entry Updating Policy Entry  Step 3 – Saving the policy file.

Java Security and Cryptography / Session3 / 23 of 45 Introduction to Authentication  Authentication is the process of confirming the identity of an entity (user/computer): using user name & a password.  Authorization (allowing) is the process of granting / denying access to a network resource: Authorized User Authorization Decision  Disadvantage of code-based authentication.

Java Security and Cryptography / Session3 / 24 of 45 Introduction to JAAS – Overview of JAAS  Java Authentication & Authorization Service (JAAS) is an API that enables Java applications to access authentication & access control services without being tied to those services.  JAAS can be used for two purpose: Authentication Authorization

Java Security and Cryptography / Session3 / 25 of 45 Using JAAS 1 - Using JASS for Authentication  LoginContext class with login() method  Principal class 2 - Using JAAS for Authorization  doAsPrivilegend() method of Subject class

Java Security and Cryptography / Session3 / 26 of 45 Definition of Cryptography  To maintain and protect the confidentiality of the information transmitted on a communication medium, encryption is applied  Cryptography is the mechanism of encoding information in a secret coded form.  The term “encrypting” pertains to converting plaintext to ciphertext, which is again decrypted into usable plaintext

Java Security and Cryptography / Session3 / 27 of 45 Cryptography  The process of cryptography is achieved with the help of encryption algorithm and encryption key  The encryption algorithm is a mathematical procedure to encrypt and decrypt the data  The encryption key is the input that the encryption algorithm takes

Java Security and Cryptography / Session3 / 28 of 45 Types of Algorithms  Classified based upon the number and types of keys as follows: Secret Key Cryptography Public Key Cryptography Hash functions

Java Security and Cryptography / Session3 / 29 of 45 Secret Key Cryptography  Transforms the input, called the plaintext, to an output, known as ciphertext, operated by a single secret key.  The two entities taking part in the communication process, must share the same secret key.  Another name, Symmetric Cryptography

Java Security and Cryptography / Session3 / 30 of 45 Public Key Cryptography  Is similar to the symmetric cryptography, except for the difference that it operates under two different keys instead of one secret key.  One key is used for encoding, the second is used for decoding the data.  Also called, Asymmetric Cryptography

Java Security and Cryptography / Session3 / 31 of 45 Hash Functions  Makes use of a mathematical hash function to encrypt the information into an irreversible code.  It’s also named as one-way cryptography, as it’s easy to compute but difficult to reverse.

Java Security and Cryptography / Session3 / 32 of 45 Purpose of Cryptography  Authentication  Privacy/confidentiality  Integrity  Non-repudiation

Java Security and Cryptography / Session3 / 33 of 45 Java Cryptography Architecture  The Java security API is a new addition to library of Java APIs, to achieve both low- level and high-level security in Java applications  The JCA forms part of the Java security API, is a framework to access and develop cryptographic functionality.

Java Security and Cryptography / Session3 / 34 of 45 Components of JCA Architecture  The JCA defines two components: Cryptographic Service Providers:  a package or a set of packages defined by the JCA to implement one or more cryptographic services Key Management:  The JCA also defines a database called keystore to manage the library of keys and certificates  KeyStore class in the java.security package

Java Security and Cryptography / Session3 / 35 of 45 Cryptographic Service  The Service provider classes provide the functionality of a type of cryptographic algorithm.  Java class for each service: MessageDigest, Signature, KeyPairGenerator, KeyFactory, CertificateFactory, KeyStore…

Java Security and Cryptography / Session3 / 36 of 45 Java Cryptography Extension  The JCE extends the underlying architecture of JCA framework to implement encryption, key exchange, …  JCA and JCE together provide a complete, platform-independent API to implement cryptography  The JCE forms the core part of Java SDK 1.4

Java Security and Cryptography / Session3 / 37 of 45 Packages in JCE

Java Security and Cryptography / Session3 / 38 of 45 Introduction to Cipher  Cipher is the object capable of performing encryption and decryption as per an encryption algorithm.  The Cipher class in the javax.crypto package, form the base of the JCE framework.

Java Security and Cryptography / Session3 / 39 of 45 Cipher Block (1)  You can encrypt single bits or a block of bits called “cipher blocks”  Block cipher algorithms like BlowFish or DES requires the input to be an exact mutiple of the block size.  The block size is typically of 64 bits or 128 bits.  Single-bit ciphers are called “stream ciphers”

Java Security and Cryptography / Session3 / 40 of 45 Cipher Block (2)  The short block must be padded with bytes to make it a full block size  There’re many padding techniques, most used technique is PKCS5

Java Security and Cryptography / Session3 / 41 of 45 Cipher Mode  A cipher mode determines how the encryption will work.  A mode may allow you make the encryption of one block dependent of another block whereas another mode may not allow this.  For example, ECB mode allows a message to be divided into blocks, each block is encrypted separated using a key.

Java Security and Cryptography / Session3 / 42 of 45 Cipher Object (1)  A cipher object implements a specified transformation.  Cipher objects are created using the getInstance() method of the Cipher class. public static Cipher getInstance(String transformation) public static Cipher getInstance(String transformation, String povider)  A transformation can have any one of the forms: “algorithm/mode/padding”, such as “DES/CBC/PKCS5Padding” “(only) algorithm”, such as “DES”

Java Security and Cryptography / Session3 / 43 of 45 Cipher Object (2)  The Cipher object is initialized by the init() method public void init(int opmode, Key key)  The opmode can have any one of the following values ENCRYPT_MODE DECRYPT_MODE WRAP_MODE UNWRAP_MODE

Java Security and Cryptography / Session3 / 44 of 45 Module 4, 5 - Summary (1)  The java 2 security model provides a consistent and flexible policy for applets and applications  No unsigned applet is allowed to access a resource unless the security manager finds that permission has been explicitly granted in a policy file  A security manager is not automatically installed when an application is running  Cryptography is mechanism of encoding information in a secret coded form

Java Security and Cryptography / Session3 / 45 of 45 Module 4, 5 - Summary (2)  JCA is the java security API is a new addition to library of java APIs. It is a framework written in java to access and develop cryptographic functionality  JCE is a set, it provides implements for encryption, key generation and agreement and message authentication code  Cipher is one of the core classes from JCE. It provides the functionality of a cryptographic cipher used for encryption and decryption