JP5528281B2 - Hash value arithmetic unit - Google Patents

Hash value arithmetic unit Download PDF

Info

Publication number
JP5528281B2
JP5528281B2 JP2010213244A JP2010213244A JP5528281B2 JP 5528281 B2 JP5528281 B2 JP 5528281B2 JP 2010213244 A JP2010213244 A JP 2010213244A JP 2010213244 A JP2010213244 A JP 2010213244A JP 5528281 B2 JP5528281 B2 JP 5528281B2
Authority
JP
Japan
Prior art keywords
value
function
bit length
calculation unit
encryption
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2010213244A
Other languages
Japanese (ja)
Other versions
JP2012068436A (en
Inventor
祐介 内藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2010213244A priority Critical patent/JP5528281B2/en
Publication of JP2012068436A publication Critical patent/JP2012068436A/en
Application granted granted Critical
Publication of JP5528281B2 publication Critical patent/JP5528281B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、例えば、安全性の高いハッシュ値を計算する技術に関する。   The present invention relates to a technique for calculating a highly secure hash value, for example.

ハッシュ関数は、任意長の値を入力として、固定長の値を出力する関数である。   The hash function is a function that takes an arbitrary length value as input and outputs a fixed length value.

非特許文献1〜3には、出力長がnビットのブロック暗号の暗号化関数を用いて、衝突困難性の性質を満たす出力長が2nビットのハッシュ関数の構成法についての記載がある。
ここで、非特許文献1〜3におけるハッシュ関数が衝突困難性の性質を満たすためには、用いる暗号化関数が理想化されたブロック暗号における暗号化関数である必要がある。
Non-Patent Documents 1 to 3 describe a configuration method of a hash function having an output length of 2n bits that satisfies the collision difficulty property using an encryption function of a block cipher having an output length of n bits.
Here, in order for the hash functions in Non-Patent Documents 1 to 3 to satisfy the collision difficulty property, the encryption function to be used needs to be an encryption function in an idealized block cipher.

非特許文献4,5には、出力長がsビットのブロック暗号の暗号化関数を用いて、擬似ランダムオラクルの性質を満たす出力長がnビットのハッシュ関数の構成法についての記載がある。但し、sはn以上の整数である。
ここで、非特許文献4,5におけるハッシュ関数が擬似ランダムオラクルの性質を満たすためには、用いる暗号化関数が理想化されたブロック暗号における暗号化関数である必要がある。また、非特許文献4,5におけるハッシュ関数の安全性のセキュリティレベルはO(2s/2)以下である。なお、安全性のセキュリティレベルとは、擬似ランダムオラクルの性質を破るために必要となる計算量である。
Non-Patent Documents 4 and 5 describe a method of constructing a hash function having an output length of n bits and satisfying the characteristics of a pseudo-random oracle using an encryption function of a block cipher having an output length of s bits. However, s is an integer greater than or equal to n.
Here, in order for the hash function in Non-Patent Documents 4 and 5 to satisfy the properties of pseudo-random oracle, the encryption function to be used needs to be an encryption function in an idealized block cipher. The security level of the hash function safety in Non-Patent Documents 4 and 5 is O (2 s / 2 ) or less. Note that the security level of safety is a calculation amount required to break the property of the pseudo-random oracle.

非特許文献6には、入出力が固定長でありランダムオラクルの性質を満たす関数と、PrA(Preimage Aware)の性質を満たす任意長入力、固定長出力の関数とを用いて、擬似ランダムオラクルの性質を満たすハッシュ関数を構成することについての記載がある。非特許文献6では、PrAの性質をもつ関数として、出力長がnビットのブロック暗号の暗号化関数を用いている。
ここで、非特許文献6におけるハッシュ関数が、擬似ランダムオラクルの性質を満たすためには、用いる暗号化関数が理想化されたブロック暗号における暗号化関数である必要がある。
Non-Patent Document 6 describes a pseudo-random oracle using a function that satisfies the characteristics of a random oracle with a fixed input and output, and an arbitrary-length input and a fixed-length output that satisfy the properties of PrA (Preage Aware). There is a description about constructing a hash function that satisfies the properties. In Non-Patent Document 6, a block cipher encryption function having an output length of n bits is used as a function having PrA properties.
Here, in order for the hash function in Non-Patent Document 6 to satisfy the properties of a pseudo-random oracle, the encryption function to be used needs to be an encryption function in an idealized block cipher.

O. Ozen and M. Stam. Another Glance at Double−length Hashing. IMA Int. Conf. 2009. pp176−201. LNCS 5921.O. Ozen and M.M. Stam. Another Glance at Double-length Hashing. IMA Int. Conf. 2009. pp176-201. LNCS 5921. S. Hirose. Some Plausible Constructions of Double−Block−length Hash Functions. FSE 2006. 210−225. LNCS 4047.S. Hirose. Some Plausible Constructions of Double-Block-length Hash Functions. FSE 2006. 210-225. LNCS 4047. X. Lai and J. Massey: Hash Function Based on Block Ciphers. EUROCRYPT 1992. pp55−70. LNCS 653.X. Lai and J.H. Massey: Hash Function Based on Block Ciphers. EUROCRYPT 1992. pp55-70. LNCS 653. Shoichi Hirose, Je. Park, and A. Yun. A Simple Variant of the Merkle−Damgard Scheme with a Permutation. ASIACRYPT 2007. pp113−129. LNCS 4833.Shoichi Hirose, Je. Park, and A.A. Yun. A Simple Variant of the Markle-Damgard Scheme with a Permutation. ASIACRYPT 2007. pp113-129. LNCS 4833. J.−S. Coron, Y. Dodis, C. Malinaud, and P. Puniya. Merkle−Damgard Revisited: How to Construct a Hash Function. CRYPTO 2005. pp430−448. LNCS 3621.J. et al. -S. Coron, Y.M. Dodis, C.I. Malinaud, and P.M. Puniya. Merkle-Damgard Revisited: How to Structure a Hash Function. CRYPTO 2005. pp430-448. LNCS 3621. Y. Dodis, T. Ristenpart, and T. Shrimpton. Salvaging Merkle−Damgard for Practical Applications. EUROCRYPT 2009. pp371−388. LNCS 5479.Y. Dodis, T .; Ristenpart, and T.R. Shripton. Salvaging Merkle-Damgard for Practical Applications. EUROCRYPT 2009. pp371-388. LNCS 5479.

非特許文献1〜3に記載されたハッシュ関数は、ブロック暗号の暗号化関数を用いたハッシュ関数であるが、擬似ランダムオラクルの性質を満たさない。
非特許文献4,5に記載されたハッシュ関数は、ブロック暗号の暗号化関数を用いたハッシュ関数である。そして、このハッシュ関数は、用いる暗号化関数が理想化されたブロック暗号における暗号化関数で、その出力長がnビットの場合、擬似ランダムオラクルの性質を満たすものの、安全性のセキュリティレベルがO(2n/2)である。
非特許文献6に記載されたハッシュ関数は、入出力が固定長でありランダムオラクルの性質を満たす関数を使う必要がある。
この発明は、例えば、ランダムオラクルの性質を満たす関数を用いることなく、出力長がnビット長のブロック暗号の暗号化関数を用いて、擬似ランダムオラクルの性質を満たし、かつ、安全性のセキュリティレベルが少なくともO(2)となるハッシュ関数を構成することを目的とする。
The hash functions described in Non-Patent Documents 1 to 3 are hash functions using block cipher encryption functions, but do not satisfy the properties of pseudo-random oracles.
The hash functions described in Non-Patent Documents 4 and 5 are hash functions using block encryption functions. This hash function is an encryption function in the block cipher in which the encryption function to be used is ideal. When the output length is n bits, the hash function satisfies the property of pseudo-random oracle, but the security level of safety is O ( 2 n / 2 ).
The hash function described in Non-Patent Document 6 needs to use a function that has a fixed input / output and satisfies the characteristics of a random oracle.
The present invention, for example, satisfies the properties of a pseudo-random oracle using an encryption function of a block cipher with an output length of n bits without using a function that satisfies the properties of a random oracle, and has a security level of security. The object is to construct a hash function in which at least O (2 n ).

この発明に係るハッシュ値演算装置は、
任意ビット長の値Mを入力する任意長値入力部と、
前記任意長値入力部が入力した値Mを入力として、関数Fを計算してtビット長(tは1以上の整数)の値wを求める関数計算部と、
前記関数計算部が求めた値wを入力として、関数gを計算してdビット長(dはt以上の整数)の値kを求める鍵成分計算部と、
前記鍵成分計算部が生成した値kを鍵成分とし、nビット長の所定の値c1を平文成分として、ブロック暗号の暗号化関数E1を計算してnビット長(nは1以上の整数)の値yを求める暗号化関数E1計算部と、
前記鍵成分計算部が生成した値kを鍵成分とし、nビット長の所定の値c2を平文成分として、ブロック暗号の暗号化関数E2を計算してnビット長の値yyを求める暗号化関数E2計算部と、
前記暗号化関数E1計算部が求めた値yと、前記暗号化関数E2計算部が求めた値yyとを入力として、関数hを計算してn’ビット長(n’は1以上2n以下の整数)の値zをハッシュ値として求めるハッシュ値計算部と
を備えることを特徴とする。
The hash value calculation device according to the present invention is:
An arbitrary length value input unit for inputting an arbitrary bit length value M;
A function calculation unit that calculates a function F by using the value M input by the arbitrary length value input unit to obtain a value w of t-bit length (t is an integer of 1 or more);
A key component calculation unit that receives a value w obtained by the function calculation unit and calculates a function g to obtain a value k having a d-bit length (d is an integer equal to or greater than t);
Using the value k generated by the key component calculation unit as a key component and the n-bit predetermined value c1 as a plaintext component, the block cipher encryption function E1 is calculated and n-bit length (n is an integer of 1 or more) An encryption function E1 calculation unit for obtaining the value y of
An encryption function that calculates a block cipher encryption function E2 by using the value k generated by the key component calculation unit as a key component and a predetermined value c2 having an n-bit length as a plaintext component to obtain an n-bit length value yy An E2 calculator,
Using the value y obtained by the encryption function E1 calculation unit and the value yy obtained by the encryption function E2 calculation unit as input, the function h is calculated and an n ′ bit length (n ′ is 1 to 2n) A hash value calculation unit that obtains an integer) value z as a hash value.

