200 likes | 534 Views
CRYPTOGRAPHIC ALGORITHMS . -Abdul M. TYPES OF CRYPTOGRAPHIC ALGORITHMS . There are several ways of classifying cryptographic algorithms. For purposes of this presentation, they will be categorized based on the number of keys that are employed for encryption and decryption
E N D
CRYPTOGRAPHIC ALGORITHMS -Abdul M
TYPES OF CRYPTOGRAPHIC ALGORITHMS • There are several ways of classifying cryptographic algorithms. For purposes of this presentation, they will be categorized based on the number of keys that are employed for encryption and decryption • Secret Key (Symmetric) Cryptography (SKC): Uses a single key for both encryption and decryption • Public Key (Asymmetric) Cryptography (PKC): Uses one key for encryption and another for decryption • Hash (One-Way) Functions: Uses a mathematical transformation to irreversibly "encrypt" information
Symmetric Cryptographic Algorithm • Symmetric-key encryption are secret-key, single-key, shared-key, one-key and eventually private-key encryption.
In Symmetric-key algorithms, there are stream ciphers and block ciphers. • In cryptography, a cipher (or cypher) is an algorithm for performing encryption and decryption • In a stream cipher the plaintext digits are encrypted one at a time, and the transformation of successive digits varies during the encryption • block cipher is a symmetric key cipher which operates on fixed-length groups of bits, termed blocks, with an unvarying transformation. • Few example of Symmetric-Key Algorithms are • DES (Data Encryption Standard) • DESede (Triple DES) • (AES)Advanced Encryption Standard
DES • It is based on a Symmetric-key algorithm that uses a 56-bit key • DES is now considered insecure because a brute force attack is possible. • brute force attack is a method of defeating a cryptographic scheme by systematically trying a large number of possibilities • Cipher Detail: • Key sizes: 56 bits • Block sizes: 64 bits • Structure: Feistel network • Feistel cipher is a symmetric structure used in the construction of block ciphers
DESede (Triple DES) • When it was found that a 56-bit key of DES is not enough to guard against brute force attacks, TDES was chosen as a simple way to enlarge the key space without a need to switch to a new algorithm. • Cipher Detail: • Key sizes: 112 (2TDES) or 168 bits (3TDES) • Block sizes: 64 bits • Structure: Feistel network • TDES is slowly disappearing from use, largely replaced by the Advanced Encryption Standard (AES).
AES • Advanced Encryption Standard (AES), also known as Rijndael, is a block cipher adopted as an encryption standard by the U.S. government in late 90’s • Unlike DES (the predecessor of AES), AES is a substitution-permutation network, not a Feistel network. AES is fast in both software and hardware, is relatively easy to implement, and requires little memory. • an SP-network, or substitution-permutation network (SPN), is a series of linked mathematical operations used in block cipher algorithms such as AES • Cipher Detail: • Key sizes: 128, 192 or 256 bits • Block sizes: 128 bits • Structure: Substitution-permutation network
Java Implementation • Cipher • Cipher is a class which extends Object class in java. • java.lang.Object • javax.crypto.Cipher • This class provides the functionality of a cryptographic cipher for encryption and decryption. It forms the core of the Java Cryptographic Extension (JCE) framework. • static int DECRYPT_MODE Constant used to initialize cipher to decryption mode. • static int ENCRYPT_MODE Constant used to initialize cipher to encryption mode.
SecretKeySpec • This class specifies a secret key in a provider-independent fashion. • It can be used to construct a SecretKey from a byte array, without having to go through a (provider-based) SecretKeyFactory. • public class SecretKeySpec extends Object implements KeySpec, SecretKey
KeyGenerator • This class provides the functionality of a (symmetric) key generator. • java.lang.Object • javax.crypto.Cipher • Key generators are constructed using one of the getInstance class methods of this class. • KeyGenerator objects are reusable, i.e., after a key has been generated, the same KeyGenerator object can be re-used to generate further keys. • There are two ways to generate a key: in an algorithm-independent manner, and in an algorithm-specific manner. The only difference between the two is the initialization of the object • public class KeyGenerator extends Object
Other Concepts used in Software are File Input/Output Streams, Byte Array Input/output Streams and various java.security packages.