State-of-the-Art Implementation of SHA-1 Hash Function for Low-Power and High Throughput? H.E.Michail , A.P.Kakarountas , G.N.Selimis , C.E.Goutis {michail,kakaruda,gselimis,goutis}@ee.upatras.gr Electrical & Computer Engineering Department, University of Patras, 25600 Patras, Greece.

Abstract. Hash functions are widely used in applications that call for data integrity and signature authentication at electronic transactions. A hash function is utilized in the security layer of every communication protocol. As time passes more sophisticated applications arise that address to more users-clients and thus demand for higher throughput. Furthermore, due to the tendency of the market to minimize devices size and increase their autonomy to make them portable, power issues have also to be considered. The existing SHA-1 Hash Function implementations (SHA-1 is common in many protocols e.g. IPSec) limit throughput to a maximum of 2 Gbps. In this paper, a new implementation comes to exceed this limit improving the throughput by 53%. Furthermore,power dissipation is kept low compared to previous works, in such way that the proposed implementation can be characterized as low-power.

1

Introduction

Due to the essential need for security in networks and mobile services, as specified in various standards, such as the WTLS security level of WAP in [1], IPsec and the 802.16 standard for Local and Metropolitan Area Networks [2], an efficient and small-sized HMAC [3] implementation, to authenticate both the source of a message and its integrity, is very important. Moreover year-in year-out Internet becomes more and more a major economical parameter of world’s financial and thus whole new applications are being created that presuppose authentication services. One recent example is the Public Key Infrastracture (PKI) that incorporate authenticating services providing digital certificates to clients,servers,etc. PKI increases citizen’s trust to public networks and thus empowers applications such as on-line banking,B2B applications,electronic payments,stock trading etc. The PKI that is considered as a must-have mechanism for the burst of e-commerce worldwide involves the use of the SHA-1 hash function.However the implementations that will be used in the PKI should have a much higher throughput ?

We thank European Social Fund (ESF), Operational Program for Educational and Vocational Training II (EPEAEK II) and particularly the program PYTHAGORAS, for funding the above work.

comparing to the present implementations in order to be able to correspond to all requests for digital certificates. On the other hand applications like SET (Secure Electronic Transactions) have started to consecrate for mobile and portable devices. SET is a standard for secure electronic transactions via public networks that has been deployed by VISA,MASTERCARD and many other leading companies in financial services. SET presupposes that an authenticating module that includes SHA-1 hash function is embedded in any mobile or portable device.This means that the implemented authentication core must be low-power. To sum up it is obvious that the rapid evolution of the communication standards that include message authenticity and integrity verification, require SHA-1 hash functions implementations optimized in terms of performance, power dissipation and size. This can be partially achieved by modifying the embedded hash function. This paper is mainly focused on SHA-1 [4] due to its major use in standards, although other hash functions, like MD5 [5], can also be considered. These two competitive hash functions have both their own pros and cons. Whereas MD5 hash function results to a faster implementation it has innate weakness that corresponds to a lower security level due to the 128-bit hash value [6]. Moreover in the latest applications such as PKI only SHA-1 hash function is adopted for use. Various techniques have been proposed to minimize the SHA-1 implementation size. The most common techniques are operation rolling loop and/or re-configuration. On the other hand, alternative design approaches have been proposed to increase throughput for a variety of hash function families. The most common techniques are pipeline and parallelism. Design approaches that meet both constraints of high-performance and small-size were presented in [7] and [8], where SHA-1 was implemented applying simultaneously the re-use and pipeline techniques. The SHA-1 implementation of [8], presented the highest throughput. In this paper the SHA-1 hash function is explored in depth and various implementations that have been proposed in the international literature are considered. Design aspects of performance and power dissipation are considered in order to explore and compare current implementations. A novel design approach is proposed to increase SHA-1 throughput, which exceeds by 53% the throughput of the implementation presented in [8]. Conservative estimations also show that a 30% of power saving can also be achieved. This paper is organized as follows: In section 2 previous implementations of the SHA-1 are presented. In section 3 the proposed design approach is detailed. In section 4 power issues concerning the SHA-1 are presented.Throughput and area results of the proposed SHA-1 are offered in section 5 and it is compared to the other implementations. Finally, conclusions are offered in section 6.