この発明に係るハッシュ値演算装置によれば、用いるブロック暗号の暗号化関数が理想化されたブロック暗号における暗号化関数であれば、擬似ランダムオラクルの性質を満たし、かつ、安全性のセキュリティレベルがO(2)(nは暗号化関数の出力長)となるハッシュ関数を構成することができる。 According to the hash value calculation device according to the present invention, if the encryption function of the block cipher to be used is an encryption function in an idealized block cipher, the pseudo-random oracle property is satisfied and the security level of safety is high. A hash function can be configured to be O (2 n ) (n is the output length of the encryption function).

実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図。FIG. 3 is a functional block diagram illustrating functions of the hash value calculation device 10 according to the first embodiment. 図1に示す実施の形態1に係るハッシュ値演算装置10の動作を示すフローチャート。The flowchart which shows operation | movement of the hash value calculating apparatus 10 which concerns on Embodiment 1 shown in FIG. 図1に示す実施の形態1に係るハッシュ値演算装置10により実現されるハッシュ関数の構造図。FIG. 3 is a structural diagram of a hash function realized by the hash value calculation device 10 according to the first embodiment shown in FIG. 1. 実施の形態2に係るハッシュ値演算装置10の機能を示す機能ブロック図。FIG. 4 is a functional block diagram showing functions of a hash value calculation device 10 according to the second embodiment. 図4に示す実施の形態2に係るハッシュ値演算装置10の動作を示すフローチャート。5 is a flowchart showing an operation of the hash value calculation apparatus 10 according to the second embodiment shown in FIG. 図4に示す実施の形態2に係るハッシュ値演算装置10により実現されるハッシュ関数の構造図。FIG. 5 is a structural diagram of a hash function realized by the hash value calculation device 10 according to Embodiment 2 shown in FIG. 4. 実施の形態3に係る関数計算部12の機能を示す機能ブロック図。FIG. 10 is a functional block diagram illustrating functions of a function calculation unit 12 according to a third embodiment. 図7に示す実施の形態3に係る関数計算部12の動作を示すフローチャート。8 is a flowchart showing the operation of a function calculation unit 12 according to the third embodiment shown in FIG. 図7に示す実施の形態3に係る関数計算部12により実現される関数Fの構造図。The structure figure of the function F implement | achieved by the function calculation part 12 which concerns on Embodiment 3 shown in FIG. 実施の形態4に係る関数計算部12の機能を示す機能ブロック図。FIG. 10 is a functional block diagram illustrating functions of a function calculation unit 12 according to a fourth embodiment. 図10に示す実施の形態4に係る関数計算部12の動作を示すフローチャート。11 is a flowchart showing the operation of the function calculation unit 12 according to the fourth embodiment shown in FIG. 図10に示す実施の形態4に係る関数計算部12により実現されるハッシュ関数の構造図。FIG. 11 is a structural diagram of a hash function realized by the function calculation unit 12 according to the fourth embodiment shown in FIG.

実施の形態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 ideal 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): It has 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): For the input value x, search the output value z for the input value x from the list, and output the value z. That is, a value z satisfying H (x) = z is output.

