SlideShare a Scribd company logo
Cryptography in Java


               tnngo2@gmail.com
Cryptography

      to maintain and protect the confidentiality of the information when
      it is transmitted on a communication medium

      is the mechanism of encoding information is secret coded form.

      keep communications limited and private to only the sender and
      receiver

      enhances the security, authenticity and integrity of the
      information passed across the communication medium
Cryptography Schemes

     The process of cryptography is achieved with the help of
     encryption algorithm and an encryption key

     The encryption algorithm is a mathematical procedure to
     encrypt or decrypt the data.

     Encryption key is the input that encryption algorithm takes
Cryptography Algorithm Types

      Secret Key Cryptography (Symmetric)
              Two entities share the same secret key.


      Public Key Cryptography (Asymmetric)
              Operates under two different keys.
              One is used for encoding, the second for decoding.


      Hash Functions (One-way cryptography, Message digests)
               Encrypt the information into an irreversible codes.
Need for cryptography

      In order to develop a secure database application, cryptography is
      needed to identify all the possible threats to the application and
      provide measures to prevent them.

      The threats:
              Violation of Privacy/confidentiality
                         Data can be read by an unintended receiver.


              Tampering
                         modifying or deleting a resource without
                         proper access privilege


              Spoofing
                         impersonating the identity of a different user and use it in an
                         unauthorized way
Purpose of Cryptography

      Authentication
                  prevents spoofing by applying the digital
                  signature


      Privacy/confidentiality
                  verifies, prevents unintended receiver from
                  reading the data


      Integrity
                  verifies whether the data received by the receiver
                  is the same data as sent by the sender


      Non-repudiation
                  ensures that a user or a business organization or
                  program entity has performed a transaction
Java Cryptography Architecture (JCA)

      JCA is a framework written in Java to access and develop
      cryptographic functionality, and forms part of the Java security API



      Java Cryptography Extension (JCE) extends the underlying
      architecture of JCA to implement encryption, key exchange

      JCA and JCE together provide a complete, platform-independent API.
Design Principles of JCA

      JCA was designed to access cryptography and security concepts.

      Implementation independence and interoperability.

      Algorithm independence and extensibility
Components of JCA

     Cryptographic Service Providers
             is a package or a set of packages defined by the JCA to
             implement one or more cryptographic services.



     Key Management
            manage the library of keys and certificates which in a
            database called keystore.
            KeyStore class in the java.security package
Cryptographic Service

      The Service provider classes are also known as Engine classes.
Classes and Interfaces of JCA
Core Engine Classes of JCA
Java Cryptography Extension (JCE)

      JCA is a set of packages that form a framework and provides
      implementations for encryption, key generations and agreement,
      and Message Authentication Code (MAC) algorithms.

      Additional cryptographic libraries can be plugged in.
Java Cryptography Extension APIs

      Symmetric block encryption
      Symmetric stream encryption
      Password-based encryption
      Key Agreement
      Message Authentication Codes
Packages in JCE
Cipher

         is the object capable of performing encryption and decryption as per
         an encryption algorithm.

         is one of core classes from JCE

         javax.crypto
Methods of Cipher

      getInstance()
      init()
      update()
      doFinal()
      getBlockSize()
      getAlgorithm()
      getProvider()
Password Based encryption (PBE)

      generates a secret encryption key based on a password provided by
      the end user.

      is one of core classes from JCE

      javax.crypto
Password Based encryption (PBE)

      mix in a random number with the password, called the salt

      prevent dictionary attacks or pre-computation attacks
PBEParameterSpec Class
SecretKeyFactory Class
Encrypting Data using Passwords

      Take the string and create an instance of PBEKeySpec

      Use a SecretKeyFactory to produce a SecretKey instance

      Generate a random salt

      Select an iteration count and create a PBEParameterSpec

      Create a Cipher from the SecretKey and PBEParameterSpec

      Encrypt the data with the Cipher and write output of the Cipher
Encrypting Data using Passwords
Encrypting Data using Passwords

More Related Content

What's hot

Hybrid cryptographic technique using rsa algorithm and scheduling concepts
Hybrid cryptographic technique using rsa algorithm and scheduling conceptsHybrid cryptographic technique using rsa algorithm and scheduling concepts
Hybrid cryptographic technique using rsa algorithm and scheduling concepts
IJNSA Journal
 
Cryptography
CryptographyCryptography
Cryptography
Sajal Agarwal
 
Cn ppt
Cn pptCn ppt
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryptionSecuring broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
LeMeniz Infotech
 
