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

ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム Download PDF

Info

Publication number
WO2014046024A1
WO2014046024A1 PCT/JP2013/074801 JP2013074801W WO2014046024A1 WO 2014046024 A1 WO2014046024 A1 WO 2014046024A1 JP 2013074801 W JP2013074801 W JP 2013074801W WO 2014046024 A1 WO2014046024 A1 WO 2014046024A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
function
hash
bit
input
Prior art date
Application number
PCT/JP2013/074801
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 JP2014536822A priority Critical patent/JP5901783B2/ja
Priority to US14/420,022 priority patent/US9419791B2/en
Priority to EP13839043.0A priority patent/EP2899713B1/en
Publication of WO2014046024A1 publication Critical patent/WO2014046024A1/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
    • 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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • 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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/20Manipulating the length of blocks of bits, e.g. padding or block truncation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/24Key scheduling, i.e. generating round keys or sub-keys for block encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/30Compression, e.g. Merkle-Damgard construction

Definitions

  • This invention relates to a technique for safely calculating a hash value even if, for example, a compression function can be calculated by an inverse element.
  • Hash function is a function that takes an arbitrary length value as input and outputs a fixed length hash value.
  • Non-Patent Documents 3 and 4 describe a hash function that uses a compression function configured using, for example, AES-256 as an encryption function of a block cipher.
  • AES-256 In order for the hash functions in Non-Patent Documents 3 and 4 to satisfy collision difficulty, AES-256 to be used needs to be an idealized block cipher (see Non-Patent Documents 1-3).
  • This hash function is a hash function in which the length of the hash value is 2n bits when the plaintext length of the block cipher is n bits.
  • An idealized block cipher is a block cipher selected at random from a set of all block ciphers having a plaintext length (block length) of n bits and a key length of k bits.
  • the plaintext component that is the input of the encryption function that constitutes the compression function and the encryption so that it is difficult to obtain the input of the compression function from the output of the compression function The exclusive OR with the ciphertext component that is the output of the function is used as the output of the compression function.
  • a feedforward operation an operation in which the exclusive OR of the plaintext component and the ciphertext component is used as the output of the compression function is referred to as a feedforward operation.
  • An object of the present invention is, for example, to construct a hash function by removing the feedforward calculation while satisfying the collision difficulty.
  • a compression function calculation unit that calculates an n-bit value y2 [i] by the encryption function using the value x2 [i] as plain text and the value k2 [i] as a key; And a hash value calculation unit that calculates a hash value by a bijection function g with the value y1 [L] and the value y2 [L] calculated by the compression function calculation unit as inputs.
  • the hash value calculation apparatus does not use feedforward calculation. Therefore, the hash value calculation apparatus according to the present invention can reduce the amount of memory used.
  • the hash value calculation apparatus according to the present invention satisfies the collision difficulty when the encryption function of the block cipher is an idealized block cipher.
  • FIG. 6 is a structural diagram of a compression function c used in the hash function according to the first embodiment.
  • FIG. 3 is a structural diagram of a calculation unit of a hash function according to the first embodiment.
  • FIG. 3 is a structural diagram of an input unit of a hash function according to the first embodiment.
  • 1 is a configuration diagram of a hash value calculation apparatus 10 according to Embodiment 1.
  • FIG. 5 is a flowchart showing an operation of the hash value calculation apparatus 10 according to the first embodiment.
  • FIG. 6 is a structural diagram of a compression function c used in a hash function according to the second embodiment.
  • FIG. 6 is a structural diagram of a calculation unit of a hash function according to the second embodiment.
  • FIG. 10 is a structural diagram of a compression function c used in a hash function according to Embodiment 3.
  • FIG. 10 is a structural diagram of a calculation unit of a hash function according to the third embodiment.
  • FIG. 10 is a structural diagram of a compression function c used in a hash function according to the fourth embodiment.
  • FIG. 9 is a structural diagram of a compression function c according to Embodiment 4 when the encryption function e1 and the encryption function e3 are the same.
  • FIG. 10 is a structural diagram of a calculation unit of a hash function according to the fourth embodiment.
  • FIG. 1 is a structural diagram of a compression function c used in the hash function according to the first embodiment.
  • the compression function c is configured using a function f and two block cipher encryption functions e1 and e2 having a plaintext length of n bits and a key length of k bits.
  • the function f receives three values of value M, value w1, and value w2, and outputs four values of value x1, value x2, value k1, and value k2.
  • the value M is kn bits.
  • the value w1 and the value w2 are n bits.
  • the value x1 and the value x2 are n bits.
  • the value k1 and the value k2 are k bits.
  • the function f satisfies the following three conditions (1) to (3). (1) Bijection. (2) When the value M is a fixed value, the value w1 and the value w2, and the value x1 and the value x2 are bijective. (3) The value x1 and the value x2 are not equal, or the value k1 and the value k2 are not equal.
  • the encryption function e1 outputs an n-bit value y1 using the value x1 output from the function f as plain text and the value k1 output from the function f as a key.
  • the encryption function e2 outputs an n-bit value y2 using the value x2 output from the function f as plaintext and the value k2 output from the function f as a key.
  • the encryption functions e1 and e2 may be the same encryption function.
  • FIG. 2 is a structural diagram of the calculation unit of the hash function according to the first embodiment.
  • L (k is an integer of 2 or more) input values M [1],. . . , M [L] as input, a hash value h is calculated.
  • the operation part of the hash function includes L compression functions c [1],. . . , C [L] and a function g that combines two input values.
  • I 1,. . . , L for each integer i is the compression function c shown in FIG. 1, and the function f [i], which is the function f shown in FIG. 1, and the encryption function e1 shown in FIG. It has an encryption function e1 [i] and an encryption function e2 [i] which is the encryption function e2 shown in FIG.
  • the leading compression function c [1] has the value M [1] as the value M, the predetermined fixed value IV1 as the value w1, the predetermined fixed value IV2 as the value w2, the value y1 [1] and the value y2 [1] is output. Specifically, first, three values of the value M [1], the fixed value IV1, and the fixed value IV2 are input, and the value x1 [1], the value x2 [1], and the value k1 [ 1] and k2 [1] are output. Next, the value y1 [1] is output by the encryption function e1 [1] using the value x1 [1] as plain text and the value k1 [1] as a key. Also, the value y2 [1] is output by the encryption function e2 [1] with the value x2 [1] as plain text and the value k2 [1] as the key.
  • the value M [i] is the value M
  • the value y1 [i-1] is the value w1
  • the value y2 [i-1] is the value w2.
  • the value y1 [i] and the value y2 [i] are output.
  • three values of a value M [i], a value y1 [i-1], and a value y2 [i-1] are input, and a value x1 [i], a value is obtained by a function f [i].
  • Four values of x2 [i], value k1 [i], and value k2 [i] are output.
  • the value y1 [i] is output by the encryption function e1 [i] using the value x1 [i] as plain text and the value k1 [i] as a key.
  • the value y2 [i] is output by the encryption function e2 [i] with the value x2 [i] as plain text and the value k2 [i] as the key.
  • the function g is a bijection function, and an n-bit value y1 [L] output from the compression function c [L] and an n-bit value y2 [L] are input as a 2n-bit hash value h. Output.
  • the function g adds each bit of the value y2 [L] after each bit of the value y1 [L].
  • the function g may add each bit of the value y1 [L] after each bit of the value y2 [L], or each bit of the value y1 [L] and each bit of the value y2 [L] May be combined in any order.
  • FIG. 3 is a structural diagram of the input part of the hash function according to the first embodiment.
  • L input values M [1],. . . , M [L] are calculated.
  • the input part of the hash function is configured using a padding function pad and a division function d.
  • the function pad receives the value M and outputs a value M * having a length L times (kn).
  • the function pad outputs two values a * and b * having a length L times that of one of which is not the other suffix (kn).
  • the fact that it is not a suffix means that one of the two values a * and b * is not equal to some lower bits of the other value.
  • the function pad adds 1 to the value M, then adds 0 to the required number of bits, and then adds the value ⁇ M> to the value M *.
  • the value ⁇ M> is a value representing the bit length of the value M by j bits.
  • j 64.
  • the bit length of the value M is 8 bits, the value ⁇ M> is 0... 0100.
  • the division function d is a value M [1],... Obtained by dividing the value M * calculated by the function pad into kn bits in order from the top. . . , The value M [L] is output.
  • FIG. 4 is a configuration diagram of the hash value calculation apparatus 10 according to the first embodiment.
  • the hash value calculation device 10 implements the hash function described above.
  • the hash value calculation device 10 includes an arbitrary length value input unit 11, a padding unit 12, a division unit 13, a predetermined length value input unit 14, a compression function calculation unit 15, and a hash value calculation unit 16.
  • the arbitrary length value input unit 11, padding unit 12, and division unit 13 calculate a hash function input unit, and the default length value input unit 14, compression function calculation unit 15, and hash value calculation unit 16 are hash function calculation units. Calculate
  • the arbitrary length value input unit 11 inputs an arbitrary length value M using an input device.
  • the padding unit 12 receives the value M input by the arbitrary length input unit 11 and calculates the function pad by the processing device and outputs the value M *.
  • the dividing unit 13 receives the value M * as an input, calculates a dividing function d by the processing device, and calculates the values M [1],. . . , M [L] are output.
  • the predetermined length value input unit 14 receives the values M [1],. . . , M [L] are input by the input device.
  • the compression function calculation unit 15 receives the values M [1],. . . , M [L] as inputs, and the compression function c [1],. . . , C [L], and outputs a value y1 [L] and a value y2 [L].
  • the compression function calculation unit 15 includes a function f calculation unit 151 and an encryption function calculation unit 152.
  • the function f calculation unit 151 includes functions f [1],. . . , F [L] are calculated by the processing unit.
  • the encryption function calculation unit 152 includes encryption functions e1 [1],. . .
  • the hash value calculation unit 16 receives the value y1 [L] and the value y2 [L] output from the compression function calculation unit 15, calculates the function g by the processing device, and outputs the hash value h to the output device.
  • FIG. 5 is a flowchart showing the operation of the hash value calculation apparatus 10 according to the first embodiment.
  • S1 Arbitrary length input step
  • the arbitrary length value input unit 11 inputs a value M having an arbitrary bit length.
  • the padding unit 12 receives the value M input in (S1), calculates the function pad, and outputs a (kn) ⁇ L-bit value M *.
  • the dividing unit 13 receives the value M * output in (S2), calculates the dividing function d by the processing device, and calculates (kn) bit values M [1],. . . , M [L] are output.
  • the predetermined length value input unit 14 receives the values M [1],. . . , M [L] are input by the input device.
  • the function calculation step includes four steps from (S51) to (S54).
  • S51: Function f calculation step (1) The function f calculation unit 151 receives the three values of the value M [1], the fixed value IV1, and the fixed value IV2, and calculates the function f [1] to obtain the value x1 [1], the value x2 [1], Four values of value k1 [1] and value k2 [1] are output.
  • S52: Encryption function calculation step (1) The encryption function calculation unit 152 calculates the encryption function e1 [1] using the value x1 [1] as plain text and the value k1 [1] as a key, and outputs the value y1 [1].
  • the encryption function calculation unit 152 calculates the encryption function e2 [1] using the value x2 [1] as plain text and the value k2 [1] as a key, and outputs the value y2 [1].
  • the function f calculation unit 151 receives the three values of the value M [i], the value y1 [i-1], and the value y2 [i-1] as an input, calculates the function f [i], and calculates the value x1 [i ], Value x2 [i], value k1 [i], value k2 [i] are output.
  • the encryption function calculation unit 152 calculates the encryption function e1 [i] using the value x1 [i] as plain text and the value k1 [i] as a key, and outputs the value y1 [i]. Also, the encryption function calculation unit 152 calculates the encryption function e2 [i] using the value x2 [i] as plain text and the value k2 [i] as a key, and outputs the value y2 [i].
  • the hash value calculation unit 16 receives the value y1 [L] and the value y2 [L] output in (S5), calculates the function g, and outputs the hash value h.
  • the hash value calculation apparatus 10 according to Embodiment 1 configures a hash function without using a feedforward operation. As a result, the amount of memory used can be reduced. Further, the hash value calculation apparatus 10 according to Embodiment 1 uses the plaintext component of the encryption function of the block cipher as the ciphertext component of the previous encryption function. Thereby, when the encryption function of the block cipher is an idealized block cipher, a hash function that satisfies the collision difficulty can be realized.
  • the plaintext length is usually 128 bits. 128 bits is short as the length of the hash value. Calculated amount of collision of the hash function output length is 128 bits at brute force, a 2 64 times the hash value calculation. This is because the computable range computer. Therefore, in the hash function according to the first embodiment, the encryption function of the block cipher is used twice with one compression function, and the output length is 256 bits, which is twice the plaintext length. A hash function that makes such an output length twice the plaintext length of the encryption function is called a double block length hash function.
  • Embodiment 2 FIG.
  • functions f [1],. . . , F [L] a hash function that constitutes a compression function has been described.
  • the functions f [1],. . . , F [L] will be described below.
  • the second embodiment is the same as the first embodiment except for the function f.
  • FIG. 6 is a structure diagram of the compression function c used in the hash function according to the second embodiment.
  • the compression function c is configured using a function f and two block cipher encryption functions e1 and e2 having a plaintext length of n bits and a key length of k bits.
  • the encryption functions e1 and e2 are the same as the encryption functions e1 and e2 according to the first embodiment.
  • the function f receives three values of value M, value w1, and value w2, and outputs four values of value x1, value x2, value k1, and value k2.
  • the value M is kn bits.
  • the value w1 and the value w2 are n bits.
  • the value x1 and the value x2 are n bits.
  • the value k1 and the value k2 are k bits.
  • the function f sets the value w1 as the value x1, the value obtained by converting the value w1 with the replacement function p as the value x2, and the value obtained by combining the value M and the value w2 as the value k1 and the value k2.
  • the function f may be a value k1 and a value k2 by arranging each bit of the value M and each bit of the value w2 in an arbitrary order. For example, the function f adds each bit of the value w2 after each bit of the value M to obtain a value k1 and a value k2.
  • the replacement function p is an n-bit replacement function, and is a function that satisfies p (x) ⁇ x with respect to an arbitrary n-bit value x.
  • the replacement function p is a function that calculates an exclusive OR of an n-bit input value x and an n-bit fixed value c, or adds an n-bit fixed value c to the n-bit input value x This function outputs an n-bit value.
  • FIG. 7 is a structural diagram of the calculation unit of the hash function according to the second embodiment.
  • the first compression function c [1] first, three values of the value M [1], the fixed value IV1, and the fixed value IV2 are input, and the value x1 [1] and the value x2 [1] are obtained by the function f [1]. ], Value k1 [1], and value k2 [1] are output.
  • the fixed value IV1 is set to the value x1 [1]
  • the value obtained by converting the fixed value IV1 by the replacement function p is set to the value x2 [1]
  • the value M [1] and the fixed value are set.
  • a value obtained by combining IV2 is a value k1 [1] and a value k2 [1].
  • the value y1 [1] is output by the encryption function e1 [1] using the value x1 [1] as plain text and the value k1 [1] as a key.
  • the value y2 [1] is output by the encryption function e2 [1] with the value x2 [1] as plain text and the value k2 [1] as the key.
  • i 2,. . . , L
  • the function f [i] is input with three values of the value M [i], the value y1 [i-1], and the value y2 [i-1].
  • the value y1 [i-1] is set to the value x1 [i]
  • the value obtained by converting the value y1 [i-1] by the replacement function p is set to the value x2 [i]
  • a value obtained by combining the value M [i] and the value y2 [i-1] is set as a value k1 [i] and a value k2 [i].
  • the value y1 [i] is output by the encryption function e1 [i] using the value x1 [i] as plain text and the value k1 [i] as a key.
  • the value y2 [i] is output by the encryption function e2 [i] with the value x2 [i] as plain text and the value k2 [i] as the key.
  • Embodiment 3 In the third embodiment, as in the second embodiment, the functions f [1],. . . , F [L] will be described below.
  • the third embodiment is the same as the first embodiment except for the function f.
  • FIG. 8 is a structural diagram of the compression function c used in the hash function according to the third embodiment.
  • the compression function c is configured using a function f and two block cipher encryption functions e1 and e2 having a plaintext length of n bits and a key length of k bits.
  • the encryption functions e1 and e2 are the same as the encryption functions e1 and e2 according to the first embodiment.
  • the function f receives three values of value M, value w1, and value w2, and outputs four values of value x1, value x2, value k1, and value k2.
  • the value M is kn bits.
  • the value w1 and the value w2 are n bits.
  • the value x1 and the value x2 are n bits.
  • the value k1 and the value k2 are k bits.
  • the function f sets the value w1 as the value x1, the value obtained by inverting each bit of the value w2 as the value x2, the value obtained by combining the value M and the value w2 as the value k1, and the value M and the value w1 combined. Let the value be the value k2.
  • the function f may be obtained by arranging each bit of the value M and each bit of the value w2 in any order as the value k1, and arranging each bit of the value M and each bit of the value w1 in any order as the value k2. For example, the function f adds each bit of the value M after each bit of the value w2 to obtain the value k1, and adds each bit of the value w1 after each bit of the value M to obtain the value k2.
  • FIG. 9 is a structural diagram of the calculation unit of the hash function according to the third embodiment.
  • the first compression function c [1] first, three values of the value M [1], the fixed value IV1, and the fixed value IV2 are input, and the value x1 [1] and the value x2 [1] are obtained by the function f [1]. ], Value k1 [1], and value k2 [1] are output.
  • the fixed value IV1 is the value x1 [1]
  • the value obtained by inverting each bit of the fixed value IV2 is the value x2 [1]
  • the value M [1] is the fixed value.
  • a value combining IV2 is a value k1 [1], and a value combining value M [1] and a fixed value IV1 is a value k2 [1].
  • the value y1 [1] is output by the encryption function e1 [1] using the value x1 [1] as plain text and the value k1 [1] as a key.
  • the value y2 [1] is output by the encryption function e2 [1] with the value x2 [1] as plain text and the value k2 [1] as the key.
  • i 2,. . . , L
  • the function f [i] is input with three values of the value M [i], the value y1 [i-1], and the value y2 [i-1].
  • the value y1 [i] is output by the encryption function e1 [i] using the value x1 [i] as plain text and the value k1 [i] as a key.
  • the value y2 [i] is output by the encryption function e2 [i] with the value x2 [i] as plain text and the value k2 [i] as the key.
  • Embodiment 4 FIG. In the first embodiment, in the fourth embodiment, the functions f [1],. . . , F [L] will be described below.
  • the fourth embodiment is the same as the first embodiment except for the function f.
  • FIG. 10 is a structural diagram of the compression function c used in the hash function according to the fourth embodiment.
  • the compression function c is configured using a function f and two block cipher encryption functions e1 and e2 having a plaintext length of n bits and a key length of k bits.
  • the encryption functions e1 and e2 are the same as the encryption functions e1 and e2 according to the first embodiment.
  • the function f receives three values of value M, value w1, and value w2, and outputs four values of value x1, value x2, value k1, and value k2.
  • the value M is kn bits.
  • the value w1 and the value w2 are n bits.
  • the value x1 and the value x2 are n bits.
  • the value k1 and the value k2 are k bits.
  • the function f has the value w1 as the value x1, the value w2 as the value x2, the value k1 as a combination of the value M and the value w2, the value x1 as plain text, and the value k1 as the key.
  • a value obtained by combining the value and the value M is a value k2.
  • the function f arranges each bit of the value M and each bit of the value w2 in an arbitrary order to obtain a value k1, and arranges each bit of the value M and each bit of the value output by the encryption function e3 in an arbitrary order to obtain a value k2. And it is sufficient. For example, the function f adds each bit of the value M after each bit of the value w2 to obtain the value k1, and adds each bit of the value output by the encryption function e3 after each bit of the value M to obtain the value k2.
  • the encryption function e3 used in the function f is a block cipher encryption function that outputs an n-bit value using an n-bit value as plain text and a k-bit value as a key.
  • the encryption function e3 may be the same as the encryption function e1.
  • FIG. 11 is a structural diagram of the compression function c according to Embodiment 4 when the encryption function e1 and the encryption function e3 are the same.
  • the encryption functions e1 and e3 are the encryption function e1.
  • FIG. 12 is a structural diagram of the calculation unit of the hash function according to the fourth embodiment.
  • the hash function calculation unit is configured using the compression function c when the encryption function e1 and the encryption function e3 are the same.
  • the first compression function c [1] first, three values of the value M [1], the fixed value IV1, and the fixed value IV2 are input, and the value x1 [1] and the value x2 [1] are obtained by the function f [1]. ], Value k1 [1], and value k2 [1] are output.
  • the fixed value IV1 is a value x1 [1]
  • the fixed value IV2 is a value x2 [1]
  • a value obtained by combining the value M [1] and the fixed value IV2 is a value.
  • k1 [1] and the value y1 [1] obtained by calculating the encryption function e1 [1] using the value x1 [1] as plain text and the value k1 [1] as a key is combined with the value M [1].
  • the value is k2 [1].
  • the value y2 [1] is output by the encryption function e2 [1] using the value x2 [1] as plain text and the value k2 [1] as a key.
  • i 2,. .
  • the function f [i] is input with three values of the value M [i], the value y1 [i-1], and the value y2 [i-1]. ], Four values of value x1 [i], value x2 [i], value k1 [i], and value k2 [i] are output.
  • the value y1 [i-1] is the value x1 [i]
  • the value y2 [i-1] is the value x2 [i]
  • a value obtained by combining [i ⁇ 1] is a value k1 [i]
  • a value y1 [i] obtained by calculating the encryption function e1 [i] using the value x1 [i] as plain text and the value k1 [i] as a key.
  • the value k2 [i] is a value obtained by combining the value M [i] and the value M [i].
  • the value y2 [i] is output by the encryption function e2 [i] using the value x2 [i] as plain text and the value k2 [i] as a key.
  • the hash value calculation apparatus 10 described above is configured by, for example, a circuit or software.
  • the processing device in the above description is an arithmetic circuit, for example, and the memory is a register, for example.
  • the processing device in the above description is, for example, a CPU (Central Processing Unit), and the memory 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 memory such as a register or RAM.
  • LCD Liquid Crystal Display
  • a communication board or a memory 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.