ランダムオラクルの性質を満たすハッシュ関数は、「(1)衝突困難性」、「(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”.
The definition of each property of (1) to (3) is 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)第二原像計算困難性を満たすハッシュ関数とは、ランダムな入力値Mが与えられたとき、「H(M)=H(M’)」を満たす入力値M’を見つけることが困難なハッシュ関数である。つまり、第二原像計算困難性とは、第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 that satisfies the second original image calculation difficulty is to find an input value M ′ that satisfies “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)第二原像計算困難性を満たすハッシュ関数は(3)原像計算困難性を満たすという関係がある。
また、(3)原像計算困難性が破られたハッシュ関数(原像計算困難性を満たさないハッシュ関数)は、(1)衝突困難性、及び、(2)第二原像計算困難性を満たさないという関係がある。つまり、原像計算困難性が破られたハッシュ関数は、安全なハッシュ関数が満たすべき(1)〜(3)の性質を満たさない関数であり、安全性が低いため一般的に使い物にならない。
(1) to (3) In each of the properties, (1) a hash function satisfying the collision difficulty satisfies (2) a second original image calculation difficulty, and (2) a hash function satisfying 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 with a broken original image calculation difficulty (a hash function that does not satisfy the original image calculation difficulty) has (1) a collision difficulty and (2) a second original image calculation difficulty. There is a relationship of not satisfying. That is, the 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 the 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 an electronic signature algorithm, RSA-KEEM (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, a hash function such as SHA-256 (Secure Hash Algorithm-256) is used instead of a hash function that satisfies the characteristics of a 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)第二原像計算困難性、(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.

PrAの性質を満たすハッシュ関数とは、ハッシュ関数で用いる内部関数をP、Pを用いて構成したハッシュ関数をH[P]とすると、H[P]は衝突困難性を満たし、かつ、選択原像計算困難性を満たすというハッシュ関数である。
ここで、H[P]が選択原像計算困難性を満たす場合とは、任意の攻撃者Aがハッシュ関数の出力値zを決め(但し、この時点では、Aはその入力値を知らない)、攻撃者Aはzの入力値を求めようとした場合に、求めることができない場合である。
The hash function satisfying the properties of PrA is that the internal function used in the hash function is P, and the hash function configured using P is H [P]. H [P] satisfies the collision difficulty, and the selection source It is a hash function that satisfies image calculation difficulty.
Here, when H [P] satisfies the difficulty of calculating the selected original image, an arbitrary attacker A determines the output value z of the hash function (however, at this point, A does not know the input value). In this case, the attacker A cannot obtain the input value of z when trying to obtain the input value.

ブロック暗号(E,D)は、Eは暗号化関数、Dは復号関数である。暗号化関数Eは、dビットとnビットの2つの値を入力とし、nビットの値を出力する。dビットの値を値kと固定した場合、E(k,・)はnビットの置換関数となる。
kを固定し、順方向の置換計算するのが関数E(k,・)とすると、復号関数Dは逆方向の置換計算する関数E−1(k,・)である。
理想化されたブロック暗号とは、全てのブロック暗号の関数の集合からランダムに1つブロック暗号の関数を取ってきた場合におけるブロック暗号の関数のことである。
In the block cipher (E, D), E is an encryption function and D is a decryption function. The encryption function E receives two values, d bits and n bits, and outputs an n bit value. When the d-bit value is fixed to the value k, E (k,...) is an n-bit replacement function.
If k is fixed and the forward permutation calculation is the function E (k,...), the decoding function D is the function E −1 (k ,.
An idealized block cipher is a block cipher function when one block cipher function is randomly obtained from a set of all block cipher functions.

理想化されたブロック暗号を実現することは困難であることが知られている。そのため、非特許文献4,5に記載されたハッシュ関数等、擬似ランダムオラクルの性質を満たすハッシュ関数を実現する際は、理想化されたブロック暗号の代わりに、例えば、(1)衝突困難性、(2)第二原像計算困難性、(3)原像計算困難性の3つの性質に相当する性質を満たす関数を用いることが考えられる。つまり、(1)出力値が同じである複数の入力値を求めることが難しいという性質、(2)第1の入力値と出力値が同じである第2の入力値を求めることが難しいという性質、(3)出力値に対応する入力値を求めることが難しいという性質という3つの性質を満たす関数を用いることが考えられる。
この場合、理想的なブロック暗号を用いていないため、得られたハッシュ関数は、擬似ランダムオラクルの性質を満たすハッシュ関数とはならない。しかし、ランダムオラクルの性質を満たす関数を用いた場合に安全であることが証明されているため、ある程度の安全性があるものと認められる。
It is known that it is difficult to realize an ideal block cipher. Therefore, when realizing a hash function that satisfies the properties of a pseudo-random oracle such as the hash functions described in Non-Patent Documents 4 and 5, instead of an idealized block cipher, for example, (1) collision difficulty, It is conceivable to use a function satisfying properties corresponding to the three properties of (2) second original image calculation difficulty and (3) original image calculation difficulty. That is, (1) the property that it is difficult to obtain a plurality of input values having the same output value, and (2) the property that it is difficult to obtain a second input value that has the same output value as the first input value. (3) It is conceivable to use a function that satisfies the three properties of being difficult to obtain the input value corresponding to the output value.
In this case, since an ideal block cipher is not used, the obtained hash function is not a hash function that satisfies the properties of a pseudo-random oracle. However, it has been proved to be safe when a function satisfying the properties of a random oracle is used, and thus it is recognized that there is a certain degree of safety.

以下の説明では、非特許文献4,5に記載されたハッシュ関数と同様に、理想的なブロック暗号における暗号化関数を用いたハッシュ関数について説明する。以下で説明するハッシュ関数は、非特許文献4,5に記載されたハッシュ関数と同様に、用いるブロック暗号が理想的なブロック暗号における暗号化関数の場合、擬似ランダムオラクルの性質を満たす。
しかし、以下で説明するハッシュ関数では、非特許文献4,5に記載されたハッシュ関数と同等の安全性を満たすのに必要なブロック暗号の暗号化関数の出力長が半分以下でよい。つまり、非特許文献4,5に記載されたハッシュ関数に比べ、用いる暗号化関数の出力長が小さくて済む。そのため、例えば、以下で説明するハッシュ関数を回路で実現した場合、回路規模を小さくすることができる。
In the following description, a hash function using an encryption function in an ideal block cipher will be described in the same manner as the hash functions described in Non-Patent Documents 4 and 5. Similar to the hash functions described in Non-Patent Documents 4 and 5, the hash function described below satisfies the characteristics of a pseudo-random oracle when the block cipher to be used is an encryption function in an ideal block cipher.
However, in the hash function described below, the output length of the encryption function of the block cipher necessary for satisfying the security equivalent to the hash functions described in Non-Patent Documents 4 and 5 may be half or less. That is, the output length of the encryption function to be used is smaller than that of the hash functions described in Non-Patent Documents 4 and 5. Therefore, for example, when the hash function described below is realized by a circuit, the circuit scale can be reduced.

次に、実施の形態1に係るハッシュ関数について説明する。   Next, the hash function according to Embodiment 1 will be described.

図1は、実施の形態1に係るハッシュ値演算装置10の機能を示す機能ブロック図である。
図2は、図1に示す実施の形態1に係るハッシュ値演算装置10の動作を示すフローチャートである。
図3は、図1に示す実施の形態1に係るハッシュ値演算装置10により実現されるハッシュ関数の構造図である。なお、図3では、各値の下に括弧書でその値のビット長を示す。例えば、値Mは任意長であり、値wはtビット長である。
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 according to the first embodiment shown in FIG.
FIG. 3 is a structural diagram of a hash function realized by the hash value calculation apparatus 10 according to the first embodiment shown in FIG. In FIG. 3, the bit length of each value is shown in parentheses below each value. For example, the value M is an arbitrary length, and the value w is t bits long.

図1に示すハッシュ値演算装置10の機能と動作について、図2、図3を用いて説明する。
図1に示すハッシュ値演算装置10は、任意長値入力部11、関数計算部12、鍵成分計算部13、暗号化関数E1計算部14、暗号化関数E2計算部15、ハッシュ値計算部16を備える。
The function and operation of the hash value calculation device 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 function calculation unit 12, a key component calculation unit 13, an encryption function E1 calculation unit 14, an encryption function E2 calculation unit 15, and a hash value calculation unit 16. Is provided.

(S1:任意長値入力ステップ)
任意長値入力部11は、任意ビット長の値Mを入力装置により入力する。
(S1: Arbitrary length input step)
The arbitrary length value input unit 11 inputs an arbitrary bit length value M from the input device.

(S2:関数F計算ステップ)
関数計算部12は、(S1)で入力された値Mを入力として、関数Fを計算してtビット長(tは1以上の整数)の値wを処理装置により求める。
(S2: Function F calculation step)
The function calculation unit 12 receives the value M input in (S1), calculates the function F, and obtains a value w having a t-bit length (t is an integer of 1 or more) by the processing device.

(S3:関数g計算ステップ)
鍵成分計算部13は、(S2)で求められた値wを入力として、関数gを計算してdビット長(dはt以上の整数)の値kを処理装置により求める。
(S3: Function g calculation step)
The key component calculation unit 13 receives the value w obtained in (S2) as an input, calculates the function g, and obtains a value k having a d-bit length (d is an integer equal to or greater than t) by the processing device.

(S4:暗号化関数E1計算ステップ)
暗号化関数E1計算部14は、(S3)で求められた値kを鍵成分とし、nビット長(nは1以上の整数)の固定値c1を平文成分として、暗号化関数E1を計算してnビット長の値yを処理装置により求める。
(S4: Encryption function E1 calculation step)
The encryption function E1 calculation unit 14 calculates the encryption function E1 using the value k obtained in (S3) as a key component and the fixed value c1 having an n-bit length (n is an integer of 1 or more) as a plaintext component. Then, a value y having an n-bit length is obtained by the processing device.

(S5:暗号化関数E2計算ステップ)
暗号化関数E2計算部15は、(S3)で求められた値kを鍵成分とし、nビット長の固定値c2を平文成分として、暗号化関数E2を計算してnビット長の値yyを処理装置により求める。
なお、(S4)と(S5)とは並列に実行してもよい。
(S5: Encryption function E2 calculation step)
The encryption function E2 calculation unit 15 calculates the encryption function E2 by using the value k obtained in (S3) as a key component and the fixed value c2 having an n-bit length as a plaintext component to obtain an n-bit value yy. It is determined by the processing device.
Note that (S4) and (S5) may be executed in parallel.

(S6:ハッシュ値計算ステップ)
ハッシュ値計算部16は、(S4)で求められた値yと、(S5)で求められた値yyとを入力として、関数hを計算してn’ビット長(ここでのn’は1以上2n以下の整数)の値zをハッシュ値として求める。
(S6: Hash value calculation step)
The hash value calculation unit 16 receives the value y obtained in (S4) and the value yy obtained in (S5) as input, calculates a function h, and has an n ′ bit length (where n ′ is 1). The value z of an integer of 2n or less is obtained as a hash value.

つまり、実施の形態1に係るハッシュ値演算装置10は、関数F、関数g、暗号化関数E1、暗号化関数E2、関数hを用いてハッシュ関数を構成する。   That is, the hash value calculation apparatus 10 according to Embodiment 1 configures a hash function using the function F, the function g, the encryption function E1, the encryption function E2, and the function h.

関数Fは、任意長の値Mを入力として、tビット長の値wを出力する関数である。
関数Fについては、後の実施の形態で詳しく説明する。
The function F is a function that receives a value M having an arbitrary length and outputs a value w having a t-bit length.
The function F will be described in detail in a later embodiment.

関数gは、tビット長の値wを入力として、dビット長の値kを出力する関数である。
関数gは、例えば、(d−t)ビット長の固定値cを用いて、入力値wと値cとをビット結合する関数である。ビット結合の方法は、w||cでもよいし、c||wでもよいし、値cのビットと値wのビットとをそれぞれ決められたルールでシャッフルして任意の順に結合してもよい。なお、“||”という記号は、ビット列の結合を意味する。つまり、w||cであれば、値wの後に値cを付加するという意味であり、c||wであれば、値cの後に値wを付加するという意味である。
The function g is a function that receives a value w having a t-bit length and outputs a value k having a d-bit length.
The function g is, for example, a function that bit-combines the input value w and the value c using a fixed value c having a (dt) bit length. The method of bit combination may be w || c, c || w, or the bit of value c and the bit of value w may be shuffled according to a predetermined rule and combined in an arbitrary order. . The symbol “||” means a combination of bit strings. That is, if w || c, it means that the value c is added after the value w, and if c || w, it means that the value w is added after the value c.

暗号化関数E1は、dビット長の値kと、nビット長の値c1とを入力として、nビット長の値を出力するブロック暗号の暗号化関数である。同様に、暗号化関数E2は、dビット長の値kと、nビット長の値c2とを入力として、nビット長の値を出力するブロック暗号の暗号化関数である。
暗号化関数E1と暗号化関数E2とは同じ関数であってもよいし、異なる関数であってもよい。但し、暗号化関数E1と暗号化関数E2とが同じ関数である場合、値c1と値c2とを異なる値とする。
The encryption function E1 is a block cipher encryption function that receives a value k of d bits and a value c1 of n bits and outputs an n bit value. Similarly, the encryption function E2 is a block cipher encryption function that receives a value k of d bits and a value c2 of n bits and outputs a value of n bits.
The encryption function E1 and the encryption function E2 may be the same function or different functions. However, when the encryption function E1 and the encryption function E2 are the same function, the value c1 and the value c2 are set to different values.

関数hは、2つのnビット長の値y、値yyを入力として、n’ビット長の値を出力する関数である。
関数hは、例えば、2つの入力された値y、値yyをビット結合し、そのビットからn’ビット選んで出力する関数である。なお、値y、値yyをビット結合の方法は、関数gにおいて値wと値cとのビット結合の方法と同様に、値yと値yyとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
The function h is a function that inputs two n-bit length values y and yy and outputs an n′-bit length value.
The function h is, for example, a function that bit-combines two input values y and yy, and selects n ′ bits from the bits and outputs them. Note that the method of bit-combining the value y and the value yy may be the same as the method of bit-combining the value w and the value c in the function g. May be combined.

実施の形態1に係るハッシュ値演算装置10が実現するハッシュ関数は、関数FがPrAの性質を満たし、かつ、暗号化関数E1,E2が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。   The hash function realized by the hash value computing device 10 according to the first embodiment is an encryption function in a block cipher in which the function F satisfies the properties of PrA and the encryption functions E1 and E2 are idealized. Satisfy the properties of pseudo-random oracles.

なお、図3に示す暗号化関数E1,E2は、三角の印が付いた部分の入力(図3では値k)を固定とすると、置換関数となる。以下の実施の形態においても同様に、図において三角の印が付いた部分の入力を固定とした場合、その暗号化関数は置換関数となる。   Note that the encryption functions E1 and E2 shown in FIG. 3 are replaced functions when the input (value k in FIG. 3) with a triangular mark is fixed. Similarly, in the following embodiments, when the input of the portion marked with a triangle in the figure is fixed, the encryption function is a replacement function.

実施の形態2
実施の形態2では、実施の形態1とは異なるハッシュ関数について説明する。
Embodiment 2
In the second embodiment, a hash function different from that in the first embodiment will be described.

図4は、実施の形態2に係るハッシュ値演算装置10の機能を示す機能ブロック図である。
図5は、図4に示す実施の形態2に係るハッシュ値演算装置10の動作を示すフローチャートである。
図6は、図4に示す実施の形態2に係るハッシュ値演算装置10により実現されるハッシュ関数の構造図である。なお、図6では、図3と同様に、各値の下に括弧書でその値のビット長を示す。
FIG. 4 is a functional block diagram illustrating functions of the hash value calculation apparatus 10 according to the second embodiment.
FIG. 5 is a flowchart showing the operation of the hash value calculation apparatus 10 according to the second embodiment shown in FIG.
FIG. 6 is a structural diagram of a hash function realized by the hash value calculation apparatus 10 according to the second embodiment shown in FIG. In FIG. 6, as in FIG. 3, the bit length of each value is shown in parentheses below each value.

図4に示すハッシュ値演算装置10の機能と動作について、図5、図6を用いて説明する。
図4に示すハッシュ値演算装置10は、暗号化関数E2計算部15を備えていない点で、図1に示すハッシュ値演算装置10と異なる。
The function and operation of the hash value calculation apparatus 10 shown in FIG. 4 will be described with reference to FIGS.
The hash value calculation device 10 shown in FIG. 4 is different from the hash value calculation device 10 shown in FIG. 1 in that the encryption function E2 calculation unit 15 is not provided.

(S11)から(S12)までは、図2に示す(S1)から(S2)までと同じであるため、説明を省略する。   Since (S11) to (S12) are the same as (S1) to (S2) shown in FIG.

(S13:関数G計算ステップ)
鍵成分計算部13は、(S12)で求められた値wを入力として、関数Gを計算してdビット長の値kを処理装置により求める。
(S13: Function G calculation step)
The key component calculation unit 13 receives the value w obtained in (S12) as an input, calculates the function G, and obtains a value k of d-bit length by the processing device.

(S14:暗号化関数E1計算ステップ)
暗号化関数E1計算部14は、(S13)で求められた値kを鍵成分とし、nビット長の固定値c1を平文成分として、暗号化関数E1を計算してnビット長の値yを処理装置により求める。
(S14: Encryption function E1 calculation step)
The encryption function E1 calculation unit 14 calculates the encryption function E1 by using the value k obtained in (S13) as a key component and the n-bit fixed value c1 as a plaintext component to obtain an n-bit length value y. It is determined by the processing device.

(S15:ハッシュ値計算ステップ)
ハッシュ値計算部16は、(S14)で求められた値yとを入力として、関数Hを計算してn’ビット長(ここでのn’は1以上n以下の整数)の値zをハッシュ値として求める。
(S15: Hash value calculation step)
The hash value calculation unit 16 receives the value y obtained in (S14) as an input, calculates the function H, and hashes the value z having an n′-bit length (where n ′ is an integer between 1 and n). Calculate as a value.

つまり、実施の形態2に係るハッシュ値演算装置10は、関数F、関数G、暗号化関数E1、関数Hを用いてハッシュ関数を構成する。   That is, the hash value calculation device 10 according to the second embodiment configures a hash function using the function F, the function G, the encryption function E1, and the function H.

関数Fは、任意長の値Mを入力として、tビット長の値wを出力する関数である。
関数Fについては、後の実施の形態で詳しく説明する。
The function F is a function that receives a value M having an arbitrary length and outputs a value w having a t-bit length.
The function F will be described in detail in a later embodiment.

関数Gは、tビット長の値wを入力として、dビット長の値kを出力する関数である。
関数Gは、例えば、(d−t)ビット長の固定値cを用いて、入力値wと値cとをビット結合する関数である。入力値wと値cとのビット結合の方法は、入力値wと値cとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
The function G is a function that receives a value w having a t-bit length and outputs a value k having a d-bit length.
The function G is a function that, for example, bit-links the input value w and the value c using a fixed value c having a length of (d−t) bits. As a method of bit combination of the input value w and the value c, the input value w and the value c may be combined as they are, or the bits may be mixed and combined.

暗号化関数E1は、dビット長の値kと、nビット長の値c1とを入力として、nビット長の値を出力するブロック暗号の暗号化関数である。   The encryption function E1 is a block cipher encryption function that receives a value k of d bits and a value c1 of n bits and outputs an n bit value.

関数Hは、nビット長の値yを入力として、n’ビット長の値を出力する関数である。
関数Hは、例えば、入力された値yからn’ビット選んで出力する関数である。
The function H is a function that receives an n-bit length value y and outputs an n′-bit length value.
The function H is, for example, a function that selects and outputs n ′ bits from the input value y.

実施の形態2に係るハッシュ値演算装置10が実現するハッシュ関数は、関数FがPrAの性質を満たし、かつ、暗号化関数E1が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。   The hash function realized by the hash value computing device 10 according to the second embodiment is pseudo-random when the function F satisfies the properties of PrA and the encryption function E1 is an encryption function in an idealized block cipher. Satisfy the nature of Oracle.

実施の形態3.
実施の形態3では、実施の形態1,2における関数Fの一例について説明する。
Embodiment 3 FIG.
In the third embodiment, an example of the function F in the first and second embodiments will be described.

図7は、実施の形態3に係る関数計算部12の機能を示す機能ブロック図である。
図8は、図7に示す実施の形態3に係る関数計算部12の動作を示すフローチャートである。
図9は、図7に示す実施の形態3に係る関数計算部12により実現される関数Fの構造図である。なお、図9では、図3と同様に、各値の下に括弧書でその値のビット長を示す。
FIG. 7 is a functional block diagram illustrating functions of the function calculation unit 12 according to the third embodiment.
FIG. 8 is a flowchart showing the operation of the function calculation unit 12 according to the third embodiment shown in FIG.
FIG. 9 is a structural diagram of the function F realized by the function calculation unit 12 according to the third embodiment shown in FIG. In FIG. 9, as in FIG. 3, the bit length of each value is shown in parentheses below each value.

図7に示す関数計算部12の機能と動作について、図8、図9を用いて説明する。
関数計算部12は、パディング部21、分割部22、鍵成分k1計算部23、暗号化関数Ej,1計算部24、関数R計算部25、関数p計算部26、暗号化関数Ej,2計算部27、関数S計算部28、鍵成分kj計算部29、関数V計算部30、変数j制御部31を備える。
The function and operation of the function calculation unit 12 shown in FIG. 7 will be described with reference to FIGS.
The function calculation unit 12 includes a padding unit 21, a division unit 22, a key component k1 calculation unit 23, an encryption function E j, 1 calculation unit 24, a function R calculation unit 25, a function p calculation unit 26, an encryption function E j, 2 calculation unit 27, function S calculation unit 28, key component kj calculation unit 29, function V calculation unit 30, and variable j control unit 31.

(S21:パディングステップ)
パディング部21は、任意長の値Mに対して、パディング関数padを用いて、所定の値を付加して(L’+L(i−1))ビット長(L’は1以上d以下の整数、ここでのLは1以上d−n以下の整数、iは1以上の整数)の値M’を処理装置により生成する。
(S21: Padding step)
The padding unit 21 adds a predetermined value to the arbitrary length value M by using the padding function pad (L ′ + L (i−1)) bit length (L ′ is an integer of 1 or more and d or less) , Where L is an integer of 1 or more and dn or less, and i is an integer of 1 or more).

(S22:分割ステップ)
分割部22は、(S21)で生成された値M’を先頭から、最初はL’ビット、以降Lビットづつに分割して、L’ビット長の値m[1]と、Lビット長の値m[2],...,値m[i]を処理装置により生成する。
(S22: Division step)
The dividing unit 22 divides the value M ′ generated in (S21) from the beginning into L ′ bits first, and then L bits, and then L ′ bit length value m [1] and L bit length The values m [2],. . . , Value m [i] is generated by the processing device.

(S23:変数j初期化ステップ)
変数j制御部31は、変数jを1に初期化する。
(S23: Variable j initialization step)
The variable j control unit 31 initializes the variable j to 1.

(S24:関数T1計算ステップ)
鍵成分k1計算部23は、(S22)で生成された値m[j](つまり、値m[1])を入力として、関数T[j](つまり、関数T[1])を計算してdビット長の値k[j](つまり、値k[1])を処理装置により求める。
(S24: Function T1 calculation step)
The key component k1 calculation unit 23 calculates the function T [j] (that is, the function T [1]) using the value m [j] (that is, the value m [1]) generated in (S22) as an input. Then, a d-bit length value k [j] (that is, the value k [1]) is obtained by the processing device.

(S25:暗号化関数Ej,1計算ステップ)
暗号化関数Ej,1計算部24は、(S24)又は後述する(S32)で求めた値k[j]を鍵成分とし、nビット長の値y[j−1](値y[0]は固定値IV)を平文成分として、暗号化関数Ej,1を計算してnビット長の値x[j]を処理装置により求める。
(S25: Encryption function E j, 1 calculation step)
The encryption function E j, 1 calculation unit 24 uses the value k [j] obtained in (S24) or (S32) described later as a key component, and the value y [j−1] (value y [0] having an n-bit length. ], The encryption function E j, 1 is calculated by using the fixed value IV) as a plaintext component, and an n-bit length value x [j] is obtained by the processing device.