2

Existing Implementations of SHA-1

The Secure Hash Standard [4] describes in detail the SHA-1 hash function. It requires 4 rounds of 20 operations each, resulting in a total of 80 operations,

to generate the Message Digest. Operations vary only from round to round, resulting in only 4 basic blocks. The main difference of the round’s operation is the applied non-linear function, used to hash the initial message. In Fig. 1, the interconnection of two consecutive operations is illustrated. Each one of the a t , bt , ct , dt , et , is 32-bit wide resulting in a 160-bit hash value. Kt and Wt are a constant value for iteration t and the tth w-bit word of the message schedule, respectively. Following the guidelines of [4], the architecture of a SHA-1 core is formed as illustrated in Fig. 2. In the MS RAM, all message schedules Wt of the tth w-bit word of the padded message are stored. The Constants Array is a hardwired array that provides the constant values Kt and the constant initialization values H0 - H4 . Additionally, it includes the Wt generators. Throughput is kept low due to the large number of the required operations. An approach to increase significantly throughput is the application of pipeline. However, applying or not pipeline, the required area is prohibitive for mobile and portable applications. Thus, various techniques have been proposed to introduce to the market highspeed and small-sized SHA-1 implementations

et-2

dt-2

Wt-1 +

ct-2

+

Non-linear function

+

ROTL 5

Kt-1

at-2

ROTL 30

+

et-1

dt-1

Wt +

bt-2

ct-1

+

Non-linear function

+

ROTL 5

Kt

bt-1

at-1

ROTL 30

+

et

dt

ct

bt

at

Fig. 1. 2 consecutive SHA-1 operations.

2.1

Rolling loop technique

In [9] the rolling loop technique was used in order to reduce area requirements. The proposed architecture of [9] requires only 4 operation blocks, one for each round. Using a temporal register and a counter, each operation block is re-used

for 20 iterations. After 20 clock cycles the value of the first round is ready and propagated to the next round. Every round is formed by a single operation block which is re-used feeding its output to the temporal register, which in turn feeds its input. Although this approach is considerably area-efficient, throughput is kept low due to the requirement of 81 clock cycles to generate the Message Digest. In [10] a re-use technique was applied to the non-linear functions, exploiting the similarity of the operation block. Modifying the operation block to include the four non-linear functions, the non-linear function that corresponds to the time instance t is selected through a multiplexer.

Input Data

Register file of 4x20 registers 32-bit wide MS RAM

Padding Unit

Padded Data 512-bit

5x32-bit

SHA-1 CONSTANTS’ ARRAY

Wt Kt

4 Rounds x 20 Operations

5x32-bit

Control Unit

Message Digest Extraction Message Digest 160-bit

Fig. 2. Typical SHA-1 core.

2.2

Pipeline technique

In [7], [8] and [11] the architecture of the SHA-1 core is based on the use of four pipeline stages. These architectures exploit the characteristics of the SHA-1 hash function that requires a different non-linear function every 20 clock cycles, assigning a pipeline stages to each round. Adopting design elements from [9] and [10], operation blocks are re-used to minimize area requirements. This allows parallel operation of the four rounds, introducing a 20 cycle latency to quadruple the throughput of that in [10]. Furthermore, power dissipation and area penalty are kept low, compared to the implementation presented in [9].

3

Proposed SHA-1 Implementation

From [4] and from Fig. 1, the expressions to calculate at , bt , ct , dt , et , are given in Eq. 1-5 at = ROT L5 (at−1 ) + ft (bt−1 , ct−1 , dt−1 ) + et−1 + Wt + Kt

(1)

bt = at−1

(2)

ct = ROT L30 (bt−1 )

(3)

dt = ct−1

(4)

et = dt−1

(5)