Abstract

 フィードフォワード演算を取り除いてハッシュ関数を構成することを目的とする。ハッシュ値計算装置は、i=1,...,Lの各整数iについて昇順に、k-nビットの値M[i]と、nビットの値y1[i-1](値y1[0]は所定値IV1)と、nビットの値y2[i-1](値y2[0]は所定値IV2)とを入力として、nビットの値x1[i]及び値x2[i]と、kビットの値k1[i]及び値k2[i]とを出力する関数f[i]を計算し、値x1[i]を平文とし、値k1[i]を鍵として、ブロック暗号の暗号化関数によりnビットの値y1[i]を計算し、値x2[i]を平文とし、値k2[i]を鍵として、ブロック暗号の暗号化関数によりnビットの値y2[i]を計算する。そして、ハッシュ値計算装置は、計算した値y1[L]と値y2[L]とを入力として、全単射関数gによりハッシュ値を計算する。

Description

ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム
 この発明は、例えば、圧縮関数が逆元計算可能であったとしても安全にハッシュ値を計算する技術に関する。
 ハッシュ関数は、任意長の値を入力として、固定長のハッシュ値を出力する関数である。
 非特許文献3,4には、ブロック暗号の暗号化関数として、例えば、AES-256を用いて構成された圧縮関数を利用したハッシュ関数に関する記載がある。非特許文献3,4におけるハッシュ関数が衝突困難性を満たすためには、用いるAES-256が理想化されたブロック暗号である必要がある(非特許文献1-3参照)。
 このハッシュ関数は、ブロック暗号の平文長がnビットの場合、ハッシュ値の長さが2nビットとなるハッシュ関数である。
 理想化されたブロック暗号とは、平文長(ブロック長)がnビット、鍵長がkビットの全てのブロック暗号の集合から、ランダムに選ばれたブロック暗号のことである。
 出力長がwビットのハッシュ関数Hが、衝突困難性を満たすとは、H(M)=H(M’)となる異なる2つの入力値M,M’を見つけることが困難なことである。厳密には、2w/2回以下のハッシュ値の計算ではこのような入力値を見つけることができなければ、衝突困難性を満たすとされる。