(S26:関数R計算ステップ)
関数R計算部25は、(S25)で求めた値x[j]と、nビット長の値y[j−1]とを入力として、関数R[j]を計算してnビット長の値y[j]を処理装置により求める。
(S26: Function R calculation step)
The function R calculation unit 25 receives the value x [j] obtained in (S25) and the n-bit length value y [j-1] as inputs and calculates the function R [j] to obtain an n-bit length value. y [j] is obtained by the processing device.

(S27:関数p計算ステップ)
関数p計算部26は、nビット長の値y[j−1]とを入力として、関数p[j]を計算してnビット長の値vv[j]を処理装置により求める。
(S27: function p calculation step)
The function p calculator 26 receives the value y [j−1] having an n-bit length as an input, calculates the function p [j], and obtains the value vv [j] having an n-bit length by the processing device.

(S28:暗号化関数Ej,2計算ステップ)
暗号化関数Ej,2計算部27は、(S24)又は後述する(S32)で求めた値k[j]を鍵成分とし、(S27)で求めた値vv[j]を平文成分として、暗号化関数Ej,2を計算してnビット長の値xx[j]を処理装置により求める。
(S28: Encryption function E j, 2 calculation step)
The encryption function E j, 2 calculation unit 27 uses the value k [j] obtained in (S24) or (S32) described later as a key component, and the value vv [j] obtained in (S27) as a plaintext component. The encryption function E j, 2 is calculated, and an n-bit length value xx [j] is obtained by the processing device.

(S29:関数S計算ステップ)
関数S計算部28は、(S28)で求めた値xx[j]と、(S27)で求めた値vv[j]とを入力として、関数S[j]を計算してnビット長の値yy[j]を求める。
なお、(S25)から(S26)までと、(S27)から(S29)までとは並列に実行してもよい。
(S29: Function S calculation step)
The function S calculation unit 28 receives the value xx [j] obtained in (S28) and the value vv [j] obtained in (S27), calculates the function S [j], and has an n-bit length value. Find yy [j].
Note that (S25) to (S26) and (S27) to (S29) may be executed in parallel.

(S30:変数j判定ステップ)
変数j制御部31は、変数jの値が値iであるか否かを判定する。変数jの値が値iでなければ(S30でNO)、処理を(S31)へ進める。一方、変数jの値が値iであれば(S30でYES)、処理を(S33)へ進める。
(S30: variable j determination step)
The variable j control unit 31 determines whether or not the value of the variable j is the value i. If the value of variable j is not value i (NO in S30), the process proceeds to (S31). On the other hand, if the value of variable j is value i (YES in S30), the process proceeds to (S33).

(S31:変数jインクリメントステップ)
変数j制御部31は、変数jに1を加算する。
(S31: Variable j increment step)
The variable j control unit 31 adds 1 to the variable j.

(S32:関数T計算ステップ)
鍵成分kj計算部29は、(S22)で生成された値m[j]と、(S29)で求めた値yy[j−1]とを入力として、関数T[j]を計算してdビット長の値k[j]を処理装置により求める。
そして、処理を(S25)及び(S27)へ戻す。
(S32: Function T calculation step)
The key component kj calculation unit 29 calculates the function T [j] by using the value m [j] generated in (S22) and the value yy [j-1] obtained in (S29) as input and d A bit length value k [j] is obtained by the processing device.
Then, the process returns to (S25) and (S27).

(S33:関数V計算ステップ)
関数V計算部30は、(S26)で求めた値y[i]と、(S29)で求めた値yy[i]とを入力として、関数Vを計算してtビット長の値wを処理装置により求める。
(S33: Function V calculation step)
The function V calculation unit 30 receives the value y [i] obtained in (S26) and the value yy [i] obtained in (S29), calculates the function V, and processes the value w having a t-bit length. Determined by device.

