Used to protect information
Can ensure confidentiality
Integrity and Authenticity too
Cryptography -: to achieve encoding messages to make
Cryptanalysis-: technique of decode no-readable into readable.
Cryptology-: combination of cryptography and
BASIC CRYPTOGRAPHIC FUNCTIONS
Private/Public Key Pair
Secret Key Generation
SECRET, PUBLIC KEY CRYPTOGRAPHY
AND HASH FUNCTIONS
Secret Key Cryptography (SKC): Uses a single key
for both encryption and decryption
Public Key Cryptography (PKC): Uses one key for
encryption and another for decryption
Hash Functions: Uses a mathematical
transformation to irreversibly "encrypt" information
ADVANTAGES OF JAVA IN CRYPTOGRAPHY
Develop programs more quickly
Avoid platform dependencies
Write once, run anywhere
Distribute software more easily
TWO MAIN TECHNOLOGIES-
Java Cryptographic Architecture (JCA) - It is a set of
classes that provide cryptographic capabilities to java
Java cryptographic Extension (JCE)- Whereas JCE is not
the part of core Java JDK. For this request special
JCA is the part of core java framework.
Security API in JDK 1.1 introduced the JCA.
It’s provide the basic cryptographic functionalities to
programmer using java language.
Cryptographic functionalities such as- access control,
permissions, key pairs, message digests and digital
In order to achieve this, the JCA package consists of
a number of classes, called as engine classes.
It is a logical representation of cryptographic
Such as:Message digest
public abstract class Signature extends SignatureSpi
Used to provide applications the functionality of a
digital signature algorithm
Provides implementation independent algorithms
There are two ways to request a signature algorithm
an algorithm name
Specifying both algorithm name and package provider
Public key cryptography is also used to provide
Manage secret keys, key pairs and digital
A password-protected database
private key and its associated public key
Can contain trusted certificates
Each entry is identified by an alias
An alias may identify the purpose of the key. i.e.
public abstract class MessageDigest extends
Also known as “hash function” or “one-way
Transforms a message of any length and
computes a fixed length string.
We want it to be hard to guess what the message
was given only the digest.
is always possible.
This class is called as Cipher class
It provides an interface to encrypt and decrypt data
either in arrays within the program or as that data is
read or written through Java’s stream interfaces
Encryption is the
process of feeding
plaintext and key into
a function and getting
Decryption is the
process of feeding
ciphertext and a key
into another function
and getting original
RANDOM NUMBER GENERATOR
It is used to create cryptographic keys and in some
cases to encrypt or sign data.
Its value could not be predicted
PRNG(Pseudo Random Number Generator) is used
by computers to generate endless sequence of