Jooyoung Lee, Martijn Stam, and John P. Steinberger. The Collision Security of Tandem-DM in the Ideal Cipher Model. CRYPTO 2011. pp561-577. Lecture Notes in Computer Science 6841. Ewan Fleischmann, Michael Gorski, and Stefan Lucks. Security of Cyclic Double Block Length Hash Functions. IMA Int. Conf. 2009. pp153-175. Lecture Notes in Computer Science 5921. Shoichi Hirose. Some Plausible Constructions of Double-Block-Length Hash Functions. FSE 2006. pp210-225. Lecture Notes in Computer Science 4047. X. Lai and J.L.Massey. Hash Functions Based on Block Ciphers. EUROCRYPT’92. pp55-70. Lecture Notes in Computer Science 658.
 非特許文献3,4に記載されたハッシュ関数では、圧縮関数の出力から圧縮関数の入力を求めることが困難となるように、圧縮関数を構成する暗号化関数の入力である平文成分と暗号化関数の出力である暗号文成分との排他的論理和を圧縮関数の出力としている。以下、平文成分と暗号文成分とを排他的論理和したものを圧縮関数の出力とする演算をフィードフォワード演算と呼ぶ。
 フィードフォワード演算を使った場合、暗号化関数の出力が計算できるまで、暗号化関数の入力を記録しておく必要があり、その分のメモリが必要となる。しかし、メモリの使用量を減らすためにフィードフォワード演算を取り除いた場合、圧縮関数の出力から圧縮関数の入力が計算できてしまう。出力から入力を計算できるという性質を用いると、圧縮関数の衝突困難性を破ることが可能となる。衝突困難性が破られた圧縮関数を利用してハッシュ関数を構成した場合、ハッシュ関数が衝突困難性を満たさなくなる恐れがある。
 この発明は、例えば、衝突困難性を満たしつつ、フィードフォワード演算を取り除いてハッシュ関数を構成することを目的とする。
 この発明に係るハッシュ値計算装置は、
 平文長がnビットであり、鍵長がkビット(k>n)であるブロック暗号の暗号化関数を用いてハッシュ値を計算するハッシュ値計算装置であり、
 k-nビットのL個(Lは2以上の整数)の値M[1],...,値M[L]を入力する既定長値入力部と、
 i=1,...,Lの各整数iについて昇順に、前記既定長値入力部が入力した値M[i]と、nビットの値y1[i-1](値y1[0]は所定値IV1)と、nビットの値y2[i-1](値y2[0]は所定値IV2)とを入力として、nビットの値x1[i]及び値x2[i]と、kビットの値k1[i]及び値k2[i]とを出力する関数f[i]を計算し、前記値x1[i]を平文とし、前記値k1[i]を鍵として、前記暗号化関数によりnビットの値y1[i]を計算し、前記値x2[i]を平文とし、前記値k2[i]を鍵として、前記暗号化関数によりnビットの値y2[i]を計算する圧縮関数計算部と、
 前記圧縮関数計算部が計算した値y1[L]と値y2[L]とを入力として、全単射関数gによりハッシュ値を計算するハッシュ値計算部と
