Design and Analysis of A New Hash Algorithm With Key Integration
Design and Analysis of A New Hash Algorithm With Key Integration
33
International Journal of Computer Applications (0975 – 8887)
Volume 81 – No1, November 2013
and made secure against the attacks that will be discovered in produced by application of a key too. BCM (Backward Chaining
future. Mode) [14] is a method of construction of hash families without
keying all compression function applications. EMD (Enveloped
4. RELATED WORK Merkle Damgard) [15] is another same kind of technique. One
Almost all cryptographic hash functions are based on Merkle- more variant RMX [16] combines a random salt with every
Damgard construction [10]. He proposed few steps for a general message block before sending it to compression function. This
purpose hash function generation. Those were padding, append technique makes it suitable for Digital Signature.
length, initialization of buffer, processing of message in blocks.
We may depict those steps as follows: 5. DESIGN OF PROPOSED ALGORITHM
Typically any hash function has two components: a compression
M1 M2 - -- Mℓ 10* L function and a construction. The compression function is a
mapping function that transforms a larger arbitrary-size input to
a smaller fixed-size output, and the construction is the method
Original Message Padding by which the compression function is being repeatedly called to
process a variable-length message [17]. Traditionally hash
Figure-1 Merkle-Damgard Padding Step functions are being designed without any usage of key
component. However, many a few recent attacks have been
Algorithm- Pads (M) successfully implemented on these traditional popular hash
D = M+1+64 mod m functions such as- SHA1, MD5 etc. [18, 5, 19]. As we discussed
in previous section, security of algorithm needs to be proved,
M||1||od||<M>64 → M most of the newly designed algorithms are based on previously
established and accepted designs with few modifications. If
M → M1 - - - Mℓ established design promises few security aspects, the new design
will automatically do so. In the same line, this algorithm is also
based on popular MD5 [20] design. The security notions are
assumed from MD5 construction. Furthermore, integration of
M1 M2 Mℓ key in each round of operation on individual blocks gives more
strength to the proposed algorithm against many of the known
attacks on MD5.
F F F Yℓ Let us assume an input message M of length b bits. We will use
IV following notations in the description of algorithms:
+ : addition modulo 232
Figure 2: The Merkle-Damgard Construction
<<< S: circular left shift by s bit positions
∧ : bit-wise AND
Algorithm MDF: ∧: Bit-wise OR
M → M1 - - - Mℓ
Y0 = IV
⊕ : bit-wise XOR
for i = 1 to ℓ do ¬ : bit-wise complement
yi = F(Mi, yi-1) The proposed algorithm may be divided into two phases-
preprocessing and hash calculation. The preprocessing phase is
return Yℓ
very much similar to that of MD-5 and SHA-1, involving
Deploying a new hash function includes two constructs- a padding and message length and further obtaining in m-blocks,
compression function that operates on input strings of a fixed each block of 512 bit length. The hash calculation is done on
length and then to use the cascade function to extend the each 512 bit block in iterative manner in second phase of the
compression function to string of arbitrary length[11]. To algorithm. This phase also makes use of two 64 bit keys. The
improve security aspect with hash function, a key may be used. 512 bits are then compressed into 128 bits and provided as input
For this purpose two solutions were proposed. First is for processing of next block of message. The output of
Dedicated-Key setting [12], in which a publicly keyed processing of last block of message is called as digest or hash
compression function h: {0,1}k × {0,1}n × {0,1}m → {0,1}n is value. The compression function makes use of S-Box, XOR,
accessed by a family of hash functions Ch: Κ × M → {0,1}n , addition modulo 232 and look-up tables. The use of primitive
such that Ch members are indexed by different public keys ki ∈ logical functions, which are implemented on hardware and
Κ. This approach facilitates multiple instances of same hash readily available look-up table help in increasing speed of hash
function with multiple keys. And if an attack is found on any function processing. Following are the few steps of proposed
particular instance of hash function family, which is indexed by algorithm:
a particular key, it still guarantees of safety of other instances of
hash function family, that are indexed by other keys. The only Step 1: Padding-
drawback of this approach is need for extra input, in terms of
The original message is padded so that the length of message
key, resulting in extra calculations and thus, more time, but for
after padding is congruent to 448 modulo 512 (length ≡ 448 mod
increased level of security, this extra time can be afforded [13].
512) this purpose, first bit is always 1 and remaining bits are
Another approach is Integrated –Key setting [8], which always 0. This is a compulsory step so, 1 to 512 bits may be
overcomes an important drawback of dedicated-key function, appended, depending upon the length of original message.
that is: not easily accommodation of key input by keyless
compression function. Here, we may take an approach of
processing the key only at last compression call, i.e. no need of
modifying the compression function, but last hash value will be
34
International Journal of Computer Applications (0975 – 8887)
Volume 81 – No1, November 2013
35
International Journal of Computer Applications (0975 – 8887)
Volume 81 – No1, November 2013
36
International Journal of Computer Applications (0975 – 8887)
Volume 81 – No1, November 2013
1.200
10. CONCLUSION
In this paper we proposed a new hash function algorithm that
1.000 includes a 64 bit key as an ingredient to the function. It produces
0.800 128 bit digest with a secure and simpler technique as compared
0.600 to many of the popular existing techniques. Use of key adds the
0.400 time taken in
source integration facility while creating digest just for integrity
0.200 purpose. The function has been verified and found fast by using
seconds existing tables for number of keys and S-Box.
0.000
11. REFERENCES
[1] Simmons GJ. Message Authentication with arbitration of
transmitter/receiver disputes. Advances in Cryptology-
Eurocrypt’87, Lecture Notes in Computer Science,
Springer-Verlag, Berlin; 1988; 304: 151-165.
Figure-5: Average Execution Time (in Seconds) for inputs of [2] Wang X, Feng D, Lai X, Chen H and Yu X. Cryptanalysis of
different size the hash functions MD4 and RIPEMD. In Eurocrypt'05,
LNCS Springer-Verlag 2005; 3494:1-18.
[3] Klima V. Finding MD5 Collisions on a notebook PC-using
multi message modifications. Cryptology ePrint Archive,
Report 2005. http://eprint.iacr.org/102.pdf.
[4] Wang X, Yu H, Yin Y. L. Efficient Collision Search Attacks
on SHA-0. In Crypto 2005; LNCS 3621, 1-16.
[5] Wang , Yin YL, Yu H. Finding Collisions in the Full SHA-1.
In Crypto'05, LNCS Springer-Verlag 2005; 3621:17-36.
[6] Shakeel N, Murtzaa G, Ikram N. MAYHAM- A New Hash
Function. International Journal of Network Security, 2011;
15(6): 417-425.
[7] Massierer M. Provably Secure Cryptographic Hash Function.
Ph.D. Thesis, School of Mathematics, The University of
New South Wales, submitted on December 2006.
Figure 6: Execution of 1000 input byte data (notice different [8] Mohammed S A. Al-Kuwari. Integrated-Key Cryptographic
key and varying computation time for each individual input Hash Function. Ph. Thesis submitted to University of Bath,
of same size) Department of Computer Science, September 2011.
Software implementation of the algorithm was tested on system [9] Bellare M, Tadayoshi. Hash Function Balance and its Impact
with Intel based CPUs Pentium® -4 2.66 GHz with 1GB RAM. on Birthday Attacks. Eurocrypt '04, LNCS Springer-Verlag
The comparison is given in the following table for various hash 2004 ; 3027: 401- 418..
functions tested on 1 Mb data file. It shows that the algorithm is
the third fastest output after MD5 and RIPEMD. And we may
37
International Journal of Computer Applications (0975 – 8887)
Volume 81 – No1, November 2013
[10] Damgard I. A Design Principle for Hash Functions. [18] Wang X, Feng D, Lai X, Yu H. Collisions for hash
Crypto’89, LNCS Springer Verlag 1989; 435 : 416-427, , functions MD4, MD5, HAVAL-128 and RIPEMD.
1989. Cryptology ePrint Archive, Report 2004/1999, 2004.
[11] Walker J, Kounavis M, Gueron S, Graunke G. Recent [19] Wang X, Yu H.. How to Break MD5 and Other Hash
Contribution to Cryptographic Hash Function, Intel Functions. In Eurocrypt'05, LNCS Springer-Verlag 2005;
Technology Journal 2009: 13 (2): 80-95. 3494:19-35.
[12] Bellare M, Ristenpart T. Hash Functions in Dedicated Key [20] Public-Key Cryptography Standards (PKCS): PKCS #7:
Settings: Design Choices and MPP Transforms. ICALP’07, Cryptographic Message Syntax Standard: 3.6 Other
LNCS Springer-Verlag 2007; 4596: 399-410. Cryptographic Techniques: 3.6.6 What are MD2, MD4, and
MD5?. RSA Laboratories. Retrieved 2012-10-03.
[13] Rogaway P, Steinberger J. Constructing Cryptographic
Hash Function from Fixed-Key Blockciphers. Crypto’08. [21] Rompay B V. Analysis and Design of Cryptographic Hash
LNCS Springer-Verlag 2008; 5157: 433-450. Function, MAC Algorithms and Block Ciphers. Thesis,
Katholieke University Leuven, 2004.
[14] Endreeva E, Preneel B. A Three-Property-Secure Hash
Function. SAC ’09, LNCS Springer-Verlag 2009; 5381: [22] Mornov I. Hash Functions: Theory, Attacks and
228-244. Applications. Microsoft Research, 2005.
[15] Bellare, Ristenpart T. Multiproperty- Preserving Hash [23] Hirose S, Park JH, Yun A. A Simple Variant of the Merkle-
Domain Extension and the EMD Transform. Asiacrypt ’06, Damgard Scheme with a Permutation. Asiacrypt '08, LNCS
LNCS Springer-Verlag 2006; 4284 : 299-314. Springer-Verlag 2008; 4833 : 113-129.
[16] Halevi S, Krawczyk H. The RMX transform and Digital [24] Tirtea R. Cryptographic hash functions, trends and
Signatures. 2nd NIST Hash Workshop, 2006. challenges. Journal of Computer and System Sciences,
2009; 2: 62-65.
[17] S. Al-Kuwari. Engineering Aspects of Hash Functions. In
International Conference on Security and Management
(SAM '11), 2011.
IJCATM : www.ijcaonline.org 38