つまり、実施の形態3に係る関数計算部12は、パディング関数pad、関数T[1],...,関数T[i]、関数p[1],...,関数p[i]、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、関数R[1],...,関数R[i]、関数S[1],...,関数S[i]、関数Vを用いて、図3や図6に示す関数Fを構成する。 That is, the function calculation unit 12 according to the third embodiment includes the padding function pad, the function T [1],. . . , Function T [i], function p [1],. . . , Function p [i], encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption function E i, 2 , function R [1],. . . , Function R [i], function S [1],. . . , Function S [i] and function V are used to construct function F shown in FIGS.

パディング関数padは、例えば、M’=pad(M)=M||1||0...0||<M>である。ここで、<M>は、例えば、64ビットの値であり、Mのビット長情報を含む値である。
つまり、パディング関数padは、先頭が“1”で、その後が複数の“0”で、最後に<M>となるビット列を生成して、値Mに付加して、値M’を生成する関数である。
なお、M’がL’+L(i−1)ビットとなるように0の個数が決定される。
The padding function pad is, for example, M ′ = pad (M) = M || 1 || 0. . . 0 || <M>. Here, <M> is, for example, a 64-bit value and a value including M bit length information.
In other words, the padding function pad is a function that generates a value M ′ by generating a bit string that starts with “1”, thereafter has a plurality of “0” s, and ends with <M> and is added to the value M. It is.
The number of 0s is determined so that M ′ becomes L ′ + L (i−1) bits.

関数T[1]は、L’ビット長の値を入力として、dビット長の値を出力する関数である。
関数T[1]は、例えば、const’をd−L’ビット長の固定値とした場合、L’ビット長の入力値mに対して、const’をビット結合したものを出力する関数である。なお、L’=dの場合には、入力値をそのまま出力するものとする。
値mと値const’とのビット結合の方法は、値mと値const’とをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
The function T [1] is a function that receives a value of L ′ bit length and outputs a value of d bit length.
The function T [1] is, for example, a function that outputs a concatenated bit of const ′ with respect to an input value m of L ′ bit length when const ′ is a fixed value of dL ′ bit length. . When L ′ = d, the input value is output as it is.
As a method of bit combination of the value m and the value const ′, the value m and the value const ′ may be combined as they are, or the bits may be mixed and combined.

関数T[2],...,関数T[i]は、Lビット長の値と、nビット長の値とを入力として、dビット長の値を出力する関数である。
関数T[2],...,関数T[i]は、値constを(d−L−n)ビットの固定値とした場合、Lビットの入力値mと、nビットの入力値xと、値constとをビット結合したものを出力する関数である。なお、L=d−nの場合は、値constは付加しない。
入力値mと入力値xと値constとビット結合の方法は、入力値mと入力値xと値constとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
Functions T [2],. . . , Function T [i] is a function that receives an L-bit length value and an n-bit length value and outputs a d-bit length value.
Functions T [2],. . . , Function T [i] is a bit combination of an L-bit input value m, an n-bit input value x, and a value const, where the value const is a fixed value of (d−L−n) bits. Is a function that outputs Note that the value const is not added when L = dn.
As a method of combining the input value m, the input value x, the value const, and the bit, the input value m, the input value x, and the value const may be combined as they are, or the bits may be mixed and combined.

関数p[1],...,関数p[i]は、全てのnビットの値xに対してp[j](x)≠x(j=1,...,i)となる置換関数である。   Functions p [1],. . . , Function p [i] is a replacement function such that p [j] (x) ≠ x (j = 1,..., I) for all n-bit values x.

暗号化関数E1,1,...,暗号化関数Ei,1と、暗号化関数E1,2,...,暗号化関数Ei,2とは、dビット長の値と、nビット長の値とを入力として、nビット長の値を出力するブロック暗号の暗号化関数である。
暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1,E2は、全て同じ暗号化関数であってもよい。
また、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2は同じ暗号化関数であり、暗号化関数E1,E2は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2と異なる暗号化関数であってもよい。この場合、暗号化関数E1,E2は、同じ暗号化関数であってもよいし、異なる暗号化関数であってもよい。
The encryption functions E 1,1,. . . , Encryption functions E i, 1 and encryption functions E 1 , 2,. . . , Encryption function E i, 2 is a block cipher encryption function that takes a d-bit length value and an n-bit length value as inputs and outputs an n-bit length value.
The encryption functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , The encryption function E i, 2 and the encryption functions E1, E2 may all be the same encryption function.
Also, the encryption functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption functions E i, 2 are the same encryption function, and encryption functions E1, E2 are encrypted functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . The encryption function may be different from the encryption function E i, 2 . In this case, the encryption functions E1 and E2 may be the same encryption function or different encryption functions.

関数R[1],...,関数R[i]と、関数S[1],...,関数S[i]とは、2つのnビット長の値を入力として、nビット長の値を出力する関数である。
関数R[1],...,関数R[i]と、関数S[1],...,関数S[i]とは、例えば、2つのnビット長の入力値x,yに対して、値xと値yとの排他的論理和を出力する関数である。
また、関数R[1],...,関数R[i]と、関数S[1],...,関数S[i]とは、2つのnビット長の入力値x,yに対して、値xと値yとを加算した値を出力する関数であってもよい。この場合、加算方法は、例えば、値xと値yとの先頭からLビットづつをそれぞれ加算していき、最後に加算したものをビット結合すればよい。
Functions R [1],. . . , Function R [i] and functions S [1],. . . , Function S [i] is a function that receives two n-bit length values and outputs an n-bit length value.
Functions R [1],. . . , Function R [i] and functions S [1],. . . , Function S [i] is, for example, a function that outputs an exclusive OR of a value x and a value y with respect to two n-bit input values x and y.
The functions R [1],. . . , Function R [i] and functions S [1],. . . , Function S [i] may be a function that outputs a value obtained by adding a value x and a value y to two n-bit input values x and y. In this case, as an addition method, for example, L bits may be added from the beginning of the value x and the value y, and the last addition may be bit-coupled.

関数Vは、2つのnビット長の値を入力として、tビット長の値を出力する関数である。
関数Vは、例えば、2つのnビット長の入力値x,yに対して、値xと値yとをビット結合し、そのうちtビットを所定の方法で抽出して出力する関数である。なお、t=2nの場合は、ビット結合した値をそのまま出力すればよい。
値xと値yとのビット結合の方法は、値xと値yとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。また、ビットの抽出方法は、先頭から抽出してもよいし、後ろから抽出してもよく、それ以外の抽出方法でもよい。
The function V is a function that inputs two n-bit length values and outputs a t-bit length value.
The function V is, for example, a function that bit-combines a value x and a value y with respect to two n-bit input values x and y, and extracts and outputs t bits by a predetermined method. If t = 2n, the bit-coupled value may be output as it is.
As a method of bit combination of the value x and the value y, the value x and the value y may be combined as they are, or the bits may be mixed and combined. The bit extraction method may be extracted from the beginning, from the back, or any other extraction method.

実施の形態1に係るハッシュ値演算装置10が、実施の形態3に係る関数計算部12が実現する関数Fを用いて実現したハッシュ関数は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1,E2が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。そして、その安全性のセキュリティレベルはO(2)となる。また、このハッシュ関数は、各暗号化関数の出力長がnビットであり、ハッシュ値の出力長が最大2nビットである。 A hash function realized by the hash value calculation apparatus 10 according to the first embodiment using the function F realized by the function calculation unit 12 according to the third embodiment is an encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption function E i, 2 , and encryption functions E 1, E 2 are the encryption functions in the ideal block cipher, the pseudo random oracle property is satisfied. The security level of the safety is O (2 n ). In this hash function, the output length of each encryption function is n bits, and the output length of the hash value is 2n bits at the maximum.

実施の形態2に係るハッシュ値演算装置10が、実施の形態3に係る関数計算部12が実現する関数Fを用いて実現したハッシュ関数は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。そして、その安全性のセキュリティレベルはO(2)となる。また、このハッシュ関数は、各暗号化関数の出力長がnビットであり、ハッシュ値の出力長が最大nビットである。 A hash function realized by the hash value calculation apparatus 10 according to the second embodiment using the function F realized by the function calculation unit 12 according to the third embodiment is an encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , The encryption function E i, 2 and the encryption function E1 are the encryption functions in the ideal block cipher, the pseudo random oracle property is satisfied. The security level of the safety is O (2 n ). In this hash function, the output length of each encryption function is n bits, and the output length of the hash value is n bits at the maximum.

なお、実施の形態1に係るハッシュ関数と、実施の形態2に係るハッシュ関数との出力長を同じ2nとする場合、実施の形態1に係るハッシュ関数は、上述した通り、安全性のセキュリティレベルはO(2)であり、用いる各暗号化関数の出力長がnビットである。一方、実施の形態2に係るハッシュ関数は、安全性のセキュリティレベルはO(22n)であり、用いる各暗号化関数の出力長が2nビットである。
つまり、ハッシュ関数の出力長を同じにした場合、実施の形態1に係るハッシュ関数の方が、実施の形態2に係るハッシュ関数よりも、用いる暗号化関数の出力長が短くてよい。そのため、例えば、ハッシュ関数を回路で実現した場合、回路規模を小さくできる。一方、実施の形態2に係るハッシュ関数の方が、実施の形態1に係るハッシュ関数よりも、安全性のセキュリティレベルが高い。
Note that when the output lengths of the hash function according to the first embodiment and the hash function according to the second embodiment are the same 2n, the hash function according to the first embodiment has the security level of safety as described above. Is O (2 n ), and the output length of each encryption function used is n bits. On the other hand, in the hash function according to the second embodiment, the security level of security is O (2 2n ), and the output length of each encryption function used is 2n bits.
That is, when the output length of the hash function is the same, the output length of the encryption function used in the hash function according to the first embodiment may be shorter than that of the hash function according to the second embodiment. Therefore, for example, when the hash function is realized by a circuit, the circuit scale can be reduced. On the other hand, the hash function according to the second embodiment has a higher security level than the hash function according to the first embodiment.

実施の形態4.
実施の形態4では、実施の形態1,2における関数Fの実施の形態3とは異なる例について説明する。
Embodiment 4 FIG.
In the fourth embodiment, an example different from the third embodiment of the function F in the first and second embodiments will be described.