を備えることを特徴とする。
 この発明に係るハッシュ値計算装置では、フィードフォワード演算を用いていない。そのため、この発明に係るハッシュ値計算装置は、メモリの使用量を減らすことができる。また、この発明に係るハッシュ値計算装置では、ブロック暗号の暗号化関数が理想化されたブロック暗号である場合、衝突困難性を満たす。
実施の形態1に係るハッシュ関数で利用される圧縮関数cの構造図。 実施の形態1に係るハッシュ関数の演算部の構造図。 実施の形態1に係るハッシュ関数の入力部の構造図。 実施の形態1に係るハッシュ値計算装置10の構成図。 実施の形態1に係るハッシュ値計算装置10の動作を示すフローチャート。 実施の形態2に係るハッシュ関数で利用される圧縮関数cの構造図。 実施の形態2に係るハッシュ関数の演算部の構造図。 実施の形態3に係るハッシュ関数で利用される圧縮関数cの構造図。 実施の形態3に係るハッシュ関数の演算部の構造図。 実施の形態4に係るハッシュ関数で利用される圧縮関数cの構造図。 暗号化関数e1と暗号化関数e3とが同じである場合の実施の形態4に係る圧縮関数cの構造図。 実施の形態4に係るハッシュ関数の演算部の構造図。
 実施の形態1.
 図1は、実施の形態1に係るハッシュ関数で利用される圧縮関数cの構造図である。
 圧縮関数cは、関数fと、平文長がnビットで鍵長がkビットである2つのブロック暗号の暗号化関数e1,e2とを用いて構成される。
 関数fは、値M、値w1、値w2の3つの値を入力として、値x1、値x2、値k1、値k2の4つの値を出力する。値Mは、k-nビットである。値w1及び値w2は、nビットである。値x1及び値x2は、nビットである。値k1及び値k2は、kビットである。
 関数fは、以下の(1)から(3)の3つの条件を満たす。(1)全単射である。(2)値Mを固定値とした場合、値w1及び値w2と、値x1及び値x2とは、全単射である。(3)値x1と値x2とが等しくない、又は、値k1と値k2とが等しくない。
 暗号化関数e1は、関数fの出力である値x1を平文とし、関数fの出力である値k1を鍵として、nビットの値y1を出力する。
 暗号化関数e2は、関数fの出力である値x2を平文とし、関数fの出力である値k2を鍵として、nビットの値y2を出力する。
 暗号化関数e1,e2は同じ暗号化関数であってもよい。
 図2は、実施の形態1に係るハッシュ関数の演算部の構造図である。
 ハッシュ関数の演算部では、k-nビットのL個(Lは2以上の整数)の入力値M[1],...,M[L]を入力として、ハッシュ値hが計算される。
 ハッシュ関数の演算部は、L個の圧縮関数c[1],...,c[L]と、2つの入力値を組み合わせる関数gとを用いて構成される。
 i=1,...,Lの各整数iについての圧縮関数c[i]は、図1に示す圧縮関数cであり、図1に示す関数fである関数f[i]と、図1に示す暗号化関数e1である暗号化関数e1[i]と、図1に示す暗号化関数e2である暗号化関数e2[i]とを有する。
 先頭の圧縮関数c[1]は、値M[1]を前記値Mとし、所定の固定値IV1を前記値w1とし、所定の固定値IV2を前記値w2として、値y1[1]及び値y2[1]を出力する。
 具体的には、まず、値M[1]、固定値IV1、固定値IV2の3つの値を入力として、関数f[1]により、値x1[1]、値x2[1]、値k1[1]、値k2[1]の4つの値が出力される。次に、値x1[1]を平文とし、値k1[1]を鍵として、暗号化関数e1[1]により、値y1[1]が出力される。また、値x2[1]を平文とし、値k2[1]を鍵として、暗号化関数e2[1]により、値y2[1]が出力される。
 i=2,...,Lの各iについての圧縮関数c[i]は、値M[i]を前記値Mとし、値y1[i-1]を前記値w1とし、値y2[i-1]を前記値w2として、値y1[i]及び値y2[i]を出力する。
 具体的には、まず、値M[i]、値y1[i-1]、値y2[i-1]の3つの値を入力として、関数f[i]により、値x1[i]、値x2[i]、値k1[i]、値k2[i]の4つの値が出力される。次に、値x1[i]を平文とし、値k1[i]を鍵として、暗号化関数e1[i]により、値y1[i]が出力される。また、値x2[i]を平文とし、値k2[i]を鍵として、暗号化関数e2[i]により、値y2[i]が出力される。
 関数gは、全単射関数であり、圧縮関数c[L]が出力したnビットの値y1[L]と、nビットの値y2[L]とを入力として、2nビットのハッシュ値hとして出力する。
 例えば、関数gは、値y1[L]の各ビット後に、値y2[L]の各ビットを付加する。もちろん、関数gは、値y2[L]の各ビット後に、値y1[L]の各ビットを付加してもよいし、値y1[L]の各ビットと値y2[L]の各ビットとを任意の順に組み合わせてもよい。
 図3は、実施の形態1に係るハッシュ関数の入力部の構造図である。
 ハッシュ関数の入力部では、演算部へ入力するL個の入力値M[1],...,M[L]が計算される。
 ハッシュ関数の入力部は、パディング関数padと、分割関数dとを用いて構成される。
 関数padは、値Mを入力として、(k-n)のL倍の長さの値M*を出力する。
 関数padは、任意の2つの値a,bが入力された場合、一方が他方のサフィックスになっていない(k-n)のL倍の長さの2つの値a*,b*を出力する。サフィックスになっていないとは、2つの値a*,b*のうち一方の値が、他方の値の下位の一部のビットと等しくないということである。
 例えば、関数padは、値Mの後に1を付加し、その後に0を必要なビット数付加して、その後に値<M>を付加して値M*とする。ここで、値<M>は、値Mのビット長をjビットでビット表現した値である。例えば、j=64とする。例えば、値Mのビット長が8ビットである場合、値<M>は、0・・・0100である。
 分割関数dは、関数padが計算した値M*を先頭から順にk-nビット毎に分割して値M[1],...,値M[L]を出力する。
 図4は、実施の形態1に係るハッシュ値計算装置10の構成図である。
 ハッシュ値計算装置10は、上述したハッシュ関数を実現する。
 ハッシュ値計算装置10は、任意長値入力部11、パディング部12、分割部13、既定長値入力部14、圧縮関数計算部15、ハッシュ値計算部16を備える。
 任意長値入力部11、パディング部12、分割部13は、ハッシュ関数の入力部を計算し、既定長値入力部14、圧縮関数計算部15、ハッシュ値計算部16は、ハッシュ関数の演算部を計算する。
 任意長値入力部11は、任意長の値Mを入力装置により入力する。
 パディング部12は、任意長値入力部11が入力した値Mを入力として、処理装置により関数padを計算して、値M*を出力する。
 分割部13は、値M*を入力として、処理装置により分割関数dを計算して、値M[1],...,M[L]を出力する。
 既定長値入力部14は、分割部13が出力した値M[1],...,M[L]を入力装置により入力する。
 圧縮関数計算部15は、既定長値入力部14が入力した値M[1],...,M[L]を入力として、処理装置により圧縮関数c[1],...,c[L]を計算して、値y1[L]及び値y2[L]を出力する。圧縮関数計算部15は、関数f計算部151、暗号化関数計算部152を備える。関数f計算部151は、圧縮関数を構成する関数f[1],...,f[L]を処理装置により計算する。暗号化関数計算部152は、圧縮関数を構成する暗号化関数e1[1],...,e1[L]及び暗号化関数e2[1],...,e2[L]を処理装置により計算する。
 ハッシュ値計算部16は、圧縮関数計算部15が出力した値y1[L]及び値y2[L]を入力として、処理装置により関数gを計算して、ハッシュ値hを出力装置へ出力する。
 図5は、実施の形態1に係るハッシュ値計算装置10の動作を示すフローチャートである。
 (S1:任意長値入力ステップ)
 任意長値入力部11は、任意ビット長の値Mを入力する。
 (S2:パディングステップ)
 パディング部12は、(S1)で入力された値Mを入力として、関数padを計算して、(k-n)×Lビットの値M*を出力する。
 (S3:分割ステップ)
 分割部13は、(S2)で出力された値M*を入力として、処理装置により分割関数dを計算して、(k-n)ビットの値M[1],...,M[L]を出力する。
 (S4:既定長値入力ステップ)
 既定長値入力部14は、(S3)で出力された値M[1],...,M[L]を入力装置により入力する。
 (S5:圧縮関数計算ステップ)
 関数計算ステップは、(S51)から(S54)までの4つのステップを備える。
 (S51:関数f計算ステップ(1))
 関数f計算部151は、値M[1]、固定値IV1、固定値IV2の3つの値を入力として、関数f[1]を計算して、値x1[1]、値x2[1]、値k1[1]、値k2[1]の4つの値を出力する。
 (S52:暗号化関数計算ステップ(1))
 暗号化関数計算部152は、値x1[1]を平文とし、値k1[1]を鍵として、暗号化関数e1[1]を計算して、値y1[1]を出力する。また、暗号化関数計算部152は、値x2[1]を平文とし、値k2[1]を鍵として、暗号化関数e2[1]を計算して、値y2[1]を出力する。
 続いて、i=2,...,Lの各整数iについて昇順に、(S53)から(S54)までの処理が実行される。
 (S53:関数f計算ステップ(2))
 関数f計算部151は、値M[i]、値y1[i-1]、値y2[i-1]の3つの値を入力として、関数f[i]を計算して、値x1[i]、値x2[i]、値k1[i]、値k2[i]の4つの値を出力する。
 (S54:暗号化関数計算ステップ(2))
 暗号化関数計算部152は、値x1[i]を平文とし、値k1[i]を鍵として、暗号化関数e1[i]を計算して、値y1[i]を出力する。また、暗号化関数計算部152は、値x2[i]を平文とし、値k2[i]を鍵として、暗号化関数e2[i]を計算して、値y2[i]を出力する。
 (S6:ハッシュ値計算ステップ)
 ハッシュ値計算部16は、(S5)で出力された値y1[L]及び値y2[L]を入力として、関数gを計算して、ハッシュ値hを出力する。
 以上のように、実施の形態1に係るハッシュ値計算装置10は、フィードフォワード演算を使わずハッシュ関数を構成する。これにより、メモリの使用量を減らすことができる。
 また、実施の形態1に係るハッシュ値計算装置10は、ブロック暗号の暗号化関数の平文成分を、前の暗号化関数の暗号文成分としている。これにより、ブロック暗号の暗号化関数が理想化されたブロック暗号である場合、衝突困難性を満たすハッシュ関数を実現できる。
 なお、AES-256の場合、通常、平文長は128ビットである。128ビットは、ハッシュ値の長さとしては短い。出力長が128ビットのハッシュ関数の衝突困難性の計算量は総当り攻撃で、264回のハッシュ値計算であり、これはコンピュータで計算可能な範囲のためである。そこで、実施の形態1に係るハッシュ関数では、1つの圧縮関数でブロック暗号の暗号化関数を2回使い、出力長を平文長の2倍の256ビットにしている。このような出力長を暗号化関数の平文長の2倍にするハッシュ関数を倍ブロック長ハッシュ関数と呼ぶ。
 実施の形態2.
 実施の形態1では、3つの条件を満たす関数f[1],...,f[L]を用いて圧縮関数を構成したハッシュ関数について説明した。実施の形態2では、関数f[1],...,f[L]をより具体化したハッシュ関数について説明する。
 実施の形態2では、関数f以外は実施の形態1と同じである。
 図6は、実施の形態2に係るハッシュ関数で利用される圧縮関数cの構造図である。
 圧縮関数cは、関数fと、平文長がnビットで鍵長がkビットである2つのブロック暗号の暗号化関数e1,e2とを用いて構成される。暗号化関数e1,e2は、実施の形態1に係る暗号化関数e1,e2と同じである。
 関数fは、値M、値w1、値w2の3つの値を入力として、値x1、値x2、値k1、値k2の4つの値を出力する。値Mは、k-nビットである。値w1及び値w2は、nビットである。値x1及び値x2は、nビットである。値k1及び値k2は、kビットである。
 関数fは、値w1を値x1とし、値w1を置換関数pで変換した値を値x2とし、値Mと値w2とを組み合わせた値を値k1及び値k2とする。
 関数fは、値Mの各ビットと値w2の各ビットとを任意の順に並べて値k1及び値k2とすればよい。例えば、関数fは、値Mの各ビットの後に値w2の各ビットを付加して値k1及び値k2とする。
 置換関数pは、nビットの置換関数であり、任意のnビットの値xに対してp(x)≠xとなる関数である。例えば、置換関数pは、nビットの入力値xとnビットの固定値cとの排他的論理和を計算する関数や、nビットの入力値xにnビットの固定値cを加算して下位nビットの値を出力する関数である。
 図7は、実施の形態2に係るハッシュ関数の演算部の構造図である。
 先頭の圧縮関数c[1]では、まず、値M[1]、固定値IV1、固定値IV2の3つの値を入力として、関数f[1]により、値x1[1]、値x2[1]、値k1[1]、値k2[1]の4つの値が出力される。ここで、関数f[1]では、固定値IV1が値x1[1]とされ、固定値IV1を置換関数pで変換した値が値x2[1]とされ、値M[1]と固定値IV2とを組み合わせた値が値k1[1]及び値k2[1]とされる。次に、値x1[1]を平文とし、値k1[1]を鍵として、暗号化関数e1[1]により、値y1[1]が出力される。また、値x2[1]を平文とし、値k2[1]を鍵として、暗号化関数e2[1]により、値y2[1]が出力される。
 i=2,...,Lの各iについての圧縮関数c[i]では、まず、値M[i]、値y1[i-1]、値y2[i-1]の3つの値を入力として、関数f[i]により、値x1[i]、値x2[i]、値k1[i]、値k2[i]の4つの値が出力される。ここで、関数f[i]では、値y1[i-1]が値x1[i]とされ、値y1[i-1]を置換関数pで変換した値が値x2[i]とされ、値M[i]と値y2[i-1]とを組み合わせた値が値k1[i]及び値k2[i]とされる。次に、値x1[i]を平文とし、値k1[i]を鍵として、暗号化関数e1[i]により、値y1[i]が出力される。また、値x2[i]を平文とし、値k2[i]を鍵として、暗号化関数e2[i]により、値y2[i]が出力される。
 実施の形態3.
 実施の形態3では、実施の形態2と同様に、関数f[1],...,f[L]をより具体化したハッシュ関数について説明する。
 実施の形態3では、関数f以外は実施の形態1と同じである。
 図8は、実施の形態3に係るハッシュ関数で利用される圧縮関数cの構造図である。
 圧縮関数cは、関数fと、平文長がnビットで鍵長がkビットである2つのブロック暗号の暗号化関数e1,e2とを用いて構成される。暗号化関数e1,e2は、実施の形態1に係る暗号化関数e1,e2と同じである。
 関数fは、値M、値w1、値w2の3つの値を入力として、値x1、値x2、値k1、値k2の4つの値を出力する。値Mは、k-nビットである。値w1及び値w2は、nビットである。値x1及び値x2は、nビットである。値k1及び値k2は、kビットである。
 関数fは、値w1を値x1とし、値w2の各ビットを反転させた値を値x2とし、値Mと値w2とを組み合わせた値を値k1とし、値Mと値w1とを組み合わせた値を値k2とする。
 関数fは、値Mの各ビットと値w2の各ビットとを任意の順に並べて値k1とし、値Mの各ビットと値w1の各ビットとを任意の順に並べて値k2とすればよい。例えば、関数fは、値w2の各ビットの後に値Mの各ビットを付加して値k1とし、値Mの各ビットの後に値w1の各ビットを付加して値k2とする。
 図9は、実施の形態3に係るハッシュ関数の演算部の構造図である。
 先頭の圧縮関数c[1]では、まず、値M[1]、固定値IV1、固定値IV2の3つの値を入力として、関数f[1]により、値x1[1]、値x2[1]、値k1[1]、値k2[1]の4つの値が出力される。ここで、関数f[1]では、固定値IV1が値x1[1]とされ、固定値IV2の各ビットを反転させた値が値x2[1]とされ、値M[1]と固定値IV2とを組み合わせた値が値k1[1]とされ、値M[1]と固定値IV1とを組み合わせた値が値k2[1]とされる。次に、値x1[1]を平文とし、値k1[1]を鍵として、暗号化関数e1[1]により、値y1[1]が出力される。また、値x2[1]を平文とし、値k2[1]を鍵として、暗号化関数e2[1]により、値y2[1]が出力される。
 i=2,...,Lの各iについての圧縮関数c[i]では、まず、値M[i]、値y1[i-1]、値y2[i-1]の3つの値を入力として、関数f[i]により、値x1[i]、値x2[i]、値k1[i]、値k2[i]の4つの値が出力される。ここで、関数f[i]では、値y1[i-1]が値x1[i]とされ、値y2[i-1]の各ビットを反転させた値が値x2[i]とされ、値M[i]と値y2[i-1]とを組み合わせた値が値k1[i]とされ、値M[i]と値y1[i-1]とを組み合わせた値が値k2[i]とされる。次に、値x1[i]を平文とし、値k1[i]を鍵として、暗号化関数e1[i]により、値y1[i]が出力される。また、値x2[i]を平文とし、値k2[i]を鍵として、暗号化関数e2[i]により、値y2[i]が出力される。
 実施の形態4.
 実施の形態1では、実施の形態4では、実施の形態2,3と同様に、関数f[1],...,f[L]をより具体化したハッシュ関数について説明する。
 実施の形態4では、関数f以外は実施の形態1と同じである。
 図10は、実施の形態4に係るハッシュ関数で利用される圧縮関数cの構造図である。
 圧縮関数cは、関数fと、平文長がnビットで鍵長がkビットである2つのブロック暗号の暗号化関数e1,e2とを用いて構成される。暗号化関数e1,e2は、実施の形態1に係る暗号化関数e1,e2と同じである。
 関数fは、値M、値w1、値w2の3つの値を入力として、値x1、値x2、値k1、値k2の4つの値を出力する。値Mは、k-nビットである。値w1及び値w2は、nビットである。値x1及び値x2は、nビットである。値k1及び値k2は、kビットである。
 関数fは、値w1を値x1とし、値w2を値x2とし、値Mと値w2とを組み合わせた値を値k1とし、値x1を平文とし値k1を鍵として暗号化関数e3が出力した値と値Mとを組み合わせた値を値k2とする。
 関数fは、値Mの各ビットと値w2の各ビットとを任意の順に並べて値k1とし、値Mの各ビットと暗号化関数e3が出力した値の各ビットとを任意の順に並べて値k2とすればよい。例えば、関数fは、値w2の各ビットの後に値Mの各ビットを付加して値k1とし、値Mの各ビットの後に暗号化関数e3が出力した値の各ビットを付加して値k2とする。
 関数fで用いられる暗号化関数e3は、nビットの値を平文とし、kビットの値を鍵として、nビットの値を出力するブロック暗号の暗号化関数である。暗号化関数e3は、暗号化関数e1と同じであってもよい。
 図11は、暗号化関数e1と暗号化関数e3とが同じである場合の実施の形態4に係る圧縮関数cの構造図である。図11では、暗号化関数e1,e3を暗号化関数e1としている。
 図12は、実施の形態4に係るハッシュ関数の演算部の構造図である。図12では、暗号化関数e1と暗号化関数e3とが同じである場合の圧縮関数cを用いてハッシュ関数の演算部を構成している。
 先頭の圧縮関数c[1]では、まず、値M[1]、固定値IV1、固定値IV2の3つの値を入力として、関数f[1]により、値x1[1]、値x2[1]、値k1[1]、値k2[1]の4つの値が出力される。ここで、関数f[1]では、固定値IV1が値x1[1]とされ、固定値IV2が値x2[1]とされ、値M[1]と固定値IV2とを組み合わせた値が値k1[1]とされ、値x1[1]を平文とし値k1[1]を鍵として暗号化関数e1[1]を計算した値y1[1]と値M[1]とを組み合わせた値が値k2[1]とされる。次に、値x2[1]を平文とし、値k2[1]を鍵として、暗号化関数e2[1]により、値y2[1]が出力される。
 i=2,...,Lの各iについての圧縮関数c[i]では、まず、値M[i]、値y1[i-1]、値y2[i-1]の3つの値を入力として、関数f[i]により、値x1[i]、値x2[i]、値k1[i]、値k2[i]の4つの値が出力される。ここで、関数f[i]では、値y1[i-1]が値x1[i]とされ、値y2[i-1]が値x2[i]とされ、値M[i]と値y2[i-1]とを組み合わせた値が値k1[i]とされ、値x1[i]を平文とし値k1[i]を鍵として暗号化関数e1[i]を計算した値y1[i]と値M[i]とを組み合わせた値が値k2[i]とされる。次に、値x2[i]を平文とし、値k2[i]を鍵として、暗号化関数e2[i]により、値y2[i]が出力される。
 以上に説明したハッシュ値計算装置10は、例えば、回路やソフトウェア等で構成される。回路で構成される場合には、上記説明における処理装置は、例えば演算回路であり、メモリは、例えばレジスタである。また、ソフトウェアで構成される場合には、上記説明における処理装置は、例えばCPU(Central Processing Unit)であり、メモリは、例えばRAM(Random Access Memory)である。また、上記説明における入力装置は、例えばキーボード、通信ボードであり、出力装置は、例えばLCD(Liquid Crystal Display)等の表示装置、通信ボード、レジスタやRAM等のメモリである。もちろん、これらに限定されるものではない。
 なお、ハッシュ値計算装置10を回路で構成する場合、上述した「~部」を「~回路」と読み変えてもよい。また、上述した「~部」は、「~処理」、「~装置」、「~機器」、「~手段」、「~手順」、「~機能」と読み替えてもよい。つまり、「~部」として説明するものは、ROM(Read Only Memory)に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、素子・デバイス・基板・配線などのハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実現されても構わない。
 10 ハッシュ値計算装置、11 任意長値入力部、12 パディング部、13 分割部、14 既定長値入力部、15 圧縮関数計算部、151 関数f計算部、152 暗号化関数計算部、16 ハッシュ値計算部。

