+

WO2013175599A1 - Hash value calculation device, hash value calculation method, and hash value calculation program - Google Patents

Hash value calculation device, hash value calculation method, and hash value calculation program Download PDF

Info

Publication number
WO2013175599A1
WO2013175599A1 PCT/JP2012/063259 JP2012063259W WO2013175599A1 WO 2013175599 A1 WO2013175599 A1 WO 2013175599A1 JP 2012063259 W JP2012063259 W JP 2012063259W WO 2013175599 A1 WO2013175599 A1 WO 2013175599A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
bit length
function
hash
input
Prior art date
Application number
PCT/JP2012/063259
Other languages
French (fr)
Japanese (ja)
Inventor
祐介 内藤
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2012/063259 priority Critical patent/WO2013175599A1/en
Publication of WO2013175599A1 publication Critical patent/WO2013175599A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system

Definitions

  • This invention relates to a technique for calculating a highly secure hash value, for example.
  • Hash function is a function that takes an arbitrary length value as input and outputs a fixed length hash value.
  • Non-Patent Document 1-5 describes a hash function using a replacement function that satisfies the properties of a pseudo-random oracle.
  • the hash functions of Non-Patent Documents 1-4 can freely change the hash length.
  • the hash function of Non-Patent Document 5 cannot change the hash length freely.
  • the replacement function to be used needs to be an idealized replacement function.
  • Non-Patent Documents 1-4 is a replacement function in which the replacement function to be used is idealized.
  • the input / output length is b bits and the message size is r bits, the pseudo-random oracle property is obtained.
  • the safety level is O (2 (br) / 2 ).
  • this hash function is not computationally efficient when a long hash value is required.
  • the hash function described in Non-Patent Document 5 is an idealized replacement function.
  • the input / output length is b bits and the message size is b / 2 bits
  • the pseudo-random oracle property is obtained. Satisfaction and safety level is O (2 b / 6 ).
  • a calculation method when a long hash value is required has not been proposed.
  • a long hash value can be obtained by combining this hash function and the method of Non-Patent Document 6.
  • this hash function has a fixed message size of b / 2 bits and is less secure than the hash functions described in Non-Patent Documents 1-4.
  • An object of the present invention is, for example, to construct a function that can be as secure as the system of Non-Patent Documents 1-4 and is more efficient than the system of Non-Patent Documents 1-4. To do.
  • the hash value calculation device is: a default length value input unit for inputting a value m [1] of r ′ bit length (r ′ is an integer of 1 or more);
  • the function A [1] is calculated by using the fixed value IV1 of r ′ bit length and the value m [1] as input to obtain the value s [1] of r ′ bit length, and the obtained values s [1] and c
  • a leading function calculation unit for calculating a replacement function by inputting a fixed value IV2 of 'bit length (c' is an integer equal to or greater than 1) 'to obtain (r' + c ') bit length value t [1]; With value t [1] as value x [1], value z [1] from value x [1] to r ′′ bit length (r ′′ is an integer of 1 or more) and value x [1] to value z
  • the value y [1] of c ′′ bit length excluding [1] (c ′′ is an
  • the function B [k] is calculated by inputting the value y [k ⁇ 1] and the value y [k ⁇ 1] to obtain the value c′-bit length z ′ [k], and the value z [k] and the value y [k] are input.
  • the hash value calculation device satisfies the properties of the pseudo-random oracle and has the same security as the methods of Non-Patent Documents 1-4 if the replacement function to be used is an idealized replacement function. Can be configured more efficiently than the methods disclosed in Non-Patent Documents 1-4.
  • FIG. 3 is a functional block diagram illustrating functions of the hash value calculation device 10 according to the first embodiment. 3 is a flowchart showing the operation of the hash value calculation apparatus 10 shown in FIG.
  • FIG. 3 is a structural diagram (1) of a hash function realized by the hash value computing device 10 shown in FIG. 1.
  • FIG. 2 is a structural diagram (2) of a hash function realized by the hash value computing device 10 shown in FIG. 1.
  • Embodiment 1 FIG. First, the concept of security of the hash function will be described.
  • a hash function that satisfies the characteristics of a random oracle is an idealized hash function.
  • the hash function H satisfying the characteristics of the random oracle is a hash function to which the following 1 and 2 are given.
  • 1. (List): A list in which pairs of all input values and output values randomly selected for each input value are recorded. 2.
  • (Oracle that outputs a value in the forward direction): Oracle that outputs the value z by searching the output value z for the input value x from the list for the input value x. That is, it is an oracle that outputs a value z such that H (x) z.
  • a hash function that satisfies the properties of a random oracle satisfies the following three properties: “(1) collision difficulty”, “(2) second original image calculation difficulty”, and “(3) original image calculation difficulty”.
  • Definitions of the properties (1) to (3) are as follows.
  • “H” indicates a hash function.
  • “M” and “M ′ ( ⁇ M)” indicate input values of the hash function H.
  • “H (x)” indicates an output (hash value) of the hash function H to which x is input.
  • the properties are as follows: (1) A hash function that satisfies the collision difficulty (2) satisfies the second original image calculation difficulty, and (2) a hash function that satisfies the second original image calculation difficulty There is a relationship that (3) the original image calculation difficulty is satisfied. In addition, (3) a hash function (hash function that does not satisfy the original image calculation difficulty) whose original image calculation difficulty is broken has (1) collision difficulty and (2) second original image calculation difficulty. There is a relationship of not satisfying. That is, a hash function whose original image calculation difficulty has been broken is a function that does not satisfy the properties (1) to (3) that should be satisfied by a secure hash function, and is generally unusable because of its low security.
  • hash function satisfies random oracle properties.
  • hash functions such as SHA-256 (Secure Hash Algorithm-256) are used instead of hash functions satisfying the characteristics of random oracle.
  • H [P] satisfies the properties of pseudo-random oracle
  • H [P] satisfies the properties of (1) collision difficulty, (2) second original image calculation difficulty, and (3) original image calculation difficulty.
  • a cryptographic algorithm that is secure when using a hash function that satisfies the characteristics of a random oracle is guaranteed to be secure even when H [P] is used.
  • the replacement function (P, Pinv) is a set of a forward calculation function P and a backward calculation function Pinv.
  • the forward calculation function P and the backward calculation function Pinv take a predetermined d-bit value as input and output a d-bit value.
  • the idealized replacement function is a replacement function when one replacement function is selected at random from a set of all replacement functions.
  • a hash function using a replacement function will be described in the same manner as the hash function described in Non-Patent Documents 1-5. Similar to the hash functions described in Non-Patent Documents 1-5, the hash function described below satisfies the property of a pseudo-random oracle when the replacement function to be used is an idealized replacement function. However, the hash function described below satisfies the same safety as the hash function described in Non-Patent Document 1-4, and calculates a hash value longer than the hash function described in Non-Patent Document 1-4 at high speed. Is possible.
  • FIG. 1 is a functional block diagram illustrating functions of the hash value calculation device 10 according to the first embodiment.
  • FIG. 2 is a flowchart showing the operation of the hash value calculation apparatus 10 shown in FIG. 3 and 4 are structural diagrams of a hash function realized by the hash value calculation device 10 shown in FIG. FIG. 4 shows the continuation of the processing of FIG.
  • the hash value calculation device 10 shown in FIG. 1 includes an arbitrary length value input unit 11, a padding unit 12, a division unit 13, a predetermined length value input unit 14, a function calculation unit 15, and a hash value calculation unit 16.
  • the function calculation unit 15 includes a head function calculation unit 151, a subsequent function calculation unit 152, and an output function calculation unit 153.
  • the function calculation unit 15 performs the functions A [1],. . . , A [i] and functions B [2],. . . , B [i ′] and the function P.
  • the function A [1] is a function that receives two r′-bit length values (r ′ is an integer of 1 or more) and outputs an r′-bit length value.
  • the function A [1] is, for example, a function that calculates x + y and truncates the bits after the r ′ + 1th bit and outputs an exclusive OR of x and y, where x and y are r′-bit length values. Is a function that calculates and outputs. Functions A [2],. . .
  • a [i] is a function that inputs two r-bit length values (r is an integer of 1 or more) and outputs an r-bit length value.
  • Functions B [2],. . . , B [i ′] is a function that inputs two c ′′ bit length values (c ′′ is an integer of 1 or more) and outputs two c ′′ bit length values. Functions B [2],. . .
  • B [i ′] is, for example, a function that calculates x + y and truncates the bits after c ′′ +1 bits and outputs them when x and y are c ′′ -bit length values, and exclusive of x and y This function calculates and outputs a logical OR.
  • the function P is a forward calculation function in the above-described replacement function, and receives a d-bit length value and outputs a d-bit length value.
  • the arbitrary length value input unit 11 inputs an arbitrary bit length value M by an input device.
  • the padding unit 12 uses the padding function pad to generate the value M * of r ′ + (i ⁇ 1) r bit length for the value M input in (S1) by the processing device.
  • i is an integer of 1 or more.
  • the padding unit 12 generates the value M * so that the last r bits are not all zero.
  • all the last r bits are 0 by this method, at least one bit of the last r bits may be set to 1.
  • the dividing unit 13 cuts r ′ + (i ⁇ 1) r-bit length value M * generated in (S2) by r′-bit from the head and sets the value to m [1]. Further, the dividing unit 13 divides the remaining (i ⁇ 1) r-bit length values into i ⁇ 1 pieces for each r bits in order from the top, and values m [2],. . . , M [i ⁇ 1].
  • the predetermined length value input unit 14 receives the r ′ bit length value m [1] generated by the dividing unit 13 and the i ⁇ 1 values m [2],. . . , And the value m [i].
  • the function calculation step includes three steps from (S51) to (S53).
  • S51: First function calculation step The head function calculation unit 151 calculates the function A [1] with the processing device as input using the fixed value IV1 of r ′ bit length and the value m [1] of r ′ bit length, and the value s of r ′ bit length. [1] is obtained. Then, the head function calculation unit 151 calculates the replacement function P by using the obtained value s [1] and the fixed value IV2 of c ′ bit length as input by the processing device, and (r ′ + c ′) a bit length value. t [1] is obtained.
  • the subsequent function calculation unit 152 divides the value t [j ⁇ 1] into the leading r-bit length value u [j] and the remaining c-bit length value v [j] by the processing device.
  • the succeeding function calculation unit 152 calculates the function A [j] by using the r-bit length value u [j] and the r-bit length value m [j] as inputs by the processing device, and calculates the r-bit length.
  • the value s [j] is obtained.
  • the subsequent function calculation unit 152 calculates the replacement function P by using the value s [j] of the r-bit length and the value v [j] of the c-bit length as input, and (r + c) the value of the bit length. t [j] is obtained.
  • the output function calculation unit 153 sets the value t [i] as the value x [1].
  • the output function calculation unit 153 divides the value x [1] into the leading r ′′ bit length value z [1] and the remaining c ′′ bit length value y [1] by the processing device.
  • the output function calculation unit 153 divides the value x [k] into the first r ′′ bit length value z [k] and the remaining c ′′ bit length value y [k] by the processing device. Next, the output function calculation unit 153 calculates the function B [k] by using the c ′′ bit length value y [k] and the c ′′ bit length value y [k ⁇ 1] as inputs by the processing device. Then, a c ′′ bit length value z ′ [k] is obtained. Then, the output function calculation unit 153 calculates the replacement function P using the value z [k] and the value y [k] as inputs, and (r ′′ + c ′′) the bit length value x [k + 1]. Ask for.
  • the value t [j-1] is divided into the leading r-bit length value u [j] and the remaining c-bit length value v [j].
  • the value u [j] need not be the first r bits of the value t [j-1], but may be an r-bit value extracted from the value t [j-1].
  • the value v [j] may be a value consisting of the remaining c bits obtained by removing the value u [j] from the value t [j-1].
  • the value x [k] is divided into the leading r ′′ bit length value z [k] and the remaining c ′′ bit length value y [k].
  • the value z [k] need not be the first r ′′ bits of the value x [k], but may be a value of r ′′ bits extracted from the value x [k].
  • the value y [k] may be a value composed of the remaining c ′′ bits obtained by removing the value z [k] from the value x [k].
  • the number of repetitions i ′ of the process in S53 is determined by the number of bits necessary as a hash value. That is, the process of S53 may be repeated until the total number of bits of the value z [k] and the value z ′ [k] reaches the number of bits necessary as the hash value.
  • the hash value calculation device 10 described above is configured by, for example, a circuit or software.
  • the processing device in the above description is, for example, an arithmetic circuit
  • the storage device is, for example, a register.
  • the processing device in the above description is, for example, a CPU (Central Processing Unit)
  • the storage device is, for example, a RAM (Random Access Memory).
  • the input device in the above description is, for example, a keyboard or a communication board
  • the output device is a display device such as an LCD (Liquid Crystal Display), a communication board, or a storage device such as a register or RAM.
  • LCD Liquid Crystal Display
  • a storage device such as a register or RAM.
  • the above-described “ ⁇ unit” may be read as “ ⁇ circuit”. Further, the above-described “ ⁇ part” may be read as “ ⁇ processing”, “ ⁇ apparatus”, “ ⁇ apparatus”, “ ⁇ means”, “ ⁇ procedure”, and “ ⁇ function”. That is, what is described as “ ⁇ unit” may be realized by firmware stored in a ROM (Read Only Memory). Alternatively, it may be realized only by software, only hardware such as an element, a device, a board, and wiring, or a combination of software and hardware, or further a combination of firmware.
  • the hash value calculation apparatus 10 processes an r-bit length message in the subsequent process (S52), whereas an r′-bit length message is processed in the head process (S51). To process. For this reason, it is possible to lengthen the message that can be processed in the head process. Further, the hash value calculation device 10 according to the first embodiment calculates a hash value using all the output values of the replacement function in the output process (S53). Therefore, the hash value calculation device 10 according to Embodiment 1 can calculate a hash value at high speed.
  • the reason why c ′ and c ′′ are set to c / 2 or more is that there are two attack methods that break the properties of the pseudo-random oracle, one with a calculation amount of 2 c ′ and one with a calculation amount of 2 c ′′. .
  • the amount of calculation by these attack methods becomes 2 c / 2 and the level of safety becomes O (2 c / 2 ).
  • Hash value calculator 10 hash value calculation device, 11 arbitrary length value input unit, 12 padding unit, 13 division unit, 14 default length value input unit, 15 function calculation unit, 151 head function calculation unit, 152 subsequent function calculation unit, 153 output function calculation unit 16 Hash value calculator.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The purpose of the present invention is to maintain sufficient stability and configure efficient functions. s[1] of r' bit is calculated by using A[1] and having IV1 of r' bit and m[1] as inputs; and t[1] is calculated by using a replacement function (P) and having s[1] and c' bit IV2 as inputs. Using t[1] as x[1], x[1] is divided into z[1] of r'' bit and y[1] of c'' bit, and x[2] is calculated by using the replacement function (P) and having z[1] and y[1] as inputs. From k=2 to i', z'[k] is calculated by using B[k] and having y[k] of c'' bit among x[k] and y[k-1] as inputs, and x[k+1] is calculated by using the replacement function (P) and having z[k] of r'' bit for the remainder of x[k] and y[k] as inputs. z[1] , z[k] for all k, and z'[k] are associated and become the hash values.

Description

ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラムHash value calculation device, hash value calculation method, and hash value calculation program
 この発明は、例えば、安全性の高いハッシュ値を計算する技術に関する。 This invention relates to a technique for calculating a highly secure hash value, for example.
 ハッシュ関数は、任意長の値を入力として、固定長のハッシュ値を出力する関数である。 Hash function is a function that takes an arbitrary length value as input and outputs a fixed length hash value.
 非特許文献1-5には、擬似ランダムオラクルの性質を満たす置換関数を用いたハッシュ関数についての記載がある。非特許文献1-4のハッシュ関数は、ハッシュ長を自由に変えることができる。非特許文献5のハッシュ関数は、ハッシュ長を自由に変えることができない。
 ここで、非特許文献1-5におけるハッシュ関数が擬似ランダムオラクルの性質を満たすためには、用いる置換関数が理想化された置換関数である必要がある。
Non-Patent Document 1-5 describes a hash function using a replacement function that satisfies the properties of a pseudo-random oracle. The hash functions of Non-Patent Documents 1-4 can freely change the hash length. The hash function of Non-Patent Document 5 cannot change the hash length freely.
Here, in order for the hash function in Non-Patent Documents 1-5 to satisfy the properties of a pseudo-random oracle, the replacement function to be used needs to be an idealized replacement function.
 非特許文献1-4に記載されたハッシュ関数は、用いる置換関数が理想化された置換関数であり、その入出力長がbビット、1メッセージサイズがrビットの場合、擬似ランダムオラクルの性質を満たし、安全性レベルがO(2(b-r)/2)である。
 しかし、このハッシュ関数は、長いハッシュ値を必要とする場合、計算効率が悪い。
The hash function described in Non-Patent Documents 1-4 is a replacement function in which the replacement function to be used is idealized. When the input / output length is b bits and the message size is r bits, the pseudo-random oracle property is obtained. And the safety level is O (2 (br) / 2 ).
However, this hash function is not computationally efficient when a long hash value is required.
 非特許文献5に記載されたハッシュ関数は、用いる置換関数が理想化された置換関数であり、その入出力長がbビット、1メッセージサイズがb/2ビットの場合、擬似ランダムオラクルの性質を満たし、安全性のレベルがO(2b/6)である。
 しかし、長いハッシュ値を必要とする場合の計算方法は提案されていない。但し、このハッシュ関数と非特許文献6の方式とを組み合わせると、長いハッシュ値を得ることができるようになる。しかし、この場合、効率が悪くなってしまう。
 また、このハッシュ関数は、1メッセージサイズがb/2ビットと固定されており、非特許文献1-4に記載されたハッシュ関数より安全性が低い。
The hash function described in Non-Patent Document 5 is an idealized replacement function. When the input / output length is b bits and the message size is b / 2 bits, the pseudo-random oracle property is obtained. Satisfaction and safety level is O (2 b / 6 ).
However, a calculation method when a long hash value is required has not been proposed. However, a long hash value can be obtained by combining this hash function and the method of Non-Patent Document 6. However, in this case, the efficiency is deteriorated.
In addition, this hash function has a fixed message size of b / 2 bits and is less secure than the hash functions described in Non-Patent Documents 1-4.
 この発明は、例えば、非特許文献1-4の方式と同等の安全性とすることが可能な関数であって、非特許文献1-4の方式より効率的な関数を構成することを目的とする。 An object of the present invention is, for example, to construct a function that can be as secure as the system of Non-Patent Documents 1-4 and is more efficient than the system of Non-Patent Documents 1-4. To do.
 この発明に係るハッシュ値演算装置は、
 r’ビット長(r’は1以上の整数)の値m[1]を入力する既定長値入力部と、
 r’ビット長の固定値IV1と前記値m[1]とを入力として関数A[1]を計算してr’ビット長の値s[1]を求め、求めた値s[1]とc’ビット長(c’は1以上の整数)の固定値IV2とを入力として置換関数を計算して(r’+c’)ビット長の値t[1]を求める先頭関数計算部と、
 値t[1]を値x[1]として、値x[1]からr’’ビット長(r’’は1以上の整数)の値z[1]と、値x[1]から値z[1]を除いたc’’ビット長(c’’は1以上の整数であり、r’+c’=r’’+c’’)の値y[1]とを切り出して、値z[1]と値y[1]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[2]を求めるとともに、k=2からi’(i’は1以上の整数)まで順に、値x[k]からr’’ビット長の値z[k]を切り出し、値x[k]から値z[k]を除いたc’’ビット長の値y[k]と値y[k-1]とを入力として関数B[k]を計算してc’’ビット長の値z’[k]を求め、値z[k]と値y[k]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[k+1]を求める出力関数計算部と、
 値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合してハッシュ値Zを計算するハッシュ値計算部と
を備えることを特徴とする。
The hash value calculation device according to the present invention is:
a default length value input unit for inputting a value m [1] of r ′ bit length (r ′ is an integer of 1 or more);
The function A [1] is calculated by using the fixed value IV1 of r ′ bit length and the value m [1] as input to obtain the value s [1] of r ′ bit length, and the obtained values s [1] and c A leading function calculation unit for calculating a replacement function by inputting a fixed value IV2 of 'bit length (c' is an integer equal to or greater than 1) 'to obtain (r' + c ') bit length value t [1];
With value t [1] as value x [1], value z [1] from value x [1] to r ″ bit length (r ″ is an integer of 1 or more) and value x [1] to value z The value y [1] of c ″ bit length excluding [1] (c ″ is an integer equal to or greater than 1 and r ′ + c ′ = r ″ + c ″) is cut out and the value z [1 ] And the value y [1] as inputs to calculate a replacement function (r ″ + c ″) to obtain a bit length value x [2], and from k = 2 to i ′ (i ′ is 1 or more) The value z [k] of r ″ bit length is extracted from the value x [k] in order up to an integer), and the value c [bit length y [k] of the value x [k] minus the value z [k] is extracted. The function B [k] is calculated by inputting the value y [k−1] and the value y [k−1] to obtain the value c′-bit length z ′ [k], and the value z [k] and the value y [k] are input. An output function calculation unit for calculating a replacement function to obtain a value x [k + 1] of (r ″ + c ″) bit length;
A hash value calculation unit that calculates a hash value Z by combining the value z [1], the value z [k] from k = 2 to i ′, and the value z ′ [k]. .
 この発明に係るハッシュ値演算装置は、用いる置換関数が理想化された置換関数であれば、擬似ランダムオラクルの性質を満たし、かつ、非特許文献1-4の方式と同等の安全性とすることが可能な関数であって、非特許文献1-4の方式より効率的な関数を構成することができる。 The hash value calculation device according to the present invention satisfies the properties of the pseudo-random oracle and has the same security as the methods of Non-Patent Documents 1-4 if the replacement function to be used is an idealized replacement function. Can be configured more efficiently than the methods disclosed in Non-Patent Documents 1-4.
実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図。FIG. 3 is a functional block diagram illustrating functions of the hash value calculation device 10 according to the first embodiment. 図1に示すハッシュ値演算装置10の動作を示すフローチャート。3 is a flowchart showing the operation of the hash value calculation apparatus 10 shown in FIG. 図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図(1)。FIG. 3 is a structural diagram (1) of a hash function realized by the hash value computing device 10 shown in FIG. 1. 図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図(2)。FIG. 2 is a structural diagram (2) of a hash function realized by the hash value computing device 10 shown in FIG. 1.
 実施の形態1.
 まず、ハッシュ関数の安全性の概念について説明する。
Embodiment 1 FIG.
First, the concept of security of the hash function will be described.
 ランダムオラクルの性質を満たすハッシュ関数は、理想化されたハッシュ関数である。
 ランダムオラクルの性質を満たすハッシュ関数Hとは、以下の1,2が与えられたハッシュ関数である。
1.(リスト):全ての入力値と、各入力値に対してランダムに選択した出力値とのペアを記録したリスト。
2.(順方向の値を出力するオラクル):入力値xに対し、リストから入力値xに対する出力値zを検索して、値zを出力するオラクル。つまり、H(x)=zとなる値zを出力するオラクルである。
A hash function that satisfies the characteristics of a random oracle is an idealized hash function.
The hash function H satisfying the characteristics of the random oracle is a hash function to which the following 1 and 2 are given.
1. (List): A list in which pairs of all input values and output values randomly selected for each input value are recorded.
2. (Oracle that outputs a value in the forward direction): Oracle that outputs the value z by searching the output value z for the input value x from the list for the input value x. That is, it is an oracle that outputs a value z such that H (x) = z.
 ランダムオラクルの性質を満たすハッシュ関数は、「(1)衝突困難性」、「(2)第2原像計算困難性」、「(3)原像計算困難性」の3つの性質を満たす。
 (1)~(3)の各性質の定義は以下の通りである。以下の定義において、「H」は、ハッシュ関数を示す。「M」「M’(≠M)」は、ハッシュ関数Hの入力値を示す。「H(x)」は、xを入力したハッシュ関数Hの出力(ハッシュ値)を示す。
A hash function that satisfies the properties of a random oracle satisfies the following three properties: “(1) collision difficulty”, “(2) second original image calculation difficulty”, and “(3) original image calculation difficulty”.
Definitions of the properties (1) to (3) are as follows. In the following definition, “H” indicates a hash function. “M” and “M ′ (≠ M)” indicate input values of the hash function H. “H (x)” indicates an output (hash value) of the hash function H to which x is input.
(1)衝突困難性を満たすハッシュ関数とは、「H(M)=H(M’)」となる2つの入力値M、M’を見つけることが困難なハッシュ関数である。つまり、衝突困難性とは、ハッシュ値が同じである複数の入力値を求めることが難しいという性質である。
(2)第2原像計算困難性を満たすハッシュ関数とは、ランダムな入力値Mが与えられたとき、「H(M)=H(M’)」を満たす入力値M’を見つけることが困難なハッシュ関数である。つまり、第2原像計算困難性とは、第1の入力値とハッシュ値が同じである第2の入力値を求めることが難しいという性質である。
(3)原像計算困難性を満たすハッシュ関数とは、ランダムな値zが与えられたとき、「z=H(M)」を満たすMを見つけることが困難なハッシュ関数である。つまり、原像計算困難性とは、ハッシュ値に対応する入力値を求めることが難しいという性質である。
(1) A hash function that satisfies the collision difficulty is a hash function in which it is difficult to find two input values M and M ′ that satisfy “H (M) = H (M ′)”. That is, the collision difficulty is a property that it is difficult to obtain a plurality of input values having the same hash value.
(2) A hash function satisfying the second original image calculation difficulty is to find an input value M ′ satisfying “H (M) = H (M ′)” when a random input value M is given. It is a difficult hash function. That is, the second original image calculation difficulty is a property that it is difficult to obtain a second input value having the same hash value as the first input value.
(3) A hash function satisfying the original image calculation difficulty is a hash function in which it is difficult to find M satisfying “z = H (M)” when a random value z is given. That is, the original image calculation difficulty is a property that it is difficult to obtain an input value corresponding to a hash value.
 (1)~(3)各性質には、(1)衝突困難性を満たすハッシュ関数は(2)第2原像計算困難性を満たし、(2)第2原像計算困難性を満たすハッシュ関数は(3)原像計算困難性を満たすという関係がある。
 また、(3)原像計算困難性が破られたハッシュ関数(原像計算困難性を満たさないハッシュ関数)は、(1)衝突困難性、及び、(2)第2原像計算困難性を満たさないという関係がある。つまり、原像計算困難性が破られたハッシュ関数は、安全なハッシュ関数が満たすべき(1)~(3)の性質を満たさない関数であり、安全性が低いため一般的に使い物にならない。
(1) to (3) The properties are as follows: (1) A hash function that satisfies the collision difficulty (2) satisfies the second original image calculation difficulty, and (2) a hash function that satisfies the second original image calculation difficulty There is a relationship that (3) the original image calculation difficulty is satisfied.
In addition, (3) a hash function (hash function that does not satisfy the original image calculation difficulty) whose original image calculation difficulty is broken has (1) collision difficulty and (2) second original image calculation difficulty. There is a relationship of not satisfying. That is, a hash function whose original image calculation difficulty has been broken is a function that does not satisfy the properties (1) to (3) that should be satisfied by a secure hash function, and is generally unusable because of its low security.
 標準的な公開鍵暗号、電子署名アルゴリズムであるRSA-OAEP(RSA-Optimal Asymmetric Encryption Padding)、RSA-KEM(RSA-Key Encapsulation Mechanism)、RSA-PSS(RSA-Probabilistic Signature Scheme)などは、用いられるハッシュ関数がランダムオラクルの性質を満たすと仮定したときに安全なものである。
 しかし、ランダムオラクルの性質を満たすハッシュ関数を実現することは困難であることが知られている。そのため、これらの公開鍵暗号、電子署名アルゴリズムを実現する際は、ランダムオラクルの性質を満たすハッシュ関数に代え、SHA-256(Secure Hash Algorithm-256)などのハッシュ関数を用いて運用されている。
Standard public key cryptography, RSA-OAEP (RSA-Optical Encryption Padding), which is a digital signature algorithm, RSA-KEM (RSA-Key Encapsulation Mechanism), RSA-PSS (RSA-Probabilistic Science), etc. It is safe to assume that the hash function satisfies random oracle properties.
However, it is known that it is difficult to realize a hash function that satisfies the characteristics of a random oracle. Therefore, when implementing these public key cryptography and digital signature algorithms, hash functions such as SHA-256 (Secure Hash Algorithm-256) are used instead of hash functions satisfying the characteristics of random oracle.
 ランダムオラクルの性質を満たさないハッシュ関数を用いて、上述した公開鍵暗号、電子署名アルゴリズムを実現した場合、その安全性が保証されるとは限らない。しかし、その安全性を保証するための概念として、擬似ランダムオラクルという概念が存在する。
 ここで、ハッシュ関数で用いる内部関数をP、Pを用いて構成したハッシュ関数をH[P]とする。H[P]が擬似ランダムオラクルの性質を満たすとは、どんな識別者でも、H[P]とランダムオラクルの性質を満たすハッシュ関数とを識別できないようなPをシミュレートするシミュレータSが存在することである。
When the above-described public key cryptography and electronic signature algorithm are implemented using a hash function that does not satisfy the characteristics of a random oracle, the security is not necessarily guaranteed. However, there is a concept of pseudo-random oracle as a concept for guaranteeing the safety.
Here, an internal function used in the hash function is P, and a hash function configured using P is H [P]. The fact that H [P] satisfies the property of pseudo-random oracle means that there exists a simulator S that simulates P such that any discriminator cannot distinguish H [P] from a hash function that satisfies the property of random oracle. It is.
 H[P]が擬似ランダムオラクルの性質を満たすならば、H[P]は(1)衝突困難性、(2)第2原像計算困難性、(3)原像計算困難性の性質を満たす。そして、ランダムオラクルの性質を満たすハッシュ関数を用いた場合に安全な暗号アルゴリズムは、H[P]を用いた場合にも安全であることが保証される。 If H [P] satisfies the properties of pseudo-random oracle, H [P] satisfies the properties of (1) collision difficulty, (2) second original image calculation difficulty, and (3) original image calculation difficulty. . A cryptographic algorithm that is secure when using a hash function that satisfies the characteristics of a random oracle is guaranteed to be secure even when H [P] is used.
 置換関数(P,Pinv)は、順方向計算関数P、逆方向計算関数Pinvの組である。順方向計算関数Pと逆方向計算関数Pinvとは、所定のdビットの値を入力とし、dビットの値を出力する。
 理想化された置換関数とは、全ての置換関数の集合からランダムに1つ置換関数を選択した場合における置換関数のことである。
The replacement function (P, Pinv) is a set of a forward calculation function P and a backward calculation function Pinv. The forward calculation function P and the backward calculation function Pinv take a predetermined d-bit value as input and output a d-bit value.
The idealized replacement function is a replacement function when one replacement function is selected at random from a set of all replacement functions.
 理想化された置換関数を実現することは困難であることが知られている。そのため、非特許文献1-5に記載されたハッシュ関数等、擬似ランダムオラクルの性質を満たすハッシュ関数を実現する際は、理想化された置換関数の代わりに、加算、シフト、掛け算、テーブル参照などを用いて実現した置換関数を用いることが考えられる。
 この場合、理想化された置換関数を用いていないため、得られたハッシュ関数は、擬似ランダムオラクルの性質を満たすハッシュ関数とはならない。しかし、理想化された置換関数を用いた場合に疑似ランダムオラクルの性質を満たすことが証明されているため、ある程度の安全性があるものと認められる。
It is known that it is difficult to realize an idealized replacement function. Therefore, when realizing a hash function that satisfies the properties of a pseudo-random oracle, such as the hash function described in Non-Patent Document 1-5, instead of an idealized replacement function, addition, shift, multiplication, table reference, etc. It is conceivable to use a permutation function realized using.
In this case, since the idealized replacement function is not used, the obtained hash function does not become a hash function that satisfies the properties of the pseudo-random oracle. However, since it has been proved that the pseudo-random oracle properties are satisfied when an idealized replacement function is used, it is recognized that there is a certain degree of safety.
 以下の説明では、非特許文献1-5に記載されたハッシュ関数と同様に、置換関数を用いたハッシュ関数について説明する。以下で説明するハッシュ関数は、非特許文献1-5に記載されたハッシュ関数と同様に、用いる置換関数が理想化された置換関数の場合、擬似ランダムオラクルの性質を満たす。
 しかし、以下で説明するハッシュ関数では、非特許文献1-4に記載されたハッシュ関数と同等の安全性を満たし、非特許文献1-4に記載されたハッシュ関数より長いハッシュ値を高速に計算可能である。
In the following description, a hash function using a replacement function will be described in the same manner as the hash function described in Non-Patent Documents 1-5. Similar to the hash functions described in Non-Patent Documents 1-5, the hash function described below satisfies the property of a pseudo-random oracle when the replacement function to be used is an idealized replacement function.
However, the hash function described below satisfies the same safety as the hash function described in Non-Patent Document 1-4, and calculates a hash value longer than the hash function described in Non-Patent Document 1-4 at high speed. Is possible.
 図1は、実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図である。
 図2は、図1に示すハッシュ値演算装置10の動作を示すフローチャートである。
 図3,4は、図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図である。なお、図4は図3の処理の続きを示す。
FIG. 1 is a functional block diagram illustrating functions of the hash value calculation device 10 according to the first embodiment.
FIG. 2 is a flowchart showing the operation of the hash value calculation apparatus 10 shown in FIG.
3 and 4 are structural diagrams of a hash function realized by the hash value calculation device 10 shown in FIG. FIG. 4 shows the continuation of the processing of FIG.
 図1に示すハッシュ値演算装置10の機能と動作について、図2-4を用いて説明する。
 図1に示すハッシュ値演算装置10は、任意長値入力部11、パディング部12、分割部13、既定長値入力部14、関数計算部15、ハッシュ値計算部16を備える。関数計算部15は、先頭関数計算部151、後続関数計算部152、出力関数計算部153を備える。
The function and operation of the hash value calculation apparatus 10 shown in FIG. 1 will be described with reference to FIGS.
The hash value calculation device 10 shown in FIG. 1 includes an arbitrary length value input unit 11, a padding unit 12, a division unit 13, a predetermined length value input unit 14, a function calculation unit 15, and a hash value calculation unit 16. The function calculation unit 15 includes a head function calculation unit 151, a subsequent function calculation unit 152, and an output function calculation unit 153.
 なお、関数計算部15は、図3,4に示す関数A[1],...,A[i]と、関数B[2],...,B[i’]と、関数Pとを用いる。
 関数A[1]は、2つのr’ビット長(r’は1以上の整数)の値を入力とし、r’ビット長の値を出力する関数である。関数A[1]は、例えば、x,yをr’ビット長の値とすると、x+yを計算してr’+1ビット目以降は切り捨てて出力する関数や、xとyとの排他的論理和を計算して出力する関数である。
 関数A[2],...,A[i]は、2つのrビット長(rは1以上の整数)の値を入力とし、rビット長の値を出力する関数である。関数A[2],...,A[i]は、例えば、x,yをrビット長の値とすると、x+yを計算してr+1ビット目以降は切り捨てて出力する関数や、xとyとの排他的論理和を計算して出力する関数である。
 関数B[2],...,B[i’]は、2つのc’’ビット長(c’’は1以上の整数)の値を入力とし、2つのc’’ビット長の値を出力する関数である。関数B[2],...,B[i’]は、例えば、x,yをc’’ビット長の値とすると、x+yを計算してc’’+1ビット目以降は切り捨てて出力する関数や、xとyとの排他的論理和を計算して出力する関数である。
 関数Pは、上述した置換関数における順方向計算関数であり、dビット長の値を入力とし、dビット長の値を出力する。なお、以下の説明において、c,c’,r’’は1以上の整数であり、d=r+c=r’+c’=r’’+c’’である。
Note that the function calculation unit 15 performs the functions A [1],. . . , A [i] and functions B [2],. . . , B [i ′] and the function P.
The function A [1] is a function that receives two r′-bit length values (r ′ is an integer of 1 or more) and outputs an r′-bit length value. The function A [1] is, for example, a function that calculates x + y and truncates the bits after the r ′ + 1th bit and outputs an exclusive OR of x and y, where x and y are r′-bit length values. Is a function that calculates and outputs.
Functions A [2],. . . , A [i] is a function that inputs two r-bit length values (r is an integer of 1 or more) and outputs an r-bit length value. Functions A [2],. . . , A [i], for example, if x and y are r-bit length values, calculate x + y and round off the output from the (r + 1) th bit and calculate the exclusive OR of x and y. Function to output.
Functions B [2],. . . , B [i ′] is a function that inputs two c ″ bit length values (c ″ is an integer of 1 or more) and outputs two c ″ bit length values. Functions B [2],. . . , B [i ′] is, for example, a function that calculates x + y and truncates the bits after c ″ +1 bits and outputs them when x and y are c ″ -bit length values, and exclusive of x and y This function calculates and outputs a logical OR.
The function P is a forward calculation function in the above-described replacement function, and receives a d-bit length value and outputs a d-bit length value. In the following description, c, c ′, and r ″ are integers of 1 or more, and d = r + c = r ′ + c ′ = r ″ + c ″.
 (S1:任意長値入力ステップ)
 任意長値入力部11は、入力装置により、任意ビット長の値Mを入力する。
(S1: Arbitrary length input step)
The arbitrary length value input unit 11 inputs an arbitrary bit length value M by an input device.
 (S2:パディングステップ)
 パディング部12は、処理装置により、(S1)で入力された値Mに対して、パディング関数padを用いて、r’+(i-1)rビット長の値M*を生成する。なお、iは1以上の整数である。但し、パディング部12は、最後のrビットが全て0にならないように、値M*を生成する。
 パディング部12は、例えば、値Mの後に1を付加し、その後に0を必要なビット数付加してr’+(i-1)rビット長の値M*とする。つまり、M*=M||1||0,...,0とする。この方法により、最後のrビットが全て0となる場合には、最後のrビットのうちの少なくとも1ビットを1にすればよい。
(S2: Padding step)
The padding unit 12 uses the padding function pad to generate the value M * of r ′ + (i−1) r bit length for the value M input in (S1) by the processing device. Note that i is an integer of 1 or more. However, the padding unit 12 generates the value M * so that the last r bits are not all zero.
For example, the padding unit 12 adds 1 after the value M, and then adds 0 to the required number of bits to obtain a value M * of r ′ + (i−1) r bit length. That is, M * = M || 1 || 0,. . . , 0. When all the last r bits are 0 by this method, at least one bit of the last r bits may be set to 1.
 (S3:分割ステップ)
 分割部13は、処理装置により、(S2)で生成されたr’+(i-1)rビット長の値M*を先頭からr’ビット切り出して値m[1]とする。さらに、分割部13は、処理装置により、残りの(i-1)rビット長の値を先頭から順にrビット毎にi-1個に分割して、先頭から順に値m[2],...,m[i-1]とする。
(S3: Division step)
The dividing unit 13 cuts r ′ + (i−1) r-bit length value M * generated in (S2) by r′-bit from the head and sets the value to m [1]. Further, the dividing unit 13 divides the remaining (i−1) r-bit length values into i−1 pieces for each r bits in order from the top, and values m [2],. . . , M [i−1].
 (S4:既定長値入力ステップ)
 既定長値入力部14は、入力装置により、分割部13が生成したr’ビット長の値m[1]と、rビット長のi-1個の値m[2],...,値m[i]とを入力する。
(S4: Default length input step)
The predetermined length value input unit 14 receives the r ′ bit length value m [1] generated by the dividing unit 13 and the i−1 values m [2],. . . , And the value m [i].
 (S5:関数計算ステップ)
 関数計算ステップは、(S51)から(S53)までの3つのステップを備える。
 (S51:先頭関数計算ステップ)
 先頭関数計算部151は、処理装置により、r’ビット長の固定値IV1とr’ビット長の値m[1]とを入力として関数A[1]を計算してr’ビット長の値s[1]を求める。そして、先頭関数計算部151は、処理装置により、求めた値s[1]とc’ビット長の固定値IV2とを入力として置換関数Pを計算して(r’+c’)ビット長の値t[1]を求める。
(S5: Function calculation step)
The function calculation step includes three steps from (S51) to (S53).
(S51: First function calculation step)
The head function calculation unit 151 calculates the function A [1] with the processing device as input using the fixed value IV1 of r ′ bit length and the value m [1] of r ′ bit length, and the value s of r ′ bit length. [1] is obtained. Then, the head function calculation unit 151 calculates the replacement function P by using the obtained value s [1] and the fixed value IV2 of c ′ bit length as input by the processing device, and (r ′ + c ′) a bit length value. t [1] is obtained.
 (S52:後続関数計算ステップ)
 後続関数計算部152は、j=2からiまで順に、以下の処理を実行する。
 後続関数計算部152は、処理装置により、値t[j-1]を先頭のrビット長の値u[j]と、残りのcビット長の値v[j]とに分割する。次に、後続関数計算部152は、処理装置により、rビット長の値u[j]とrビット長の値m[j]とを入力として関数A[j]を計算してrビット長の値s[j]を求める。そして、後続関数計算部152は、処理装置により、rビット長の値s[j]とcビット長の値v[j]とを入力として置換関数Pを計算して(r+c)ビット長の値t[j]を求める。
(S52: Subsequent function calculation step)
The subsequent function calculation unit 152 executes the following processing in order from j = 2 to i.
The subsequent function calculation unit 152 divides the value t [j−1] into the leading r-bit length value u [j] and the remaining c-bit length value v [j] by the processing device. Next, the succeeding function calculation unit 152 calculates the function A [j] by using the r-bit length value u [j] and the r-bit length value m [j] as inputs by the processing device, and calculates the r-bit length. The value s [j] is obtained. Then, the subsequent function calculation unit 152 calculates the replacement function P by using the value s [j] of the r-bit length and the value v [j] of the c-bit length as input, and (r + c) the value of the bit length. t [j] is obtained.
 (S53:出力関数計算ステップ)
 出力関数計算部153は、値t[i]を値x[1]とする。
 出力関数計算部153は、処理装置により、値x[1]を先頭のr’’ビット長の値z[1]と、残りのc’’ビット長の値y[1]とに分割する。次に、出力関数計算部153は、処理装置により、値z[1]と値y[1]とを入力として置換関数Pを計算して(r’’+c’’)ビット長の値x[2]を求める。
 続いて、出力関数計算部153は、k=2からi’(i’は1以上の整数)まで順に、以下の処理を実行する。
 出力関数計算部153は、処理装置により、値x[k]を先頭のr’’ビット長の値z[k]と、残りのc’’ビット長の値y[k]とに分割する。次に、出力関数計算部153は、処理装置により、c’’ビット長の値y[k]とc’’ビット長の値y[k-1]とを入力として関数B[k]を計算してc’’ビット長の値z’[k]を求める。そして、出力関数計算部153は、処理装置により、値z[k]と値y[k]とを入力として置換関数P計算して(r’’+c’’)ビット長の値x[k+1]を求める。
(S53: Output function calculation step)
The output function calculation unit 153 sets the value t [i] as the value x [1].
The output function calculation unit 153 divides the value x [1] into the leading r ″ bit length value z [1] and the remaining c ″ bit length value y [1] by the processing device. Next, the output function calculation unit 153 calculates the replacement function P by using the value z [1] and the value y [1] as inputs, and (r ″ + c ″) the bit length value x [. 2].
Subsequently, the output function calculation unit 153 executes the following processing in order from k = 2 to i ′ (i ′ is an integer of 1 or more).
The output function calculation unit 153 divides the value x [k] into the first r ″ bit length value z [k] and the remaining c ″ bit length value y [k] by the processing device. Next, the output function calculation unit 153 calculates the function B [k] by using the c ″ bit length value y [k] and the c ″ bit length value y [k−1] as inputs by the processing device. Then, a c ″ bit length value z ′ [k] is obtained. Then, the output function calculation unit 153 calculates the replacement function P using the value z [k] and the value y [k] as inputs, and (r ″ + c ″) the bit length value x [k + 1]. Ask for.
 (S6:ハッシュ値計算ステップ)
 ハッシュ値計算部16は、処理装置により、S53で計算した値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合関数を用いて結合してハッシュ値Zを計算する。
(S6: Hash value calculation step)
The hash value calculation unit 16 combines the value z [1] calculated in S53, the value z [k] from k = 2 to i ′, and the value z ′ [k] using a combination function by the processing device. To calculate the hash value Z.
 なお、上記説明では、S52において、値t[j-1]を先頭のrビット長の値u[j]と、残りのcビット長の値v[j]とに分割した。しかし、値u[j]は、値t[j-1]の先頭のrビットでなくても、値t[j-1]から切り出されたrビットの値であればよい。そして、値v[j]は、値t[j-1]から値u[j]を除いた残りのcビットからなる値であればよい。
 同様に、上記説明では、S53において、値x[k]を先頭のr’’ビット長の値z[k]と、残りのc’’ビット長の値y[k]とに分割した。しかし、値z[k]は、値x[k]の先頭のr’’ビットでなくても、値x[k]から切り出されたr’’ビットの値であればよい。そして、値y[k]は、値x[k]から値z[k]を除いた残りのc’’ビットからなる値であればよい。
In the above description, in S52, the value t [j-1] is divided into the leading r-bit length value u [j] and the remaining c-bit length value v [j]. However, the value u [j] need not be the first r bits of the value t [j-1], but may be an r-bit value extracted from the value t [j-1]. The value v [j] may be a value consisting of the remaining c bits obtained by removing the value u [j] from the value t [j-1].
Similarly, in the above description, in S53, the value x [k] is divided into the leading r ″ bit length value z [k] and the remaining c ″ bit length value y [k]. However, the value z [k] need not be the first r ″ bits of the value x [k], but may be a value of r ″ bits extracted from the value x [k]. The value y [k] may be a value composed of the remaining c ″ bits obtained by removing the value z [k] from the value x [k].
 また、S53における処理の繰り返し回数i’は、ハッシュ値として必要なビット数によって決定される。つまり、値z[k]と値z’[k]との合計ビット数が、ハッシュ値として必要なビット数になるまでS53の処理を繰り返せばよい。 Also, the number of repetitions i ′ of the process in S53 is determined by the number of bits necessary as a hash value. That is, the process of S53 may be repeated until the total number of bits of the value z [k] and the value z ′ [k] reaches the number of bits necessary as the hash value.
 また、上記説明では、iが2以上の場合を想定して説明した。しかし、iが1である場合には、S52は実行されず、S53で値t[1]を値x[1]とする。 In the above description, the case where i is 2 or more has been described. However, when i is 1, S52 is not executed, and the value t [1] is set to the value x [1] in S53.
 以上に説明したハッシュ値演算装置10は、例えば、回路やソフトウェア等で構成される。回路で構成される場合には、上記説明における処理装置は、例えば演算回路であり、記憶装置は、例えばレジスタである。また、ソフトウェアで構成される場合には、上記説明における処理装置は、例えばCPU(Central Processing Unit)であり、記憶装置は、例えばRAM(Random Access Memory)である。また、上記説明における入力装置は、例えばキーボード、通信ボードであり、出力装置は、例えばLCD(Liquid Crystal Display)等の表示装置、通信ボード、レジスタやRAM等の記憶装置である。もちろん、これらに限定されるものではない。
 なお、ハッシュ値演算装置10を回路で構成する場合、上述した「~部」を「~回路」と読み変えてもよい。また、上述した「~部」は、「~処理」、「~装置」、「~機器」、「~手段」、「~手順」、「~機能」と読み替えてもよい。つまり、「~部」として説明するものは、ROM(Read Only Memory)に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、素子・デバイス・基板・配線などのハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実現されても構わない。
The hash value calculation device 10 described above is configured by, for example, a circuit or software. In the case of a circuit, the processing device in the above description is, for example, an arithmetic circuit, and the storage device is, for example, a register. When configured by software, the processing device in the above description is, for example, a CPU (Central Processing Unit), and the storage device is, for example, a RAM (Random Access Memory). The input device in the above description is, for example, a keyboard or a communication board, and the output device is a display device such as an LCD (Liquid Crystal Display), a communication board, or a storage device such as a register or RAM. Of course, it is not limited to these.
When the hash value calculation device 10 is configured by a circuit, the above-described “˜unit” may be read as “˜circuit”. Further, the above-described “˜part” may be read as “˜processing”, “˜apparatus”, “˜apparatus”, “˜means”, “˜procedure”, and “˜function”. That is, what is described as “˜unit” may be realized by firmware stored in a ROM (Read Only Memory). Alternatively, it may be realized only by software, only hardware such as an element, a device, a board, and wiring, or a combination of software and hardware, or further a combination of firmware.
 以上のように、実施の形態1に係るハッシュ値演算装置10は、後続処理(S52)ではrビット長のメッセージを処理するのに対して、先頭処理(S51)ではr’ビット長のメッセージを処理する。そのため、先頭処理で処理可能なメッセージを長くすることが可能である。
 また、実施の形態1に係るハッシュ値演算装置10は、出力処理(S53)における置換関数の出力値を全て用いてハッシュ値を計算する。
 そのため、実施の形態1に係るハッシュ値演算装置10は、高速にハッシュ値を計算することができる。
As described above, the hash value calculation apparatus 10 according to the first embodiment processes an r-bit length message in the subsequent process (S52), whereas an r′-bit length message is processed in the head process (S51). To process. For this reason, it is possible to lengthen the message that can be processed in the head process.
Further, the hash value calculation device 10 according to the first embodiment calculates a hash value using all the output values of the replacement function in the output process (S53).
Therefore, the hash value calculation device 10 according to Embodiment 1 can calculate a hash value at high speed.
 また、c’,c’’をc/2以上にすることにより、実施の形態1に係るハッシュ値演算装置10は、用いる置換関数が理想化されたbビット入出力置換関数であれば、擬似ランダムオラクルの性質を満たし、かつ、安全性のレベルがO(2(b-r)/2)=O(2c/2)となるハッシュ関数を構成することができる。
 c’,c’’をc/2以上にする理由は、擬似ランダムオラクルの性質を破る攻撃法として、計算量が2c’のものや計算量が2c’’のものがあるためである。c’をc/2以上c’’をc/2以上とすることで、これらの攻撃法による計算量が2c/2となり、安全性のレベルがO(2c/2)となる。
In addition, by setting c ′ and c ″ to be c / 2 or more, the hash value calculation apparatus 10 according to Embodiment 1 can simulate the pseudo-bit replacement function if the replacement function to be used is an idealized b-bit input / output replacement function. It is possible to construct a hash function that satisfies the characteristics of a random oracle and has a security level of O (2 (br) / 2 ) = O ( 2c / 2 ).
The reason why c ′ and c ″ are set to c / 2 or more is that there are two attack methods that break the properties of the pseudo-random oracle, one with a calculation amount of 2 c ′ and one with a calculation amount of 2 c ″. . By setting c ′ to c / 2 or more and c ″ to c / 2 or more, the amount of calculation by these attack methods becomes 2 c / 2 and the level of safety becomes O (2 c / 2 ).
 10 ハッシュ値演算装置、11 任意長値入力部、12 パディング部、13 分割部、14 既定長値入力部、15 関数計算部、151 先頭関数計算部、152 後続関数計算部、153 出力関数計算部、16 ハッシュ値計算部。 10 hash value calculation device, 11 arbitrary length value input unit, 12 padding unit, 13 division unit, 14 default length value input unit, 15 function calculation unit, 151 head function calculation unit, 152 subsequent function calculation unit, 153 output function calculation unit 16 Hash value calculator.

Claims (8)

  1.  r’ビット長(r’は1以上の整数)の値m[1]を入力する既定長値入力部と、
     r’ビット長の固定値IV1と前記値m[1]とを入力として関数A[1]を計算してr’ビット長の値s[1]を求め、求めた値s[1]とc’ビット長(c’は1以上の整数)の固定値IV2とを入力として置換関数を計算して(r’+c’)ビット長の値t[1]を求める先頭関数計算部と、
     値t[1]を値x[1]として、値x[1]からr’’ビット長(r’’は1以上の整数)の値z[1]と、値x[1]から値z[1]を除いたc’’ビット長(c’’は1以上の整数であり、r’+c’=r’’+c’’)の値y[1]とを切り出して、値z[1]と値y[1]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[2]を求めるとともに、k=2からi’(i’は1以上の整数)まで順に、値x[k]からr’’ビット長の値z[k]を切り出し、値x[k]から値z[k]を除いたc’’ビット長の値y[k]と値y[k-1]とを入力として関数B[k]を計算してc’’ビット長の値z’[k]を求め、値z[k]と値y[k]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[k+1]を求める出力関数計算部と、
     値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合してハッシュ値Zを計算するハッシュ値計算部と
    を備えることを特徴とするハッシュ値演算装置。
    a default length value input unit for inputting a value m [1] of r ′ bit length (r ′ is an integer of 1 or more);
    The function A [1] is calculated by using the fixed value IV1 of r ′ bit length and the value m [1] as input to obtain the value s [1] of r ′ bit length, and the obtained values s [1] and c A leading function calculation unit for calculating a replacement function by inputting a fixed value IV2 of 'bit length (c' is an integer equal to or greater than 1) 'to obtain (r' + c ') bit length value t [1];
    With value t [1] as value x [1], value z [1] from value x [1] to r ″ bit length (r ″ is an integer of 1 or more) and value x [1] to value z The value y [1] of c ″ bit length excluding [1] (c ″ is an integer equal to or greater than 1 and r ′ + c ′ = r ″ + c ″) is cut out and the value z [1 ] And the value y [1] as inputs to calculate a replacement function (r ″ + c ″) to obtain a bit length value x [2], and from k = 2 to i ′ (i ′ is 1 or more) The value z [k] of r ″ bit length is extracted from the value x [k] in order up to an integer), and the value c [bit length y [k] of the value x [k] minus the value z [k] is extracted. The function B [k] is calculated by inputting the value y [k−1] and the value y [k−1] to obtain the value c′-bit length z ′ [k], and the value z [k] and the value y [k] are input. An output function calculation unit for calculating a replacement function to obtain a value x [k + 1] of (r ″ + c ″) bit length;
    A hash value calculation unit that calculates a hash value Z by combining the value z [1], the value z [k] from k = 2 to i ′, and the value z ′ [k]. Hash value arithmetic unit.
  2.  前記既定長値入力部は、さらに、(i-1)個(iは2以上の整数)のrビット長(rは1以上の整数)の値m[2],...,値m[i]を入力し、
     前記ハッシュ値演算装置は、さらに、
     j=2からiまで順に、値t[j-1]からrビット長の値u[j]を切り出し、値u[j]と値m[j]とを入力として関数A[j]を計算してrビット長の値s[j]を求め、求めた値s[j]と値t[j-1]から値u[j]を除いたcビット長(cは1以上の整数であり、r+c=r’+c’=r’’+c’’)の値v[j]とを入力として置換関数を計算して(r+c)ビット長の値t[j]を求める後続関数計算部
    を備え、
     前記出力関数計算部は、前記値m[2],...,値m[i]が入力された場合には、値t[i]を値x[1]とする
    ことを特徴とする請求項1に記載のハッシュ値演算装置。
    The predetermined length value input unit further includes (i−1) (i is an integer of 2 or more) r bit length (r is an integer of 1 or more) values m [2],. . . , Enter the value m [i],
    The hash value calculation device further includes:
    In order from j = 2 to i, a value u [j] of r-bit length is extracted from the value t [j−1], and the function A [j] is calculated by using the value u [j] and the value m [j] as inputs. Then, an r-bit length value s [j] is obtained, and the obtained value s [j] and the value t [j−1] minus the value u [j] (c is an integer of 1 or more) , R + c = r ′ + c ′ = r ″ + c ″) as input and a substitution function is calculated to obtain a (r + c) bit length value t [j]. ,
    The output function calculation unit is configured to output the values m [2],. . . , M [i] is input, the value t [i] is set to the value x [1].
  3.  前記ハッシュ値演算装置は、さらに、
     任意ビット長の値Mを入力する任意長値入力部と、
     前記任意長値入力部が入力した値Mに対して、所定の値を付加して(r’+(i-1)×r)ビット長の値M’を生成するパディング部と、
     前記パディング部が生成した値M’を分割して、値m[1]と、値m[2],...,値m[i]を生成する分割部と
    を備え、
     前記既定長値入力部は、前記分割部が生成した値m[1]と、値m[2],...,値m[i]を入力する
    ことを特徴とする請求項2に記載のハッシュ値演算装置。
    The hash value calculation device further includes:
    An arbitrary length value input unit for inputting an arbitrary bit length value M;
    A padding unit that adds a predetermined value to the value M input by the arbitrary length value input unit to generate a value M ′ of (r ′ + (i−1) × r) bit length;
    The value M ′ generated by the padding unit is divided into a value m [1], a value m [2],. . . , A dividing unit that generates a value m [i],
    The predetermined length value input unit includes a value m [1] generated by the dividing unit, a value m [2],. . . , The value m [i] is input.
  4.  前記関数A[1],...,A[i]と、前記関数B[1],...,[i’]とは、2つの入力値の和を計算し、不要なビットを切り捨てて出力する関数、あるいは、2つの入力値の排他的論理和を計算して出力する関数のいずれかである
    ことを特徴とする請求項2又は3に記載のハッシュ値演算装置。
    The functions A [1],. . . , A [i] and the functions B [1],. . . , [I ′] is either a function that calculates the sum of two input values, truncates unnecessary bits and outputs, or a function that calculates and outputs an exclusive OR of two input values The hash value calculation device according to claim 2, wherein the hash value calculation device is provided.
  5.  前記ハッシュ値計算部は、値z[1]と、k=2からi’までの値z[k]と値z’[k]とを順に結合してハッシュ値Zを計算する
    ことを特徴とする請求項1から4までのいずれかに記載のハッシュ値演算装置。
    The hash value calculation unit calculates a hash value Z by sequentially combining a value z [1], a value z [k] from k = 2 to i ′, and a value z ′ [k]. The hash value computing device according to any one of claims 1 to 4.
  6.  前記c’及び前記c’’は、c/2以上の整数である
    ことを特徴とする請求項2に記載のハッシュ演算装置。
    3. The hash calculation apparatus according to claim 2, wherein the c ′ and the c ″ are integers equal to or greater than c / 2.
  7.  入力装置が、r’ビット長(r’は1以上の整数)の値m[1]を入力し、
     処理装置が、r’ビット長の固定値IV1と前記値m[1]とを入力として関数A[1]を計算してr’ビット長の値s[1]を求め、求めた値s[1]とc’ビット長(c’は1以上の整数)の固定値IV2とを入力として置換関数を計算して(r’+c’)ビット長の値t[1]を求め、
     処理装置が、値t[1]を値x[1]として、値x[1]からr’’ビット長(r’’は1以上の整数)の値z[1]と、値x[1]から値z[1]を除いたc’’ビット長(c’’は1以上の整数であり、r’+c’=r’’+c’’)の値y[1]とを切り出して、値z[1]と値y[1]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[2]を求めるとともに、k=2からi’(i’は1以上の整数)まで順に、値x[k]からr’’ビット長の値z[k]を切り出し、値x[k]から値z[k]を除いたc’’ビット長の値y[k]と値y[k-1]とを入力として関数B[k]を計算してc’’ビット長の値z’[k]を求め、値z[k]と値y[k]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[k+1]を求め、
     処理装置が、値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合してハッシュ値Zを計算する
    ことを特徴とするハッシュ値演算方法。
    The input device inputs a value m [1] of r ′ bit length (r ′ is an integer of 1 or more),
    The processing device calculates the function A [1] by using the fixed value IV1 of r ′ bit length and the value m [1] as inputs to obtain the value s [1] of r ′ bit length, and the obtained value s [ 1] and a fixed value IV2 of c ′ bit length (c ′ is an integer equal to or greater than 1) as inputs, calculate a replacement function to obtain a value t [1] of (r ′ + c ′) bit length,
    The processing device sets the value t [1] as the value x [1], the value z [1] from the value x [1] to r ″ bit length (r ″ is an integer of 1 or more), and the value x [1 ], The value y [1] of c ″ bit length (c ″ is an integer equal to or greater than 1 and r ′ + c ′ = r ″ + c ″) obtained by removing the value z [1], The permutation function is calculated with the value z [1] and the value y [1] as inputs to obtain the value ([r ″ + c ″) bit length value x [2], and from k = 2 to i ′ (i ′ Is an integer greater than or equal to 1), in order, the value z [k] of r ″ bit length is extracted from the value x [k], and the value of c ″ bit length is obtained by removing the value z [k] from the value x [k]. The function B [k] is calculated by taking y [k] and the value y [k−1] as inputs to obtain a c ″ -bit length value z ′ [k], and the value z [k] and the value y [k] ] As an input to calculate a replacement function (r ″ + c ″) to obtain a bit length value x [k + 1],
    A hash value calculation, wherein the processing device calculates a hash value Z by combining a value z [1], a value z [k] from k = 2 to i ′, and a value z ′ [k]. Method.
  8.  r’ビット長(r’は1以上の整数)の値m[1]を入力する既定長値入力処理と、
     r’ビット長の固定値IV1と前記値m[1]とを入力として関数A[1]を計算してr’ビット長の値s[1]を求め、求めた値s[1]とc’ビット長(c’は1以上の整数)の固定値IV2とを入力として置換関数を計算して(r’+c’)ビット長の値t[1]を求める先頭関数計算処理と、
     値t[1]を値x[1]として、値x[1]からr’’ビット長(r’’は1以上の整数)の値z[1]と、値x[1]から値z[1]を除いたc’’ビット長(c’’は1以上の整数であり、r’+c’=r’’+c’’)の値y[1]とを切り出して、値z[1]と値y[1]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[2]を求めるとともに、k=2からi’(i’は1以上の整数)まで順に、値x[k]からr’’ビット長の値z[k]を切り出し、値x[k]から値z[k]を除いたc’’ビット長の値y[k]と値y[k-1]とを入力として関数B[k]を計算してc’’ビット長の値z’[k]を求め、値z[k]と値y[k]とを入力として置換関数を計算して(r’’+c’’)ビット長の値x[k+1]を求める出力関数計算処理と、
     値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合してハッシュ値Zを計算するハッシュ値計算処理と
    をコンピュータに実行させることを特徴とするハッシュ値演算プログラム。
    a predetermined length value input process for inputting a value m [1] of r ′ bit length (r ′ is an integer of 1 or more);
    The function A [1] is calculated by using the fixed value IV1 of r ′ bit length and the value m [1] as input to obtain the value s [1] of r ′ bit length, and the obtained values s [1] and c A head function calculation process for calculating a replacement function by inputting a fixed value IV2 of 'bit length (c' is an integer of 1 or more) and obtaining (r '+ c') bit length value t [1];
    With value t [1] as value x [1], value z [1] from value x [1] to r ″ bit length (r ″ is an integer of 1 or more) and value x [1] to value z The value y [1] of c ″ bit length excluding [1] (c ″ is an integer equal to or greater than 1 and r ′ + c ′ = r ″ + c ″) is cut out and the value z [1 ] And the value y [1] as inputs to calculate a replacement function (r ″ + c ″) to obtain a bit length value x [2], and from k = 2 to i ′ (i ′ is 1 or more) The value z [k] of r ″ bit length is extracted from the value x [k] in order up to an integer), and the value c [bit length y [k] of the value x [k] minus the value z [k] is extracted. The function B [k] is calculated by inputting the value y [k−1] and the value y [k−1] to obtain the value c′-bit length z ′ [k], and the value z [k] and the value y [k] are input. An output function calculation process for calculating a replacement function to obtain a value x [k + 1] of (r ″ + c ″) bit length;
    Causing the computer to execute a value z [1], a hash value calculation process for calculating the hash value Z by combining the value z [k] and the value z ′ [k] from k = 2 to i ′. A hash value calculation program.
PCT/JP2012/063259 2012-05-24 2012-05-24 Hash value calculation device, hash value calculation method, and hash value calculation program WO2013175599A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/063259 WO2013175599A1 (en) 2012-05-24 2012-05-24 Hash value calculation device, hash value calculation method, and hash value calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/063259 WO2013175599A1 (en) 2012-05-24 2012-05-24 Hash value calculation device, hash value calculation method, and hash value calculation program

Publications (1)

Publication Number Publication Date
WO2013175599A1 true WO2013175599A1 (en) 2013-11-28

Family

ID=49623330

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/063259 WO2013175599A1 (en) 2012-05-24 2012-05-24 Hash value calculation device, hash value calculation method, and hash value calculation program

Country Status (1)

Country Link
WO (1) WO2013175599A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068436A (en) * 2010-09-24 2012-04-05 Mitsubishi Electric Corp Hash value arithmetic device, hash value arithmetic method and hash value arithmetic program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068436A (en) * 2010-09-24 2012-04-05 Mitsubishi Electric Corp Hash value arithmetic device, hash value arithmetic method and hash value arithmetic program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BERTONI, G. ET AL.: "The KECCAK SHA-3 submission", 14 January 2011 (2011-01-14), Retrieved from the Internet <URL:http://keccak.noekeon.org/Keccak-submission-3.pdf> [retrieved on 20120606] *
CANNIERE, C.D. ET AL.: "Hash Function Luffa Specification Ver. 2.0.1", 2 October 2009 (2009-10-02), Retrieved from the Internet <URL:http://www.hitachi.com/rd/yrl/crypto/luffa/Luffa_v2_Specification20091002.pdf> [retrieved on 20120606] *
GUO, J. ET AL.: "The PHOTON Family of Lightweight Hash Functions", CRYPTOLOGY EPRINT ARCHIVE, 15 November 2011 (2011-11-15), Retrieved from the Internet <URL:http://eprint.iacr.org/2011/609> [retrieved on 20120606] *

Similar Documents

Publication Publication Date Title
JP6575532B2 (en) Encryption device, decryption device, encryption processing system, encryption method, decryption method, encryption program, and decryption program
US11385893B2 (en) Method secured against side-channel attacks performing an arithmetic operation of a cryptographic algorithm mixing Boolean and arithmetic operations
JPWO2013065241A1 (en) Incremental MAC tag generation device, method and program, and message authentication device
US20200160755A1 (en) Encryption device, encryption method, decryption device, and decryption method
US20130243191A1 (en) Encryption key generating apparatus
US9515830B2 (en) Universal hash function computing device, method and program
JP5528281B2 (en) Hash value arithmetic unit
WO2016034912A1 (en) Method and apparatus for scalar multiplication secure against differential power attacks
US20120069998A1 (en) Encryption device
WO2016132506A1 (en) Pseudorandom number generation device and pseudorandom number generation program
CN109981250B (en) SM4 encryption and key expansion method, device, equipment and medium
JP5901783B2 (en) Hash value calculation device and hash value calculation method
WO2013175599A1 (en) Hash value calculation device, hash value calculation method, and hash value calculation program
JP6033504B1 (en) Message authenticator generator
JP2009188794A (en) Message authenticator generating device, message authenticator verifying device, message authenticator generating method, message authenticator verifying method, program, and recording medium
JP2016503195A5 (en)
JP4914329B2 (en) Message authenticator generation device, message authenticator verification device, message authenticator generation method, message authenticator verification method, program, and recording medium
JP2012014077A (en) Hash value calculation device, hash value calculation method, and hash value calculation program
JP6305643B2 (en) Message authenticator generating apparatus, message authenticator generating method, and message authenticator generating program
WO2018154642A1 (en) Message authenticator generation device
EP4373030A1 (en) Method for calculating using an one-way function effienct in a zero knowledge proof, and apparatus implementing the same method
JP5449063B2 (en) Rijndael type 192-bit block encryption apparatus, method, and program thereof
WO2023053458A1 (en) Hash value calculation device, hash value calculation method, and hash value calculation program
JP6257464B2 (en) Hash value calculator
JP6371197B2 (en) Cryptographic processing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12877469

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12877469

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载