Crypt 21 Cipher

Embed Size (px)

Citation preview

  • 8/3/2019 Crypt 21 Cipher

    1/18

    Sidra Malik

    MS(Computer and Communication Security)

    A Novel Key-based Transposition

    Scheme for Text Encryption

    NUST School of Electrical Engineering and Computer

    Science

  • 8/3/2019 Crypt 21 Cipher

    2/18

    Outline

    y Basic Idea

    y Characteristics of Proposed Idea

    y Description of a Single Round Cipher

    y Encryption Exampley Decryption Example

    y Making Iterative

    y Strengths and Weaknesses

    y Conclusion and Future Directions

    12/20/20112 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    3/18

    Basic Idea

    12/20/2011A Novel Key-based Transposition Scheme for Text Encryption3

    y What is a Transposition Cipher?

    y a method of encryption by which the positions held by units of

    plaintext (the text needed to be hidden) are shifted, so that the

    ciphertext constitutes a permutation of the plaintext.

    y In other words,y Simply the order of text is changed.

    y Contribution

    y A new transposition/ordering scheme is proposed which is based on

    graphical pattern of key letters

  • 8/3/2019 Crypt 21 Cipher

    4/18

    General Working of a Cipher

    y Plaintext of size n is fed into the encryption

    scheme

    y Which is a process which consists of

    substitution and transposition mainly.

    These methods can be applied in any orderfollowed.

    y one or more rounds of encryption (if the

    block cipher is iterated) to attain the

    desired working of your cipher

    12/20/20114 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    5/18

    Characteristics of Crypt21y substitution concept borrowed from

    classical ciphers

    y transposition based on key matrix and

    merges it with the working phenomenonof iterated block ciphers

    y The Cipher consists of mainly three

    steps: KeyExtension, Substitution andTransposition.

    Find permutations of

    key and generate a new

    key

    C=f(Plaintext, key)

    Transformation using

    key pattern

    Select key

    New key

    ciphertext1

    Ciphertext

    plaintext

    12/20/20115 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    6/18

    Description of a Single Roundy Key Extension

    y Select a key, and make permutations of this key by ROT function.Rotate previous shifted again, and store all the combinations of key.Calculate new extended key, Nk wherey N

    k= Sum(Key) mod Keylength

    y Out of the previously stored combinations of key, select Nk

    keys.Append them to make one long extended key.

    y Substitution

    y In this step, ciphertext is computed by using new key and plaintext byformula given belowy C1 = P + K mod 26

    y where C1 is the obtained ciphertext, P is the plaintext as input and K is theextended key derived in the previous step

    12/20/20116 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    7/18

    Description of a Single Round

    Transposition Based on Key

    y create l(key length) times a 3*3 matrix and fill each with a pattern of

    1s and 0s depicting each key letter.

    y next step is to fill in these matrices where there is 1 with letters of

    intermediate ciphertext

    y The last step is to read the same 1 positioned values row wise to

    generate final ciphertext.

    12/20/20117 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    8/18

    Description of a Single Round

    Example (Encryption)y Plaintext:Mary had a little key it is all she could export

    y Key: excess

    1) Step 1,Key Extension:

    E(4) + X(23) + C(2) + E(4) + S(18) + S(18) = 69

    69 mod 6 (keylength) = 3

    y Use the above answer to rotate row wise with a shift of 1 towards left to getpermutations of key:

    XCESSE

    CESSEX

    ESSEXCSSEXCE

    SEXCES

    y Now consider rst three as 69 mod 6 equals 3 and concatenate them.

    y NEWKEY: XCESSECESSEXESSEXC

    12/20/20118 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    9/18

    Description of a Single Round

    Example (Encryption)

    Step 2, Substitution:

    Substitution of plaintext using extended key is done

    as follows

    12/20/20119 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    10/18

    Description of a Single Round

    Example (Encryption)Step 3, Transposition based on key:

    y the ciphertext received in Step 2 is filled column wise into a pattern table of akey and then extracted out reading row wise.

    y Final ciphertext received is given below:

    JQFDQWBQWPWSVMVCZXCSVRWQVEEAPIKKDLUPBO

    12/20/201110 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    11/18

    Description of a Single Round

    Example (Decryption)Step 1, Reverse Transposition:

    Decryption algorithm needs key and a ciphertext

    y Ciphertext:JQFDQWBQWPWSVMVCZXCSVRWQVEEAPIKKDLUPBO

    y Key: EXCESS

    Take a key pattern and ll the ciphertext row wise in the matrices and read it column wise

    12/20/201111 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    12/18

    Description of a Single Round

    Example (Decryption)

    Step 2, Extension ofKey:

    Follow exactly the same steps in Step1 of encryption to get extended newkey and as a result same extended key will be generated similar to that inencryption.

    y NEWKEY: XCESSECESSEXESSEXC

    Step 3, De-Substitution:

    In this step, plaintext is computed by using new key and

    ciphertext by ceaser decryption formulay P = C1 - K mod 26 (4)

    y P= Maryhadalittlekeyitisallshecouldexport

    P= Maryhad a littlekeyit is allshe couldexport

    12/20/201112 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    13/18

    Iterative Design

    y Whyiterative?

    y General phenomenon that more the rounds of cipher, more

    secure it is considered.

    y The idea of increasing rounds was to add complexityinto

    the system so that the overall process is somewhat

    computationallyexpensivefor brute force attacks.

    12/20/201113 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    14/18

    Iterative Designy The cipher is extended up to N

    roundsby introducing a Key

    schedule function.

    y Initial Key is used only once in

    Extended Key function, and

    further in a pattern in

    transposition.

    12/20/201114 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    15/18

    Strengths and WeaknessesStrengths

    Strengths of this cipher include it is based on

    classical concepts as well as modern iterative

    methods.y The transposition method is newandentirely dependent on key and key length as

    compared to previous methods

    y Frequency analysis is not easy after successive iterations of cipher.

    y It depends upon the length andvalue of key letters in original keywhich

    determine theextended key i.e. forevery key, there is a variable lengthextended

    key. Which

    12/20/201115 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    16/18

    Strengths and Weaknesses

    Weaknesses

    y Most of the previous ciphers have been broken due to weak

    key schedule.

    y A good key schedule however should have the following

    properties:

    y Given all but one of the sub-keys, it is impossible to determine the

    remaining sub-key.

    y Given all of the sub-keys, it is impossible to determine the master key.

    y

    Each sub-key bit is a random function of all of the bits of the master key.

    12/20/201116 A Novel Key-based Transposition Scheme for Text Encryption

  • 8/3/2019 Crypt 21 Cipher

    17/18

    Strengths and Weaknesses

    12/20/2011A

    Novel Key-based Transposition Scheme for Text Encryption17

    y When the attacker knows number of rounds and the key schedule

    function like ROT he is always able to determine

    y the number of bits changing after every round which helpshim to

    derive original key length.

    y Once, the key length is found, the brute force attack complexityreduces by a large number.

    y Thus a stronger key schedule may be introduced rather than just a

    Rotation Function.

  • 8/3/2019 Crypt 21 Cipher

    18/18

    Conclusion and Future Directionsy A new transposition scheme based block cipher is proposed. It uses

    classical substitution whereas proposed transposition scheme which isentirely dependent on key.

    y

    Strengths include that it is safe from frequency analysisy and dependant on original key in many ways.

    y Weaknesses include weak key schedule.

    y Improvements that can be made in key schedule

    y By generating the hash of extended key or using any one way function which

    may not yield any related keys.y Future directions are extending this algorithm to bit level values

    y includingASCII characters in ciphertext as well.

    12/20/201118A

    Novel Key-based Transposition Scheme for Text Encryption