AES Image Encryption (Advanced Encryption Standard)
AES Image Encryption (Advanced Encryption Standard)
https://doi.org/10.22214/ijraset.2021.39542
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
Abstract: An Image Encryption and Decryption Using AES (Advance Encryption Standard) Algorithm is proposed in the project.
Due to increasing use of image in various field, it is very important to protect the confidential image data from unauthorized
access. The design uses the iterative approach with block size of 128 bit and key size of 128, 192 or 256 bit. The numbers of
round for key size of 256 bits is 14 , for 128 bits is 10 and for 192 bits is 12. As secret key increases the security as well as
complexity of the cryptography algorithms. In this paper , an algorithm in which the image is an input to AES Encryption to get
the encrypted image and then input it to AES Decryption to get the original image is proposed and explained which will further
be implemented by me. The paper shows the study in which a system could be used for effective image data encryption and key
generation in diversified application areas, where sensitive and confidential data needs to be transmitted along with the image.
I. INTRODUCTION
A. Need of the Study
In today’s image communication system security of images is essential. It is necessary to protect confidential image data from
unauthorized users. To detect and find unauthorized users is a challenging task. Different researchers proposed different techniques
for securing image transmission. Today almost all digital services like internet communication, medical and military imaging
systems, multimedia system requires reliable security in storage and transmission of digital images. Due to faster growth in
multimedia technology, internet and cellphones, there is a need for image encryption techniques in order to hide images from such
attacks. In this system we use AES (Advanced Encryption Technique) in order to hide image. Such Encryption Technique helps to
avoid intrusion attacks.
B. Problem Definition
Many encryption methods have been proposed in literature, and the most common way to protect large multimedia files is by using
conventional encryption techniques, Private key bulk encryption algorithms, such as Triple DES, are not so suitable for transmission
of images. Due to complexity of their internal structure, they are not particularly fast in terms of execution speed and cannot be
applied for images in the real time scenario Also traditional cryptographic techniques such as DES cannot be applied to images due
to intrinsic properties of images such as bulk data capacity, redundancy and high correlation among pixels. Image encryption
algorithms can become an integral part of the image delivery process if they aim towards efficiency and at same time preserve the
security level.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1357
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
B. Encryption
Encryption is a way of scrambling data so that only authorized parties can understand the information. In technical terms, it is the
process of converting human-readable plaintext to incomprehensible text, also known as ciphertext. In simpler terms, encryption
takes readable data and alters it so that it appears random. Encryption requires the use of a cryptographic key: a set of mathematical
values that both the sender and the recipient of an encrypted message agree on. Although encrypted data appears random, encryption
proceeds in a logical, predictable way, allowing a party that receives the encrypted data and possesses the right key to decrypt the
data, turning it back into plaintext. Truly secure encryption will use keys complex enough that a third party is highly unlikely to
decrypt or break the ciphertext by brute force — in other words, by guessing the key.
C. Types of Encryption
The two main kinds of encryption are symmetric encryption and asymmetric encryption.
In symmetric encryption, there is only one key, and all communicating parties use the same (secret) key for both encryption and
decryption. In asymmetric, or public key, encryption, there are two keys: one key is used for encryption, and a different key is used
for decryption. The decryption key is kept private (hence the "private key" name), while the encryption key is shared publicly, for
anyone to use (hence the "public key" name).
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1358
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
E. Symmetric Encryption
Symmetric encryption is a type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic
information. The entities communicating via symmetric encryption must exchange the key so that it can be used in the decryption
process. This encryption method differs from asymmetric encryption where a pair of keys, one public and one private, is used to
encrypt and decrypt messages.
By using symmetric encryption algorithms, data is converted to a form that cannot be understood by anyone who does not possess
the secret key to decrypt it. Once the intended recipient who possesses the key has the message, the algorithm reverses its action so
that the message is returned to its original and understandable form.
G. Drawbacks
A significant disadvantage of symmetric ciphers is the key management necessary to use them securely. Each distinct pair of
communicating parties must, ideally, share a different key, and perhaps for each ciphertext exchanged as well. The number of keys
required increases as the square of the number of network members, which very quickly requires complex key management schemes
to keep them all consistent and secret.
1) Key Exhaustion: Symmetric Encryption suffers from behavior where every use of a key ‘leaks’ some information that can
potentially be used by an attacker to reconstruct the key. The defenses against this behavior include using a key hierarchy to
ensure that master or key-encryption keys are not overused and the appropriate rotation of keys that do encrypt volumes of data.
To be tractable, both these solutions require competent key-management strategies.
2) Attribution Data: Unlike asymmetric (public-key) Certificates, symmetric keys do not have embedded metadata to record
information such as expiry date or an Access Control List to indicate the use the key may be put to - to Encrypt but not Decrypt
for example. The latter issue is somewhat addressed by standards(eg ANSI X9-31) where a key can be bound to information
prescribing its usage. But for full control over what a key can be used for and when it can be used, a key-management system is
required.
3) Key Management at Large Scale: Where only a few keys are involved in a scheme (tens to low hundreds), the management
overhead is modest and can be handled through manual, human activity. However, with a large estate, tracking the expiration
and arranging rotation of keys quickly becomes impractical.
A. Features of AES
NIST specified the new AES algorithm must be a block cipher capable of handling 128-bit blocks, using keys sized at 128, 192 and
256 bits. Other criteria for being chosen as the next AES algorithm included the following:
Security: Competing algorithms were to be judged on their ability to resist attack as compared to other submitted ciphers. Security
strength was to be considered the most important factor in the competition.
Cost: Intended to be released on a global, nonexclusive and royalty-free basis, the candidate algorithms were to be evaluated on
computational and memory efficiency.
Implementation: Factors to be considered included the algorithm's flexibility, suitability for hardware or software implementation,
and overall simplicity.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1359
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1360
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
E. Encryption Process
The encryption phase of AES can be broken into three phases: the initial round, the main rounds, and the final round.
1) Initial Round
2) AddRoundKey
3) Main Rounds
a) SubBytes
b) ShiftRows
c) MixColumns
d) AddRoundKey
4) Final Round
a) SubBytes
b) ShiftRows
c) AddRoundKey
5) Creation of Round Keys: A Key Schedule algorithm is used to calculate all the round keys from the key. So the initial key is
used to create many different round keys which will be used in the corresponding round of the encryption.
6) Byte Substitution (SubBytes): The 16 input bytes are substituted by looking up a fixed table (S-box) given in design. The result
is in a matrix of four rows and four columns. This step implements the substitution. In this step each byte is substituted by
another byte.(Its performed using a lookup table also called the S-box. This substitution is done in a way that a byte is never
substituted by itself and also not substituted by another byte which is a compliment of the current byte. The result of this step is
a 16 byte (4 x 4 ) matrix like before. The next two steps implement the permutation.
7) Shiftrows
Each of the four rows of the matrix is shifted to the left. Any entries that ‘fall off’ are re-inserted on the right side of row.
a) First row is not shifted.
b) Second row is shifted one (byte) position to the left.
c) Third row is shifted two positions to the left.
d) Fourth row is shifted three positions to the left.
The result is a new matrix consisting of the same 16 bytes but shifted with respect to each other.
8) MixColumns: Each column of four bytes is now transformed using a special mathematical function. This function takes as input
the four bytes of one column and outputs four completely new bytes, which replace the original column. The result is another
new matrix consisting of 16 new bytes. It should be noted that this step is not performed in the last round. (This multiplication
has the property of operating independently over each of the columns of the initial matrix, i.e. the first column when multiplied
by the matrix, produces the first column of the resultant matrix.)
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1361
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
9) Addroundkey : The 16 bytes of the matrix are now considered as 128 bits and are XORed to the 128 bits of the round key. If
this is the last round then the output is the ciphertext. Otherwise, the resulting 128 bits are interpreted as 16 bytes and we begin
another similar round.
F. Decryption Process
The process of decryption of an AES ciphertext is similar to the encryption process in the reverse order. Each round consists of the
four processes conducted in the reverse order −
1) Inverse Final Round
a) AddRoundKey
b) ShiftRows
c) SubBytes
2) Inverse Main Round
a) AddRoundKey
b) MixColumns -This step is similar to the MixColumns step in encryption, but differs in the matrix used to carry out the
operation.
c) ShiftRows
d) SubBytes -Inverse S-box is used as a lookup table and using which the bytes are substituted during decryption.
3) Inverse Initial Round
a) AddRoundKey
Since sub-processes in each round are in reverse manner, unlike for a Feistel Cipher, the encryption and decryption algorithms needs
to be separately implemented, although they are very closely related.
Of the four operations in AES encryption, only the AddRoundKey operation is its own inverse (since it is an exclusive-or).
To undo AddRoundKey, it is only necessary to expand the entire AES key schedule (identically to encryption) and then use the
appropriate key in the exclusive-or. The other three operations require an inverse operation to be defined and used.
The first operation to be undone is ShiftRows. The Inverse ShiftRows operation is identical to the ShiftRows operation except that
rotations are made to the right instead of to the left.
The next operation to be undone is the SubBytes operation. The Inverse S-Box is used which is read identically to the S-Box matrix.
The last inverse operation to define is MixColumns. Like MixColumns, Inverse MixColumns can be defined as the matrix
multiplication .
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1362
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 9 Issue XII Dec 2021- Available at www.ijraset.com
REFERENCES
[1] https://www.iosrjournals.org/
[2] https://www.researchgate.net/
[3] https://citeseerx.ist.psu.edu/
[4] https://www.ijser.org/
[5] https://www.educative.io/edpresso/what-is-the-aes-algorithm
[6] https://www.researchgate.net
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 1363