S/MIME
S/MIMES/MIME
S/MIME
maria azam
 
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryptionSecuring broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
Shakas Technologies
 
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
Adz91 Digital Ads Pvt Ltd
 
Inscibe and Squeeze
Inscibe and SqueezeInscibe and Squeeze
Inscibe and Squeeze
Ayush Kejriwal
 
Ppt
PptPpt
Cryptography and attacks ins
Cryptography and attacks insCryptography and attacks ins
Cryptography and attacks ins
Astha Parihar
 
Pgp
PgpPgp
Security Basics
Security BasicsSecurity Basics
Security Basics
ArchitecTerra Ltd.
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
IJERD Editor
 
fucking shit
fucking shitfucking shit
fucking shit
eyalrav
 
Analysis of Cryptographic Algorithms for Network Security
Analysis of Cryptographic Algorithms for Network SecurityAnalysis of Cryptographic Algorithms for Network Security
Analysis of Cryptographic Algorithms for Network Security
Editor IJCATR
 
CRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITYCRYPTOGRAPHY & NETWORK SECURITY
Encryption by fastech
Encryption by fastechEncryption by fastech
Encryption by fastech
Abdulafeez Fasasi
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKI
Rabei Hassan
 
Pgp
PgpPgp
Network security & cryptography
Network security & cryptographyNetwork security & cryptography
Network security & cryptography
Rahulprasad Yadav
 

What's hot (20)

Hybrid cryptographic technique using rsa algorithm and scheduling concepts
Hybrid cryptographic technique using rsa algorithm and scheduling conceptsHybrid cryptographic technique using rsa algorithm and scheduling concepts
Hybrid cryptographic technique using rsa algorithm and scheduling concepts
 
Cryptography
CryptographyCryptography
Cryptography
 
Cn ppt
Cn pptCn ppt
Cn ppt
 
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryptionSecuring broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
 
S/MIME
S/MIMES/MIME
S/MIME
 
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryptionSecuring broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
 
Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption Securing broker less publish subscribe systems using identity-based encryption
Securing broker less publish subscribe systems using identity-based encryption
 
Inscibe and Squeeze
Inscibe and SqueezeInscibe and Squeeze
Inscibe and Squeeze
 
Ppt
PptPpt
Ppt
 
Cryptography and attacks ins
Cryptography and attacks insCryptography and attacks ins
Cryptography and attacks ins
 
Pgp
PgpPgp
Pgp
 
Security Basics
Security BasicsSecurity Basics
Security Basics
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
fucking shit
fucking shitfucking shit
fucking shit
 
Analysis of Cryptographic Algorithms for Network Security
Analysis of Cryptographic Algorithms for Network SecurityAnalysis of Cryptographic Algorithms for Network Security
Analysis of Cryptographic Algorithms for Network Security
 
CRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITYCRYPTOGRAPHY & NETWORK SECURITY
CRYPTOGRAPHY & NETWORK SECURITY
 
Encryption by fastech
Encryption by fastechEncryption by fastech
Encryption by fastech
 
Cryptography and PKI
Cryptography and PKICryptography and PKI
Cryptography and PKI
 
Pgp
PgpPgp
Pgp
 
Network security & cryptography
Network security & cryptographyNetwork security & cryptography
Network security & cryptography
 

Viewers also liked

Authentication Systems
Authentication SystemsAuthentication Systems
Authentication Systems
Bit Hacker
 
Software product development services company creative technosoft systems
Software product development services company creative technosoft systemsSoftware product development services company creative technosoft systems
Software product development services company creative technosoft systems
Creative Technosoft Systems
 
Vessels & Access Forum
Vessels & Access ForumVessels & Access Forum
Vessels & Access Forum
gm330
 
Hyperactivity
HyperactivityHyperactivity
Hyperactivity
candice santiago
 
Encourage webinar participation through gamification
Encourage webinar participation through gamificationEncourage webinar participation through gamification
Encourage webinar participation through gamification
Natalie Denmeade
 
Observing Solid, Liquid and Gas Particles Day 2
Observing Solid, Liquid and Gas Particles Day 2Observing Solid, Liquid and Gas Particles Day 2
Observing Solid, Liquid and Gas Particles Day 2
jmori1
 
Fighting cleanup routines
Fighting cleanup routinesFighting cleanup routines
Fighting cleanup routines
candice santiago
 
Cosug 2012-lzy
Cosug 2012-lzyCosug 2012-lzy
Cosug 2012-lzy
OpenCity Community
 
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertasTeatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
Miguel Muñoz de Morales
 