where ROT Lx (y) stands for rotation of y byx positions to the left, and ft (z,q,r) represents the non-linear function of the SHA-1 operation block which is applicable on operation t. The proposed design approach is based on a special property of the SHA-1 operation block. Let’s consider two consecutive operations of the SHA-1 hash function. The considered inputs at−2 , bt−2 , ct−2 , dt−2 , et−2 go through a specific procedure in two operations and after that the considered outputs at , bt , ct , dt and et arise. In between the signals at−1 , bt−1 , ct−1 , dt−1 , et−1 that are outputs from the first operation and inputs for the second operation have been computed. Except of the signal at−1 , the rest of the signals bt−1 , ct−1 , dt−1 , et−1 are derived directly from the inputs at−2 , bt−2 , ct−2 , dt−2 respectively. This means consequently that also ct , dt and et can be derived directly from at−2 , bt−2 , ct−2 respectively. Furthermore,the fact that at and bt calculations require the dt−2 and et−2 inputs respectively, which are stored in temporal registers is observed. The output at requires only dt−2 whereas bt requires only et−2 . It is clear enough that these these two calculations can be performed concurrently. In Fig. 3, the consecutive SHA-1 operation blocks of Fig. 1, have been modified so that at and bt are calculated concurrently. The gray marked areas on Fig. 3 indicate the parts of the proposed SHA-1 operation block that operate in parallel. Examining the execution process it is noticed that only a single addition level has been introduced to the critical path. This is necessary because during the computation of at the bt value has to be known.So in three addition levels the bt value is known and in parallel the two addition levels of at computation have already been performed. An extra addition level is required in order for the at value to be fully computed. Considering the above facts it is obvious that the critical path in the proposed implementation consists of four addition levels instead of the three addition levels consisting the critical path of a non-concurrent implementation. Although, this fact reduces the maximum operation frequency in the proposed implementation, the throughput is increased significantly as it will be shown. In Eq. 6, the expression of throughput is given. T hroughput =

#bits ∗ foperation #operations

(6)

et-2

K t-1 W t-1

+

d t-2

ct-2

+

Non-linear function

+

ROTL 5

bt-2

at-2

ROTL 30

+ Kt Wt

+

Non -linear function

+

ROTL 30

+ +

et

ROTL 5

dt

ct

bt

at

Fig. 3. Proposed SHA-1 operation blocks.

For the above equation the theoretical expected operating frequency is about 25% lower since the critical path has been exceeded from three to four addition levels comparing to non-concurrent implementations. However the hash value in the proposed implementation is computed in only 40 clock cycles instead of 80 in the non-concurrent implementations. This computations lead to the result that theoretically the throughput of the proposed implementation increases by 50%. In Fig. 4, the modified structure of the hash core is illustrated, as it is proposed in [7] and [8], where there are four pipeline stages and the proposed operation block for each round. The partially unrolled expressions that give at , bt , ct , dt and et , are now described from Eq.7-11. at = ROT L5 (at−1 ) + ft (at−2 , ct−2 , ROT L5 (bt−2 )) + dt−2 + Wt + Kt

(7)

bt = ROT L5 (at−2 ) + ft (bt−2 , ct−2 , dt−2 ) + et−2 + Wt−1 + Kt−1

(8)

ct = ROT L30 (at−2 )

(9)

dt = ROT L30 (bt−2 )

(10)

et = ct−2

(11)

From Eq. 7-11, it can be assumed that the area requirements are increased. Thus, the small-sized constraint is violated. However, the hardware to implement the operation blocks of the SHA-1 rounds is only a small percentage of the SHA-1 core. Moreover considering the fact that the SHA-1 hash core is a

Input Data

Register file of 4x16 registers 32-bit wide MS RAM

Padding Unit

Padded Data 512-bit

CONSTANTS’ ARRAY

Transformation Round 1

5x32-bit TEMP DATA

SHA-1 Wt Kt

H0 – H 4 TEMP DATA

4 Rounds x 2 Operations

Transformation Round 2

TEMP DATA

Transformation Round 3

5x32-bit TEMP DATA

Control Unit

Message Digest Extraction

Transformation Round 4

Message Digest 160-bit

Fig. 4. Proposed SHA-1 operation blocks.

component and not entire the authenticating scheme obviously the proposed implementation satisfies the design constraint for small-sized, and high-performing operation. Besides that in the next section it will be shown that the proposed implementation also meets the design constraints for the characterization as low-power.

4

Power Issues

