0% found this document useful (0 votes)
147 views18 pages

Cryptography Using Artificial Neural Network

The document describes a project on using an artificial neural network for cryptography. It outlines topics on neural networks and cryptography algorithms. It then discusses encrypting and decrypting data using a chaotic neural network algorithm. Code examples in Matlab are provided to demonstrate encrypting a message into cipher text and decrypting it back to the original plaintext. The conclusion states that chaotic neural networks provide high security for cryptography applications.

Uploaded by

Pray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views18 pages

Cryptography Using Artificial Neural Network

The document describes a project on using an artificial neural network for cryptography. It outlines topics on neural networks and cryptography algorithms. It then discusses encrypting and decrypting data using a chaotic neural network algorithm. Code examples in Matlab are provided to demonstrate encrypting a message into cipher text and decrypting it back to the original plaintext. The conclusion states that chaotic neural networks provide high security for cryptography applications.

Uploaded by

Pray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

EEE1007- NEURAL NETWORK AND

FUZZY CONTROL

PROJECT REPORT

CRYPTOGRAPHY USING
ARTIFICIAL NEURAL
NETWORK

BY :

PRISHITA RAY (17BCE2405)

1
OUTLINE :

TOPICS PAGE No.

1. NEURAL NETWORKS 3

1.1 ARTIFICIAL NEURAL NETWORK 3

2. CRYPTOGRAPHY 4

2.1 CRYPTOGRAPHY ALGORITHM 5

3. CHAOTIC NEURAL NETWORK 5

3.1 ENCRYPTION AND DECRYPTION 8

4. IMPLEMENTATION 9

4.1 INITIAL PROGRESS 9

4.2 FINAL PROGRESS AND OUTPUT 13

5. INFERENCE 15

6. CONCLUSION 16

7. REFERENCE 16

2
1. NEURAL NETWORKS :

A neural network is characterised by :


 Its pattern of connections between the neurons  Its
method of determining the weights on connections  Its
activation functions.

1.1 ARTIFICIAL NEURAL NETWORK:

Artificial neural network (ANN) takes its name from the


network of nerve cells in the human brain. An ANN is a
computational model based on the structure and functions of
biological neural networks. It is an information processing
network that has certain performance characteristics in
common with biological neural networks. Information that
flows through the network affects the structure of the ANN
because a neural network changes or learns in a sense based
on that input and output. There are extensive applications of
all kinds of ANN in the field of communication, control,
instrumentation and forecasting. The ANN is capable of
performing on nonlinear input and output systems in the
workspace due to its large parallel interconnections between
different layers and its nonlinear processing characteristics.
An artificial neural network consists of a pool of simple
processing units which communicate by sending signals to
each other over a large number of weighted connections.

3
Fig : 1 Basic components of ANN

An artificial neuron basically consists of a computing element


that performs the weighted sum of the input signal and the
connecting weight. The sum is added with the bias or
threshold and the resultant signal is then processed for
nonlinear function of sigmoid or hyperbolic tangent type.

2. CRYPTOGRAPHY :

There are many aspects to security and many applications,


ranging from secure commerce and payments to private
communications and protecting passwords. One essential
aspect for secure communications is that of cryptography.
Cryptography is associated with converting ordinary plain
text into unintelligible text and vice versa. It is the method of
storing and transmitting data in a particular form so that only
those for whom it is intended can read and process it. The goal
of any cryptographic system is the exchange of information
among the intended users without any leakage of information
to others who may have unauthorized access to it.

4
Cryptography, then, not only protects data from theft or
alteration, but can also be used for user authentication.

There are, in general, three types of cryptographic schemes


typically used to accomplish these goals:
secret key (or symmetric) cryptography, public-
key (or asymmetric) cryptography, and hash
functions.

2.1 Cryptography algorithms:

Secret key cryptography : It uses singe key for both encryption


and decryption.
Public key cryptography: It uses two keys-one for encryption
and one for decryption.
Hash functions cryptography: Uses no key since the plain text
is not recoverable from cipher text.

Generally cryptography can be achieved by using neural


network in 2 methods:-
• Using a neural network based n-state sequential
machine
• Using a chaotic neural network

3. CHAOTIC NEURAL NETWORK :

Chaos is defined as stochastic behaviour occurring in


deterministic system. It is known that chaotic systems are non
– periodical and also sensitive to initial conditions, system
parameters and topological transitivity. Chaotic neural
networks offer greatly increase memory capacity. A network is
called chaotic neural network if its weights and biases are
determined by chaotic sequence.
In this project we are opting Chaotic neural network method.
5
It is considered to be a more efficient method for achieving
cryptography because of the following reasons:

 High security  No distortion


 Suitable for system integration
 Non-periodic dynamics

ALGORITHM :

Let g denote a digital signal of length M and g(n),


0 ≤ M-1 , be the one-byte value of the signal g at position n.

Step 1: Set the value of the parameter M.

Step 2: Determine the parameter, U and the initial point x(0)


of the 1-D logistic map [SI.

Step 3: Evolve the chaotic sequence x(l), x(2), ... , x(M) by


x(n+l) = μ(n)(l-x(n)), and create b(O), b(l), ..., b(8M-1)
from x(l), x(2), ..., x(M) by the generating scheme that
0.b(8m-8)b(8m-7) ….. b(8m-2)b(8m-l) … is the binary
representation of x(m) for m = 1, 2,. . . ., M.

Step 4: FOR n: 0 TO (M - 1) DO

For i= 0 TO 7 DO 1

6
j (0,1,2,3,4,5,6,7)

END
For i= 0 TO 7 DO

Where f(x) is 1 if x 2 0 and 0 otherwise,


END

END

Step 5: The encrypted signal g’ is obtained and the algorithm


is terminated.
The decryption procedure is the same as the above one except
that the input signal to the decryption CNN should be g’(n)
and its output signal should be g”(n).
Assume the encryption procedure is known except the chaotic
binary sequence. When the CNN is applied to a signal of length
M, it requires 8M bits. The number of possible encryption
results is 28×M. Let us consider the raw data of size

7
65536 bytes. 8M equals 524288 and all the possible results
are 252428(≈ 10157810). In the chaotic systems, it is
wellknown that

1) It has sensitive dependence on initial conditions


2) There exist trajectories that are dense, bounded, but neither
periodic nor quasi-periodic in the state space.

3.1 ENCRYPTION AND DECRYPTION USING ANN :

The process of cryptography consists of two parts


namely encryption and decryption.
● The encryption process can be defined as converting the
original message which is named as plain-text to an
inscrutable form which is named as cipher-text by an
algorithm with secret keys.
● Decryption process is the inverse form of encryption
process.

Be it secret key, public key or hash functions cryptography, the


initial unencrypted data is referred to as plaintext. It is
encrypted into ciphertext, which will in turn (usually) be
decrypted into usable plaintext.

A plain-text was encrypted and then obtained ciphertext was


decrypted by using the chaotic dynamics. It is accepted that
the initial conditions which were used in the training phase of
the ANN model and the system parameters are known by both
the transmitter and the receiver.

8
4. IMPLEMENTATION :

A chaotic network is a neural network whose weights depend


on a chaotic sequence. The chaotic sequence highly depends
upon the initial conditions and the parameters, x(0) and µ are
set. It is very difficult to decrypt an encrypted data correctly by
making an exhaustive search without knowing x(0) and µ.

As we are using Secret key cryptography method, we set the


values of the initial conditions and parameters x(0) = 0.75 and
µ = 3.9.

4.1 INITIAL PROGRESS :

Initially we chose to do the static codes for the


encryption and decryption; as in, the codes were specifically
for the given input and that input was encrypted and later
decrypted.

9
Matlab codes for encryption :

10
Output for encryption :

A set of numbers are being used for encryption. This output or


encrypted data is used as the input for decryption.

11
Matlab codes for decryption :

12
Output for decryption :

On using the encrypted data as input, we receive the output as


the original message which are the set of 10 numbers. This
certain set of codes can be used to encrypt and decrypt only for
this particular input.

13
4.2 FINAL PROGRESS AND OUTPUT:

Matlab code for encryption :

14
Matlab code for decryption :

15
5. INFERENCE :

Output for encryption :

Output for decryption :

16
Thus for this set of codes, we may be able to encrypt any string
consisting of Alphabets, Numbers and Special
Characters and decrypt it back to the original message. Here,
we tried to encrypt the string data - “harinir6@gmail.com”.
This was encrypted into a secret code or cipher text which is a
Number pattern.
When this cipher text was given as the input for the decryption
part, it decoded the original message.

6. CONCLUSION :

Data security is a prime concern in data communication


systems. The use of ANN in the field of Cryptography is
investigated using chaotic neural network. The chaotic binary
sequence is unpredictable. It is very difficult to decrypt an
encrypted data correctly by making an exhaustive search
without knowing x(0) and µ. Hence, CNN is one of guaranteed
high security. Also, a chaotic neural network for digital signal
cryptography is analysed. Better results can be achieved by
improvement of code or by use of better training algorithms.
Thus, Artificial Neural Network can be used as a new method
of encryption and decryption of data.

17
7.REFERENCE :

1. Course reference book : Fundamentals of Neural Network


by Laurene Fausset.
2. A project thesis on cryptography using ANN by NIT
Rourkela.
3. International Journal of Information Technology and
Knowledge Management July-December 2011, Volume 4,
No. 2, pp. 417-422
4. Other internet resources for details on using MATLAB for
neural network.

18

You might also like