Presentation1
Presentation1Presentation1
Presentation1
Himanshu Bansal
 
Eliot and modernism
Eliot and modernismEliot and modernism
Eliot and modernism
ms_faris
 
SHAHU MAHARAJ
SHAHU MAHARAJSHAHU MAHARAJ
SHAHU MAHARAJ
Rahul Gavade
 
Privacy and security on twitter
Privacy and security on twitterPrivacy and security on twitter
Privacy and security on twitter
Eman Aldakheel
 
Cathedral of Saint Mary Magdalene
Cathedral of Saint Mary MagdaleneCathedral of Saint Mary Magdalene
Cathedral of Saint Mary Magdalene
Tigu Rius
 
Putting the wow into your school's wom, NYSAIS Presentation
Putting the wow into your school's wom, NYSAIS PresentationPutting the wow into your school's wom, NYSAIS Presentation
Putting the wow into your school's wom, NYSAIS Presentation
Rick Newberry
 
Seven things to make your pup ONE in a million
Seven things to make your pup ONE in a millionSeven things to make your pup ONE in a million
Seven things to make your pup ONE in a million
Raymond J. Ramirez DVM speaking
 
Golf Center Kiev
Golf Center KievGolf Center Kiev
Golf Center Kievjshappo
 
3D Workshop - Stereoscopic Post-Production and Visual Effects
3D Workshop - Stereoscopic Post-Production and Visual Effects3D Workshop - Stereoscopic Post-Production and Visual Effects
3D Workshop - Stereoscopic Post-Production and Visual Effects
Rick Baumgartner
 
2) exam section a question 1
2) exam section a   question 12) exam section a   question 1
2) exam section a question 1
adamporter
 
Distribution (1)
Distribution (1)Distribution (1)
Distribution (1)
NShuttle
 

Viewers also liked (20)

Authentication Systems
Authentication SystemsAuthentication Systems
Authentication Systems
 
Software product development services company creative technosoft systems
Software product development services company creative technosoft systemsSoftware product development services company creative technosoft systems
Software product development services company creative technosoft systems
 
Vessels & Access Forum
Vessels & Access ForumVessels & Access Forum
Vessels & Access Forum
 
Hyperactivity
HyperactivityHyperactivity
Hyperactivity
 
Encourage webinar participation through gamification
Encourage webinar participation through gamificationEncourage webinar participation through gamification
Encourage webinar participation through gamification
 
Observing Solid, Liquid and Gas Particles Day 2
Observing Solid, Liquid and Gas Particles Day 2Observing Solid, Liquid and Gas Particles Day 2
Observing Solid, Liquid and Gas Particles Day 2
 
Fighting cleanup routines
Fighting cleanup routinesFighting cleanup routines
Fighting cleanup routines
 
Cosug 2012-lzy
Cosug 2012-lzyCosug 2012-lzy
Cosug 2012-lzy
 
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertasTeatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
Teatro de la sensacion danza moderna infantil-jornadas de puertas abiertas
 
Presentation1
Presentation1Presentation1
Presentation1
 
Eliot and modernism
Eliot and modernismEliot and modernism
Eliot and modernism
 
SHAHU MAHARAJ
SHAHU MAHARAJSHAHU MAHARAJ
SHAHU MAHARAJ
 
Privacy and security on twitter
Privacy and security on twitterPrivacy and security on twitter
Privacy and security on twitter
 
Cathedral of Saint Mary Magdalene
Cathedral of Saint Mary MagdaleneCathedral of Saint Mary Magdalene
Cathedral of Saint Mary Magdalene
 
Putting the wow into your school's wom, NYSAIS Presentation
Putting the wow into your school's wom, NYSAIS PresentationPutting the wow into your school's wom, NYSAIS Presentation
Putting the wow into your school's wom, NYSAIS Presentation
 
Seven things to make your pup ONE in a million
Seven things to make your pup ONE in a millionSeven things to make your pup ONE in a million
Seven things to make your pup ONE in a million
 
Golf Center Kiev
Golf Center KievGolf Center Kiev
Golf Center Kiev
 
3D Workshop - Stereoscopic Post-Production and Visual Effects
3D Workshop - Stereoscopic Post-Production and Visual Effects3D Workshop - Stereoscopic Post-Production and Visual Effects
3D Workshop - Stereoscopic Post-Production and Visual Effects
 
2) exam section a question 1
2) exam section a   question 12) exam section a   question 1
2) exam section a question 1
 
Distribution (1)
Distribution (1)Distribution (1)
Distribution (1)
 