図10は、実施の形態4に係る関数計算部12の機能を示す機能ブロック図である。
図11は、図10に示す実施の形態4に係る関数計算部12の動作を示すフローチャートである。
図12は、図10に示す実施の形態4に係る関数計算部12により実現されるハッシュ関数の構造図である。なお、図12では、図3と同様に、各値の下に括弧書でその値のビット長を示す。
FIG. 10 is a functional block diagram illustrating functions of the function calculation unit 12 according to the fourth embodiment.
FIG. 11 is a flowchart showing the operation of the function calculation unit 12 according to the fourth embodiment shown in FIG.
FIG. 12 is a structural diagram of a hash function realized by the function calculation unit 12 according to the fourth embodiment shown in FIG. In FIG. 12, as in FIG. 3, the bit length of each value is shown in parentheses below each value.

図10に示すハッシュ値演算装置10の機能と動作について、図11、図12を用いて説明する。
図10に示す関数計算部12は、関数h計算部32、関数h’計算部33を備え、関数p計算部26、関数R計算部25、関数S計算部28を備えていない点が図7に示す関数計算部12と異なる。
Functions and operations of the hash value calculation device 10 shown in FIG. 10 will be described with reference to FIGS. 11 and 12.
The function calculation unit 12 shown in FIG. 10 includes a function h calculation unit 32 and a function h ′ calculation unit 33, but does not include a function p calculation unit 26, a function R calculation unit 25, and a function S calculation unit 28. Different from the function calculation unit 12 shown in FIG.

(S41)から(S43)までの処理は、図8に示す(S21)から(S23)までの処理と同じであるため、説明を省略する。但し、ここでのLは1以上d−2n以下の整数である。   The processing from (S41) to (S43) is the same as the processing from (S21) to (S23) shown in FIG. However, L here is an integer of 1 or more and d-2n or less.

(S44:関数g1計算ステップ)
鍵成分k1計算部23は、(S42)で生成された値m[j](値m[1])を入力として、関数g[j](関数g[1])を計算してdビット長の値k[j](値k[1])を処理装置により求める。
(S44: Function g1 calculation step)
The key component k1 calculator 23 receives the value m [j] (value m [1]) generated in (S42) as an input, calculates the function g [j] (function g [1]), and has a d bit length Value k [j] (value k [1]) is obtained by the processing device.

(S45:暗号化関数Ej,1計算ステップ)
暗号化関数Ej,1計算部24は、(S44)又は後述する(S50)で求めた値k[j]を鍵成分とし、nビット長の所定の値cj,1を平文成分として、暗号化関数Ej,1を計算してnビット長の値y[j]を処理装置により求める。
(S45: Encryption function E j, 1 calculation step)
The encryption function E j, 1 calculation unit 24 uses the value k [j] obtained in (S44) or (S50) described later as a key component, and uses a predetermined value c j, 1 having an n-bit length as a plaintext component. The encryption function E j, 1 is calculated, and an n-bit length value y [j] is obtained by the processing device.

(S46:暗号化関数Ej,2計算ステップ)
暗号化関数Ej,2計算部27は、(S44)又は後述する(S50)で求めた値k[j]を鍵成分とし、nビット長の所定の値cj,2を平文成分として、暗号化関数Ej,2を計算してnビット長の値yy[j]を処理装置により求める。
なお、(S45)と(S46)とは並列に実行してもよい。
(S46: Encryption function E j, 2 calculation step)
The encryption function E j, 2 calculation unit 27 uses the value k [j] obtained in (S44) or (S50) described later as a key component, and uses a predetermined value c j, 2 having an n-bit length as a plaintext component. The encryption function E j, 2 is calculated, and an n-bit length value yy [j] is obtained by the processing device.
Note that (S45) and (S46) may be executed in parallel.

(S47:関数h計算ステップ)
関数h計算部32は、(S45)で求めた値y[j]と、(S46)で求めた値yy[j]とを入力として、関数h[j]を計算して2nビット長の値w[j]を処理装置により求める。
(S47: Function h calculation step)
The function h calculation unit 32 receives the value y [j] obtained in (S45) and the value yy [j] obtained in (S46), calculates the function h [j], and has a value of 2n bits. w [j] is obtained by the processing device.

(S48:変数j判定ステップ)
関数計算部12は、変数jの値が値iであるか否かを判定する。変数jの値が値iでなければ(S48でNO)、処理を(S49)へ進める。一方、変数jの値が値iであれば(S48でYES)、処理を(S51)へ進める。
(S48: Variable j determination step)
The function calculation unit 12 determines whether or not the value of the variable j is the value i. If the value of variable j is not value i (NO in S48), the process proceeds to (S49). On the other hand, if the value of variable j is value i (YES in S48), the process proceeds to (S51).

(S49:変数jインクリメントステップ)
関数計算部12は、変数jに1を加算する。
(S49: Variable j increment step)
The function calculation unit 12 adds 1 to the variable j.

(S50:関数g計算ステップ)
鍵成分kj計算部29は、(S42)で生成された値m[j]と、(S47)で求めた値w[j−1]とを入力として、関数g[j]を計算してdビット長の値k[j]を処理装置により求める。
そして、処理を(S45)及び(S46)へ戻す。
(S50: function g calculation step)
The key component kj calculation unit 29 calculates the function g [j] by using the value m [j] generated in (S42) and the value w [j-1] obtained in (S47) as input, and d A bit length value k [j] is obtained by the processing device.
Then, the process returns to (S45) and (S46).

(S51:関数h’計算ステップ)
関数h’計算部33は、(S47)で求めた値w[i]を入力として、関数h’を計算してtビット長の値wを処理装置により求める。
(S51: Function h ′ calculation step)
The function h ′ calculation unit 33 receives the value w [i] obtained in (S47) as an input, calculates the function h ′, and obtains a value w having a t-bit length by the processing device.

つまり、実施の形態4に係る関数計算部12は、パディング関数pad、関数g[1],...,関数g[i]、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、関数h[1],...,関数h[i]、関数h’を用いて、図3や図6に示す関数Fを構成する。 That is, the function calculation unit 12 according to the fourth embodiment includes the padding function pad, the function g [1],. . . , Function g [i], encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption function E i, 2 , function h [1],. . . , Function h [i] and function h ′ are used to construct the function F shown in FIGS.

パディング関数padは、実施の形態3のパディング関数padと同じである。   The padding function pad is the same as the padding function pad of the third embodiment.

関数g[1]は、L’ビット長の値を入力として、dビット長の値を出力する関数である。
関数g[1]は、例えば、const’をd−L’ビット長の固定値とした場合、L’ビット長の入力値mに対して、const’をビット結合したものを出力する関数である。なお、L’=dの場合には、入力値をそのまま出力するものとする。
値mと値const’とのビット結合の方法は、値mと値const’とをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
The function g [1] is a function that takes an L ′ bit length value as an input and outputs a d bit length value.
The function g [1] is a function that outputs, for example, const ′ bit-coupled to an input value m of L ′ bit length when const ′ is a fixed value of dL ′ bit length. . When L ′ = d, the input value is output as it is.
As a method of bit combination of the value m and the value const ′, the value m and the value const ′ may be combined as they are, or the bits may be mixed and combined.

関数g[2],...,関数g[i]は、Lビット長の値と、nビット長の値とを入力として、dビット長の値を出力する関数である。
値constを(d−L−2n)ビットの固定値とした場合、Lビットの入力値mと、nビットの入力値xと、値constとをビット結合したものを出力する関数である。なお、L=d−2nの場合は、値constは付加しない。
入力値mと入力値xと値constとビット結合の方法は、入力値mと入力値xと値constとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。
Functions g [2],. . . , Function g [i] is a function that receives an L-bit length value and an n-bit length value and outputs a d-bit length value.
When the value const is a fixed value of (d−L−2n) bits, this is a function that outputs a bit combination of an L-bit input value m, an n-bit input value x, and a value const. Note that the value const is not added when L = d−2n.
As a method of combining the input value m, the input value x, the value const, and the bit, the input value m, the input value x, and the value const may be combined as they are, or the bits may be mixed and combined.

暗号化関数E1,1,...,暗号化関数Ei,1と、暗号化関数E1,2,...,暗号化関数Ei,2とは、dビット長の値と、nビット長の値とを入力として、nビット長の値を出力するブロック暗号の暗号化関数である。
暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1,E2は、全て同じ暗号化関数であってもよい。
また、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2は同じ暗号化関数であり、暗号化関数E1,E2は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2と異なる暗号化関数であってもよい。この場合、暗号化関数E1,E2は、同じ暗号化関数であってもよいし、異なる暗号化関数であってもよい。
The encryption functions E 1,1,. . . , Encryption functions E i, 1 and encryption functions E 1 , 2,. . . , Encryption function E i, 2 is a block cipher encryption function that takes a d-bit length value and an n-bit length value as inputs and outputs an n-bit length value.
The encryption functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , The encryption function E i, 2 and the encryption functions E1, E2 may all be the same encryption function.
Also, the encryption functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption functions E i, 2 are the same encryption function, and encryption functions E1, E2 are encrypted functions E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . The encryption function may be different from the encryption function E i, 2 . In this case, the encryption functions E1 and E2 may be the same encryption function or different encryption functions.

関数h[1],...,関数h[i]は、2つのnビット長の値を入力として、2nビット長の値を出力する関数である。
関数h[1],...,関数h[i]は、2つのnビット長の値をビット結合する関数である。2つのnビットの値のビット結合の方法は、2つのnビットの値をそのまま結合してもよいし、ビットを混ぜて結合してもよい。
Functions h [1],. . . , Function h [i] is a function that inputs two n-bit length values and outputs a 2n-bit length value.
Functions h [1],. . . , Function h [i] is a function that bit-combines two n-bit long values. As a method of bit combination of two n-bit values, two n-bit values may be combined as they are, or bits may be mixed and combined.

関数h’は、2つのnビット長の値を入力として、tビット長の値を出力する関数である。
関数h’は、例えば、2つのnビット長の入力値x,yに対して、値xと値yとをビット結合し、そのうちtビットを所定の方法で抽出して出力する関数である。
値xと値yとのビット結合の方法は、値xと値yとをそのまま結合してもよいし、ビットを混ぜて結合してもよい。また、ビットの抽出方法は、先頭から抽出してもよいし、後ろから抽出してもよく、それ以外の抽出方法でもよい。
The function h ′ is a function that inputs two n-bit length values and outputs a t-bit length value.
The function h ′ is, for example, a function that bit-combines a value x and a value y with respect to two n-bit input values x and y, and extracts and outputs t bits of them by a predetermined method.
As a method of bit combination of the value x and the value y, the value x and the value y may be combined as they are, or the bits may be mixed and combined. The bit extraction method may be extracted from the beginning, from the back, or any other extraction method.

