+

WO2013175599A1 - ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム - Google Patents

ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム 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
English (en)
French (fr)
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/ja
Publication of WO2013175599A1 publication Critical patent/WO2013175599A1/ja

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

 十分な安全性を持ちつつ、効率的な関数を構成することを目的とする。r'ビットのIV1とm[1]とを入力としてA[1]によりr'ビットのs[1]が計算され、s[1]とc'ビットIV2とを入力として置換関数Pによりt[1]が計算される。t[1]をx[1]として、x[1]がr''ビットのz[1]とc''ビットのy[1]とに分割され、z[1]とy[1]とを入力として置換関数Pによりx[2]が計算される。k=2からi'まで、x[k]のうちのc''ビットのy[k]とy[k-1]とを入力としてB[k]によりz'[k]が計算され、x[k]の残りのr''ビットのz[k]とy[k]とを入力として置換関数Pによりx[k+1]が計算される。z[1]と全てのkについてのz[k]とz'[k]とが結合されハッシュ値となる。

Description

ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム
 この発明は、例えば、安全性の高いハッシュ値を計算する技術に関する。
 ハッシュ関数は、任意長の値を入力として、固定長のハッシュ値を出力する関数である。
 非特許文献1-5には、擬似ランダムオラクルの性質を満たす置換関数を用いたハッシュ関数についての記載がある。非特許文献1-4のハッシュ関数は、ハッシュ長を自由に変えることができる。非特許文献5のハッシュ関数は、ハッシュ長を自由に変えることができない。
 ここで、非特許文献1-5におけるハッシュ関数が擬似ランダムオラクルの性質を満たすためには、用いる置換関数が理想化された置換関数である必要がある。
Guido Bertoni, Joan Daemen, Michael Peeters and Gilles Van Assche, On the Indifferentiability of the Sponge Construction, EUROCRYT 2008, LNCS 4965, pp181-197 G. Bertoni, J. Daemen, M. Peeters and G. Van Assche, Sponge Functions, Ecrypt Hash Workshop 2007 Guido Bertoni, Joan Daemen, Michael Peeters and Gilles Van Assche, The Keccak SHA-3 submission, Submission to NIST (Round 3), 2011. Elena Andreeva, Bart Mennink and Bart Preneel, "The Parazoa Family: Generalizing the Sponge Hash Functions", Eprint report: 028/2010. Hongjun Wu - The Hash Function JH, Submission to NIST (round 3), 2011 Victor Shoup. A Proposal for an ISO Standard for Public Key Encryption (version 2.1). 2001.
 非特許文献1-4に記載されたハッシュ関数は、用いる置換関数が理想化された置換関数であり、その入出力長がbビット、1メッセージサイズがrビットの場合、擬似ランダムオラクルの性質を満たし、安全性レベルがO(2(b-r)/2)である。
 しかし、このハッシュ関数は、長いハッシュ値を必要とする場合、計算効率が悪い。
 非特許文献5に記載されたハッシュ関数は、用いる置換関数が理想化された置換関数であり、その入出力長がbビット、1メッセージサイズがb/2ビットの場合、擬似ランダムオラクルの性質を満たし、安全性のレベルがO(2b/6)である。
 しかし、長いハッシュ値を必要とする場合の計算方法は提案されていない。但し、このハッシュ関数と非特許文献6の方式とを組み合わせると、長いハッシュ値を得ることができるようになる。しかし、この場合、効率が悪くなってしまう。
 また、このハッシュ関数は、1メッセージサイズがb/2ビットと固定されており、非特許文献1-4に記載されたハッシュ関数より安全性が低い。
 この発明は、例えば、非特許文献1-4の方式と同等の安全性とすることが可能な関数であって、非特許文献1-4の方式より効率的な関数を構成することを目的とする。
 この発明に係るハッシュ値演算装置は、
 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を計算するハッシュ値計算部と
を備えることを特徴とする。
 この発明に係るハッシュ値演算装置は、用いる置換関数が理想化された置換関数であれば、擬似ランダムオラクルの性質を満たし、かつ、非特許文献1-4の方式と同等の安全性とすることが可能な関数であって、非特許文献1-4の方式より効率的な関数を構成することができる。