The proposed SHA-1 operation block not only results to a higher throughput for the whole SHA-1 core but it also leads to a more efficient implementation as long as the power dissipation is concerned. The reduction of the power dissipation is achieved due to a number of reasons. First of all the decrease of the operating frequency of the SHA-1 core results to lower dynamic power dissipation for the whole SHA-1 core. This can easily be seen regarding the relevant power equations. Moreover the adopted methodology for the implementation of each SHA-1 operation block combines the execution of two logical SHA-1 operations in only one single clock cycle. This means that the final message digest is computed in only 40 clock cycles and thus calls for only 40 write operations in the temporal register that save all the the intermediate results until the final message digest has been fully derived. It is possible to estimate the total power savings considering that the initial power dissipation was calculated as Pinit =80Pop (fop ) + 80PW R (fop ), where Pop (fop ) is the dynamic power dissipation of a single operation (depends from

the operation frequency fop ) and PW R (fop ) is the power dissipated during write/read operation of the registers (also depends from fop ). Both Pop (fop ) and PW R (fop )’s values are proportional to the operating frequency fop . This means for a decreased fop both Pop (fop ) and PW R (fop ) result to decreased values. According to the latter assumptions, the proposed operation blocks power 0 0 0 dissipation is estimated as Pprop = 40(2∗Pop (fop ))+40PW R (fop ) = 80Pop (fop )+ 0 0 0 40PW R (fop ). Considering that fop > fop and thus Pop (fop ) > Pop (fop ) and 0 PW R (fop ) > PW R (fop ) (according to what was previously mentioned), it can be derived that the operating frequency defines the overall power savings and that the proposed implementation has a lower power dissipation. The above calculations are considered as conservatives since the proposed operation blocks dynamic power dissipation is for sure less than the twofold dynamic power dissipation of a single operation. This can be easily realized if the conventional single-operation and the proposed double-operation block are examined thoroughly. However in the theoretical analysis the factor 2 was used in order to cover the worst case that could happen including any power leakages that could be revealed due to the extra hardware used in the proposed operation block. If a similar implementation is intended to be used in a device that does not exploits the extra throughput (i.e some portable or mobile devices for certain use) then this fact can lead to an even more low-power device.This can be achieved if a certain targeted technology(in ASIC) is used where the operating frequency can be slowed down and at the same time the supplying voltage Vdd can be also decreased. Obviously this leads to a significant reduction of the total power consumption whereas the throughput of the device fluctuates to the desirable limits of conventional high-throughput implementations. In the proposed implementation a 53% higher throughput is achieved comparing to competitive implementations. s a result of this the operating frequency can be reduced about 53% and have the same throughput with the other competitive implementations. The reduction of the operating frequency also leads to reduction of the supplying voltage Vdd ( in ASIC designs)at about 40% taking in consideration conservative aspects. On the other hand a significant increase in the effective capacitance of the circuit occurs by a factor of two, that has to be taken in consideration. Considering that the power dissipation in a circuit is proportional to the effective capacitance,to the operating frequency and to the square of the supplying voltage,it can be assumed that in this way an extra 60% power saving can be achieved meeting this way the constraint for extended autonomy.

5

Experimental Results and Comparisons

In order to evaluate the proposed SHA-1 design approach, the XILINX FPGA technology was used. The core was integrated to a v150bg352 FPGA device. The design was fully verified using a large set of test vectors, apart from the test example proposed by the standard. The maximum achieved operating frequency

is equal to 55 MHz, an expected decrease of 25% compared to [8] that correspond to the extra addition level introduced to the critical path. Although the operating frequency of the proposed implementation is lower than that of [7], [8] and [10], the achieved throughput exceeds 2,8 Gbps. For a fair comparison, among the considered implementations [7], [8], [9], [10], [11], the work presented in [12] is included, which although it does not present a competitive throughput, it is the most recent on the topic. In Table 1, the proposed implementation is compared to the implementations of [7], [8], [9], [10], [11] and [12]. From the experimental results, there is a range of 53% - 2266% increase of the throughput compared to the previous implementations. It has to be noticed that the implementation of [10] was re-designed for the specific technology, for fair comparison. In [10], the reported operating frequency was 82 MHz and the throughput was 518 Mbps.

Implementations Operating Frequency(Mhz) Throughput(Mbps) [7] 71 1731 [8] 72 1843 [9] 43 119 [10] 72(82) 460(518) [11] 55 1339 [12] 38.6 900 Prop. Arch. 55 2816 Table 1. Operating Frequencies and Throughput