Similar to Jdbc 6

Security via Java
Security via JavaSecurity via Java
Security via Java
Bahaa Zaid
 
Iaetsd a survey on cloud storage security with
Iaetsd a survey on cloud storage security withIaetsd a survey on cloud storage security with
Iaetsd a survey on cloud storage security with
Iaetsd Iaetsd
 
CN GP 4 Cryptogaraphy.pptx
CN GP 4 Cryptogaraphy.pptxCN GP 4 Cryptogaraphy.pptx
CN GP 4 Cryptogaraphy.pptx
GarimaJain745610
 
PresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.pptPresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.ppt
PrabhatMishraAbvp
 
PresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.pptPresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.ppt
vinitajain703
 
Presentationon ON THE TOPIC CRYPTOGRAPHY
Presentationon ON THE TOPIC CRYPTOGRAPHYPresentationon ON THE TOPIC CRYPTOGRAPHY
Presentationon ON THE TOPIC CRYPTOGRAPHY
BARATH800940
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
Uttara University
 
Java Crypto
Java CryptoJava Crypto
Java Crypto
phanleson
 
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
Editor IJMTER
 
Cloud Security Mechanisms
Cloud Security MechanismsCloud Security Mechanisms
Cloud Security Mechanisms
Mohammed Sajjad Ali
 
Sankar jayam
Sankar jayamSankar jayam
Sankar jayam
tasankar14
 
Cryptography /Sankar jayam
Cryptography /Sankar jayamCryptography /Sankar jayam
Cryptography /Sankar jayam
tasankar14
 
Cryptography ppt
Cryptography pptCryptography ppt
A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...
ijsrd.com
 
Cryptography
CryptographyCryptography
Cryptography
Dipti Sakpal
 
A Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated KeysA Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated Keys
IJORCS
 
A Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated KeysA Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated Keys
IJORCS
 
Mj3422172221
Mj3422172221Mj3422172221
Mj3422172221
IJERA Editor
 
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTSHYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
IJNSA Journal
 

Similar to Jdbc 6 (20)

Security via Java
Security via JavaSecurity via Java
Security via Java
 
Iaetsd a survey on cloud storage security with
Iaetsd a survey on cloud storage security withIaetsd a survey on cloud storage security with
Iaetsd a survey on cloud storage security with
 
CN GP 4 Cryptogaraphy.pptx
CN GP 4 Cryptogaraphy.pptxCN GP 4 Cryptogaraphy.pptx
CN GP 4 Cryptogaraphy.pptx
 
PresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.pptPresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.ppt
 
PresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.pptPresentationonCRYPTOGRAPHYppt.ppt
PresentationonCRYPTOGRAPHYppt.ppt
 
Presentationon ON THE TOPIC CRYPTOGRAPHY
Presentationon ON THE TOPIC CRYPTOGRAPHYPresentationon ON THE TOPIC CRYPTOGRAPHY
Presentationon ON THE TOPIC CRYPTOGRAPHY
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
 
Java Crypto
Java CryptoJava Crypto
Java Crypto
 
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
Authentication Mechanisms For Signature Based Cryptography By Using Hierarchi...
 
Cloud Security Mechanisms
Cloud Security MechanismsCloud Security Mechanisms
Cloud Security Mechanisms
 
Sankar jayam
Sankar jayamSankar jayam
Sankar jayam
 
Cryptography /Sankar jayam
Cryptography /Sankar jayamCryptography /Sankar jayam
Cryptography /Sankar jayam
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...A Review Paper on Secure authentication and data sharing in cloud storage usi...
A Review Paper on Secure authentication and data sharing in cloud storage usi...
 
Cryptography
CryptographyCryptography
Cryptography
 
A Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated KeysA Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated Keys
 
A Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated KeysA Robust Cryptographic System using Neighborhood-Generated Keys
A Robust Cryptographic System using Neighborhood-Generated Keys
 
Mj3422172221
Mj3422172221Mj3422172221
Mj3422172221
 
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTSHYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
HYBRID CRYPTOGRAPHIC TECHNIQUE USING RSA ALGORITHM AND SCHEDULING CONCEPTS
 

More from Tuan Ngo

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
Tuan Ngo
 
Net framework
Net frameworkNet framework
Net framework
Tuan Ngo
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
Tuan Ngo
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
Tuan Ngo
 
13 collections
13   collections13   collections
13 collections
Tuan Ngo
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
Tuan Ngo
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
Tuan Ngo
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
Tuan Ngo
 