Claims (8)

  1.  平文長がnビットであり、鍵長がkビット(k>n)であるブロック暗号の暗号化関数を用いてハッシュ値を計算するハッシュ値計算装置であり、
     k-nビットのL個(Lは2以上の整数)の値M[1],...,値M[L]を入力する既定長値入力部と、
     i=1,...,Lの各整数iについて昇順に、前記既定長値入力部が入力した値M[i]と、nビットの値y1[i-1](値y1[0]は所定値IV1)と、nビットの値y2[i-1](値y2[0]は所定値IV2)とを入力として、nビットの値x1[i]及び値x2[i]と、kビットの値k1[i]及び値k2[i]とを出力する関数f[i]を計算し、前記値x1[i]を平文とし、前記値k1[i]を鍵として、前記暗号化関数によりnビットの値y1[i]を計算し、前記値x2[i]を平文とし、前記値k2[i]を鍵として、前記暗号化関数によりnビットの値y2[i]を計算する圧縮関数計算部と、
     前記圧縮関数計算部が計算した値y1[L]と値y2[L]とを入力として、全単射関数gによりハッシュ値を計算するハッシュ値計算部と
    を備えることを特徴とするハッシュ値計算装置。
  2.  i=1,...,Lの各整数iについて、前記関数f[i]は、全単射であり、かつ、前記値M[i]を固定値とした場合に前記値y1[i]及び前記値y2[i]と前記値x1[i]及び前記値x2[i]とは全単射の関係であり、かつ、前記値x1[i]と前記値x2[i]と、又は、前記値k1[i]と前記値k2[i]とは同一とならない関数である
    ことを特徴とする請求項1に記載のハッシュ値計算装置。
  3.  i=1,...,Lの各整数iについて、前記関数f[i]は、前記値y1[i-1]を前記値x1[i]とし、前記値y1[i-1]を置換関数pで変換した値を前記値x2[i]とし、前記値y2[i-1]と前記値M[i]とを組み合わせた値を前記値k1[i]及び前記値k2[i]とする関数である
    ことを特徴とする請求項1に記載のハッシュ値計算装置。
  4.  i=1,...,Lの各整数iについて、前記関数f[i]は、前記値y1[i-1]を前記値x1[i]とし、前記値y2[i-1]の各ビットを反転させた値を前記値x2[i]とし、前記値M[i]と前記値y2[i-1]とを組み合わせた値を前記値k1[i]とし、前記値M[i]と前記値y1[i-1]とを組み合わせた値を前記値k2[i]とする関数である
    ことを特徴とする請求項1に記載のハッシュ値計算装置。
  5.  i=1,...,Lの各整数iについて、前記関数f[i]は、前記値y1[i-1]を前記値x1[i]とし、前記値y2[i-1]を前記値x2[i]とし、前記値M[i]と前記値y2[i-1]とを組み合わせた値を前記値k1[i]とし、前記値x1[i]と前記値k1[i]とを入力として前記暗号化関数により計算した前記値y1[i]と前記値M[i]とを組み合わせた値を前記値k2[i]とする関数である
    ことを特徴とする請求項1に記載のハッシュ値計算装置。
  6.  前記ハッシュ値計算装置は、さらに、
     任意ビット長の値Mを入力する任意長値入力部と、
     前記任意長値入力部が入力した値Mに対して、所定の値を付加して(k-n)ビットのL倍のビット長の値M*を出力するパディング部と、
     前記パディング部が生成した値M*をL個に分割して、k-nビットの値M[1],.
    ..,値M[L]を出力する分割部と
    を備え、
     前記既定長値入力部は、前記分割部が出力した値M[1],...,値M[L]を入力する
    ことを特徴とする請求項1から5までのいずれかに記載のハッシュ値計算装置。
  7.  平文長がnビットであり、鍵長がkビット(k>n)であるブロック暗号の暗号化関数を用いてハッシュ値を計算するハッシュ値計算方法であり、
     入力装置が、k-nビットのL個(Lは2以上の整数)の値M[1],...,値M[L]を入力する既定長値入力ステップと、
     処理装置が、i=1,...,Lの各整数iについて昇順に、前記既定長値入力ステップで入力した値M[i]と、nビットの値y1[i-1](値y1[0]は所定値IV1)と、nビットの値y2[i-1](値y2[0]は所定値IV2)とを入力として、nビットの値x1[i]及び値x2[i]と、kビットの値k1[i]及び値k2[i]とを出力する関数f[i]を計算し、前記値x1[i]を平文とし、前記値k1[i]を鍵として、前記暗号化関数によりnビットの値y1[i]を計算し、前記値x2[i]を平文とし、前記値k2[i]を鍵として、前記暗号化関数によりnビットの値y2[i]を計算する圧縮関数計算ステップと、
     処理装置が、前記圧縮関数計算ステップで計算した値y1[L]と値y2[L]とを入力として、全単射関数gによりハッシュ値を計算するハッシュ値計算ステップと
    を備えることを特徴とするハッシュ値計算方法。
  8.  平文長がnビットであり、鍵長がkビット(k>n)であるブロック暗号の暗号化関数を用いてハッシュ値を計算するハッシュ値計算プログラムであり、
     k-nビットのL個(Lは2以上の整数)の値M[1],...,値M[L]を入力する既定長値入力処理と、
     i=1,...,Lの各整数iについて昇順に、前記既定長値入力処理で入力した値M[i]と、nビットの値y1[i-1](値y1[0]は所定値IV1)と、nビットの値y2[i-1](値y2[0]は所定値IV2)とを入力として、nビットの値x1[i]及び値x2[i]と、kビットの値k1[i]及び値k2[i]とを出力する関数f[i]を計算し、前記値x1[i]を平文とし、前記値k1[i]を鍵として、前記暗号化関数によりnビットの値y1[i]を計算し、前記値x2[i]を平文とし、前記値k2[i]を鍵として、前記暗号化関数によりnビットの値y2[i]を計算する圧縮関数計算処理と、
     前記圧縮関数計算処理で計算した値y1[L]と値y2[L]とを入力として、全単射関数gによりハッシュ値を計算するハッシュ値計算処理と
    をコンピュータに実行させることを特徴とするハッシュ値計算プログラム。