Furthermore, regarding the overall power dissipation to process a message, the proposed implementation presents significant decrease, approximately by 30% compared to the nearest performing implementation [8]. Power dissipation was calculated using Synopsys Synthesize Flow for the targeted technology as it has already been mentioned in the previous section. The activity of the netlist was estimated for a wide range of messages so that the gathered values of the netlist activity can be considered as realistic. Then, from the characteristics of the technology, an average wire capacitance was assumed and the power compiler gave rough estimations. The results were also verified on test boards, measuring the overall power consumed for a given set of messages, for each implementation. Power dissipation is decreased primarily due to the lower operating frequency, without compromising performance. Also, power dissipation decrease is achieved due to the reduction by 50% of the write processes to the temporal registers. In the case of the introduced area, the implementation of a SHA-1 core, using the proposed operation block, presented a 20% overall area penalty, compared to the implementation of [8]. The introduced area is considered to satisfy the requirements of the small-sized SHA-1 implementations, meeting in parallel the high-performance and low-power constraints.

6

Conclusions and Future Work

A high-speed and low power implementation of the SHA-1 hash function was proposed in this paper. It is the first known small-sized implementation that exceeds the 2 Gbps throughput limit (for the XILINX FPGA technology - v150bg352 device). From the experimental results, it was proved that it is performing more than 50% better than any previously known implementation. The introduced area penalty was approximately 20% compared to the nearest performing implementation. This makes it suitable for every new wireless and mobile communication application [1], [2] that urges for high-performance and small-sized solutions. However, the major design advantage of the proposed design approach is the low power dissipation that is required to calculate the hash value of any given message. Compared to other high-performing implementations, approximately 30% less power per message is required. The proposed design approach will be used to form a generic methodology to design low-power and high-speed implementations for various families of hash functions.

References [1] WAP Forum, Wireless Application Protocol, Wireless Transport Layer Security, Architecture Specifications, 2003. [2] IEEE Std. 801.16–2001, IEEE Standard for Local and Metropolitan Area Networks, part 16, Air Interface for Fixed Broadband Wireless Access Systems, IEEE Press, 2001. [3] HMAC Standard, The Keyed-Hash Message Authentication Code, National Institute of Standards and Technology (NIST), 2003. [4] FIPS PUB 180-1, Secure Hash Standard (SHA-1), National Institute of Standards and Technology (NIST), 1995. [5] R. L., Rivest, The MD5 Message digest Algorithm, IETF Network Working Group , RFC 1321, April 1992. [6] H., Dobbertin, The Status of MD5 After a Recent Attack, RSALabs CryptoBytes, Vol.2, No.2, Summer 1996. [7] N., Sklavos, P., Kitsos, E., Alexopoulos, and O., Koufopavlou, Open Mobile Alliance (OMA) Security Layer: Architecture, Implementation and Performance Evaluation of the Integrity Unit, New Generation Computing: Computing Paradigms and Computational Intelligence, Springer-Verlag, 2004, in press. [8] N., Sklavos, E., Alexopoulos, and O., Koufopavlou, Networking Data Integrity: High Speed Architectures and Hardware Implementations, IAJIT Journal, vol. 1, no. 0, pp. 54-59, 2003. [9] S., Dominikus, A Hardware Implementation of MD-4 Family Hash Algorithms, in Proc. of ICECS, pp. 1143-1146, 2002. [10] G., Selimis, N., Sklavos, and O., Koufopavlou, VLSI Implementation of the KeyedHash Message Authentication Code for the Wireless Application Protocol, in Proc. of ICECS, pp. 24-27, 2003. [11] N., Sklavos, G., Dimitroulakos, and O., Koufopavlou, An Ultra High Speed Architecture for VLSI Implementation of Hash Functions, in Proc. of ICECS, pp. 990-993, 2003. [12] J.M., Diez, S., Bojanic, C., Carreras, and O., Nieto-Taladriz, Hash Algorithms for Cryptographic Protocols: FPGA Implementations, in Proc. of TELEFOR, 2002.

State-of-the-Art Implementation of SHA-1 Hash ...