実施の形態1に係るハッシュ値演算装置10が、実施の形態4に係る関数計算部12が実現する関数Fを用いて実現したハッシュ関数は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1,E2が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。そして、その安全性のセキュリティレベルはO(2)となる。また、このハッシュ関数は、各暗号化関数の出力長がnビットであり、ハッシュ値の出力長が最大2nビットである。 A hash function realized by the hash value calculation apparatus 10 according to the first embodiment using the function F realized by the function calculation unit 12 according to the fourth embodiment is an encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , Encryption function E i, 2 , and encryption functions E 1, E 2 are the encryption functions in the ideal block cipher, the pseudo random oracle property is satisfied. The security level of the safety is O (2 n ). In this hash function, the output length of each encryption function is n bits, and the output length of the hash value is 2n bits at the maximum.

実施の形態2に係るハッシュ値演算装置10が、実施の形態4に係る関数計算部12が実現する関数Fを用いて実現したハッシュ関数は、暗号化関数E1,1,...,暗号化関数Ei,1、暗号化関数E1,2,...,暗号化関数Ei,2、暗号化関数E1が理想化されたブロック暗号における暗号化関数である場合、擬似ランダムオラクルの性質を満たす。そして、その安全性のセキュリティレベルはO(2)となる。また、このハッシュ関数は、各暗号化関数の出力長がnビットであり、ハッシュ値の出力長が最大nビットである。 A hash function realized by the hash value calculation apparatus 10 according to the second embodiment using the function F realized by the function calculation unit 12 according to the fourth embodiment is an encryption function E 1,1,. . . , Encryption function E i, 1 , encryption function E 1,2,. . . , The encryption function E i, 2 and the encryption function E1 are the encryption functions in the ideal block cipher, the pseudo random oracle property is satisfied. The security level of the safety is O (2 n ). In this hash function, the output length of each encryption function is n bits, and the output length of the hash value is n bits at the maximum.

なお、実施の形態1に係るハッシュ関数と、実施の形態2に係るハッシュ関数との出力長を同じ2nとする場合、実施の形態1に係るハッシュ関数は、上述した通り、安全性のセキュリティレベルはO(2)であり、用いる各暗号化関数の出力長がnビットである。一方、実施の形態2に係るハッシュ関数は、安全性のセキュリティレベルはO(22n)であり、用いる各暗号化関数の出力長が2nビットである。
つまり、ハッシュ関数の出力長を同じにした場合、実施の形態1に係るハッシュ関数の方が、実施の形態2に係るハッシュ関数よりも、用いる暗号化関数の出力長が短くてよい。そのため、例えば、ハッシュ関数を回路で実現した場合、回路規模を小さくできる。一方、実施の形態2に係るハッシュ関数の方が、実施の形態1に係るハッシュ関数よりも、安全性のセキュリティレベルが高い。
Note that when the output lengths of the hash function according to the first embodiment and the hash function according to the second embodiment are the same 2n, the hash function according to the first embodiment has the security level of safety as described above. Is O (2 n ), and the output length of each encryption function used is n bits. On the other hand, in the hash function according to the second embodiment, the security level of security is O (2 2n ), and the output length of each encryption function used is 2n bits.
That is, when the output length of the hash function is the same, the output length of the encryption function used in the hash function according to the first embodiment may be shorter than that of the hash function according to the second embodiment. Therefore, for example, when the hash function is realized by a circuit, the circuit scale can be reduced. On the other hand, the hash function according to the second embodiment has a higher security level than the hash function according to the first embodiment.

以上に説明したハッシュ値演算装置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.
In addition, when the hash value calculation apparatus 10 is comprised with a circuit, you may read "~ part" mentioned above as "~ circuit". In addition, the “to part” described above may be read as “to process”, “to apparatus”, “to device”, “to means”, “to procedure”, and “to 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.

10 ハッシュ値演算装置、11 任意長値入力部、12 関数計算部、13 鍵成分計算部、14 暗号化関数E1計算部、15 暗号化関数E2計算部、16 ハッシュ値計算部、21 パディング部、22 分割部、23 鍵成分k1計算部、24 暗号化関数Ej,1計算部、25 関数R計算部、26 関数p計算部、27 暗号化関数Ej,2計算部、28 関数S計算部、29 鍵成分kj計算部、30 関数V計算部、31 変数j制御部、32 関数h計算部、33 関数h’計算部。 DESCRIPTION OF SYMBOLS 10 Hash value calculation apparatus, 11 Arbitrary length value input part, 12 Function calculation part, 13 Key component calculation part, 14 Encryption function E1 calculation part, 15 Encryption function E2 calculation part, 16 Hash value calculation part, 21 Padding part, 22 division unit, 23 key component k1 calculation unit, 24 encryption function E j, 1 calculation unit, 25 function R calculation unit, 26 function p calculation unit, 27 encryption function E j, 2 calculation unit, 28 function S calculation unit 29 key component kj calculation unit, 30 function V calculation unit, 31 variable j control unit, 32 function h calculation unit, 33 function h ′ calculation unit.

Claims (4)