PCT/JP2013/074801 2012-09-21 2013-09-13 ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム WO2014046024A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2014536822A JP5901783B2 (ja) 2012-09-21 2013-09-13 ハッシュ値計算装置及びハッシュ値計算方法
US14/420,022 US9419791B2 (en) 2012-09-21 2013-09-13 Hash value calculation device, hash value calculation method, and non-transitory computer-readable storage medium including computer executable instruction
EP13839043.0A EP2899713B1 (en) 2012-09-21 2013-09-13 Hash value calculation device, hash value calculation method and hash value calculation program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012207712 2012-09-21
JP2012-207712 2012-09-21

Publications (1)

Publication Number Publication Date
WO2014046024A1 true WO2014046024A1 (ja) 2014-03-27

Family

ID=50341337

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/074801 WO2014046024A1 (ja) 2012-09-21 2013-09-13 ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム

Country Status (4)

Country Link
US (1) US9419791B2 (ja)
EP (1) EP2899713B1 (ja)
JP (1) JP5901783B2 (ja)
WO (1) WO2014046024A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023053458A1 (ja) * 2021-10-01 2023-04-06 三菱電機株式会社 ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3085005B1 (en) * 2013-12-20 2019-09-25 Koninklijke Philips N.V. Secure data transformations
US11695541B2 (en) * 2020-12-07 2023-07-04 International Business Machines Corporation Implementing resilient deterministic encryption

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049127A (ja) * 2008-08-25 2010-03-04 Sony Corp データ変換装置、およびデータ変換方法、並びにプログラム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8238549B2 (en) * 2008-12-05 2012-08-07 Smith Micro Software, Inc. Efficient full or partial duplicate fork detection and archiving
JP5354994B2 (ja) * 2008-08-25 2013-11-27 株式会社東芝 代数的トーラスを用いたデータ圧縮処理を行う装置およびプログラム
KR101210607B1 (ko) * 2008-12-08 2012-12-11 한국전자통신연구원 해시 암호 장치 및 방법
JP5528281B2 (ja) 2010-09-24 2014-06-25 三菱電機株式会社 ハッシュ値演算装置

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049127A (ja) * 2008-08-25 2010-03-04 Sony Corp データ変換装置、およびデータ変換方法、並びにプログラム

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
EWAN FLEISCHMANN; MICHAEL GORSKI; STEFAN LUCKS: "IMA Int. Conf", 2009, LECTURE NOTES IN COMPUTER SCIENCE 59 1, article "Security of Cyclic Double Block Length Hash Functions", pages: L53 - 175
JOOYOUNG LEE; ARTIJN STAM; JOHN P. STEINBERGER: "CRYPTO", 2011, LECTURE NOTES IN COMPUTER SCIENCE 6841, article "The Collision Security of Tandem-DM in the Ideal Cipher Model", pages: 561 - 77
SHOICHI HIROSE: "FSE", 2006, LECTURE NOTES IN COMPUTER SCIENCE 047, article "Some Plausible Constructions of Double-Block-Length Hash Functions", pages: 210 - 225
SHOICHI HIROSE: "Secure Double Block Length Hash Functions Based on Abreast/Tandem Davies- Meyer", IPSJ SIG NOTES, vol. 2004, no. 75, 21 July 2004 (2004-07-21), pages 21 - 26, XP055250419 *
X. LAI; L.MASSEY: "EU OCR PT'9", LECTURE NOTES IN COMPUTER SCIENCE 65, article "Hash Functions Based on Block Ciphers", pages: 5 - 70
YEVENIY DODIS ET AL.: "Salvaging Markle-Damgard for Practical Applications", LNCS, ADVANCES IN CRYPTOLOGY - EUROCRYPT 2009, vol. 5479, April 2009 (2009-04-01), pages 371 - 388, XP047030477 *
YUSUKE NAITO: "Blockcipher-Based Double-Length Hash Functions for Pseudorandom Oracles", CRYPTOLOGY EPRINT ARCHIVE: REPORT 2010/566, VERSION: 20110511:021845, 11 May 2011 (2011-05-11), XP061004441, Retrieved from the Internet <URL:http://eprint.iacr.org/2010/566.pdf> [retrieved on 20131025] *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023053458A1 (ja) * 2021-10-01 2023-04-06 三菱電機株式会社 ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム
JPWO2023053458A1 (ja) * 2021-10-01 2023-04-06
JP7422953B2 (ja) 2021-10-01 2024-01-26 三菱電機株式会社 ハッシュ値計算装置、ハッシュ値計算方法及びハッシュ値計算プログラム