10 namespace
10  namespace10  namespace
10 namespace
Tuan Ngo
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
Tuan Ngo
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
Tuan Ngo
 
5 arrays
5   arrays5   arrays
5 arrays
Tuan Ngo
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
Tuan Ngo
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
Tuan Ngo
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
Tuan Ngo
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
Tuan Ngo
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
Tuan Ngo
 
Jdbc 7
Jdbc 7Jdbc 7
Jdbc 7
Tuan Ngo
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
Tuan Ngo
 
Jdbc 2
Jdbc 2Jdbc 2
Jdbc 2
Tuan Ngo
 

More from Tuan Ngo (20)

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
 
Net framework
Net frameworkNet framework
Net framework
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
 
13 collections
13   collections13   collections
13 collections
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
 
10 namespace
10  namespace10  namespace
10 namespace
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 
5 arrays
5   arrays5   arrays
5 arrays
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
 
Jdbc 7
Jdbc 7Jdbc 7
Jdbc 7
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
 
Jdbc 2
Jdbc 2Jdbc 2
Jdbc 2
 

Recently uploaded

GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Jdbc 6

  • 1. Cryptography in Java tnngo2@gmail.com
  • 2. Cryptography to maintain and protect the confidentiality of the information when it is transmitted on a communication medium is the mechanism of encoding information is secret coded form. keep communications limited and private to only the sender and receiver enhances the security, authenticity and integrity of the information passed across the communication medium
  • 3. Cryptography Schemes The process of cryptography is achieved with the help of encryption algorithm and an encryption key The encryption algorithm is a mathematical procedure to encrypt or decrypt the data. Encryption key is the input that encryption algorithm takes
  • 4. Cryptography Algorithm Types Secret Key Cryptography (Symmetric) Two entities share the same secret key. Public Key Cryptography (Asymmetric) Operates under two different keys. One is used for encoding, the second for decoding. Hash Functions (One-way cryptography, Message digests) Encrypt the information into an irreversible codes.
  • 5. Need for cryptography In order to develop a secure database application, cryptography is needed to identify all the possible threats to the application and provide measures to prevent them. The threats: Violation of Privacy/confidentiality Data can be read by an unintended receiver. Tampering modifying or deleting a resource without proper access privilege Spoofing impersonating the identity of a different user and use it in an unauthorized way
  • 6. Purpose of Cryptography Authentication prevents spoofing by applying the digital signature Privacy/confidentiality verifies, prevents unintended receiver from reading the data Integrity verifies whether the data received by the receiver is the same data as sent by the sender Non-repudiation ensures that a user or a business organization or program entity has performed a transaction
  • 7. Java Cryptography Architecture (JCA) JCA is a framework written in Java to access and develop cryptographic functionality, and forms part of the Java security API Java Cryptography Extension (JCE) extends the underlying architecture of JCA to implement encryption, key exchange JCA and JCE together provide a complete, platform-independent API.
  • 8. Design Principles of JCA JCA was designed to access cryptography and security concepts. Implementation independence and interoperability. Algorithm independence and extensibility
  • 9. Components of JCA Cryptographic Service Providers is a package or a set of packages defined by the JCA to implement one or more cryptographic services. Key Management manage the library of keys and certificates which in a database called keystore. KeyStore class in the java.security package
  • 10. Cryptographic Service The Service provider classes are also known as Engine classes.
  • 13. Java Cryptography Extension (JCE) JCA is a set of packages that form a framework and provides implementations for encryption, key generations and agreement, and Message Authentication Code (MAC) algorithms. Additional cryptographic libraries can be plugged in.
  • 14. Java Cryptography Extension APIs Symmetric block encryption Symmetric stream encryption Password-based encryption Key Agreement Message Authentication Codes
  • 16. Cipher is the object capable of performing encryption and decryption as per an encryption algorithm. is one of core classes from JCE javax.crypto
  • 17. Methods of Cipher getInstance() init() update() doFinal() getBlockSize() getAlgorithm() getProvider()
  • 18. Password Based encryption (PBE) generates a secret encryption key based on a password provided by the end user. is one of core classes from JCE javax.crypto
  • 19. Password Based encryption (PBE) mix in a random number with the password, called the salt prevent dictionary attacks or pre-computation attacks
  • 22. Encrypting Data using Passwords Take the string and create an instance of PBEKeySpec Use a SecretKeyFactory to produce a SecretKey instance Generate a random salt Select an iteration count and create a PBEParameterSpec Create a Cipher from the SecretKey and PBEParameterSpec Encrypt the data with the Cipher and write output of the Cipher