Basics_of_Cryptography.pdf

download Basics_of_Cryptography.pdf

of 25

Transcript of Basics_of_Cryptography.pdf

  • 7/27/2019 Basics_of_Cryptography.pdf

    1/25

    Basics of Cryptography

  • 7/27/2019 Basics_of_Cryptography.pdf

    2/25

    2

    Definition of Cryptography

    Conversion of plain text data into a secret code

    We will announcethe merger at noon

    on Friday

    We will announcethe merger at noon

    on Friday

    Plain Text Data

    px pbdd tgghnvxmax fxlzxl tm ghhg

    hg ylbwtr

    px pbdd tgghnvxmax fxlzxl tm ghhg

    hg ylbwtr

    Secret Code

  • 7/27/2019 Basics_of_Cryptography.pdf

    3/25

    3

    Brief History

    Dates as far back as 1900 B.C in Egypt

    Julius Caesar (100-44 B.C.) used simple

    substitution For example, substitute each letter in the alphabet with a

    different letter

    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

    M N O P Q R S T U V W X Y Z A B C D E F G H I J K L

  • 7/27/2019 Basics_of_Cryptography.pdf

    4/254

    Brief History (cont.)

    Sir Francis Bacon (1623) Bi-literal cipher

  • 7/27/2019 Basics_of_Cryptography.pdf

    5/255

    Brief History (cont.)

    Thomas Jefferson (1790) Wheel Cipher

    Read this

    line on the

    wheel

  • 7/27/2019 Basics_of_Cryptography.pdf

    6/256

    Brief History (cont.)

    William Frederick Friedman Father of USCryptanalysis

    US Government cryptanalyst 1918 Index of Coincidence and its Applications inCryptography

    WWII Code Machines: Germanys Enigma Japans Purple

  • 7/27/2019 Basics_of_Cryptography.pdf

    7/257

    Brief History (cont.)

    1970s 1976 DES standardized

    1976 Public key cryptography introduced

    1977 RSA cipher introduced

    1980s Stronger ciphers (128 bit) introduced (e.g., IDEA)

    1990s Integration of cryptography into commercial

    applications Post 2K:

    AES standardized to replace DES

    Emergence on the use of elliptic curve cryptography

  • 7/27/2019 Basics_of_Cryptography.pdf

    8/258

    Encrypting Data

    Encrypting data primarily requires two

    components

    Secret key Algorithm

    We will announce

    the merger atnoon on Friday

    We will announcethe merger atnoon on Friday

    Plain Text

    px pbdd tgghnvx

    max fxlzxl tmghhg hg ylbwtr

    px pbdd tgghnvxmax fxlzxl tm

    ghhg hg ylbwtr

    Cipher Text

    Crypto

    Algorithm

    Crypto

    Algorithm

    Secret Key

  • 7/27/2019 Basics_of_Cryptography.pdf

    9/259

    We willannounce the

    merger on Friday

    We willannounce the

    merger on Friday

    Plain Text

    Decrypting Data

    Reverse process of encryption

    px pbdd tgghnvxmax fxlzxl tm

    ghhg hg ylbwtr

    px pbdd tgghnvxmax fxlzxl tm

    ghhg hg ylbwtr

    Cipher Text

    Crypto

    Algorithm

    Crypto

    Algorithm

    Secret Key

  • 7/27/2019 Basics_of_Cryptography.pdf

    10/2510

    Types of Cryptographic Algorithms

    Symmetric

    Asymmetric

    One-Way Hashes

  • 7/27/2019 Basics_of_Cryptography.pdf

    11/2511

    Symmetric Cryptography

    Use the same secret key to encrypt and decrypt

    data

    SharedSecret Key

    I LoveYou! apdojqlejz I LoveYou!AlgorithmAlgorithm AlgorithmAlgorithm

    Alice Bob

    S i C h

  • 7/27/2019 Basics_of_Cryptography.pdf

    12/2512

    Symmetric Cryptography:

    Pros and Cons

    Pros:

    Fast Short keys

    Well known

    Key generation simple

    Cons: Secrecy of keys

    Mgmt of keys

    Nos. of keys

  • 7/27/2019 Basics_of_Cryptography.pdf

    13/25

    13

    Asymmetric Cryptography

    Use one key for encryption, and one key for

    decryption

    One key is considered the private (secret) key, while the otheris considered the public key

    Keys are mathematically related to one another

  • 7/27/2019 Basics_of_Cryptography.pdf

    14/25

    14

    Asymmetric Cryptography

    An example (encrypting):

    I LoveYou!

    I LoveYou!

    Alice Bob

    AlgorithmAlgorithm

    Bobs Public Key

    AlgorithmAlgorithm

    Bobs Private Key

    apdojqlejz

    Cipher Text

  • 7/27/2019 Basics_of_Cryptography.pdf

    15/25

    15

    Asymmetric Cryptography

    An example (signing):

    I LoveYou!

    Alice Bob

    AlgorithmAlgorithm

    Alices Private Key

    AlgorithmAlgorithm

    Alices Public Key

    I LoveYou!

    SignedPlain Text

    I LoveYou!

    Authentic

    Asymmetric Cryptography:

  • 7/27/2019 Basics_of_Cryptography.pdf

    16/25

    16

    Asymmetric Cryptography:

    Pros and Cons

    Pros:

    No shared secrets Key mgmt easier

    Provides secrecy and

    authenticity

    Cons:

    Slow

    Large keys

    Key generation ismore difficult

  • 7/27/2019 Basics_of_Cryptography.pdf

    17/25

    17

    One-Way Hashes

    Calculates a fixed size value using input of any size

    Result is typically 128 or 160 bits

    Newer algorithms will produce larger outputs

    Key Properties:

    No two results are the same

    One-way function (i.e., cannot determine input from output)

  • 7/27/2019 Basics_of_Cryptography.pdf

    18/25

    18

    One-Way Hashes

    An example:

    I LoveYou! Hash Algorithm

    Hash Algorithm Hash1

    160 Bits

    NYCPhoneBook

    Hash AlgorithmHash Algorithm Hash2

    160 Bits

    Hash1= Hash2

    Any change to input

    produces new output

    DATA INTEGRITY

  • 7/27/2019 Basics_of_Cryptography.pdf

    19/25

    19

    Combining Cryptographic Methods

    Encryption:

    Encrypt data with a temporary symmetric key

    Encrypt symmetric key to recipient using recipients public key

    Decryption:

    Decrypt temporary symmetric key using own private key

    Decrypt message using symmetric key

  • 7/27/2019 Basics_of_Cryptography.pdf

    20/25

    20

    Combining Cryptographic Methods

    Encryption (An Example):

    I LoveYou!

    Alice Bob

    Temp Symmetric Key

    SymmetricAlgorithmSymmetricAlgorithm

    apdojqlejz

    Cipher Text

    0010101

    11010100010110AsymmetricAlgorithm

    Asymmetric

    Algorithm

    Bobs Public Key

    EncryptedSymmetric Key Message

  • 7/27/2019 Basics_of_Cryptography.pdf

    21/25

    21

    Combining Cryptographic Methods

    Decryption (An Example):

    Bob

    I LoveYou!

    SymmetricAlgorithmSymmetricAlgorithm

    Temp Symmetric Key

    AsymmetricAlgorithm

    Asymmetric

    Algorithm

    Bobs Private Key

    Message

    apdojqlejz

    Cipher Text

    0010101

    11010100010110

    EncryptedSymmetric Key

  • 7/27/2019 Basics_of_Cryptography.pdf

    22/25

    22

    Combining Cryptographic Methods

    Signing:

    Hash the data to be signed (data integrity)

    Sign the hash (authentication) Verification:

    Verify signature on hash (authentication)

    Verify hash against a calculated hash of data (data integrity)

  • 7/27/2019 Basics_of_Cryptography.pdf

    23/25

    23

    Combining Cryptographic Methods

    Signing (An Example):

    I LoveYou!

    Alice Bob

    HashAlgorithm

    HashAlgorithm

    0010101

    11010100010110

    Hash

    Alices Private Key01100101110101

    0100101

    Asymmetric

    Algorithm

    Asymmetric

    Algorithm

    Signature(Encrypted Hash) Message

  • 7/27/2019 Basics_of_Cryptography.pdf

    24/25

    24

    Combining Cryptographic Methods

    Signature Verification (An Example):

    Bob

    001010111010100010110

    HashAlgorithm

    HashAlgorithm

    Message

    I LoveYou!

    Message

    0110010

    11101010100101

    Signature(Encrypted Hash)

    Alices Public Key

    AsymmetricAlgorithm

    AsymmetricAlgorithm

    0010101

    11010100010110

    Are thehashesequal??

    S

  • 7/27/2019 Basics_of_Cryptography.pdf

    25/25

    25

    Summary

    Different types of cryptographic algorithms

    address different requirements

    Each type of algorithm has its set of pros and cons Combining types of algorithms provides complete

    and useful solutions