任意ビット長の値Mを入力する任意長値入力部と、
前記任意長値入力部が入力した値Mを入力として、関数Fを計算してtビット長(tは1以上の整数)の値wを求める関数計算部と、
前記関数計算部が求めた値wを入力として、関数gを計算してdビット長(dはt以上の整数)の値kを求める鍵成分計算部と、
前記鍵成分計算部が求めた値kを鍵成分とし、nビット長の所定の値c1を平文成分として、ブロック暗号の暗号化関数E1を計算してnビット長(nは1以上の整数)の値yを求める暗号化関数E1計算部と、
前記鍵成分計算部が求めた値kを鍵成分とし、nビット長の所定の値c2を平文成分として、ブロック暗号の暗号化関数E2を計算してnビット長の値yyを求める暗号化関数E2計算部と、
前記暗号化関数E1計算部が求めた値yと、前記暗号化関数E2計算部が求めた値yyとを入力として、関数hを計算してn’ビット長(n’は1以上2n以下の整数)の値zをハッシュ値として求めるハッシュ値計算部と
を備えることを特徴とするハッシュ値演算装置。
An arbitrary length value input unit for inputting an arbitrary bit length value M;
A function calculation unit that calculates a function F by using the value M input by the arbitrary length value input unit to obtain a value w of t-bit length (t is an integer of 1 or more);
A key component calculation unit that receives a value w obtained by the function calculation unit and calculates a function g to obtain a value k having a d-bit length (d is an integer equal to or greater than t);
Using the value k obtained by the key component calculation unit as a key component and the n-bit predetermined value c1 as a plaintext component, the block cipher encryption function E1 is calculated and n-bit length (n is an integer of 1 or more) An encryption function E1 calculation unit for obtaining the value y of
An encryption function for calculating a block cipher encryption function E2 by using the value k obtained by the key component calculation unit as a key component and a predetermined value c2 having an n-bit length as a plaintext component to obtain an n-bit length value yy An E2 calculator,
Using the value y obtained by the encryption function E1 calculation unit and the value yy obtained by the encryption function E2 calculation unit as input, the function h is calculated and an n ′ bit length (n ′ is 1 to 2n) A hash value calculation device comprising: a hash value calculation unit that obtains an integer) value z as a hash value.
任意ビット長の値Mを入力する任意長値入力部と、
前記任意長値入力部が入力した値Mを入力として、関数Fを計算してtビット長(tは1以上の整数)の値wを求める関数計算部と、
前記関数計算部が求めた値wを入力として、関数Gを計算してdビット長(dはt以上の整数)の値kを求める鍵成分計算部と、
前記鍵成分計算部が求めた値kを鍵成分とし、nビット長の値c1を平文成分として、ブロック暗号の暗号化関数E1を計算してnビット長(nは1以上の整数)の値yを求める暗号化関数E1計算部と、
前記暗号化関数E1計算部が求めた値yを入力として、関数Hを計算してn’ビット長(n’は1以上n以下の整数)の値zをハッシュ値として求めるハッシュ値計算部と
を備えることを特徴とするハッシュ値演算装置。
An arbitrary length value input unit for inputting an arbitrary bit length value M;
A function calculation unit that calculates a function F by using the value M input by the arbitrary length value input unit to obtain a value w of t-bit length (t is an integer of 1 or more);
A key component calculation unit that calculates a function G by calculating the function G using the value w obtained by the function calculation unit as an input;
Using the value k obtained by the key component calculation unit as the key component, the n-bit length value c1 as the plaintext component, the block cipher encryption function E1 is calculated, and the n-bit length (n is an integer of 1 or more) an encryption function E1 calculation unit for obtaining y;
A hash value calculation unit that calculates a function H by using the value y obtained by the encryption function E1 calculation unit as an input and obtains a value z of n ′ bit length (n ′ is an integer of 1 to n) as a hash value; A hash value calculation device comprising:
前記関数計算部は、
前記任意長値入力部が入力した値Mに対して、所定の値を付加して(L’+L(i−1))ビット長(L’は1以上d以下の整数、Lは1以上d−n以下の整数、iは1以上の整数)の値M’を生成するパディング部と、
前記パディング部が生成した値M’を分割して、L’ビット長の値m[1]と、Lビット長の値m[2],...,値m[i]を生成する分割部と、
前記分割部が生成した値m[1]を入力として、関数T[1]を計算してdビット長の値k[1]を求める鍵成分k1計算部と、
j=1からiまで順に、値k[j]を鍵成分とし、nビット長の値y[j−1](値y[0]は固定値IVとする)を平文成分として、ブロック暗号の暗号化関数Ej,1を計算してnビット長の値x[j]を求める暗号化関数Ej,1計算部と、
j=1からiまで順に、前記値y[j−1]と、前記暗号化関数Ej,1計算部が計算した値x[j]とを入力として、関数R[j]を計算してnビット長の値y[j]を求める関数R計算部と、
j=1からiまで順に、前記値y[j−1]を入力として、関数p[j]を計算してnビット長の値vv[j]を求める関数p計算部と、
j=1からiまで順に、前記値k[j]を鍵成分とし、前記関数p計算部が求めた値vv[j]を平文成分として、ブロック暗号の暗号化関数Ej,2を計算してnビット長の値xx[j]を求める暗号化関数Ej,2計算部と、
j=1からiまで順に、前記暗号化関数Ej,2計算部が求めた値xx[j]を入力と
して、関数S[j]を計算してnビット長の値yy[j]を求める関数S計算部と、
j=2からiまで順に、前記分割部が生成した値m[j]と、前記関数S計算部が計算した値yy[j−1]とを入力として、関数T[j]を計算してdビット長の値k[j]を求める鍵成分kj計算部と、
前記関数R計算部が求めた値y[i]と、前記関数S計算部が求めた値yy[i]とを入力として、関数Vを計算して2nビット長の前記値wを求める関数V計算部と
を備えることを特徴とする請求項1又は2に記載のハッシュ値演算装置。
The function calculator is
A predetermined value is added to the value M input by the arbitrary length value input unit (L ′ + L (i−1)) and the bit length (L ′ is an integer of 1 to d, L is 1 to d) A padding part that generates a value M ′ of an integer less than or equal to −n, i is an integer greater than or equal to 1),
The value M ′ generated by the padding unit is divided into an L ′ bit length value m [1], an L bit length value m [2],. . . , A dividing unit for generating a value m [i],
A key component k1 calculating unit that calculates a function T [1] by using the value m [1] generated by the dividing unit and calculates a value k [1] having a d-bit length;
In order from j = 1 to i, a value k [j] is a key component, and an n-bit length value y [j−1] (a value y [0] is a fixed value IV) is a plaintext component. An encryption function Ej, 1 calculating section for calculating an encryption function Ej, 1 to obtain an n-bit length value x [j];
In order from j = 1 to i, the value y [j−1] and the encryption function Ej, the value x [j] calculated by one calculation unit are input, and the function R [j] is calculated and n A function R calculator for obtaining a bit length value y [j];
a function p calculator that calculates the function p [j] by calculating the function p [j] with the value y [j−1] as an input in order from j = 1 to i;
In order from j = 1 to i, the encryption function Ej, 2 of the block cipher is calculated using the value k [j] as a key component and the value vv [j] obtained by the function p calculation unit as a plaintext component. an encryption function Ej, 2 calculation unit for obtaining an n-bit length value xx [j];
A function for obtaining an n-bit value yy [j] by calculating a function S [j] by inputting the value xx [j] obtained by the encryption function Ej, 2 calculation unit in order from j = 1 to i An S calculator,
In order from j = 2 to i, the function m [j] generated by the dividing unit and the value yy [j−1] calculated by the function S calculating unit are input and the function T [j] is calculated. a key component kj calculation unit for obtaining a value k [j] having a d-bit length;
A function V for obtaining the value w having a 2n-bit length by calculating the function V using the value y [i] obtained by the function R calculation unit and the value yy [i] obtained by the function S calculation unit as inputs. The hash value calculation apparatus according to claim 1, further comprising a calculation unit.
前記関数計算部は、
前記任意長値入力部が入力した値Mに対して、所定の値を付加して(L’+L(i−1))ビット長(L’は1以上d以下の整数、Lは1以上d−2n以下の整数、iは1以上の整数)の値M’を生成するパディング部と、
前記パディング部が生成した値M’を分割して、L’ビット長の値m[1]と、Lビット長の値m[2],...,値m[i]を生成する分割部と、
前記分割部が生成した値m[1]を入力として、関数g[1]を計算してdビット長の値k[1]を求める鍵成分k1計算部と、
j=1からiまで順に、値k[j]を鍵成分とし、nビット長の所定の値cj,1を平文成分として、ブロック暗号の暗号化関数Ej,1を計算してnビット長の値y[j]を求める暗号化関数Ej,1計算部と、
j=1からiまで順に、前記値k[j]を鍵成分とし、nビット長の所定の値cj,2を平文成分として、ブロック暗号の暗号化関数Ej,2を計算してnビット長の値yy[j]を求める暗号化関数Ej,2計算部と、
j=1からiまで順に、前記暗号化関数Ej,1計算部が求めた値y[j]と、前記暗号化関数Ej,2計算部が求めた値yy[j]とを入力として、関数h[j]を計算して2nビット長の値w[j]を求める関数h計算部と、
j=2からiまで順に、前記分割部が生成した値m[j]と、前記関数h計算部が計算した値w[j−1]とを入力として、関数h[j]を計算してdビット長の値k[j]を求める鍵成分kj計算部と、
前記関数h計算部が求めた値w[i]を入力として、関数h’を計算してtビット長の前記値wを求める関数h’計算部と
を備えることを特徴とする請求項1又は2に記載のハッシュ値演算装置。
The function calculator is
A predetermined value is added to the value M input by the arbitrary length value input unit (L ′ + L (i−1)) and the bit length (L ′ is an integer of 1 to d, L is 1 to d) A padding unit that generates a value M ′ of −2n or less, i is an integer of 1 or more);
The value M ′ generated by the padding unit is divided into an L ′ bit length value m [1], an L bit length value m [2],. . . , A dividing unit for generating a value m [i],
A key component k1 calculating unit that calculates a function g [1] by using the value m [1] generated by the dividing unit and calculates a value k [1] having a d-bit length;
In order from j = 1 to i, a block cipher encryption function Ej, 1 is calculated using a value k [j] as a key component and a predetermined value cj, 1 having an n-bit length as a plaintext component. An encryption function Ej for obtaining a value y [j], one calculation unit;
In order from j = 1 to i, the encryption function Ej, 2 of the block cipher is calculated by using the value k [j] as a key component and the predetermined value cj, 2 having an n-bit length as a plaintext component to obtain an n-bit length An encryption function Ej, 2 calculation unit for obtaining the value yy [j] of
In order from j = 1 to i, the value y [j] obtained by the encryption function Ej, 1 calculation unit and the value yy [j] obtained by the encryption function Ej, 2 calculation unit are input, and the function a function h calculator for calculating h [j] to obtain a 2n-bit length value w [j];
In order from j = 2 to i, the value m [j] generated by the dividing unit and the value w [j-1] calculated by the function h calculating unit are input and the function h [j] is calculated. a key component kj calculation unit for obtaining a value k [j] having a d-bit length;
The function h ′ calculating unit which calculates the function h ′ by calculating the value w [i] obtained by the function h calculating unit and calculating the value w having a t-bit length. 2. The hash value calculation device according to 2.
JP2010213244A 2010-09-24 2010-09-24 Hash value arithmetic unit Active JP5528281B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010213244A JP5528281B2 (en) 2010-09-24 2010-09-24 Hash value arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010213244A JP5528281B2 (en) 2010-09-24 2010-09-24 Hash value arithmetic unit

Publications (2)

Publication Number Publication Date
JP2012068436A JP2012068436A (en) 2012-04-05
JP5528281B2 true JP5528281B2 (en) 2014-06-25

Family

ID=46165797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010213244A Active JP5528281B2 (en) 2010-09-24 2010-09-24 Hash value arithmetic unit

Country Status (1)

Country Link
JP (1) JP5528281B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013175599A1 (en) * 2012-05-24 2013-11-28 三菱電機株式会社 Hash value calculation device, hash value calculation method, and hash value calculation program
WO2014046024A1 (en) 2012-09-21 2014-03-27 三菱電機株式会社 Hash value calculation device, hash value calculation method and hash value calculation program
KR101978684B1 (en) * 2017-08-31 2019-05-15 동국대학교 산학협력단 Code-based encryption apparatus and method capable of preventing replay attack
CN117981269A (en) * 2021-10-01 2024-05-03 三菱电机株式会社 Hash value calculation device, hash value calculation method, and hash value calculation program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5532560B2 (en) * 2008-08-25 2014-06-25 ソニー株式会社 Data conversion apparatus, data conversion method, and program
JP5079671B2 (en) * 2008-11-27 2012-11-21 日本電信電話株式会社 Hash value generation device, verification device, hash value generation method, verification method, program, and recording medium
JP5241475B2 (en) * 2008-12-24 2013-07-17 三菱電機株式会社 Hash value calculation device, hash value calculation method, and hash value calculation program
JP2012014077A (en) * 2010-07-02 2012-01-19 Mitsubishi Electric Corp Hash value calculation device, hash value calculation method, and hash value calculation program

Also Published As

Publication number Publication date
JP2012068436A (en) 2012-04-05

Similar Documents

Publication Publication Date Title
JP5229315B2 (en) Encryption device and built-in device equipped with a common key encryption function
US20120314857A1 (en) Block encryption device, block decryption device, block encryption method, block decryption method and program
JP2008145791A (en) Encryption processing device, encryption processing method and computer program
JPWO2015015702A1 (en) Authentication encryption apparatus, authentication encryption method, and authentication encryption program
TW201044334A (en) Encryption device, encryption method, and computer program
WO2017056150A1 (en) Message authenticator generation device, message authenticator generation method, and message authenticator generation program
US11463235B2 (en) Encryption device, encryption method, program, decryption device, and decryption method
WO2013065241A1 (en) Incremental mac tag generation device, method, and program, and message authentication device
JPWO2017203992A1 (en) Encryption apparatus, encryption method, decryption apparatus, and decryption method
US9515830B2 (en) Universal hash function computing device, method and program
Teh et al. A chaos-based authenticated cipher with associated data
JP5528281B2 (en) Hash value arithmetic unit
JP5188414B2 (en) Information processing apparatus, information processing method, and program
JP2010044251A (en) Hash value generator, program and hash value generation method
JP5901783B2 (en) Hash value calculation device and hash value calculation method
JP6305643B2 (en) Message authenticator generating apparatus, message authenticator generating method, and message authenticator generating program
Abdulwahed Chaos-Based Advanced Encryption Standard
KR101971001B1 (en) A method of generating random number based on block cipher with whitebox encryption and apparatus thereof
JP2009188794A (en) Message authenticator generating device, message authenticator verifying device, message authenticator generating method, message authenticator verifying method, program, and recording medium
JP5488608B2 (en) Block encryption apparatus, block encryption method and program
JP2012014077A (en) Hash value calculation device, hash value calculation method, and hash value calculation program
JP5500277B2 (en) Encryption device and built-in device equipped with a common key encryption function
JP2009141407A (en) Message authenticator generator, message authenticator verification apparatus, message authenticator generating method, message authenticator verification method, program, and recording medium
Nu1L Team Crypto
KR20030001888A (en) Cipher algorithm design method using block information without using key

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131217

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140117

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140318

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140415

R150 Certificate of patent or registration of utility model

Ref document number: 5528281

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250