Implementation of AES Algorithm On FPGA and On Software
Implementation of AES Algorithm On FPGA and On Software
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on July 24,2021 at 13:41:27 UTC from IEEE Xplore. Restrictions apply.
V. BLOCK DIAGRAM B. Intshift
A. Encryption This module takes the 8 bit input and shifts the 8 bit data
parallel into a 128 bit register. Thus we successfully send the
128 bit plain text into the board to be encrypted.
C. AES_TOP
This is the main module of our project which does the
encryption process. Here we used a hardcoded Key for easy
implementation.
D. Stringoutshift
This module does the reverse of Intshift module that is
sends the 128 bit encrypted data 8 bit at a time to the
transmitter module. We also configured it to send hardcoded
prompts for the end user at the beginning of the operation for
Fig. 2. Block Diagram Of Encryption the ease of user according to the state the design is at the
moment like “Enter plaintext:” , “Encryption key:”.
The data to be encrypted i.e. the plaintext (128 bit) and E. Transmitter
the key (128 bit) are the inputs which are fed to the board
and the output is the required cipher text (128bit) as shown in It takes the 8 bit data from String out Shift module and
Fig 2. sends it to PC through UART port.
B. Decryption F. state_machine
Module used to properly receive plaintext and key from
the user input as shown in Fig 5.
The data to be decrypted i.e. the cipher text (128 bit) and We see that there are 3 states. The design is configured to
the key (128 bit) are the inputs which are fed to the board initialize with Receive PT state.
and the output is the required plaintext (128bit) as shown in
Fig 3. This state is used to get user input and store in FPGA
(Plain text).
VI. IMPLEMENTATION OF ENCRYPTION ON ARTIX-7
When the user presses Enter key it is detected by the state
FPGA BOARD (BLOCK DIAGRAM) machine and it transitions to Receive Key state.
This state is used to get user input and store in FPGA
(Key).
When the user again presses Enter key it is detected by
the state machine and it transitions to Process state.
This state waits for the Encryption/Decryption process to
finish and sends the output.
After the output is sent the state transfers from Process
state to Receive state.
The PC receives the data and shows it on screen. For this
Fig. 4. Elaborated design of encryption design on Basys-3 Board we used the open source TERA TERM software. Both
Receiver and Transmitter work at a baud rate of 9600 baud
A. Receiver with 1 Start bit, 8 data bits and 1 stop bit. This design does
The Receiver module receives serial data from the PC not incorporate parity bits which are standard in some UART
through the UART port and converts each character sent to 8 Protocols.
bit binary data.
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on July 24,2021 at 13:41:27 UTC from IEEE Xplore. Restrictions apply.
VII. FPGA IMPLEMENTATION (BOARD TO BOARD) The Encryption process is shown in Fig 9 and the output
is represented in a hexadecimal format. The highlighted part
corresponds to the Encrypted output in the hexadecimal
format.
Fig. 9. Picture depicting encryption process(hex output) Fig. 12. Timing Simulation of the Synthesized Design in Ascii (Encryption)
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on July 24,2021 at 13:41:27 UTC from IEEE Xplore. Restrictions apply.
From Fig 12 we got the propagation delay of the whole E. Software Implementation result
Encryption process as 40.26 ns in the hexadecimal format
C. Decryption Results
Fig. 16. AES Implemented using Python language and its result for the
above data
Fig. 13. Timing Simulation of the Synthesized Design (Decryption)
The AES algorithm was implemented on python as well
From Fig 13 we got the propagation delay of the whole and the corresponding results are shown above. It took 51ms
Decryption process as 80.36 ns. to encrypt the plaintext and 7ms to decrypt the encrypted
text.
IX. CONCLUSION AND FUTURE WORK
We were successfully able to Implement AES Algorithm
on Artix - 7. We achieved a much lower propagation delay of
around 40.26 ns and 80.36 ns for Encryption and Decryption
respectively whereas it took around 5ms for encryption as
well as decryption when implemented through software. The
asynchronous implementation of AES algorithm on FPGA
resulted in a much faster rate of encryption and decryption as
compared to the traditional synchronous implementation.
Moreover, combining the Shiftrows and Subbytes operations
together and utilization of more number of S-boxes (due to
asynchronous approach) also accelerated the rate of
Encryption and decryption. We were also able to connect
Fig. 14. Timing Simulation of the Synthesized Design in Ascii
(Decryption)
two FPGAs together and transmit data between them. One
FPGA handled the encryption whereas the second FPGA
The propagation delay of Decryption is almost twice of handled decryption.
Encryption this is mainly for 2 reasons: This setup is not limited to AES-128. It can be further
1. The Inverse Mix Columns operation is a complex extended to implement AES-192 and AES-256. The number
design with many sequential operations than Mix of S-boxes can be reduced to save space, but the tradeoff
Columns operation. would be slower encryption rate. Moreover, this
implementation can be extended to any type of file (audio,
2. To execute round 1 of Decryption we need the last video, etc.) and is not limited to texts.
Key generated from the Key expansion process
therefore round 1 has to wait for the last key to be REFERENCES
generated thus increasing the delay. [1] Advanced encryption standard (AES). Technical Report Federal
Information Processing Standards Publications (FIPS PUBS) 197,
D. Simulation of Encryption on Artix-7 FPGA Board Available from https://www.nist.gov/publications/advanced-
encryption-standard-aes.
[2] N. S. S. Srinivas and M. Akramuddin, "FPGA based hardware
implementation of AES Rijndael algorithm for Encryption and
Decryption", 2016 International Conference on Electrical,
Electronics, and Optimization Techniques (ICEEOT), Chennai, 2016.
[3] Basys3 FPGA Board Reference Manual Overview:
https://reference.digilentinc.com/_media/basys3:basys3_rm.pdf
[4] Joan Boyar and Rene Peralta, “New logic minimization techniques
with applications to cryptology.” Cryptology ePrint Archive, Report
2009/191, 2009.
Fig. 15. Simulation of sending 128 bit data from PC to the Board and [5] Chodowiec P, Gaj K. Very compact FPGA implementation of the
getting Encrypted 128 bit data from the board back to the PC. AES algorithm. Proc. of Cryptographic Hardware and Embedded
System Workshop, 2003;319–333.
The Fig 15 depicts the transmission of 128 bit data from [6] Granado-Criado JM. A new methodology to implement the AES
PC to the FPGA. The FPGA then encrypts the 128 bit data algorithm using partial and dynamic reconfiguration. Integration, the
and sends back the corresponding encrypted output back to VLSI Journal 2010;43(1):72–80.
the laptop.
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on July 24,2021 at 13:41:27 UTC from IEEE Xplore. Restrictions apply.