to a maximum of 2 Gbps. In this paper, a new implementation comes to exceed this limit improving ... Moreover year-in year-out Internet becomes more and more ...

120KB Sizes 1 Downloads 146 Views

Recommend Documents

VLSI IMPLEMENTATION OF THE KEYED-HASH ...
Every client and application server provider must be authenticated, in order both ... WAP an extra layer, dedicated to the security, is needed. The security layer of ...

Implementation of Keccak hash function in Tree ...
opposition to host memory which resides on the host computer. The device global ... ing results of leaves in a serial way on the Host CPU. A leaf interleaving ...

Beyond 11% Efficiency: Characteristics of StateoftheArt ...
Aug 16, 2012 - Widespread adoption of solar energy has the potential to bring human civilization ... of the two leading thin-film technologies, CdTe and Cu(In,Ga)(S,Se) 2 (CIGSSe), ..... light source solar simulator, equipped with light stabilization

1 New Hash Algorithm: jump consistent hash -
function mapping tuple to a segment. Its prototype is. Hash(tuple::Datum ... Big Context: To compute the Hash function, they both need a very big context to save.

Hash Tables
0. 12. 15. 1. 2 ... 10. Hash. Function banana apple cantaloupe mango kiwi pear apple banana cantaloupe kiwi mango pear. Hash Tables ...

Hash Rush Whitepaper.pdf
Page 2 of 22. Table of Contents. Legal Disclaimer. Introduction. Overview of HASH RUSH Project. RUSH COIN Tokens. Beginning of the Game. Game Modes and Events. Look and Feel. Monetization. Earn Minable Crytocurrencies. Game World and Rules. Factions.

IMPLEMENTATION OF MIS Implementation of MIS ... -
space occupied by computers, terminals, printers, etc., as also by people and their movement. ... These classes are not necessarily exclusive, as they quite often.

Implementation of Recommendations.PDF
keywords: equine dentistry, dentistry disease, equine. 1. INTRODUÇÃO ... PDF. Implementation of Recommendations.PDF. Open. Extract. Open with. Sign In.

LEARNING COMMONS, STAGES OF IMPLEMENTATION
Apr 12, 2016 - How will individuals with pedagogical, content and technological .... Educational Technologies: Does the school technology plan support a ...

Implementation of IREM.PDF
No. t22l NEW DDLHI'THURSDAY, MARCH 8' 20I8/PHALGUNA l7,lr39. tdr{{rdc. @*t). qBqfdr. Etffi, gqr{, zotg. qnfttf.37m18. qr.m.R. ZtO 1e1.+ftam + 3r-f-*E 309 + qrq.6 artl TEiiT erRr,qi 6r e-fr{T +tt gq, trFcfr qil6m t{. *+r 1*ftft-a *aa1 fr{q, 2016 t ftq

The PHOTON Family of Lightweight Hash Functions
RFID security is currently one of the major challenges cryptography has to face, often .... input one needs to store 2m+k bits, out of which m bits are required for the ... that in most RFID applications the user will not hash a large amount of data,

Implementation of recommendations - Abolition of Allowance.PDF ...
Page 1 of 1. Implementation of recommendations - Abolition of Allowance.PDF. Implementation of recommendations - Abolition of Allowance.PDF. Open. Extract.

Implementation of recommendations of Seventh Central Pay ...
Indian NationalTrade Union Congress (INTUC). lnternational Transport Workers' Federation (lTF). No. V5(g)/PartVI. The Member Stafl. Railway Board,. New Delhi. Dear Sir. Sub:. Implementation of recommendations of Seventh Central Pay Commission accepte

Hash Letter 692.pdf
Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Hash Letter 692.pdf. Hash Let

Hash Rush Whitepaper (1).pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Hash Rush ...

Randomized Language Models via Perfect Hash Functions
Randomized Language Models via Perfect Hash Functions ... jor languages, making use of all the available data is now a ...... functions. Journal of Computer and System Sci- ence ... Acoustics, Speech and Signal Processing (ICASSP). 2007 ...

GHA-256: Genetic Hash Algorithm
Pretty Good Privacy (PGP) and S/MIME (Secure Multipurpose Internet Mail. Extension) etc., which is proven that it .... evolution. Many people, biologists included, are astonished that life at the level of complexity that we observe could have evolved