実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図。 図1に示すハッシュ値演算装置10の動作を示すフローチャート。 図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図(1)。 図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図(2)。
 実施の形態1.
 まず、ハッシュ関数の安全性の概念について説明する。
 ランダムオラクルの性質を満たすハッシュ関数は、理想化されたハッシュ関数である。
 ランダムオラクルの性質を満たすハッシュ関数Hとは、以下の1,2が与えられたハッシュ関数である。
1.(リスト):全ての入力値と、各入力値に対してランダムに選択した出力値とのペアを記録したリスト。
2.(順方向の値を出力するオラクル):入力値xに対し、リストから入力値xに対する出力値zを検索して、値zを出力するオラクル。つまり、H(x)=zとなる値zを出力するオラクルである。
 ランダムオラクルの性質を満たすハッシュ関数は、「(1)衝突困難性」、「(2)第2原像計算困難性」、「(3)原像計算困難性」の3つの性質を満たす。
 (1)~(3)の各性質の定義は以下の通りである。以下の定義において、「H」は、ハッシュ関数を示す。「M」「M’(≠M)」は、ハッシュ関数Hの入力値を示す。「H(x)」は、xを入力したハッシュ関数Hの出力(ハッシュ値)を示す。
(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)~(3)各性質には、(1)衝突困難性を満たすハッシュ関数は(2)第2原像計算困難性を満たし、(2)第2原像計算困難性を満たすハッシュ関数は(3)原像計算困難性を満たすという関係がある。
 また、(3)原像計算困難性が破られたハッシュ関数(原像計算困難性を満たさないハッシュ関数)は、(1)衝突困難性、及び、(2)第2原像計算困難性を満たさないという関係がある。つまり、原像計算困難性が破られたハッシュ関数は、安全なハッシュ関数が満たすべき(1)~(3)の性質を満たさない関数であり、安全性が低いため一般的に使い物にならない。
 標準的な公開鍵暗号、電子署名アルゴリズムである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)などのハッシュ関数を用いて運用されている。
 ランダムオラクルの性質を満たさないハッシュ関数を用いて、上述した公開鍵暗号、電子署名アルゴリズムを実現した場合、その安全性が保証されるとは限らない。しかし、その安全性を保証するための概念として、擬似ランダムオラクルという概念が存在する。
 ここで、ハッシュ関数で用いる内部関数をP、Pを用いて構成したハッシュ関数をH[P]とする。H[P]が擬似ランダムオラクルの性質を満たすとは、どんな識別者でも、H[P]とランダムオラクルの性質を満たすハッシュ関数とを識別できないようなPをシミュレートするシミュレータSが存在することである。
 H[P]が擬似ランダムオラクルの性質を満たすならば、H[P]は(1)衝突困難性、(2)第2原像計算困難性、(3)原像計算困難性の性質を満たす。そして、ランダムオラクルの性質を満たすハッシュ関数を用いた場合に安全な暗号アルゴリズムは、H[P]を用いた場合にも安全であることが保証される。
 置換関数(P,Pinv)は、順方向計算関数P、逆方向計算関数Pinvの組である。順方向計算関数Pと逆方向計算関数Pinvとは、所定のdビットの値を入力とし、dビットの値を出力する。
 理想化された置換関数とは、全ての置換関数の集合からランダムに1つ置換関数を選択した場合における置換関数のことである。
 理想化された置換関数を実現することは困難であることが知られている。そのため、非特許文献1-5に記載されたハッシュ関数等、擬似ランダムオラクルの性質を満たすハッシュ関数を実現する際は、理想化された置換関数の代わりに、加算、シフト、掛け算、テーブル参照などを用いて実現した置換関数を用いることが考えられる。
 この場合、理想化された置換関数を用いていないため、得られたハッシュ関数は、擬似ランダムオラクルの性質を満たすハッシュ関数とはならない。しかし、理想化された置換関数を用いた場合に疑似ランダムオラクルの性質を満たすことが証明されているため、ある程度の安全性があるものと認められる。
 以下の説明では、非特許文献1-5に記載されたハッシュ関数と同様に、置換関数を用いたハッシュ関数について説明する。以下で説明するハッシュ関数は、非特許文献1-5に記載されたハッシュ関数と同様に、用いる置換関数が理想化された置換関数の場合、擬似ランダムオラクルの性質を満たす。
 しかし、以下で説明するハッシュ関数では、非特許文献1-4に記載されたハッシュ関数と同等の安全性を満たし、非特許文献1-4に記載されたハッシュ関数より長いハッシュ値を高速に計算可能である。
 図1は、実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図である。
 図2は、図1に示すハッシュ値演算装置10の動作を示すフローチャートである。
 図3,4は、図1に示すハッシュ値演算装置10により実現されるハッシュ関数の構造図である。なお、図4は図3の処理の続きを示す。
 図1に示すハッシュ値演算装置10の機能と動作について、図2-4を用いて説明する。
 図1に示すハッシュ値演算装置10は、任意長値入力部11、パディング部12、分割部13、既定長値入力部14、関数計算部15、ハッシュ値計算部16を備える。関数計算部15は、先頭関数計算部151、後続関数計算部152、出力関数計算部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’’である。
 (S1:任意長値入力ステップ)
 任意長値入力部11は、入力装置により、任意ビット長の値Mを入力する。
 (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にすればよい。
 (S3:分割ステップ)
 分割部13は、処理装置により、(S2)で生成されたr’+(i-1)rビット長の値M*を先頭からr’ビット切り出して値m[1]とする。さらに、分割部13は、処理装置により、残りの(i-1)rビット長の値を先頭から順にrビット毎にi-1個に分割して、先頭から順に値m[2],...,m[i-1]とする。
 (S4:既定長値入力ステップ)
 既定長値入力部14は、入力装置により、分割部13が生成したr’ビット長の値m[1]と、rビット長のi-1個の値m[2],...,値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]を求める。
 (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]を求める。
 (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]を求める。
 (S6:ハッシュ値計算ステップ)
 ハッシュ値計算部16は、処理装置により、S53で計算した値z[1]と、k=2からi’までの値z[k]と値z’[k]とを結合関数を用いて結合してハッシュ値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’’ビットからなる値であればよい。
 また、S53における処理の繰り返し回数i’は、ハッシュ値として必要なビット数によって決定される。つまり、値z[k]と値z’[k]との合計ビット数が、ハッシュ値として必要なビット数になるまでS53の処理を繰り返せばよい。
 また、上記説明では、iが2以上の場合を想定して説明した。しかし、iが1である場合には、S52は実行されず、S53で値t[1]を値x[1]とする。
 以上に説明したハッシュ値演算装置10は、例えば、回路やソフトウェア等で構成される。回路で構成される場合には、上記説明における処理装置は、例えば演算回路であり、記憶装置は、例えばレジスタである。また、ソフトウェアで構成される場合には、上記説明における処理装置は、例えばCPU(Central Processing Unit)であり、記憶装置は、例えばRAM(Random Access Memory)である。また、上記説明における入力装置は、例えばキーボード、通信ボードであり、出力装置は、例えばLCD(Liquid Crystal Display)等の表示装置、通信ボード、レジスタやRAM等の記憶装置である。もちろん、これらに限定されるものではない。
 なお、ハッシュ値演算装置10を回路で構成する場合、上述した「~部」を「~回路」と読み変えてもよい。また、上述した「~部」は、「~処理」、「~装置」、「~機器」、「~手段」、「~手順」、「~機能」と読み替えてもよい。つまり、「~部」として説明するものは、ROM(Read Only Memory)に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、素子・デバイス・基板・配線などのハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実現されても構わない。
 以上のように、実施の形態1に係るハッシュ値演算装置10は、後続処理(S52)ではrビット長のメッセージを処理するのに対して、先頭処理(S51)ではr’ビット長のメッセージを処理する。そのため、先頭処理で処理可能なメッセージを長くすることが可能である。
 また、実施の形態1に係るハッシュ値演算装置10は、出力処理(S53)における置換関数の出力値を全て用いてハッシュ値を計算する。
 そのため、実施の形態1に係るハッシュ値演算装置10は、高速にハッシュ値を計算することができる。
 また、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)となる。
 10 ハッシュ値演算装置、11 任意長値入力部、12 パディング部、13 分割部、14 既定長値入力部、15 関数計算部、151 先頭関数計算部、152 後続関数計算部、153 出力関数計算部、16 ハッシュ値計算部。

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を計算するハッシュ値計算部と
    を備えることを特徴とするハッシュ値演算装置。
  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に記載のハッシュ値演算装置。
  3.  前記ハッシュ値演算装置は、さらに、
     任意ビット長の値Mを入力する任意長値入力部と、
     前記任意長値入力部が入力した値Mに対して、所定の値を付加して(r’+(i-1)×r)ビット長の値M’を生成するパディング部と、
     前記パディング部が生成した値M’を分割して、値m[1]と、値m[2],...,値m[i]を生成する分割部と
    を備え、
     前記既定長値入力部は、前記分割部が生成した値m[1]と、値m[2],...,値m[i]を入力する
    ことを特徴とする請求項2に記載のハッシュ値演算装置。
  4.  前記関数A[1],...,A[i]と、前記関数B[1],...,[i’]とは、2つの入力値の和を計算し、不要なビットを切り捨てて出力する関数、あるいは、2つの入力値の排他的論理和を計算して出力する関数のいずれかである
    ことを特徴とする請求項2又は3に記載のハッシュ値演算装置。
  5.  前記ハッシュ値計算部は、値z[1]と、k=2からi’までの値z[k]と値z’[k]とを順に結合してハッシュ値Zを計算する
    ことを特徴とする請求項1から4までのいずれかに記載のハッシュ値演算装置。
  6.  前記c’及び前記c’’は、c/2以上の整数である
    ことを特徴とする請求項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を計算する
    ことを特徴とするハッシュ値演算方法。
  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を計算するハッシュ値計算処理と
    をコンピュータに実行させることを特徴とするハッシュ値演算プログラム。