Also Published As

Publication number Publication date
EP2899713A4 (en) 2016-06-29
JP5901783B2 (ja) 2016-04-13
EP2899713B1 (en) 2019-04-24
US9419791B2 (en) 2016-08-16
EP2899713A1 (en) 2015-07-29
US20150215113A1 (en) 2015-07-30
JPWO2014046024A1 (ja) 2016-08-18

Similar Documents

Publication Publication Date Title
CN105453482B (zh) 认证加密设备、认证加密方法以及用于认证加密的程序
Anees et al. Designing secure substitution boxes based on permutation of symmetric group
JP5000365B2 (ja) ハッシュ値生成装置、プログラム及びハッシュ値生成方法
JP6575532B2 (ja) 暗号化装置、復号装置、暗号処理システム、暗号化方法、復号方法、暗号化プログラム、及び復号プログラム
JP7031580B2 (ja) 暗号化装置、暗号化方法、復号化装置、及び復号化方法
TW201044334A (en) Encryption device, encryption method, and computer program
CN106133810A (zh) 加密处理装置、加密处理方法、以及程序
JP5901783B2 (ja) ハッシュ値計算装置及びハッシュ値計算方法
JP6607257B2 (ja) 秘密計算システム、秘密計算装置、および、秘密計算方法
JP6028798B2 (ja) 暗号化装置、暗号化方法およびプログラム
JP5528281B2 (ja) ハッシュ値演算装置
JP6052166B2 (ja) 暗号化方法、暗号化装置および暗号化プログラム
JP6194136B2 (ja) 疑似乱数生成装置及び疑似乱数生成プログラム
JP2010044251A (ja) ハッシュ値生成装置、プログラム及びハッシュ値生成方法
JP2014240921A (ja) 暗号装置、暗号処理方法及び暗号処理プログラム
JP4857230B2 (ja) 疑似乱数生成装置及びそれを用いた暗号化処理装置
WO2018154642A1 (ja) メッセージ認証子生成装置
JP2016503195A5 (ja)
JP5354914B2 (ja) 暗号処理装置及び復号処理装置及びプログラム
JP6033504B1 (ja) メッセージ認証子生成装置
JP2013205437A (ja) 非線形関数S−boxの計算方法及び装置
JP5449063B2 (ja) Rijndael型192bitブロック暗号化装置、方法、及びそのプログラム
JP5726394B2 (ja) 非線形関数器、ストリーム暗号の暗号化装置、復号化装置、mac生成装置
JP6371197B2 (ja) 暗号処理装置
JP4913530B2 (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: 13839043

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014536822

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14420022

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2013839043

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE