You are on page 1of 17

REVIEW-II

PULMONARY MEDICAL IMAGE ENCRYPTION


AND DECRYPTION USING AES-128

A Review-II Project report submitted by


S.ABITHA
(20PCS509)
Under the guidance of
Prof.J.REXY M.Sc.,M.Phil.,M.B.A.,SET.,NET.,
On 16-05-2022
ABSTRACT

Nowadays cryptanalysts are increasing day by day. The diagnostic images with
confidential information related to patients are stored and transmitted via public networks.
So, in order to maintain privacy in modern clinic diagnosis. A security encryption
algorithm is required in order to send the patients data confidentially. AES (Advanced
Encryption Standard) is one among the standardized high security algorithms having the
larger block size, good security and efficiency.
This system presents the performance of encryption and decryption for a specific type of
medical image (LUNGS) to secure the image data from unauthorized access.
And explores the implementation of AES for image encryption and cipher image
decryption with cipher keys of length 128 bits. AES uses symmetric cryptography which
means that the same keys are used for both encryption and decryption. AES is known to
be resistant against any cryptanalytic attacks. In this work, the plain image of 128 bits is
given as input to the encryption block in which encryption of data is made and the cipher
image of 128 bits is through out as output.
1. INTRODUCTION

Medical Images are sent over an insecure transmission channel from different sources,
some images are highly confidential hence, securing them from malicious attack is
essentially required. One way to provide image security is by using Visual cryptography.
Visual cryptography is a technique in which visual information is enciphered in such a way
that no one is able to identify the image during transmission.
Cryptography is normally classified into two inclusive groups:
1. Symmetric Key Cryptography
2. Asymmetric Key Cryptography
The former group, Symmetric key cryptography relies on one shared key that both
transmitter and sender know and can use to encrypt or decrypt data.
The latter group, Asymmetric key cryptography uses a public-private key pair where one
key is used to encrypt and the other to decrypt.
Symmetric key algorithm is much faster and requires less processing power as compared
to asymmetric key algorithm.
One of the well-known visual cryptographic symmetric algorithms is Advanced
Encryption Standard (AES). In this system, we implemented the AES-128 bit algorithm on
pulmonary medical images with the help of MATLAB software. The advanced encryption
standard (AES) specifies a federal information processing standards publication (FIPS)
approved cryptographic algorithm that can be used to protect electronic data. It was
published by National Institute of Standard and Technology (NIST) in 2001 developed by
Joan Daemen and Vincent Rijmen, an algorithm called Rijndael providing strong security
and high flexibility.
1.1 PROJECT DEFINITION AND DESCRIPTION

The Advanced Encryption Standard (AES), also known by its original name Rijndael, is a
specification for the encryption of electronic data established by the U.S. National Institute
of Standards and Technology (NIST). It is a symmetric block cipher algorithm with a
block/chunk size of 128 bits. It converts these individual blocks using keys of 128, 192, and
256 bits. Once it encrypts these blocks, it joins them together to form the ciphertext.
It is based on a substitution-permutation network, also known as an SP network. It consists
of a series of linked operations, including replacing inputs with specific outputs
(substitutions) and others involving bit shuffling (permutations).

The Advanced Encryption standard consists of a block size of 128 bits and a key length size
of 128 bits. So, AES 128 bit is known to be an AES-128 algorithm based on key size. The
algorithm is applied for both image encryption and decryption.
Under this method of encryption, the first thing that happens is that your plainimage (the
image that you want to be encrypted) is separated into blocks by using a block cipher. The
data block length is fixed to be 128 bits (Nb = 4 words). The 128 bit plainimage block is
divided into 16 bytes (there are eight bits in a byte and 16 x 8 = 128). These bytes are
mapped to a 4 x 4 array called the State, which constitutes a matrix. and all the internal
operations of the AES algorithm are performed on the State. while the length of the cipher
key is 128 bit and represented by Nk = 4 words respectively. Moreover, the AES algorithm
is an iterative algorithm. The iterations are called rounds, and the total number of rounds,
Nr is 10.
The decryption side requires the inverse process of the four mathematical operation
processes.
1.2 EXISTING SYSTEM

RSA is an algorithm used in the modern computer environment to encrypt and decrypt the
data in transform. The RSA algorithm is also called an asymmetric cryptographic
algorithm. Asymmetric cryptosystem means two different keys are used in the encryption
and decryption. In the two keys one key is used for encryption and the second key is used
for decryption. This RSA algorithm is also called public key cryptography.

DRAWBACKS OF RSA ALGORITHM


Encryption is a very complex technology. One big disadvantage of encryption is related
to keys is that the security of data becomes the security of the encryption key.

1. RSA is a public key cryptosystem (asymmetric cryptography) which is slow


compared to symmetric cryptography.
2. It requires a more computer power supply compared to similar key encryption.

3. RSA is more computationally intensive than AES, and much slower.


4. It is a stream cipher algorithm. Meaning, entire data is encrypted at once, which
takes more computational power. Hence it is slow. Mainly used for exchanging
little information such as symmetric keys.
1.3 PROPOSED SYSTEM

AES (Advanced Encryption Standard) is supported for both encryption and decryption for
any kind of data. There are several standard types of bit lengths and along with symmetric
Keys are used in AES such as 128,192,256-bits.Here, in this paper 128- bit AES is used.
AES has several steps such as adding plain text, adding symmetric Key, shifting rows and
columns, mixed columns, and a substitution box containing subbytes and shift rows. All
these blocks are used for the encryption and decryption process.

ADVANTAGES
1. AES is a Private Key Symmetric block Cipher. So more secure.
2. It uses higher length key sizes such as 128 for encryption. Hence it makes the AES
algorithm more robust against hacking.
3. For 128 bit, about 2128 attempts are needed to break. This makes it very difficult to
hack it as a result it is a very safe protocol.
4. Stronger & faster than RSA.
2. SYSTEM DESIGN

2.1 ARCHITECTURAL DESIGN


2.2 DATASET

● The proposed system uses a dataset in computer vision as a curated set of digital
photographs that this system uses to secure an image that is free from the type of the
image type (i.e. jpg, imp, etc.).
● The experiments were conducted with Chest X-Ray Images dataset.
● The dataset consists of the .jpg image file in this dataset.
● This is used to evaluate the performance of the AES-128 algorithm.
● This algorithm uses a block-wise pixel shuffling algorithm proposed for the medical
pulmonary image encryption. The input required for the proposed block-wise pixel
shuffling algorithm is an 8-bit grayscale image.
2.4 GRAPHICAL USER INTERFACE

Home.fig

Encryption.fig
Decryption.fig
2.5 MODULE DESCRIPTION
Encryption process

In the encryption of the AES algorithm, each round except for the final round consists of
four transformations: the Sub__Bytes(), the Shift__Rows(), the Mix__Columns(), and the
Add__RoundKey(), while the final round does not have the MixColumns() transformation.

Initial Round

● AddRoundKey

Main Rounds
● SubBytes
● ShiftRows
● MixColumns
● AddRoundKey

Final Round

● SubBytes
● ShiftRows
● AddRoundKey
Substitute Bytes:
Substitute Byte is also called a SubBytes transformation which is one of the transformation
techniques which is a nonlinear byte substitution and also a simple table lookup
technique. The implementation of this transformation is simple. SubBytes transformation is
an S-Box which consist of 16*16 matrix in which the S-Box is used for both forward and
inverse transformation.
Shift rows:
This transformation shifts the rows in a cyclic manner at each and every row to the left. It
means each row is shifted to a different offset. Shift row transformation has some rules for
shifting rows which are given below:

1. According to the rule of Shift Row, the first step, the first row should not be shifted.
2. The shifting process will be started at the second step. In the second row the byte is
shifting at one byte position to the left.
3. Likewise, the third row will be shifting at the two byte position to the left.
4. Fourth row is third position and vice versa.
Mix columns:
The MixColumns function takes four bytes as input and outputs four bytes, where each
input byte affects all four output bytes. Each column is multiplied modulo x4+1 with a
fixed four-term polynomial .Together with ShiftRows, MixColumns provides diffusion in
the cipher.
Add round key:
Add round key performs bitwise XOR operation between the state array and the resulting
round key that is the output of the key expansion algorithm.

Decryption process
To decrypt an AES-encrypted cipher image, it is necessary to undo each stage of the
encryption operation in the reverse order in which they were applied. The three stage of
decryption are as follows:
Inverse Final Round

● AddRoundKey
● ShiftRows
● SubBytes

Inverse Main Round

● AddRoundKey
● MixColumns
● ShiftRows
● SubBytes
Inverse Initial Round
● AddRoundKey

Inverse Shift rows:


InvShiftRows exactly functions the same as ShiftRows, only in the opposite direction. The
first row is not shifted, while the second, third and fourth rows are shifted right by one, two
and three bytes respectively.
Inverse Substitute Bytes:
The InvSubBytes transformation is done using a once precalculated substitution table called
InvS-box. That InvSbox table contains 256 numbers (from 0 to 255) and their
corresponding values.

Inverse Mix columns


Inverse MixColumns is the reverse process of MixColumns that is used for cipher text in
decryption. Same routine as mix column, only instead of a(x), the inverse of a(x) is used.
PSEUDOCODE OF ENCRYPTION ALGORITHM

Cipher (byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])


begin
byte state[4,Nb]
state = in
AddRoundKey (state, w[0, Nb-1])
for round = 1 step 1 to Nr-1
SubBytes(state)
ShiftRows(state)
MixColumns(state)
AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])
end for
SubBytes(state)
ShiftRows(state)
AddRoundKey(state, w[Nr*Nb,(Nr+1)*Nb-1])
out = state
end
PSEUDOCODE OF DECRYPTION ALGORITHM

InvCipher (byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])


begin
byte state[4,Nb]
state = in
AddRoundKey (state, w[Nr*Nb, (Nr+1)*Nb-1])
for round = Nr-1 step -1 downto -1
InvShiftRows(state)
InvSubBytes(state)
AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])
InvMixColumns(state)
end for
InvShiftRows(state)
InvSubBytes(state)
AddRoundKey(state, w[0, Nb-1])
out = state
end

You might also like