PCT/JP2012/063259 2012-05-24 2012-05-24 ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム WO2013175599A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/063259 WO2013175599A1 (ja) 2012-05-24 2012-05-24 ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/063259 WO2013175599A1 (ja) 2012-05-24 2012-05-24 ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム

Publications (1)

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

Family

ID=49623330

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/063259 WO2013175599A1 (ja) 2012-05-24 2012-05-24 ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム

Country Status (1)

Country Link
WO (1) WO2013175599A1 (ja)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068436A (ja) * 2010-09-24 2012-04-05 Mitsubishi Electric Corp ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012068436A (ja) * 2010-09-24 2012-04-05 Mitsubishi Electric Corp ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム

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 (ja) 暗号化装置、復号装置、暗号処理システム、暗号化方法、復号方法、暗号化プログラム、及び復号プログラム
US20150349951A1 (en) Protecting Cryptographic Operations Using Conjugacy Class Functions
JPWO2013065241A1 (ja) インクリメンタルmacタグ生成装置、方法及びプログラム並びにメッセージ認証装置
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 (ja) ハッシュ値演算装置
JP6194136B2 (ja) 疑似乱数生成装置及び疑似乱数生成プログラム
WO2016034912A1 (en) Method and apparatus for scalar multiplication secure against differential power attacks
US20120069998A1 (en) Encryption device
CN109981250B (zh) 一种sm4加密、密钥扩展方法、装置、设备及介质
JP5901783B2 (ja) ハッシュ値計算装置及びハッシュ値計算方法
WO2013175599A1 (ja) ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム
JP6033504B1 (ja) メッセージ認証子生成装置
JP2009188794A (ja) メッセージ認証子生成装置、メッセージ認証子検証装置、メッセージ認証子生成方法、メッセージ認証子検証方法、プログラム、および記録媒体
JP2016503195A5 (ja)
JP4914329B2 (ja) メッセージ認証子生成装置、メッセージ認証子検証装置、メッセージ認証子生成方法、メッセージ認証子検証方法、プログラム、および記録媒体
JP2012014077A (ja) ハッシュ値演算装置、ハッシュ値演算方法及びハッシュ値演算プログラム
JP6305643B2 (ja) メッセージ認証子生成装置、メッセージ認証子生成方法及びメッセージ認証子生成プログラム
WO2018154642A1 (ja) メッセージ認証子生成装置
US20240171401A1 (en) Method for calculating using an one-way function effienct in a zero knowledge proof, and apparatus implementing the same method
JP5449063B2 (ja) Rijndael型192bitブロック暗号化装置、方法、及びそのプログラム
WO2023053458A1 (ja) ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム
JP6257464B2 (ja) ハッシュ値計算装置
JP6371197B2 (ja) 暗号処理装置

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浏览器服务,不要输入任何密码和下载