This application claims the benefit of Korean Patent Application No. 10-2013-0088514, filed on Jul. 26, 2013, which is hereby incorporated by reference herein in its entirety.
1. Technical Field
The present disclosure relates generally to an apparatus and method for performing a compression operation in a hash algorithm, and, more particularly, to an apparatus and method for performing a compression operation in a high-speed message hash algorithm, which receive a 1024-bit message and 512-bit chain variable data, or a 2048-bit message and 1024-bit chain variable data, repeatedly compute 256-bit register based extended message binding and step functions, and perform combination with a final extended message, thereby computing updated 512- or 1024-bit chain variable data that forms the basis of a hash value.
2. Description of the Related Art
The provision of the integrity of messages is the main functionality of encryption applications that are used for the communication and data storage of a variety of types of equipment. Hash functions are functions for guaranteeing the integrity of messages, and are widely used for the signatures and authentication of messages. Generally, in a hash function, chain variable data is used, a message is divided into message units of a specific length, and the message units are input to a compression function along with the chain variable data, thereby updating the chain variable data. Final chain variable data output from a compression function is processed by means of various algorithms and converted into a hash value of the corresponding message.
In this regard, Korean Patent No. 10-0916805 entitled “Hash Algorithm having 256-bit Output” discloses a hash algorithm technique that receives a message bit string of arbitrary length, converts the message bit string into a word string, converts an input message into preset bits, and then performs a compression operation, thereby computing chain variables.
In order to increase the speed efficiency of a hash function, a compression function, which is the core algorithm of the hash function, needs to be designed to be optimally implemented in a chip or a central processing unit (CPU) specialized for an encryption application.
Accordingly, at least one embodiment of the present invention is intended to provide a technique for computing a 256-bit register based compression function, which has a 512- or 1024-bit output value, guarantees security against existing attacks, and is applied to a hash function capable of high-speed message hashing.
In accordance with an aspect of the present invention, there is provided an apparatus for performing a compression operation in a hash algorithm, including an interface unit configured to receive a message and chain variable data from the outside; a message extension unit configured to generate a plurality of extended messages from the message; a chain variable initial conversion unit configured to convert the chain variable data into initial state data for a compression function; a compression function computation unit configured to repeatedly compute extended message binding and step functions based on the initial state data and the plurality of extended messages, and to perform combination with a final extended message, thereby computing final state data; and a chain variable final conversion unit configured to generate and output chain variable data, into which the chain variable data has been updated, using the final state data.
The message extension unit may receive a 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]) in which 32 32- or 64-bit sub messages (M[0], M[1], . . . , M[31]) are successively connected to each other, and may generate 27 512- or 1024-bit extended messages (W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r≦26) in each of which 16 32- or 64-bit sub extended messages (W_r[0], W_r[1], . . . , W_r[15]) are successively connected to each other, based on the following equation:
W_0[i]=M[i], 0≦i≦15;
W_1[i−16]=M[i], 16≦i≦31;
W_r[i]=W_(r−2)[τ(i)]W_(r−1)[i], 2≦r≦26, 0≦i≦15;
τ(0)=3, τ(1)=2, τ(2)=0, τ(3)=1, τ(4)=7, τ(5)=4,
τ(6)=5, τ(7)=6, τ(8)=11, τ(9)=10, τ(10)=8,
τ(11)=9, τ(12)=15, τ(13)=12, τ(14)=13, τ(15)=14 (3)
The chain variable initial conversion unit may receive 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) in which 16 pieces of 32- or 64-bit sub chain variable data (CV[0], CV[1], . . . , CV[15]) are successively connected to each other, and may convert the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) into 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) in which 16 pieces of 32- or 64-bit initial sub state data (X_0[0], X_0[i], X_0[15]) are successively connected to each other, based on an equation (X_0[i]=CV[i], 0≦i≦15).
The compression function computation unit may compute the final state data based on the 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) and the 27 512- or 1024-bit extended messages (W_r[0], W_r[1], . . . , W_r[15]; 0≦r≦26), the compression function computation unit computing the final state data by repeatedly computing the following Equation 7, which is the extended message binding function, and the following Equation 8, which is the step function, and then computing the following Equation 9 that is combined with a final extended message:
X_r[i]=X_r[i]⊕W_r[i], 0≦i≦15
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[i]=ROTL(X_r[i],a), 0≦i≦7;
X_r[i]=X_r[i]⊕C_r[i], 0≦i≦7;
X_r[i]=X_r[i−8]X_r[i], 8≦i≦15;
X_r[i]=ROTL(X_r[i],b), 8≦i≦15;
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[9]=ROTL(X_r[9],c);
X_r[10]=ROTL(X_r[10],2c);
X_r[11]=ROTL(X_r[11],3c);
X_r[13]=ROTL(X_r[13],c);
X_r[14]=ROTL(X_r[14],2c);
X_r[15]=ROTL(X_r[15],3c);
X_(r+1)[i]=X_r[σ(i)], 0≦i≦15; (7)
σ(0)=6, σ(1)=4, σ(2)=5, σ(3)=7, σ(4)=12, σ(5)=15,
σ(6)=14, σ(7)=13, σ(8)=2, σ(9)=0, σ(10)=1, σ(11)=3,
σ(12)=8, σ(13)=11, σ(14)=10, σ(15)=9 (8)
X_26[i]=X_26[i]⊕W_26[i], 0≦i≦15 (9)
where x⊕y is an operation that outputs the logic exclusive sum (eXclusive-OR (XOR)) of 32- or 64-bit x and y, xy is an operation that outputs a remainder obtained by dividing a sum of values, in which 32- or 64-bit x and y are represented using positive integers, by 232 or 264 in a form of 32- or 64-bit output, ROTL (x, j) is an operation that cyclically shifts 32- or 64-bit x to a left by j bits and then outputs a resulting value, a is 5 and b is 23 when r is an even number and a is 25 and b is 19 when r is an odd number, c is 8 in a case of a 32 bit unit and 16 in a case of a 64 bit unit, and the 256- or 512-bit data (C_r=C_r[0]∥C_r[1]∥ . . . |C_r[7] is a constant that is fixed and then used.
The step function computation unit may repeatedly compute the extended message binding function and the step function with respect to “r” ranging from 0 to 25 26 times and perform combination with a final extended message, thereby computing 512- or 1024-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) in which 16 pieces of 32- or 64-bit final sub state data (X_26[0], X_26[1], . . . , X_26[15]) are successively connected to each other.
The chain variable final conversion unit may update the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) based on an equation (CV′[i]=X_26[i], 0≦i≦15), and may output the updated 512- or 1024-bit chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]).
In accordance with another aspect of the present invention, there is provided a method of performing a compression operation in a hash algorithm, including receiving a message and chain variable data from the outside; generating a plurality of extended messages from the message; converting the chain variable data into initial state data for a compression function; repeatedly computing extended message binding and step functions based on the initial state data and the plurality of extended messages, and performing combination with a final extended message, thereby computing final state data; and generating and outputting chain variable data, into which the chain variable data has been updated, using the final state data.
Generating the plurality of extended messages may include receiving a 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]) in which 32 32- or 64-bit sub messages (M[0], M[1], . . . , M[31]) are successively connected to each other, and generating 27 512- or 1024-bit extended messages (W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r≦26) in each of which 16 32- or 64-bit sub extended messages (W_r[0], W_r[1], . . . , W_r[15]) are successively connected to each other, based on the following equation:
W_0[i]=M[i], 0≦i≦15;
W_1[i−16]=M[i], 16≦i≦31;
W_r[i]=W_(r−2)[τ(i)]W_(r−1)[i], 2≦r≦26, 0≦i≦15;
τ(0)=3, τ(1)=2, τ(2)=0, τ(3)=1, τ(4)=7, τ(5)=4,
τ(6)=5, τ(7)=6, τ(8)=11, τ(9)=10, τ(10)=8,
τ(11)=9, τ(12)=15, τ(13)=12, τ(14)=13, τ(15) 14 (3)
Converting the chain variable data into the initial state data for the compression function may include receiving 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) in which 16 pieces of 32- or 64-bit sub chain variable data (CV[0], CV[1], . . . , CV[15]) are successively connected to each other, and converting the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) into 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) in which 16 pieces of 32- or 64-bit initial sub state data (X_0[0], X_0[1], . . . , X_0[15]) are successively connected to each other, based on an equation (X_0[i]=CV[i], 0≦i≦15).
Repeatedly computing extended message binding and step functions and performing combination may include computing the final state data based on the 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) and the 27 512- or 1024-bit extended messages (W_r[0], W_r[1], . . . , W_r[15]; 0≦r≦26), the final state data being computed by repeatedly computing the following Equation 7, which is the extended message binding function, and the following Equation 8, which is the step function, and then computing the following Equation 9 that is combined with a final extended message:
X_r[i]=X_r[i]⊕W_r[i], 0≦i≦15
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[i]=ROTL(X_r[i],a), 0≦i≦7;
X_r[i]=X_r[i]⊕C_r[i], 0≦i≦7;
X_r[i]=X_r[i−8]X_r[i], 8≦i≦15;
X_r[i]=ROTL(X_r[i],b), 8≦i≦15;
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[9]=ROTL(X_r[9],c);
X_r[10]=ROTL(X_r[10],2c);
X_r[11]=ROTL(X_r[11],3c);
X_r[13]=ROTL(X_r[13],c);
X_r[14]=ROTL(X_r[14],2c);
X_r[15]=ROTL(X_r[15],3c);
X_(r+1)[i]=X_r[σ(i)], 0≦i≦15; (7)
σ(0)=6, σ(1)=4, σ(2)=5, σ(3)=7, σ(4)=12, σ(5)=15,
σ(6)=14, σ(7)=13, σ(8)=2, σ(9)=0, σ(10)=1, σ(11)=3,
σ(12)=8, σ(13)=11, σ(14) 10, σ(15)=9 (8)
X_26[i]=X_26[i]⊕W_26[i], 0≦i≦15 (9)
where x⊕y is an operation that outputs the logic exclusive sum (eXclusive-OR (XOR)) of 32- or 64-bit x and y, xy is an operation that outputs a remainder obtained by dividing a sum of values, in which 32- or 64-bit x and y are represented using positive integers, by 232 or 264 in a form of 32- or 64-bit output, ROTL (x, j) is an operation that cyclically shifts 32- or 64-bit x to a left by j bits and then outputs a resulting value, a is 5 and b is 23 when r is an even number and a is 25 and b is 19 when r is an odd number, c is 8 in a case of a 32 bit unit and 16 in a case of a 64 bit unit, and the 256- or 512-bit data (C_r=C_r[0]∥C_r[1]∥ . . . |C_r[7] is a constant that is fixed and then used.
Computing the final state data by repeatedly computing the step function may include repeatedly computing the extended message binding function and the step function with respect to “r” ranging from 0 to 25 26 times and performing combination with a final extended message, thereby computing 512- or 1024-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) in which 16 pieces of 32- or 64-bit final sub state data (X_26[0], X_26[1], . . . , X_26[15]) are successively connected to each other.
Generating and outputting the chain variable data into which the chain variable data has been updated may include updating the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) based on an equation (CV′[i]=X_26[i], 0≦i≦15), and outputting the updated 512- or 1024-bit chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]).
The above and other objects, features and advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
The present invention is described in detail below with reference to the accompanying drawings. Repeated descriptions and descriptions of known functions and configurations which have been deemed to make the gist of the present invention unnecessarily obscure will be omitted below. The embodiments of the present invention are intended to fully describe the present invention to a person having ordinary knowledge in the art to which the present invention pertains. Accordingly, the shapes, sizes, etc. of components in the drawings may be exaggerated to make the description clear.
The configuration and operation of an apparatus for performing a compression operation in a hash algorithm according to the present invention are described with reference to
Referring to
The interface unit 100 receives a 1024- or 2048-bit message M 20 from a user as a compression and encryption target message. Furthermore, the interface unit 100 receives 512- or 1024-bit chain variable data CV 30 from a chain variable generation means (not illustrated) located outside the apparatus 10 for performing a compression operation in a hash algorithm according to an embodiment of the present invention. In this case, the interface unit 100 transfers the received message M 20 to the message extension unit 200, and transfers the chain variable data CV 30 to the chain variable initial conversion unit 300.
The message extension unit 200 generates 27 512- or 1024-bit extended messages (W_0, W_1, . . . , W_26: W_r, 0≦r≦26) from the 1024- or 2048-bit message M received from the interface unit 100. In this case, the 1024- or 2048-bit message M input to the message extension unit 200 is formed such that 32 32- or 64-bit sub messages (M[0], M[1], . . . , M[31]) are successively connected to each other, as expressed by the following Equation 1:
M=M[0]∥m[1]∥M[31] (1)
The message extension unit 200 generates 27 512- or 1024-bit extended messages (W_r, 0≦r≦26) in each of which 16 32- or 64-bit sub extended messages (W_r[0], W_r[1], . . . , W_r[15]) are successively connected to each other, as expressed by the following Equation 2, from the input 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]):
W_r=W_r[0], W_r[1], . . . , W_r[15], 0≦r≦26 (2)
In this case, the message extension unit 200 generates a total of 27 512- or 1024-bit extended messages (W_0, W_1, . . . , W_26; W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r≦26) from the 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]) based on the following Equation 3:
W_0[i]=M[i], 0≦i≦15;
W_1[i−16]=M[i], 16≦i≦31;
W_r[i]=W_(r−2)[τ(i)]W_(r−1)[i], 2≦r≦26, 0≦i≦15;
τ(0)=3, τ(1)=2, τ(2)=0, τ(3)=1, τ(4)=7, τ(5)=4,
τ(6)=5, τ(7)=6, τ(8)=11, τ(9)=10, τ(10)=8,
τ(11)=, 9, τ(12)=15, τ(13)=12, τ(14)=13, τ(15)=14 (3)
Furthermore, the message extension unit 200 outputs 27 512- or 1024-bit extended messages (W_0, W_1, . . . , W_26; W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r≦26) generated from the 1024- or 2048-bit message (M=M[0], M[1], . . . , M[31]) to the compression function computation unit 400.
The chain variable initial conversion unit 300 converts the 512- or 1024-bit chain variable data CV received from the interface unit 100 into 512- or 1024-bit initial state data X_0. In this case, the 512- or 1024-bit chain variable data CV input to the chain variable initial conversion unit 300 is formed in such a way that 16 pieces of 32- or 64-bit sub chain variable data (CV[0], CV[1], . . . , CV[15]) are successively connected to each other, as expressed by the following Equation 4:
CV=CV[0]∥CV[1]∥ . . . ∥CV[15] (4)
The chain variable initial conversion unit 300 converts the input 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) into 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) formed in such a manner that 16 pieces of 32- or 64-bit initial sub state data (X_0[0], X_0[1], . . . , X_0[15]) are successively connected to each other, as expressed by the following Equation 5:
X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15] (5)
In this case, the chain variable initial conversion unit 300 converts the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) into 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) based on the following Equation 6:
X_0[i]=CV[i], 0≦i≦15 (6)
The chain variable initial conversion unit 300 outputs the 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]), into which the input 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) has been converted, to the compression function computation unit 400.
The compression function computation unit 400 calculates a final state data by sequentially and repeatedly computing the following Equation 7, that is, an extended message binding function, and the following Equation 8, that is, a step function, using 512- or 1024-bit initial state data (X_0=X_0[0]∥X_1[1]∥ . . . ∥X_0[15]) received from the chain variable initial conversion unit 300 as an initial value and also using the 27 512- or 1024-bit extended messages (W_0, W_1, . . . , W_26; W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r26) received from message extension unit 200 and then computing Equation 9:
X_r[i]=X_r[i]⊕W_r[i], 0≦i≦15
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[i]=ROTL(X_r[i],a), 0≦i≦7;
X_r[i]=X_r[i]⊕C_r[i], 0≦i≦7;
X_r[i]=X_r[i−8]X_r[i], 8≦i≦15;
X_r[i]=ROTL(X_r[i],b), 8≦i≦15;
X_r[i]=X_r[i]X_r[i+8], 0≦i≦7;
X_r[9]=ROTL(X_r[9],c);
X_r[10]=ROTL(X_r[10],2c);
X_r[11]=ROTL(X_r[11],3c);
X_r[13]=ROTL(X_r[13],c);
X_r[14]=ROTL(X_r[14],2c);
X_r[15]=ROTL(X_r[15],3c);
X_(r+1)[i]=X_r[σ(i)], 0≦i≦15; (7)
σ(0)=6, σ(1)=4, σ(2)=5, σ(3)=7, σ(4)=12, σ(5)=15,
σ(6)=14, σ(7)=13, σ(8)=2, σ(9)=0, σ(10)=1, σ(11)=3,
σ(12)=8, σ(13)=11, σ(14)=10, σ(15)=9 (8)
In this case, a is 5 and b is 23 when r is an even number, and a is 25 and b is 19 when r is an odd number. c is 8 in the case of a 32 bit unit, and 16 in the case of a 64 bit unit. Furthermore, the 256- or 512-bit data (C_r=C_r[0]∥C_r[1]∥ . . . |C_r[7] is a constant that is fixed and then used.
X_26[i]=X_26[i]⊕W_26[i], 0≦i≦15 (9)
In this case, x⊕y is an operation that outputs the logic exclusive sum (eXclusive-OR (XOR)) of 32- or 64-bit x and y, xy is an operation that outputs the remainder obtained by dividing the sum of values, in which 32- or 64-bit x and y are represented using positive integers, by 232 or 264 in the form of 32- or 64-bit output, and ROTL (x, j) is an operation that cyclically shifts 32- or 64-bit x to the left by j bits and then outputs a resulting value.
The compression function computation unit 400 sequentially and repeatedly computes Equations 7 and 8 26 times, and then computes Equation 9. The compression function computation unit 400 calculates final state data X_26 by successively connecting resulting values (X_26[0], X_26[1], . . . , X_26[15]) obtained by computing the compression function, as expressed by the following Equation 10. The compression function computation unit 400 outputs the final state data X_26 to the chain variable final conversion unit 500.
X_26=X_26[0]∥X_26[1]∥ . . . ∥X_28[15] (10)
Meanwhile, an operation in which the compression function computation unit 400 computes an extended message binding function and a step function using the sub state data (X_r[0], X_r[1], . . . , X_r[15]) and the sub extended messages (W_r[0], W_r[1], . . . , W_r[15]; 0≦r≦26) as input values, thereby obtaining sub state data (X_(r+1)[0], X_(r+1)[1], . . . , X_(r+1)[15]), may be expressed, as illustrated in
The chain variable final conversion unit 500 updates the chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) input to the interface unit 100 using the final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) received from the compression function computation unit 400, and outputs the updated chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]). In this case, the chain variable final conversion unit 500 generates the chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]) into which the 512-bit chain variable data CV=CV[0]∥CV[1]∥ . . . ∥CV[15] has been updated based on the following Equation 11:
CV′[i]=X_26[i], 0≦i≦15 (11)
The updated 512- or 1024-bit chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]) output from the chain variable final conversion unit 500 is processed using well-known various algorithms, and is used as a hash value for the 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]) input to the interface unit 100.
A method of performing a compression operation, which is performed by the apparatus for performing a compression operation in a hash algorithm according to the present invention, is described with reference to
Referring to
Furthermore, the message extension unit 200 generates 27 512- or 1024-bit extended messages (W_0, W_1, . . . , W_26; W_r=W_r[0]∥W_r[1]∥ . . . ∥W_r[15], 0≦r≦26) in each of which 16 32- or 64-bit sub extended messages (W_r[0], W_r[1], . . . , W_r[15]) are successively connected from the 1024- or 2048-bit message (M=M[0]∥M[1]∥ . . . ∥M[31]) in which 32 32- or 64-bit sub messages (M[0], M[1], . . . , M[31]) are successively connected based on Equation 3 at step S200. In this case, the message extension unit 200 outputs the generated 27 512- or 1024-bit extended messages (W_r, 0≦r≦26) to the compression function computation unit 400.
Meanwhile, the chain variable initial conversion unit 300 converts the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) in which 16 pieces of 32- or 64-bit sub chain variable data (CV[0], CV[1], . . . , CV[15]) are successively connected, received from the interface unit 100, into 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) in which 16 pieces of 32-bit initial sub state data (X_0[0], X_0[1], . . . , X_0[15]) are successively connected, based on Equation 6 at step S300. In this case, the chain variable initial conversion unit 300 outputs the obtained 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) to the compression function computation unit 400.
Thereafter, the compression function computation unit 400 sequentially and repeatedly performs the operations of Equations 7 and 8 based on the 27 512- or 1024-bit extended messages (W_r, 0≦r≦26) received from the message extension unit 200 and the 512- or 1024-bit initial state data (X_0=X_0[0]∥X_0[1]∥ . . . ∥X_0[15]) received from the chain variable initial conversion unit 300, and finally computes a compression function for performing the operation of Equation 9 at step S400. In this case, the compression function computation unit 400 uses 16 pieces of 32- or 64-bit initial sub state data (X_0[0], X_0[1], . . . , X_0[15]) as the input value of a first compression function, and performs the operation of an (r+1)-th step function by applying 16 32- or 64-bit sub extended messages (W_r[0], W_r[1], . . . , W_r[15]).
Furthermore, the compression function computation unit 400 calculates 512-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) by successively connecting finally computed resulting values (i.e., X_26[0], X_26[1], . . . , X_26[15]) at step S500. In this case, the compression function computation unit 400 outputs the computed 512- or 1024-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26 [15]) to the chain variable final conversion unit 500.
Finally, the chain variable final conversion unit 500 updates the 512- or 1024-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) input to the interface unit 100 using the 512- or 1024-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) received from the compression function computation unit 400 and then outputs the updated date at step S600. In this case, the chain variable final conversion unit 500 updates the 512-bit chain variable data (CV=CV[0]∥CV[1]∥ . . . ∥CV[15]) input to the interface unit 100 based on Equation 11, and generates and outputs the updated 512- or 1024-bit chain variable data (CV′=CV′[0]∥CV′[1]∥ . . . ∥CV′[15]).
Referring to
Thereafter, the step function computation unit 400 sets the “r” value to 0, and starts the first computation of an extended message binding function and a step function by using initial sub state data (X_0[0], X_0[1], . . . , X_0[15]) as input values at step S420.
Furthermore, in (r+1)-th computation, the compression function computation unit 400 computes Equation 7 first at step S430, and then computes Equation 8 at step S440. Furthermore, at step S450, the compression function computation unit 400 finally computes the resulting values (X_(r+1)[0], X_(r+1)[1], . . . , X_(r+1)[15]) of a (r+1)-th step function by using the value computed at step S440.
Thereafter, after the computation of the (r+1)-th step function has been performed at steps S430 to S450, the step function computation unit 400 determines whether the “r” value is 25 at step S460.
If, as a result of the determination at step S460, the “r” value is not 25 (i.e., the “r” value is smaller than 25), the compression function computation unit 400 increases the “r” value by 1 at step S470, and repeatedly computes the functions of steps S430 to S450.
In contrast, if, as a result of the determination at step S460, the “r” value is 25, the compression function computation unit 400 finally performs Equation 9 on resulting values (X_25[0], X_25[1], . . . , X_25[15]) output in the computation of a 26th step function and outputs 512- or 1024-bit final state data (X_26=X_26[0]∥X_26[1]∥ . . . ∥X_26[15]) to the chain variable final conversion unit 500 at step S480.
Meanwhile, the method of performing a compression operation in a hash algorithm according to the present invention may be implemented in the form of program instructions that can be executed by various computer means, and may be recorded on a computer-readable recording medium. The computer-readable recording medium may restore program instructions, data files, and data structures solely or in combination. The program instructions recorded on the recording medium may have been specially designed and configured for the present invention, or may be known to or available to those who have ordinary knowledge in the field of computer software. Examples of the computer-readable recording medium include all types of hardware devices specially configured to record and execute program instructions, such as magnetic media, such as a hard disk, a floppy disk, and magnetic tape, optical media, such as CD-ROM and a DVD, magneto-optical media, such as a floptical disk, ROM, RAM, and flash memory. Examples of the program instructions include machine code, such as code created by a compiler, and high-level language code executable by a computer using an interpreter.
The apparatus and method for performing a compression operation in a hash algorithm according to the present invention have the advantages of providing not only a simple message extension algorithm but also a compression operation algorithm configured by combining only bit addition, bit rotation, bit eXclusive-OR (XOR) operators generally used in most central processing units (CPUs), thereby enabling high-speed parallel processing using a 256-bit register and accordingly enabling a CPU to perform a compression operation with small computational load.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible without departing from the scope and spirit of the invention as disclosed in the accompanying claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2013-0088514 | Jul 2013 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
5897662 | Corrigan | Apr 1999 | A |
5992737 | Kubota | Nov 1999 | A |
6258167 | Kawano | Jul 2001 | B1 |
7181009 | Huxel | Feb 2007 | B1 |
8571207 | Nishikawa et al. | Oct 2013 | B2 |
8787563 | Shirai et al. | Jul 2014 | B2 |
20030041242 | Patel | Feb 2003 | A1 |
20060034456 | McGough | Feb 2006 | A1 |
20090319547 | Hollis | Dec 2009 | A1 |
20100135484 | Nishikawa | Jun 2010 | A1 |
20110211688 | Shirai et al. | Sep 2011 | A1 |
20110238636 | Shirai et al. | Sep 2011 | A1 |
20120128151 | Boehm | May 2012 | A1 |
20120257742 | Ebeid | Oct 2012 | A1 |
20130336480 | Hong | Dec 2013 | A1 |
20140355755 | Hong | Dec 2014 | A1 |
Number | Date | Country |
---|---|---|
1 257 084 | Nov 2002 | EP |
2009-159618 | Jul 2009 | JP |
2010-049126 | Mar 2010 | JP |
2010-049127 | Mar 2010 | JP |
2010-128392 | Jun 2010 | JP |
10-0916805 | Sep 2009 | KR |
Entry |
---|
Deukjo Hong et al., “A New Dedicated 256-Bit Hash Function: FORK-256,” FSE 2006, pp. 195-209, 2006. |
Number | Date | Country | |
---|---|---|---|
20150032704 A1 | Jan 2015 | US |