Use of Maple software in
Cryptosystem

Mr.  M. S. Wavare

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

Rajarshi
Shahu Mahavidyalaya, Latur(Autonomous)

Abstract

In this paper 
we are dealing with algebraic cryptosystem using Maple commands .We have
introduced some basic types of cryptosystem in which we will see  that how we can encode or decode the messages
. We have introduced method of Hill cryptosystem in general case which is
beneficial for sending top secret information.

(Terms Used: Cryptosystem, encipher, decipher,
encryption, decryption)

1.     
Introduction
:

In today’s technical word, everything is
available in single click, which requires security of transmitted message and authentication
of those messages too. From ancient era, various security suits  are analyzed and prepared by researchers.   Cryptography
is
the study of techniques that can be used to disguise a message so that only the
intended recipient can remove the disguise and read it. The simplest way to
disguise a message is to replace every occurrence of each specific character
with a different character. This method for disguising a message yields what we
will call a substitution cipher. Since substitution ciphers appear as
puzzles in many newspapers and puzzle books, they are obviously relatively easy
to “break” and should not be used when sending “top secret” information The
disguising techniques we discuss involve applying mathematical operations to
messages, these techniques are examples of algebraic cryptography.

                     We will call an
undisguised message a plaintext and a disguised message a cipher text.
Also, we will call the process of converting a plaintext to a cipher text the encryption
or encipherent of the message, and we will call the reverse process
the decryption or decipherment of the message.

2.     
Cryptosystem
                                                                                                                                                                    

A
cryptosystem consists of the following:                                                                         

i. An alphabet L that contains all characters that
can be used in messages (letters, numerals,    punctuation marks, blank spaces, etc.),

ii. A commutative ring R with identity such that
|R| =
|L|,

iii.
Bijections  ? : L ? R
and f : R ? R.

The idea we will take is that to encipher a
plaintext that is expressed as a list of elements in L, we first use ?
to convert the plaintext into a list of elements in R. We can then
form the cipher text by applying f to the plaintext ring elements and,
if desired ,use ??1 to convert the code text back to a list of elements
in L. We can recover the plaintext from the code text by repeating this
procedure using f?1 instead of f. So that only the intended
recipient of the message can recover the plain text, only the intended
recipient can know f?1. We will always assume that everything else in a
cryptosystem, with the obvious exception of f, is public knowledge.It is
true in some cryptosystems that f can be public knowledge without
revealing f?1. Such cryptosystems are called public-key system.                                                                                                              

For
simplicity in this chapter we will assume that all messages are written in the
alphabet                          L = {A, B, . . . , Z}. Also ,w e will take R
= Z26 and let ? : L ? R be
given by ?(A) = 0, ?(B) = 1, , ?(C) =
2 . . . , , ?(Y) = 24, ?(Z) = 25.                 

For
reference, we list the correspondence for ? below                                                                                       

A         B        
C        D           E        F          G          H        I           J
   K    L     M      N   O                                                                                                                                       
0          1            2       3             4         5          6           7      8            9
  10   11   12     13  14                                                                                                                        

P          Q         R         S            T        U         V          W       X         Y           Z                                                                                                                                                    
15        16         17        18         19      20         21        22       23         24         25                                                                                                          We
now consider some cryptosystems with different types of encryption methods.
That is, we consider some cryptosystems with different types of Bijections f
: R ? R                                                                                                                                        
2.1       Encryption Method 1:

Choose f:
R ? R
by
f(x) = ax mod |R| for some a ? R with g.c.d (a,
|R|) = 1                         

 2.1.1 Example
1

 Let f(x)
= 3x mod 26. Then the message “ATTACK AT DAWN” enciphers as follows.

         A                        T          T          A        C        
K        A         T          D         A         W        N

?
;    0
             19        19        0          2          10        0        
19       3          0          22        13

f
;     0
             5          5          0          6          4
         0          5          9          0         14
       13

:   A           F          F          A        G         E         A
        F          J
          A         O         N                                                                                                                                                                                                         
                                    

Hence, the
corresponding cipher text is “AFFAGEAFJAON”. To decode this message we repeat
the same procedure using the inverse function

 mod
|R| = 9x mod 26
instead of  f.  This message decode, as follows.

           A          F           F          A         G         E          A         F          J           A        O          N

? ;       0           5           5          0          6          4           0
        5          9          0          14
      13

f?1
;   0
          19
       19
        0          2        10        
 0     
 19          3         0          22
       13

? ?1
; A           T          T          A
        C        K           A       T           D       
A        W        N

Note
that 3?1

 9 mod 26 because 3 ? 9

