VLSI Implementation of Crypto Coprocessor Using AES and LFSR
VLSI Implementation of Crypto Coprocessor Using AES and LFSR
Abstract—Data security has been a major concern as that of hardware implementation of these algorithms require much
the faster processing of data. As the capability of data processing effort and more number of build elements. Currently we can
is being evolved, the attacks on these devices for the extraction of see many cryptograhpic implementations that are mostly done
data also have been increasing day by day. The purpose of this
work is to optimise the security of current crypto coprocessors on software than in hardware. It is because the developments
with the help of Linear Feedback Shift Register (LFSR) as key and updates are linearly happening in the software domain.
generator. The integration of LFSR with Advanced Encryption Hardware tools are having high price compared to software.
Standard (AES) will enhance the security when considering hash Most of the developed VLSI cad tools can only be availed
algorithms that have hardcoded keys which can be extracted or purchased by researchers and high end industries. For
through back tracing. By making the key input of the AES
random, the device will be less prone to hardware attacks and individual projects and in most of the small colleges, it is
back tracing the algorithm to extract the key value and thereby not possible to buy those tools. The applications increasing
the data will be difficult. Here AES with 128-bit block size and demand for computation power, and the power reduction
key size is integrated with the 128-bit LFSR. All the simulations requirements for portable devices, force us to consider that
and implementations are done on Xilinx-Vivado. general-purpose processors are no longer an efficient solution
Index Terms—LFSR, AES, Cryptography, Hardware attacks.
for mobile systems. Most of the applications are consuming
very high power and they requires highly improved com-
I. I NTRODUCTION
putational requirements, therefore general purpose processors
Data security is always a major concern in the progressing are not effective for portable devices . Such approaches are
word. As the world is looking for more innovative ways to [13]Application-Specific Integrated Circuits (ASIC) technol-
make the data processing and transfer more faster, the security ogy and [6]Field Programmable Gate Arrays (FPGAs).
of the data that is transferred also need to be considered. In this project the implementation of a cryptographically
Recent [3]hardware attacks reported shows the significance of secure co-processor with the help of an 128-bit linear feedback
implementing a secure architecture that provides better secu- shift register is taken into account. Advanced Encryption Stan-
rity to the devices. [2]Cryptographic algorithms are considered dard (AES), and [19]Federal Information Processing Standard
to be the most secure and effective algorithms till date since (FIPS), are approved by NIST and are widely used for the
most of the algorithms are hard to break or back trace. The protection of electronic data world wide . It is also referenced
world is currently focusing more into crypto currencies, block as Rijndael (its original name), is a specification for the
chain etc. The possibilities of crypto algorithms are not to encryption of electronic data established by the U.S. National
be bounded only for software security but also for hardware Institute of Standards and Technology (NIST) in 2001. AES
architectures. Implementation of crypto algorithms apart from algorithm can be programmed in software and hardware at
the limits of compatibility with the hardware modeling must the same time. The encrypted output from the AES process
be considered. requires our data input and the key for the encryption. The
Implementing a secure hardware architecture using cryptog- key will always same when considering an AES module, so it
raphy is a gradual process. As the new attacks are reported the will be vulnerable to hardware attacks if the key is somehow
world tends to look for more safer and secure algorithms. As obtained by the attacker. The [21]LFSR is used to provide
far as we know, most of the cryptographic algorithms are not the key input to the AES and that makes the input key also
easy to back trace. The security provided by [1]AES, [19]Se- random. The AES and LFSR used here are both with 128-bit
cure Hash Algorithm (SHA), [7]Message Digest Method 5 security. 128-bit LFSR will be more complex architecture but
(MD5)etc. have implemented or been into discussion over provides better security to the crypto engine.
the past two decades. The most updated versions of these The paper is ordered in the following strcuture: Section II
algorithms not tend to be fragile or able to back trace it describes the architecture of AES and its working. Section
and its been into study always. The area overhead by these III discusses about LFSR and the implementation of 128 Bit
crypto engines have to be taken into account because each modular LFSR. Methodology adopted for implementation of
• Rounds
a) SubBytes
b) ShiftRows
c) MixColumns
d) AddRoundKey
• Last Round
a) SubBytes
b) ShiftRows
c) AddRoundKey
to key expander circuit will be the key from the LFSR here, ments. The [16]polynomial used for the implementation here
thereby making the keys also unpredictable by the attacker. is,
5) ADDROUNDKEY: The main function of the Add X 128 + X 127 + X 126 + X 121 + 1 (2)
Round Key is to associate the keys generated by the key
expander step to XOR with the output got from the mixcolumn
step. The initial 128 bit key is expanded by the key expansion
method to increase the key size for multiple rounds. The round
key length will be matching with the block size length, that
is 16 bytes.
The output of addround key is got by XORing of Key
expansion output and the Mix columns output. The output
given above is encrypted output of output1. The output of the
Add Round Key step is given as input to the next round to
process. The feedback creates a loop and runs for 10 rounds Fig. 3. Modular LFSR
of this stage.
need to care about power and area overhead more when it The capability of cyptographic algorithms to be combined
comes to a coprocessor. Here we are trying to implement with different external structures providing better security
a cost effective integrated structure that is having higher and less vulnerability to hardware attacks is analysed here.
security and lesser area overhead. Implementing a crypto algorithm in hardware considering the
Integration of crypto algorithms with external structures is speed and area is always a challenge. Optimized architecture
an efficient way increasing the randomness of the system. have to be considered when incorporating a higer bit LFSR
But the challenge in area and power have to be considered structure with a cryptographic algorithm
when it comes to implementation. As the area constraints The implementation of AES with 128 bit key is done in
are still a challenge, the exceptional performance and lesser the initial stages. Here pipeline architecture is used for the
cost makes designers to think about these crypto algorithms. implementation, so this will tend to give better speed. As we
AES is an encryption standard and when it comes to can see in Fig. 4, a manually given key and a hard coded
pipeline architecture, it will consume more area than normal data input is used for the verification of the various stages
implementations. In case of LFSR, for generating n number of AES encryption. The architecture is designed to consume
of random bits, we need to use n clock cycles and it is a lesser area when we consider cryptographic algorithms that
not a good characteristic to be used in the cryptographic will mostly tend to consume higher area. In the next stage,
implementations. But we have implemented a method in implementation of modular LFSR is done to decrease the
which shifting of n bits can be done in one clock cycle. delay provided by LFSR. AS we know LFSR tend have
It will make the system faster and more convenient to be more delay and it is not desirable for a coprocessor. Modular
used implementations were speed is important as that of LFSR provide lesser delay compared to standard or common
security.The cost of implementation will be very less for LFSR implementation. Apart from the conventional LFSR
cryptographic algorithms and modular LFSR is also cost implementations that uses one-to-many structure, here many-
effective and having lesser area overhead compared to to-one structure is proposed because of the shortest clock to
standard LFSR’s. The seed value provided to the LFSR have clock delay path. In Table 1, the performance of AES with
to be hard coded initially and if its needed, it can also be and without LFSR is shown clearly. The increase in area after
randomised using external structures in the future. [23]As we the integration seems to be not much significant compared to
are selecting a primitive polynomial for implementing LFSR that of the initial AES structure. So the structure will not have
it can generate maximum number of random patterns. Hence higher area requirements with this security enhancement.
the key value of AES will be random for each encryption. In the schematic Fig.6 we can see that the LFSR is provided
We can see a lot of hardware attacks in the past decade that with seed value of 128 bits and the random bits are produced
makes hardware security also into consideration. Most of according to the tap values given. The random output of the
the current systems in terms of software and hardware are LFSR is fed to the input of AES directly. In the initial stage
updating their security measures using updated cryptographic of AES, the data input provided is converted to 128-bit size
algorithms. If the hackers are able to get the crptographic then it is XORed with the key value provided by the LFSR.
key through back tracing or power analysis based attacks, As shown in the schematic the output of the 1st stage of AES
the whole connected systems will be under threat. So it is is fed to the next set of rounds which includes sub-bytes, shift
very important to make the cryptographic algorithms with rows, mix columns and add round key. These steps are looped
higher levels of security. Here we are considering the effects for next 9 rounds and that will make the data highly encrypted.
of algorithm back tracing. Apart from AES being a simple The process works in a pipeline manner so that the processing
crypto algorithm, it’s providing better encryption with lesser of encrypted data will be more faster than the conventional
area overhead and power requirements than other algorithms. implementation. The encrypted output after the 9 rounds of
So if we can protect the algorithm from existing back tracing operation is fed to the last step which does not include the
threats to get the cryptographic key, it will make a safer mixcolumns steps. The data will be heavily encrypted by these
structure that can be implemented with lower cost and efforts. processes and finally can be transmitted through the channel.
LSFR is always the best approach to generate random patterns From the waveform Fig.7 we can observe the random keys
based on a single seed value and the polynomial provided. produced and the output of AES obtained using each key
produced. The pipeline architecture helps to maintain the speed
even after the structures are integrated. Obtaining the key value
V. R ESULTS AND A NALYSIS each time by breaking the randomness of an LFSR will not
Analysis of AES with 128-bit LFSR as the key generator be an easy task, so the transmitted data tend to have more
input shows greater security enhancements as expected. Cryp- security than in the case were key input is hard coded.
tographic algorithms mostly face the problem of lesser pro- Integration of complex structures is always a challenge
cessing speed, but the implementation of AES using pipeline when considering area and power optimisation. Here LFSR
method helps in increase in the processing speed. The imple- with 128 bit security have to be structured to align with the
mentation of 128-bit LFSR provides better security because speed and area requirements of a crypto algorithm and must
of the higher bit length and at the same time it makes it more work with optimum area and power requirements. 128 bit
capable to be combined with the 128 bit key structure of AES. LFSR have higher security in terms of bit strength and modular
VI. C ONCLUSION
Implementation of AES with LFSR as key generator shows
to be more secure than the hard coded key provided by the
user. Improvement in performance offered by the pipelined
Fig. 5. 128 Bit LFSR Schematic architecture of AES makes it more reliable to be used in the
coprocessor architecture. When considering the area usage,
most of the cryptographic implementations took higher area.
architecture provides lesser delay. So the overall performance Here it took comparatively lesser area and provides higher
of the crypto engine higher in terms of security and speed.The performance. In terms of security the architecture gives a huge
simulations and implementations are done using Xilinx Vivado impact in the realization of more cost-effective devices with
software. Fig. 7 shows the resulting waveform of AES with secure architecture.
LFSR output as key. The pipeline architecture of AES helps The results provided by the combination of LFSR with AES
in the faster encryption of data. The encrypted output of AES paves the way to merge different kinds of key generators with
using each LFSR key can be observed here. From the Table the existing cryptographic hash functions to make a secure
1 we can seen that the integration of these two structures did and lesser area architecture. As we have focused more on the
not affect the speed of the system to a greater extend. coprocessor crypto engine, it can be implemented inside the
processor architecture itself, thereby reducing the more area
overhead. The recent development in the are of PUF’s can also
be taken into account. PUF’s can be used as a seed generator
TABLE I
P ERFORMANCE OF I NTEGRATED S TRUCTURE to the LFSR thereby we can reduce the further vulnerabilities
of back tracing and hacking the input seed value.
Performance Parameters Without LFSR With LFSR
No of LUT’s 9379 9409
No of flip flops 35 128 R EFERENCES
IO 35 128
BUFG 1 1 [1] M. Chen, H. Wei and H. Li, ”Architecture design and hardware
Power(W) 3.23 3.5 implementation of AES encryption algorithm,” 2020 5th International
Max Frequency 276.5 255.6 Conference on Mechanical, Control and Computer Engineering (ICM-
CCE), 2020, pp. 1611-1614, doi: 10.1109/ICMCCE51767.2020.00353.
[2] A. Royo, J. Moran and J. C. Lopez, ”Design and implementation of
a coprocessor for cryptography applications,” Proceedings European
Design and Test Conference. ED TC 97, 1997, pp. 213-217, doi:
10.1109/EDTC.1997.582361.
[3] Chai Shaojie and Zhang Caizhen, ”Improvement of AES encryption
algorithm and FPGA implementation [J]”, Journal of Lanzhou Jiaotong
University, vol. 03, pp. 47-53, 2020.
[4] Sridevi Sathya Priya, Palanivel Karthigaikumar, N. M. Siva Mangai,
P. Kirti Gaurav Das, ”An Efficient Hardware Architecture for High
Throughput AES Encryptor Using MUX Based Sub Pipelined S-Box”,
Wireless Personal Communications, vol. 94, pp. 2259, 2017.
[5] Umer Farooq, M. Faisal Aslam, ”Comparative analysis of different
AES implementation techniques for efficient resource usage and better
performance of an FPGA”, Journal of King Saud University - Computer
Fig. 6. Schematic of Integrated Structure and Information Sciences, 2016.