27 = 1 mod 26. Note also that we are guaranteed a
multiplicative inverse of a = 3 exists modulo |R| = 26 because of the
requirement that g.c.d (a, |R|) = 1 a

 R with
g.c.d (a, |R|) = 1.                                                   

2.2  Encryption
Method 2:

Choose
f : R ? R
by
f(x) = ax+b  mod
|R| for some a, b

 R with  g.c.d (a, |R|) = 1.

2.2.1
Example 2.

Let
f(x) = 3x + 4 mod 26. Then the message “ATTACK AT DAWN”
enciphers as follows.

            A         T           T           A        C         K       
A         T          D        A
         W        N

?;         0
         19
       19
         0         2         10        0          19
       3          0
         22
       13

f
;         4
         9          9          4         10        8        
4         9         13        4         18        17

:     E         J          
J          E         K        I          E        
J          N        E          S         R

Hence,
the corresponding cipher text is “EJJEKIEJNESR”. To decipher this message, we
repeat the same procedure using the inverse function

 mod |R| = 9(x ? 4) mod 26 instead of f.   

3.     
Hill Encryption Method:

Let
A be an n × n
invertible
matrix over R (i.e. such that g.c.d (det A, |R|) = 1). Group the
plaintext into row vectors Pi of length n, and define f
: Rn ? Rn
by
f(Pi) = Pi A with each entry taken modulo
|R|. The resulting rows
listed together form the cipher text.

3.1 Example 3

We
use the Hill encryption method to encipher the message “MEET AT SEVEN”. We
begin by converting the message into a list of elements in Z26.

M         E         E         T          A        T          S         E          V        
E         N

?
;        12
       4          4
         19        0         19        18      
4         21       4         13

We
will use the following 2 × 2
key matrix A to encipher this message.

A
=

Note
that A is invertible over Z26 since g.c.d (det A,26)
= g.c.d (3, 26) = 1. To form the cipher text, we group the plaintext
into row vectors Pi of length 2, and compute Pi A
for all i with each entry taken modulo 26.

The
first cipher text vector is computed as follows.

P1A
=
(12, 4)

=(28,76)=(2,24)

The
remaining cipher text vectors are computed as follows. (Since the message does
not completely fill the last plaintext vector P6,we fill this
vector with an arbitrary element from Z26.)

P2A
=
(4, 19)A =  (1, 18)

P3A
=
(0, 19)A = (19, 24)

P4A
=
(18, 4)A = (14, 2)

P5A
=
(21, 4)A = (20, 17)

P6A
=
(13, 25)A = (25, 9)

Hence
,the entire encipherment is

       M             
E         E         T         A        T          S
         E          V         E          N

?
:  12
             4          4          19       0         19
       18       
4         21       4         13       25

f
:    2               24       1          18        19       
24       14       2          20       17      
25       9

??1: C             Y         B        S          T         
Y        O        C        U        R        
Z         J

and
the cipher text is “CYBSTYOCURZJ”. Although the last cipher text character is
in a position beyond the last plaintext character, it must be retained as it is
necessary for decipherment.

4.     
Generalized Hill
Encryption Method:

Let A be an n × n invertible
matrix over R, and let B be a row vector of length n over R.
Group the plaintext into row vectors Pi of length n,
and define f : Rn ? Rn by
f(Pi) = PiA + B with each entry taken
modulo |R|. The resulting rows
listed together form the cipher text. To break the generalized system by trial
and error, an intruder would have to test a maximum of

possible pairs (A,B) of keys,
while to break the original Hill system an intruder would have to test a
maximum of only

possible keys. Even for very small
values of n this increase is significant .For example, for n = 5,
the generalized system has

 =
11881376 times as many possible pairs of keys as the number of possible
keys for our original Hill system.

 

References :

1.     Richard
E. Klima,Neil P. Sigmon, Ernest Stitzinger.Applications of abstract algebra
with Maple. Maple 11 software

2.     Topics
in Algebra by I N Herstein

3.    
 Lester S. Hill, Cryptography in an Algebraic
Alphabet, The American Mathematical 

       Monthly Vol.36, June–July 1929, pp.
306–312. (PDF)

4.    
 Lester S. Hill, Concerning Certain Linear
Transformation Apparatus of Cryptography,   

The American Mathematical Monthly
Vol.38, 1931, pp. 135–154.

5.    
María Isabel González
Vasco(Guest Editors)Rainer Steinwandt, Applications of algebra to
cryptography, Discrete Applied Mathematics

 

Maple Commands Used to calculate
these  

 

>

                                                          

 

 

 

 

                                               

                         

    

>

    

>