WO2024057411A1 - メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体 - Google Patents

メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体 Download PDF

Info

Publication number
WO2024057411A1
WO2024057411A1 PCT/JP2022/034251 JP2022034251W WO2024057411A1 WO 2024057411 A1 WO2024057411 A1 WO 2024057411A1 JP 2022034251 W JP2022034251 W JP 2022034251W WO 2024057411 A1 WO2024057411 A1 WO 2024057411A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
update
memory
tag
plaintext
Prior art date
Application number
PCT/JP2022/034251
Other languages
English (en)
French (fr)
Inventor
明子 向井
一彦 峯松
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to PCT/JP2022/034251 priority Critical patent/WO2024057411A1/ja
Publication of WO2024057411A1 publication Critical patent/WO2024057411A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present disclosure relates to a memory update device, an information processing system, a memory update method, and a computer-readable medium.
  • patent document 1 patent document 2, patent document 3, and patent document 4 form a tree structure in which the target memory is a leaf node for memory protection.
  • Patent Document 4 With the technology according to Patent Document 4, it is impossible to parallelize processing such as hash generation in a tree structure, so there is a possibility that efficient processing cannot be performed.
  • the techniques disclosed in Patent Document 2 and Patent Document 3 enable processing of each node to be parallelized in memory content update processing.
  • An object of the present disclosure is to provide a memory update device, an information processing system, a memory update method, and a program that can perform processing efficiently.
  • a memory update device includes an input means for inputting a tree structure configured to protect memory and update information that is information regarding nodes to be updated in the tree structure, and using the update information, update determination means for determining whether the updated content of a leaf node that includes plaintext to be updated is dependent on plaintext before update; and generating a path from the leaf node to the root node in the tree structure. and at each node in the path, each node verifies the tag stored in each node by generating a tag used for verification by inputting at least a unique nonce in the message authentication code at each node.
  • memory verification means for verifying whether or not tampering has been performed on the leaf node and outputting a verification result; a plaintext update means for updating the plaintext of the message authentication code; and when the verification result indicates that no tampering has been detected, generating an updated tag by inputting a unique nonce to the message authentication code at least in each node.
  • tag updating means, and the memory verification means verifies tags of nodes other than the leaf node in the path when the updated content of the leaf node does not depend on the plaintext before update.
  • An information processing system includes a memory structure initialization device that receives plaintext for which tampering detection is to be performed as input and outputs a tree structure that is a tree structure in an initial state and that is configured to protect memory; A memory verification device that receives as input a storage location of plaintext to be checked for tampering and a tree structure and verifies whether or not the memory corresponding to the storage location has been tampered with; at least a storage location of plaintext to be updated and its updated contents; and a memory update device that receives the tree structure as input and outputs an updated tree structure or an error message indicating that tampering has been detected, and the memory update device inputs the tree structure and the tree structure.
  • an input means for inputting update information that is information about a node to be updated in the structure; and using the update information, the update content of a leaf node that includes the plaintext to be updated depends on the plaintext before the update.
  • an update determination means for determining whether or not the tree structure has been updated; and in the tree structure, generating a path from the leaf node to the root node, and inputting at least a unique nonce in each node in the message authentication code at each node in the path.
  • a memory verification means for verifying whether each node has been tampered with by generating a tag used for verification and verifying the tag stored in each node, and outputting a verification result; a plaintext update means for updating the plaintext to be updated in the leaf node based on the update information when the verification result indicates that no tampering has been detected; and a tag update unit that generates an updated tag by inputting a unique nonce in the message authentication code at least in each node, and the memory verification unit is configured to update the content of the leaf node. If it does not depend on the previous plaintext, verify the tag of the node other than the leaf node in the path.
  • a memory update method inputs a tree structure configured to protect memory and update information that is information about nodes to be updated in the tree structure, and uses the update information to Determine whether the updated content of a leaf node that includes plaintext depends on the plaintext before update, and if the updated content of the leaf node does not depend on the plaintext before update, in the tree structure,
  • a path is generated from the leaf node to the root node, and at each node in the path, a tag used for verification is generated by inputting at least a unique nonce in the message authentication code at each node.
  • a program includes the steps of inputting a tree structure configured to protect memory and update information that is information about nodes to be updated in the tree structure, and using the update information to a step of determining whether the updated content of a leaf node that includes plaintext depends on the plaintext before update; and if the updated content of the leaf node does not depend on the plaintext before update, the tree structure , generate a path from the leaf node to the root node, and at each node in the path, generate a tag used for verification by inputting at least a unique nonce in a message authentication code at each node; a step of verifying whether or not each node has been tampered with by verifying tags stored in nodes other than the node and outputting a verification result; and when the verification result indicates that no tampering has been detected; updating the plaintext to be updated in the leaf node based on the updated information; and if the verification result indicates that no tampering has been detected, at least each node transmits a unique nonce
  • a memory update device capable of efficiently performing verification processing of nodes forming the tree structure when updating memory contents; Information processing systems, memory update methods, and programs can be provided.
  • FIG. 1 is a block diagram illustrating a configuration example of a memory protection system.
  • FIG. 1 is a block diagram illustrating a configuration example of a memory structure initialization device according to a first embodiment
  • FIG. 1 is a block diagram illustrating a configuration example of a memory verification device according to a first embodiment
  • FIG. 1 is a block diagram illustrating a configuration example of a memory update device according to a first embodiment.
  • FIG. 3 is a flowchart illustrating an example of a processing procedure of the memory structure initialization device according to the first embodiment.
  • 3 is a flowchart illustrating an example of a processing procedure of the memory verification device according to the first embodiment.
  • 3 is a flowchart illustrating an example of a processing procedure of the memory update device according to the first embodiment.
  • FIG. 3 is a flowchart illustrating an example of a processing procedure of the memory update device according to the first embodiment.
  • 3 is a flowchart illustrating an example of a processing procedure of the memory update device according to the first embodiment.
  • FIG. 2 is a diagram showing an example of a tree structure constructed by the memory protection system according to the first embodiment.
  • FIG. 3 is a diagram showing an example of a path generated by a tag verification unit in the memory verification device according to the first embodiment.
  • FIG. 11 is a diagram illustrating an example of a tree structure configured by a memory protection system according to a second embodiment.
  • FIG. 7 is a diagram showing an example of a tree structure configured by a memory protection system according to a third embodiment.
  • FIG. 7 is a block diagram showing a configuration example of a memory structure initialization device according to a fourth embodiment.
  • FIG. 7 is a block diagram showing an example configuration of a memory verification device according to a fourth embodiment.
  • FIG. 7 is a block diagram showing an example of the configuration of a memory update device according to a fourth embodiment.
  • 12 is a flowchart illustrating an example of a processing procedure of the memory structure initialization device according to the fourth embodiment.
  • 12 is a flowchart illustrating an example of a processing procedure of a memory verification device according to a fourth embodiment.
  • 12 is a flowchart illustrating an example of a processing procedure of a memory update device according to a fourth embodiment.
  • FIG. 13 is a flowchart illustrating an example of a processing procedure of a memory update device according to a fourth embodiment.
  • 12 is a flowchart illustrating an example of a processing procedure of a memory update device according to a fourth embodiment.
  • FIG. 7 is a diagram showing an example of a tree structure constructed by the memory protection system according to the fourth embodiment.
  • FIG. 7 is a diagram showing an example of a tree structure configured by a memory protection system according to a fifth embodiment.
  • FIG. 7 is a diagram showing an example of a tree structure configured by a memory protection system according to a sixth embodiment.
  • FIG. 7 is a diagram showing the configuration of a memory update device according to a seventh embodiment.
  • FIG. 12 is a flowchart illustrating a memory update method executed by a memory update device according to a seventh embodiment.
  • FIG. 1 is a block diagram schematically showing an example of a hardware configuration of a calculation processing device that can implement the device and system according to each embodiment.
  • IoT Internet of Things
  • memory protection technology such as detecting tampering and concealing data stored in a device is important for maintaining the safety not only of the device but also of the network connected to the device.
  • on-chip is a secure area. Therefore, it is impossible for an attacker to eavesdrop or tamper with the data stored on the on-chip.
  • off-chip is an unsecure area. Therefore, it is possible for an attacker to eavesdrop and tamper with the data stored in the off-chip.
  • on-chip is realized by a memory in a CPU (Central Processing Unit), and off-chip is realized by a main storage device, an auxiliary storage device, etc.
  • CPU Central Processing Unit
  • off-chip is realized by a main storage device, an auxiliary storage device, etc.
  • Examples of memory protection techniques that solve this problem include the techniques disclosed in Patent Document 1, Patent Document 2, and Patent Document 3.
  • a tree structure is configured in which the target memory is a leaf node in order to protect the memory.
  • elemental technologies used in configuring the tree structure there are a message authentication code (MAC) and an authenticated encryption (AE).
  • MAC message authentication code
  • AE authenticated encryption
  • MAC Message Authentication Code
  • memory protection technology using a tree structure, by storing a secret key on an on-chip and storing a plain text message and an authentication tag on an off-chip, it is possible to detect tampering with a plain text message.
  • Authentication encryption is a technology that uses a secret key shared in advance between two communicating parties to encrypt a plaintext message and calculate an authentication tag for tampering detection.
  • AE Authentication encryption
  • Memory protection technology using a tree structure stores the secret key on-chip and the ciphertext and authentication tag on off-chip, similar to MAC, to conceal plaintext messages and detect tampering. It can be performed.
  • the technologies according to Patent Document 2 and Patent Document 3 enable parallelization of processing of each node in updating processing of memory contents (plaintext).
  • the technology according to Patent Document 2 and Patent Document 3 when performing node verification processing in update processing, even if it is not necessary to perform verification processing on all nodes depending on the update content, all nodes The system is configured to perform verification processing on.
  • node verification processing cannot be performed efficiently.
  • this embodiment as described below, it is possible to efficiently perform node verification processing when updating the contents of the memory.
  • a tree structure configured by a memory protection system has two branches and a depth of d.
  • the number of leaf nodes in the first embodiment is 2 ⁇ d.
  • the depth of the root node is defined as 0
  • the depth of the leaf node is defined as d.
  • a "node” corresponds to each element configuring the tree structure.
  • the "root node” is the node with the shallowest depth in the tree structure.
  • a "leaf node” is the deepest node in the tree structure.
  • FIG. 1 is a block diagram showing a configuration example of a memory protection system 1.
  • the memory protection system 1 is, for example, a computer. Therefore, the memory protection system 1 functions as an information processing system. Note that the memory protection system 1 may realize each component shown in FIG. 1 by executing a software program in a central processing unit. Further, each component implemented in the memory protection system 1 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • a memory protection system 1 (information processing system) according to the first embodiment includes a memory structure initialization device 10, a memory verification device 20, and a memory update device 30.
  • the memory structure initialization device 10, the memory verification device 20, and the memory update device 30 may be physically integrated or may be separate. Further, the constituent elements of each device described later using FIGS. 2 to 4 may be realized by different devices.
  • the memory protection system 1 performs memory tampering detection.
  • the memory structure initialization device 10 may be expressed as memory structure initialization devices 10a and 10c.
  • the memory verification device 20 may be referred to as memory verification devices 20a and 20c.
  • the memory update device 30 may be expressed as memory update devices 30a and 30c. Note that the same applies to the constituent elements shown in FIGS. 2 to 4.
  • FIG. 2 is a block diagram showing a configuration example of the memory structure initialization device 10 according to the first embodiment.
  • FIG. 3 is a block diagram showing a configuration example of the memory verification device 20 according to the first embodiment.
  • FIG. 4 is a block diagram showing a configuration example of the memory update device 30 according to the first embodiment.
  • FIG. 5 is a flowchart showing an example of a processing procedure of the memory structure initialization device 10 according to the first embodiment.
  • FIG. 6 is a flowchart illustrating an example of a processing procedure of the memory verification device 20 according to the first embodiment.
  • 7 to 9 are flowcharts showing examples of processing procedures of the memory update device 30 according to the first embodiment.
  • FIGS. 2 to 9 will be described later.
  • the memory structure initialization device 10 receives as input the plaintext (plaintext message) for which tampering is to be detected and outputs a tree structure in an initial state.
  • a nonce unique to each node is associated with each node of the tree structure.
  • the nonce is a value unique to each node. Therefore, the tree structure may include a collection of nonces. This also applies to the second and third embodiments described below.
  • the memory structure initialization device 10 can also function as a memory processing device.
  • plaintext is represented by a combination of 2 ⁇ d plaintext blocks.
  • the following formula 1 holds true.
  • M M[1]
  • M indicates plaintext
  • M[k] indicates the k-th plaintext block.
  • " represents a connection.
  • one plaintext block is defined as a Block bit.
  • the memory verification device 20 receives as input the storage location and tree structure of the plaintext (plaintext block) whose tampering is to be checked, and verifies whether the memory corresponding to the storage location has been tampered with.
  • the memory update device 30 receives as input the storage location of the plaintext (plaintext block) to be updated, the contents of the update, and the tree structure. Then, the memory update device 30 outputs the updated tree structure or an error message indicating that tampering has been detected.
  • FIG. 10 is a diagram showing an example of a tree structure constructed by the memory protection system 1 according to the first embodiment.
  • the memory protection system 1 uses a message authentication code (MAC) as an element technology.
  • a MAC function MAC_K using a secret key K receives a nonce N and a plaintext M as input, and outputs an authentication tag Tag.
  • FIG. 2 is a block diagram showing a configuration example of the memory structure initialization device 10 according to the first embodiment.
  • the memory structure initialization device 10 according to the first embodiment includes a plaintext input section 100, a nonce allocation section 101, and a tag generation section 102.
  • the memory structure initialization device 10 also includes a leaf node generation section 103, an intermediate node generation section 104, a root node generation section 105, and a tree structure output section 106.
  • the plaintext input unit 100 has a function as a plaintext input means.
  • the nonce allocation unit 101 has a function as a nonce allocation means.
  • the tag generation unit 102 has a function as a tag generation means.
  • Leaf node generation unit 103 has a function as leaf node generation means.
  • the intermediate node generation unit 104 has a function as intermediate node generation means.
  • the root node generation unit 105 has a function as a root node generation means.
  • the tree structure output unit 106 has a function as a tree structure output means.
  • the memory structure initialization device 10 is, for example, a computer. Note that the memory structure initialization device 10 may realize each component shown in FIG. 2 by executing a software program in a central processing unit. Further, each component implemented in the memory structure initialization device 10 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the plaintext input unit 100 receives input of plaintext M to be protected.
  • the plaintext input unit 100 outputs the received plaintext M to the tag generation unit 102.
  • the method by which the plaintext input unit 100 receives input of the plaintext M is not limited to a specific method.
  • the plaintext input unit 100 may include a character input device such as a keyboard, and may accept a user operation to input the plaintext M.
  • the plaintext input unit 100 may receive the plaintext M from another device.
  • the nonce assignment unit 101 assigns node-specific nonce information to each node in the tree structure.
  • the nonce assignment unit 101 then outputs the nonce information to the tag generation unit 102.
  • the nonce is uniquely determined for each node due to its nature. That is, the nonce information is unique to each node.
  • a nonce is assigned to each node such that there is no duplication throughout the tree structure. That is, a nonce is assigned to each node such that the nonce value assigned to each node does not overlap with the nonce value assigned to other nodes. In this way, by assigning nonces so that there is no duplication in the entire tree structure, data swapping attacks between nodes can be prevented.
  • the number of nodes and the amount of data for each node are determined in advance. Therefore, it is possible to assign a nonce to each node before defining the information inside each node. In other words, since the method of allocating nonces to each node is determined in advance, it is possible to allocate nonces to each node in parallel.
  • N (N(0,1), N(1,1), N(1,2), N(2,1), N(2,2),..., N(d,2 ⁇ d- 1), N(d, 2 ⁇ d))
  • N(0,1) corresponds to the nonce of the root node.
  • N(d, 1), . . . , N(d, 2 ⁇ d) corresponds to nonces of a plurality of leaf nodes. Note that the others correspond to the nonce of the intermediate node. Further, the nonce set N may be included in a tree structure.
  • a indicates the depth in the tree structure of the node to which the nonce is assigned.
  • b indicates the order (ordinal number) at depth a of the node to which the nonce is assigned. This also applies to the tag notation Tag (a, b), which will be described later.
  • the nonce allocation method may be such that, for example, the following condition A is satisfied. - The shallower the node in the tree structure, the smaller the nonce value assigned. - For nodes at the same depth, the earlier the order in that depth (the smaller the ordinal number in that depth), the smaller the nonce value is assigned.
  • the nonce set shown in Equation 4 has N(0,1) ⁇ N(1,1) ⁇ N(1 ⁇ 2) ⁇ N(2 ⁇ 1) ⁇ N(2 ⁇ 2) ⁇ ... ⁇ N(d ⁇ 2 ⁇ d-1) ⁇ N(d ⁇ 2 ⁇ d).
  • the tag generation unit 102 generates a tag for tampering detection using the plaintext M output by the plaintext input unit 100, the nonce set N output by the nonce assignment unit 101, and the secret key K.
  • the above-mentioned MAC function is used for tag generation.
  • the tag generation unit 102 generates data expressed by the following equation 5 as a tag used in a leaf node.
  • TagLeaf ((M[1], Tag(d, 1)), (M[2], Tag(d, 2)), ..., (M[2 ⁇ d], Tag(d, 2 ⁇ d )))
  • Tag(d,j_d) MAC_K(N(d,j_d),M[j_d])
  • TagInter (Tag(1,1),...,Tag(d-1,2 ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_K((N(i, j_i), N(i+1, 2j_i-1)
  • TagRoot (Tag (0, 1))
  • Tag(0,1) MAC_K(N(0,1),N(1,1) ⁇ N(1,2))
  • the tag corresponding to each node is the result of MAC calculation using the plaintext block corresponding to the own node as plaintext and the nonce of the own node and its plaintext as input. handle.
  • the tag corresponding to each node corresponds to the result of MAC calculation using the concatenation of nonces of a plurality of child nodes as plain text for nodes other than leaf nodes, and inputting the nonce of the own node and its plain text.
  • the tag corresponding to each node is expressed by the following equation 8.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • the tag generation unit 102 outputs the tag set TagLeaf to the leaf node generation unit 103. Further, the tag generation unit 102 outputs the tag set TagInter to the intermediate node generation unit 104. Further, the tag generation unit 102 outputs the tag set TagRoot to the root node generation unit 105.
  • the leaf node generation unit 103 generates tree-structured leaf nodes using the tag set TagLeaf output by the tag generation unit 102.
  • the j_d-th leaf node is generated as shown in Equation 9 below. (Formula 9) (N(d,j_d), M[j_d], Tag(d,j_d))
  • Leaf ((N(d,1),M[1],Tag(d,1)),((N(d,2),M[2],Tag(d,2)),..., (N(d, 2 ⁇ d), M[2 ⁇ d], Tag(d, 2 ⁇ d)))
  • Leaf is data indicating a set of leaf nodes.
  • the leaf node generation unit 103 outputs the generated leaf node set Leaf to the tree structure output unit 106.
  • the intermediate node generation unit 104 generates a tree-structured intermediate node using the tag set TagInter output by the tag generation unit 102.
  • the j_i-th intermediate node at depth i is generated as shown in Equation 12 below. (Formula 12) (N(i, j_i), Tag(i, j_i))
  • each intermediate node is expressed as in Equation 14 below.
  • Inter ((N(1,1), Tag(1,1)), (N(1,2), Tag(1,2)), ..., (N(2,4), Tag(2 ,4)))
  • Inter is data indicating a set of intermediate nodes.
  • the intermediate node generation unit 104 outputs the generated intermediate node set Inter to the tree structure output unit 106.
  • the root node generation unit 105 generates a tree-structured root node using the tag TagRoot output by the tag generation unit 102.
  • the root node Root is generated as shown in Equation 15 below.
  • the tree structure output unit 106 connects the leaf node set Leaf output from the leaf node generation unit 103, the intermediate node set Inter output from the intermediate node generation unit 104, and the root node Root output from the root node generation unit 105. . Then, the tree structure output unit 106 outputs the concatenated data string to a computer display, printer, etc. as data indicating a tree structure (tree structure Tree). Note that, as described above, the data indicating the tree structure includes data indicating the nonce set N.
  • FIG. 3 is a block diagram showing a configuration example of the memory verification device 20 according to the first embodiment.
  • the memory verification device 20 according to the first embodiment includes a tree structure input section 200, a verification location input section 202, a tag verification section 203, and a verification result output section 204.
  • the tree structure input unit 200 has a function as a tree structure input means.
  • the verification point input section 202 has a function as a verification point input means.
  • the tag verification unit 203 has a function as a tag verification means.
  • the verification result output unit 204 has a function as a verification result output means.
  • the memory verification device 20 is, for example, a computer. Note that the memory verification device 20 may realize each component shown in FIG. 3 by executing a software program in a central processing unit. Further, each component implemented in the memory verification device 20 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the tree structure input unit 200 receives input of a tree structure Tree for protecting the memory to be verified.
  • the tree structure input unit 200 then outputs the tree structure Tree to the tag verification unit 203.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the tree structure Tree may be a data string output by the tree structure output unit 106 in which a leaf node set Leaf, an intermediate node set Inter, and a root node Root are connected. Note that, as described above, the information on the nonce set N is included in the tree structure Tree.
  • the verification point input unit 202 receives an input of a memory verification point CheckNode. Then, the verification location input unit 202 outputs the verification location CheckNode to the tag verification unit 203.
  • CheckNode is data indicating a node corresponding to a memory verification location. Specifically, CheckNode is a numerical value of 1 or more and 2 ⁇ d or less, and indicates that the verification location is the CheckNode-th of the leaf node. That is, CheckNode indicates the position (order; ordinal number) of the leaf node corresponding to the verification location.
  • the tag verification unit 203 uses the tree structure Tree, the verification location CheckNode, and the secret key K to verify whether the memory specified by the CheckNode has been tampered with. Then, the tag verification unit 203 outputs the verification result to the verification result output unit 204. First, the tag verification unit 203 generates a path from the CheckNode-th leaf node to the root node.
  • the path Path is data indicating the path of a node from the leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • p_d CheckNode
  • p_i is defined by the following equation 17.
  • p_i ceiling(p_ ⁇ i+1 ⁇ /2)
  • ceiling represents a ceiling function. Further, the value of p_0 is always 1.
  • FIG. 11 is a diagram showing an example of a path generated by the tag verification unit 203 in the memory verification device 20 according to the first embodiment.
  • the tag verification unit 203 uses the tree structure Tree, which is the output of the tree structure input unit 200, and the secret key K to calculate Equation 18 below.
  • PathTag' (Tag' (d, p_d), Tag' (d-1, p_ ⁇ d-1 ⁇ ), ..., Tag' (0, p_0))
  • Tag'(d, p_d) MAC_K(N(d, p_d), M[p_d])
  • Tag'(i, p_i) MAC_K(N(i, p_i), N(i+1, 2p_i-1)
  • Tag' (i, p_i) inputs the nonce of the node in the nonce part of the input of the MAC function, and concatenates and inputs two nonces of the child nodes of the node in the plaintext part of the input of the MAC function. You can get it by doing that.
  • the tag verification unit 203 acquires a value expressed by the following equation 19 from the tree structure Tree that is the output of the tree structure input unit 200.
  • PathTag (Tag(d, p_d), Tag(d-1, p_ ⁇ d-1 ⁇ ), ..., Tag(0, p_0))
  • Tag verification section 203 outputs verification result B to verification result output section 204 .
  • the verification result output unit 204 outputs the verification result B output by the tag verification unit 203 to a computer display, printer, or the like.
  • FIG. 4 is a block diagram showing a configuration example of the memory update device 30 according to the first embodiment.
  • the memory update device 30 according to the first embodiment includes a tree structure input section 300, an update location input section 302, a memory verification section 303, a nonce update section 304, and a tag update section 305. and an update result output unit 306.
  • the memory update device 30 according to the first embodiment includes an update determination section 310 and a plaintext update section 312.
  • the tree structure input unit 300 has a function as a tree structure input means.
  • the updated location input section 302 has a function as an updated location input means.
  • the memory verification unit 303 has a function as a memory verification means.
  • the nonce updating unit 304 has a function as a nonce updating means.
  • the tag update unit 305 has a function as a tag update unit.
  • the update result output unit 306 has a function as update result output means.
  • the update determination unit 310 has a function as update determination means.
  • the plaintext updating unit 312 has a function as a plaintext updating means.
  • the memory update device 30 is, for example, a computer. Note that the memory update device 30 may implement each component shown in FIG. 4 by executing a software program in a central processing unit. Further, each component implemented in the memory update device 30 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the tree structure input unit 300 receives input of a tree structure Tree for protecting the memory to be updated. Then, the tree structure input unit 300 outputs the tree structure Tree to the memory verification unit 303 and the nonce update unit 304, as shown by the dashed line in FIG. Further, the tree structure input unit 300 may output the tree structure Tree to the plaintext update unit 312.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root. Note that the function of the tree structure input unit 300 is substantially the same as the function of the tree structure input unit 200 in the memory verification device 20 according to the first embodiment, so a description thereof will be omitted.
  • the update location input unit 302 accepts input of memory update information UpdateNode. Then, the update location input unit 302 outputs the memory update information UpdateNode to the update determination unit 310, plaintext update unit 312, memory verification unit 303, and tag update unit 305, as shown by the dotted line in FIG.
  • the memory update information UpdateNode is information regarding a node to be updated in the tree structure. UpdateNode includes data indicating the node to be updated (the position of the node) and data indicating the update contents of the plain text regarding the node to be updated. That is, UpdateNode includes data indicating the node to be updated (updated location) and data indicating the updated content of the leaf node that includes the plaintext to be updated.
  • UpdateIndex is data indicating a leaf node corresponding to an updated location.
  • the update location UpdateIndex is a numerical value of 1 or more and 2 ⁇ d or less, and represents that the update location is the UpdateIndex-th leaf node.
  • UpdateIndex indicates the order (ordinal number) of leaf nodes corresponding to the updated location at depth d.
  • UpdateInfo is data indicating update content.
  • UpdateInfo represents Block bit information for updating the plaintext block M[UpdateIndex], which is information included in the UpdateIndex-th leaf node.
  • Plaintext block M[UpdateIndex] may be updated according to update content UpdateInfo.
  • the update determination unit 310 uses the update information UpdateNode to determine whether the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update. Specifically, the update determination unit 310 determines the update content of the plaintext block M[UpdateIndex] included in the leaf node indicated by the update location UpdateIndex based on the update content UpdateInfo. Then, the update determination unit 310 determines whether the update content UpdateInfo indicates that the plaintext (plaintext block) is updated using the plaintext (plaintext block) before update. When the update content UpdateInfo indicates that the plaintext (plaintext block) is updated using the plaintext before update, the update determination unit 310 determines the update content of the leaf node that includes the plaintext (plaintext block) to be updated.
  • the update determination unit 310 determines whether the leaf node containing the plaintext (plaintext block) to be updated is It is determined that the updated content does not depend on the plaintext before the update.
  • the value of the plaintext block before update is x
  • the value of the plaintext block after update is x'.
  • the value of the plaintext block before update of the j1_d-th leaf node j1_d is set to x1
  • the value of the plaintext block before update of the j2_d-th leaf node j2_d is set to x2.
  • the value of the updated plaintext block of leaf node j1_d is set to x1'.
  • the update determination unit 310 determines that the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update.
  • the update determination unit 310 determines that the update content of the leaf node that includes the plaintext to be updated does not depend on the plaintext before the update. That is, when determining whether the update content of a leaf node that includes the plaintext to be updated depends on the plaintext before update, the update determination unit 310 determines whether the plaintext to be updated is independent of the plaintext concerned.
  • the fixed value c may correspond to the value of a plaintext block that has been updated at a previous timing for a leaf node different from the leaf node to be updated.
  • the fixed value used for updating may be included in the update content UpdateInfo. That is, the fixed value used for updating may be included in the update information UpdateNode. Further, the fixed value in the update information UpdateNode may be specified by the user. This allows the user to easily specify the update content of the plaintext (plaintext block).
  • the update determination unit 310 determines whether the update content of a leaf node that includes the plaintext (plaintext block) to be updated depends on the plaintext before the update when the fixed value used for update is included in the update information UpdateNode. It may be determined that this is not the case.
  • the fixed value used for updating may not be included in the update content UpdateInfo.
  • the fixed value used for updating may be stored in advance in the storage device of the memory update device 30.
  • the update content UpdateInfo may indicate the location (address) of the storage device where the fixed value is stored.
  • the fixed value used for updating may be stored in an on-chip area (secure area) of the memory.
  • the memory verification unit 303 uses the tree structure Tree, memory update information UpdateNode, and secret key K to verify whether the memory specified by UpdateNode has been tampered with. That is, the memory verification unit 303 verifies whether the node corresponding to the path regarding the leaf node specified by UpdateNode has been tampered with.
  • the processing performed by the memory verification unit 303 is substantially the same as the processing performed by the tag verification unit 203 in the memory verification device 20 of the first embodiment, but the output results are different.
  • the tag verification unit 203 in the memory verification device 20 of the first embodiment outputs the verification result B, but the memory verification unit 303 also outputs the path from the node to the root node along with the verification result B.
  • the memory verification unit 303 outputs the verification result B to the nonce update unit 304, tag update unit 305, and update result output unit 306, as shown by the thick broken line in FIG. Further, the memory verification unit 303 may output the verification result B to the plaintext update unit 312. Furthermore, the memory verification unit 303 outputs the path Path to the nonce update unit 304 and the tag update unit 305, as shown by the thick solid line in FIG.
  • p_d UpdateIndex
  • the memory verification unit 303 generates a path from the leaf node to the root node in the tree structure.
  • the memory verification unit 303 generates (calculates) a tag used for verification by inputting at least a nonce unique to each node into the message authentication code (MAC) at each node in the path Path, and stores the tag in each node. Verify the tags that are included. That is, the memory verification unit 303 generates a tag Tag' for each node in the path Path by calculating Equation 18 described above.
  • the memory verification unit 303 compares the generated tag Tag′ and the stored tag Tag (tag related to Tree) for each node, and determines whether the two match. Thereby, the memory verification unit 303 verifies whether or not each node has been tampered with. That is, the memory verification unit 303 performs integrity verification for each node. Then, the memory verification unit 303 outputs verification result B.
  • the memory verification unit 303 may not verify the tag of the leaf node depending on the determination result of the update determination unit 310. Specifically, if the update content of the leaf node does not depend on the plaintext before update, the memory verification unit 303 verifies the tag of the node other than the leaf node in the path Path. On the other hand, if the updated contents of the leaf node depend on the plain text before the update, the memory verification unit 303 verifies the tags of all nodes including the leaf node in the path Path.
  • the nonce updating unit 304 updates the nonce regarding each node regarding the Path each time a leaf node (plaintext block) regarding the Path is updated. This can prevent replay attacks.
  • the method of updating the nonce assigned to each node is determined in advance. For example, if a nonce is assigned to each node as in condition A above, the nonce value N(0, 1) of the root node is changed to N(d, 2 ⁇ d), which is the largest nonce value before updating. It may be updated by adding 1. Then, the nonce value may be updated for each node in the Path so that the above condition A is satisfied. As a result, the nonce of each node can be updated even if the update processing of the plaintext block included in the root node in Path is not completed, so the nonce can be updated for each node in parallel.
  • the tag update unit 305 uses the update result tree structure NewTree', the nonce set N, the memory update information UpdateNode, the verification result B, the path Path, and the secret key K to update the node specified by Path. Update tags.
  • (d, p_d) indicates the leaf node to be updated
  • p_d indicates the order (ordinal number) of the leaf node to be updated at the depth d.
  • "UpdateInfo" indicates the updated plaintext block in the leaf node to be updated.
  • MAC_K is the same as the method used by the tag generation unit 102 of the memory structure initialization device 10 and the tag verification unit 203 of the memory verification device 20 in the first embodiment.
  • Tag (i, p_i) inputs the updated nonce of the node in the nonce part of the input of the MAC function, and inputs the updated nonce of the child node of the node in the plaintext part of the input of the MAC function. It can be obtained by concatenating and inputting.
  • the tag update unit 305 outputs the update result tree structure NewTree to the update result output unit 306.
  • FIG. 5 is a flowchart showing the operation of the memory structure initialization device 10 (memory structure initialization method).
  • the plaintext input unit 100 receives an input of plaintext M to be protected.
  • the nonce allocating unit 101 allocates a nonce to each node of the tree structure and generates a nonce set N.
  • the tag generation unit 102 uses the plaintext M and the nonce set N to generate a tag set (TagLeaf, TagInter, TagRoot) for tampering detection.
  • step S104 the leaf node generation unit 103 generates a tree-structured leaf node set Leaf using the tag set TagLeaf output by the tag generation unit 102.
  • step S105 the intermediate node generation unit 104 generates a tree-structured intermediate node set Inter using the tag set TagInter output by the tag generation unit 102.
  • step S106 the root node generation unit 105 generates a tree-structured root node Root using the tag TagRoot output by the tag generation unit 102.
  • step S107 the tree structure output unit 106 connects the leaf node set Leaf, the intermediate node set Inter, and the root node Root, and outputs the connected data string showing the tree structure to a computer display, printer, etc. .
  • the memory structure initialization device 10 ends the process of FIG. 5.
  • FIG. 6 is a flowchart showing the operation of the memory verification device 20 (memory verification method).
  • the tree structure input unit 200 receives an input of a tree structure Tree for protecting the memory to be verified.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the tree structure Tree includes a nonce set N assigned to the tree structure for protecting the memory to be verified.
  • the verification location input unit 202 receives input of a verification location CheckNode in the memory.
  • step S202 the tag verification unit 203 verifies the tag of each node using the tree structure Tree and the verification location CheckNode. Thereby, the tag verification unit 203 verifies whether or not the memory specified by CheckNode has been tampered with. Further, the tag verification unit 203 determines acceptance (ACK) or non-acceptance (NCK), and outputs verification result B. In step S203, the verification result output unit 204 outputs the verification result B to a computer display, printer, or the like. After step S203, the memory verification device 20 ends the process of FIG. 6.
  • step S300 the tree structure input unit 300 receives an input of a tree structure Tree for protecting the memory to be updated.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the tree structure Tree includes a nonce set N.
  • step S300 the update location input unit 302 receives input of memory update information UpdateNode.
  • step S301 the update determination unit 310 determines whether the update content UpdateInfo of the update information UpdateNode is for replacing the plaintext block corresponding to the update location UpdateIndex with a fixed value. At this time, the update determination unit 310 may determine whether the update content UpdateInfo of the update information UpdateNode includes a fixed value. If the update content UpdateInfo of the update information UpdateNode is to replace a plaintext block with a fixed value (if the determination result in S301 is YES), the process advances to step S302. On the other hand, if the update content UpdateInfo of the update information UpdateNode does not replace the plaintext block with a fixed value (if the determination result in S301 is NO), the process proceeds to step S312.
  • ACK acceptance
  • NCK non-acceptance
  • step S303 the update result output unit 306 outputs the verification result B output by the memory verification unit 303 to a computer display, printer, or the like.
  • step S303 the memory update device 30 ends the process.
  • step S304 the nonce update unit 304 uses the tree structure Tree output by the tree structure input unit 300 and the path Path output by the memory verification unit 303 to update the nonce of the node specified by Path. Then, the nonce update unit 304 outputs a new tree structure NewTree' as the update result.
  • step S305 the plain text of the leaf node and the tag corresponding to the path Path are updated using the tree structure NewTree', the path Path, and the memory update information UpdateNode.
  • the plaintext update unit 312 updates the plaintext (plaintext block) of the leaf node indicated by update information UpdateNode.
  • the tag update unit 305 also updates the tag of the node indicated by Path. Then, the tag update unit 305 outputs a new tree structure NewTree as the update result.
  • step S306 the update result output unit 306 outputs the tree structure NewTree output by the tag update unit 305. After step S306, the memory update device 30 ends the process.
  • ACK acceptance
  • NCK non-acceptance
  • step S313 the update result output unit 306 outputs the verification result B output by the memory verification unit 303 to a computer display, printer, or the like.
  • step S313 the memory update device 30 ends the process.
  • step S314 the nonce update unit 304 uses the Tree output by the tree structure input unit 300 and the path Path output by the memory verification unit 303 to update the nonce of the node specified by Path. do. Then, the nonce update unit 304 outputs a new tree structure NewTree' as the update result.
  • step S315 the plaintext of the leaf node and the tag corresponding to the path Path are updated using the tree structure NewTree', the path Path, and the memory update information UpdateNode.
  • the plaintext update unit 312 updates the plaintext (plaintext block) of the leaf node indicated by the update information UpdateNode.
  • the tag update unit 305 also updates the tag of the node indicated by Path.
  • the tag update unit 305 then outputs the new tree structure NewTree as a result of the update.
  • step S316 the update result output unit 306 outputs the tree structure NewTree output by the tag update unit 305.
  • the memory update device 30 ends the process.
  • the memory update device 30 uses the update information so that the update content of the leaf node including the plaintext to be updated depends on the plaintext before the update. Determine whether or not it is. Then, the memory update device 30 verifies the tags of nodes other than the leaf node in the path from the leaf node to the root node when the update content of the leaf node does not depend on the plaintext before update.
  • verification is performed for all nodes on the path, regardless of the updated content. Therefore, with the above configuration, it is possible to reduce the amount of calculation required for verification compared to the technique according to Patent Document 2. Therefore, when updating the contents of the memory, it is possible to efficiently perform node verification processing.
  • the tag of a leaf node is generated based on the plaintext and nonce of the leaf node, as shown in Equation 5. Therefore, the tag of a leaf node is correctly generated if the plaintext and nonce of the leaf node are valid.
  • plaintext as described above, if the updated content of a leaf node does not depend on the plaintext before update, it is valid.
  • the nonce even if the nonce is tampered with, the tampering can be detected by verification at the node above it (parent node, etc.).
  • an attacker performs a replay attack on the tree structure shown in FIG. 10. Then, an attacker falsifies the nonce value N(3,1) of the leaf node (N(3,1), M[1], Tag(3,1)) and changes it to another value N(3,1). )'. In this case, the attacker needs to falsify Tag (2, 1) and N (2, 1) of the parent node to become Tag (2, 1)' and N (2, 1)'. be.
  • Tag(2,1)' MAC_K(N(2,1)', N(3,1)'
  • N(3,2)) is known to the attacker in advance.
  • the attacker can correctly forge Tag(2,1)' and N(2,1)' by rollback.
  • Such tampering cannot be detected by integrity verification using MAC.
  • the attacker similarly performs the following on the node (N(1,1), Tag(1,1)), which is the parent node of the node (N(2,1), Tag(2,1)).
  • the tag and nonce are altered to become Tag(1,1)' and N(1,1)', respectively.
  • Such tampering cannot be detected by integrity verification using MAC.
  • the amount of calculation required for verification is the same for all nodes, in the case of a tree structure with a depth of d, the amount of calculation for memory verification processing in the memory update device 30 according to the present embodiment is as described in Patent Document 2.
  • the amount of calculation required for the technology is multiplied by (d-1)/d.
  • the cost of verification processing for leaf nodes is greater than the cost of verification processing for other nodes, the effect of reducing the amount of calculation by the method according to this embodiment becomes even greater.
  • the depth d is usually about one digit of an integer and is relatively small.
  • (d-1)/d is smaller as d is smaller. Therefore, the effect of reducing the amount of calculation by the method according to this embodiment is relatively large.
  • the configuration according to the second embodiment corresponds to an improved configuration of the above-mentioned patent document 2.
  • the number of branches of the tree structure is different from that in the first embodiment.
  • the tree structure configured by the memory protection system has b branches and has a depth of d.
  • the number of leaf nodes in the second embodiment is b ⁇ d.
  • FIG. 12 is a diagram showing an example of a tree structure constructed by the memory protection system 1 according to the second embodiment.
  • the memory protection system 1 includes a memory structure initialization device 10a, a memory verification device 20a, and a memory update device 30a.
  • the memory structure initialization device 10a receives as input a plaintext (plaintext message) for which tampering is to be detected, and outputs a tree structure in an initial state.
  • plaintext plaintext message
  • plaintext is represented by a combination of b ⁇ d plaintext blocks.
  • equation 22 holds true.
  • M M[1]
  • one plaintext block is defined as a Block bit.
  • the memory verification device 20a receives as input the storage location and tree structure of the plaintext block whose tampering is to be checked, and verifies whether the memory corresponding to the storage location has been tampered with.
  • the memory update device 30a receives as input the storage location of the plaintext block to be updated, the update contents thereof, and the tree structure.
  • the memory update device 30a outputs the updated tree structure or an error message indicating that tampering has been detected.
  • the memory structure initialization device 10a according to the second embodiment includes a plaintext input section 100, a nonce allocation section 101a, and a tag generation section 102a. Further, the memory structure initialization device 10a according to the second embodiment includes a leaf node generation section 103a, an intermediate node generation section 104a, a root node generation section 105, and a tree structure output section 106. Note that the plaintext input unit 100 is substantially the same as the plaintext input unit 100 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the nonce assignment unit 101a assigns node-specific nonce information to each node of the tree structure.
  • N the nonce assigned to the j_i-th node at depth i
  • N the nonce information assigned to all nodes of the tree structure.
  • the tag generation unit 102a uses the plaintext M output by the plaintext input unit 100, the nonce set N output by the nonce assignment unit 101a, and the secret key K to generate a tag for tampering detection. generate.
  • the tag generation unit 102a generates data expressed by the following equation 24 as a tag used in a leaf node.
  • TagLeaf ((M[1], Tag(d, 1)), (M[2], Tag(d, 2)), ..., (M[b ⁇ d], Tag(d, b ⁇ d )))
  • Tag(d,j_d) MAC_K(N(d,j_d),M[j_d])
  • TagInter (Tag(1,1),...,Tag(d-1,b ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_K ((N (i, j_i), N (i+1, b ⁇ j_i ⁇ (b ⁇ 1))
  • N(1,b) indicates a concatenation of nonces of b child nodes of the root node (0,1).
  • the tag corresponding to each node is calculated using the MAC calculation result with the plaintext block corresponding to the own node as the plaintext and the nonce of the own node and its plaintext as input. handle.
  • the tag corresponding to each node corresponds to the result of MAC calculation using the concatenation of nonces of a plurality of child nodes as plain text for nodes other than leaf nodes, and inputting the nonce of the own node and its plain text.
  • the tag corresponding to each node is expressed by the following equation 27.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • the tag generation unit 102a outputs the tag set TagLeaf to the leaf node generation unit 103a. Furthermore, the tag generation unit 102a outputs the tag set TagInter to the intermediate node generation unit 104a. Furthermore, the tag generation unit 102a outputs the tag set TagRoot to the root node generation unit 105.
  • the leaf node generation unit 103a Similar to the leaf node generation unit 103, the leaf node generation unit 103a generates tree-structured leaf nodes using the tag set TagLeaf output by the tag generation unit 102a.
  • Leaf ((N(d,1),M[1],Tag(d,1)),((N(d,2),M[2],Tag(d,2)),..., (N(d, b ⁇ d), M[b ⁇ d], Tag(d, b ⁇ d)))
  • each leaf node is expressed as in Equation 30 below.
  • Leaf ((N(3,1),M[1],Tag(3,1)),(N(3,2),M[2],Tag(3,2)),...,( N(3,27), M[27], Tag(3,27)))
  • the leaf node generation unit 103a outputs the generated leaf node set Leaf to the tree structure output unit 106.
  • the intermediate node generation unit 104a Similar to the intermediate node generation unit 104, the intermediate node generation unit 104a generates a tree-structured intermediate node using the tag set TagInter output by the tag generation unit 102a.
  • the j_i-th intermediate node at depth i is generated as shown in Equation 31 below. (Formula 31) (N(i, j_i), Tag(i, j_i))
  • each intermediate node is expressed as in Equation 33 below.
  • Inter ((N(1,1), Tag(1,1)), (N(1,2), Tag(1,2)), ..., (N(2,9), Tag(2 ,9)))
  • the intermediate node generation unit 104a outputs the generated intermediate node set Inter to the tree structure output unit 106.
  • the root node generation unit 105 is substantially the same as the root node generation unit 105 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the tree structure output unit 106 is substantially the same as the tree structure output unit 106 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the memory verification device 20a includes a tree structure input section 200, a verification location input section 202a, a tag verification section 203a, and a verification result output section 204.
  • the tree structure input unit 200 is substantially the same as the tree structure input unit 200 in the memory verification device 20 of the first embodiment, so a description thereof will be omitted.
  • the tree structure Tree input to the tree structure input unit 200 includes a nonce set N as shown in Equation 23 above.
  • the verification location input unit 202a receives input of the verification location CheckNode of the memory. Then, the verification location input unit 202a outputs the verification location CheckNode to the tag verification unit 203a.
  • CheckNode is a numerical value greater than or equal to 1 and less than or equal to b ⁇ d, and represents that the verification location is the CheckNode-th of the leaf node.
  • the tag verification unit 203a uses the tree structure Tree, the verification location CheckNode, and the secret key K to verify whether the memory specified by the CheckNode has been tampered with. Then, the tag verification unit 203 outputs the verification result to the verification result output unit 204. First, the tag verification unit 203 generates a path from the CheckNode-th leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • p_d CheckNode
  • the tag verification unit 203a uses the tree structure Tree, which is the output of the tree structure input unit 200, and the secret key K to calculate Equation 36 below.
  • PathTag' (Tag' (d, p_d), Tag' (d-1, p_ ⁇ d-1 ⁇ ), ..., Tag' (0, p_0))
  • Tag'(d, p_d) MAC_K(N(d, p_d), M[p_d])
  • Tag' (i, p_i) MAC_K (N (i, p_i), N (i+1, b ⁇ p_i ⁇ (b ⁇ 1))
  • Tag' (i, p_i) inputs the nonce of the node in the nonce part of the input of the MAC function, and concatenates and inputs b nonces of the child nodes of the node in the plaintext part of the input of the MAC function. It can be obtained by
  • the tag verification unit 203a obtains a value expressed by the following equation 37 from the tree structure Tree that is the output of the tree structure input unit 200.
  • PathTag (Tag(d, p_d), Tag(d-1, p_ ⁇ d-1 ⁇ ), ..., Tag(0, p_0))
  • the tag verification unit 203a sets the verification result to NCK.
  • NCK indicates that the information of the node related to the path has been tampered with.
  • the tag verification unit 203a outputs verification result B to the verification result output unit 204.
  • the verification result output unit 204 is substantially the same as the verification result output unit 204 in the memory verification device 20 of the first embodiment, so a description thereof will be omitted.
  • the memory update device 30a includes a tree structure input section 300, an update location input section 302a, a memory verification section 303a, a nonce update section 304, a tag update section 305a, and an update result output section 306. , an update determination unit 310 , and a plaintext update unit 312 .
  • the tree structure input unit 300 is substantially the same as the tree structure input unit 300 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the tree structure Tree input to the tree structure input unit 300 includes a nonce set N as shown in Equation 23 above.
  • the update location input section 302a receives input of memory update information UpdateNode. Then, the update location input unit 302a outputs the memory update information UpdateNode to the update determination unit 310, plaintext update unit 312, memory verification unit 303a, and tag update unit 305a.
  • UpdateIndex is data indicating a leaf node corresponding to an updated location.
  • UpdateIndex is a numerical value greater than or equal to 1 and less than or equal to b ⁇ d, and represents that the updated location is the UpdateIndex-th location of the leaf node.
  • UpdateIndex indicates the order (ordinal number) of leaf nodes corresponding to the updated location at depth d.
  • UpdateInfo is data indicating update content.
  • UpdateInfo represents Block bit information for updating the plaintext block M[UpdateIndex], which is information included in the UpdateIndex-th leaf node.
  • Plaintext block M[UpdateIndex] may be updated according to update content UpdateInfo.
  • the update determination unit 310 is substantially the same as the update determination unit 310 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the memory verification unit 303a uses the tree structure Tree, memory update information UpdateNode, and secret key K to verify whether the memory specified by UpdateNode has been tampered with. That is, the memory verification unit 303a verifies whether the node corresponding to the path regarding the leaf node specified by UpdateNode has been tampered with.
  • the verification process performed by the memory verification unit 303a is substantially the same as that of the tag verification unit 203a in the memory verification device 20a of the second embodiment, but the output results are different.
  • the tag verification unit 203a in the memory verification device 20a of the second embodiment outputs the verification result B, but the memory verification unit 303a also outputs the path from the node to the root node along with the verification result B.
  • the memory verification unit 303a outputs the verification result B to the nonce update unit 304, the plaintext update unit 312, the tag update unit 305a, and the update result output unit 306. Furthermore, the memory verification unit 303a outputs the path Path to the nonce update unit 304 and the tag update unit 305a.
  • p_d UpdateIndex
  • the other functions of the memory verification unit 303a are substantially the same as the functions of the memory verification unit 303 according to the first embodiment, so a description thereof will be omitted. That is, like the memory verification unit 303, the memory verification unit 303a may not verify the tag of the leaf node depending on the determination result of the update determination unit 310.
  • the plaintext update unit 312 is substantially the same as the plaintext update unit 312 in the memory update device 30 of the first embodiment, so a description thereof will be omitted. Further, since the nonce update unit 304 is substantially the same as the nonce update unit 304 in the memory update device 30 of the first embodiment, a description thereof will be omitted.
  • the tag update unit 305a uses the update result tree structure NewTree', the nonce set N, the memory update information UpdateNode, the verification result B, the path Path, and the secret key K to update the node specified by Path. Update tags.
  • MAC_K is substantially the same as the method used in the tag generation unit 102a of the memory structure initialization device 10a and the tag verification unit 203a of the memory verification device 20a in the second embodiment, so the explanation will be omitted. Omitted.
  • the update result output unit 306 is substantially the same as the update result output unit 306 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the effects achieved by the second embodiment are substantially the same as those achieved by the first embodiment.
  • the constructed tree structure is assumed to be a binary tree, but in the second embodiment, the number of branches of the tree structure is set to be arbitrary. Therefore, the effects of the first embodiment can be achieved even for a tree structure with an arbitrary number of branches.
  • the third embodiment is a modification of the first embodiment. Therefore, in the following description, the differences from the first embodiment described above will be mainly explained.
  • the configuration according to the third embodiment corresponds to an improved configuration of the above-mentioned patent document 2.
  • the tree structure configured by the memory protection system 1 according to the third embodiment is defined to have two branches and a depth of d, similarly to the first embodiment.
  • FIG. 13 is a diagram showing an example of a tree structure configured by the memory protection system 1 according to the third embodiment.
  • the memory protection system 1 includes a memory structure initialization device 10c, a memory verification device 20c, and a memory update device 30c.
  • the memory protection system 1 performs memory tampering detection and concealment.
  • the memory structure initialization device 10c according to the third embodiment receives as input the plaintext to be tampered with and to conceal, and outputs a tree structure in an initial state.
  • the memory verification device 20c receives as input the storage location and tree structure of the ciphertext block whose tampering is to be checked, and verifies whether the memory corresponding to the storage location has been tampered with.
  • the memory update device 30c receives as input the storage location of the ciphertext block to be updated, the update contents thereof, and the tree structure.
  • the memory update device 30c outputs the updated tree structure or an error message indicating that tampering has been detected.
  • the memory protection system 1 uses authentication encryption (AE) as an elemental technology in addition to the MAC used in the memory protection system 1 according to the first embodiment.
  • AE authentication encryption
  • AE using the secret key K uses the encryption function AE.
  • Enc_K and this encryption function AE.
  • the encryption function is expressed as Equation 40 below. (Formula 40)
  • A.E. Enc_K(N,M) (C,T)
  • the memory structure initialization device 10c according to the third embodiment includes a plaintext input section 100, a nonce allocation section 101, and a tag generation section 102c. Further, the memory structure initialization device 10c according to the third embodiment includes a leaf node generation section 103c, an intermediate node generation section 104, a root node generation section 105, and a tree structure output section 106.
  • the plaintext input unit 100 is substantially the same as the plaintext input unit 100 in the memory structure initialization device of the first embodiment, so a description thereof will be omitted.
  • the nonce allocation unit 101 is substantially the same as the nonce allocation unit 101 in the memory structure initialization device of the first embodiment, so a description thereof will be omitted.
  • the tag generation unit 102c generates a tag and ciphertext for tampering detection using the plaintext M output by the plaintext input unit 100, the nonce set N output by the nonce assignment unit 101, and the secret keys K_1 and K_2. . It is assumed that MAC is used to generate tags for intermediate nodes and root nodes, and authenticated encryption (AE) is used to encrypt plaintext (leaf nodes) and generate tags. Examples of the AE algorithm include OCB (Offset CodeBook).
  • the tag generation unit 102c generates data expressed by the following equation 42 as the ciphertext and tag used in the leaf node.
  • Enc_ ⁇ K_1 ⁇ ( ⁇ , ⁇ ) represents the encryption function of AE.
  • C[j_d] indicates the j_d-th ciphertext block.
  • TagInter (Tag(1,1),...,Tag(d-1,2 ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_ ⁇ K_2 ⁇ ((N(i, j_i), N(i+1, 2j_i-1)
  • the tag corresponding to each node is calculated using the AE calculation result with the plaintext block corresponding to the own node as the plaintext and the nonce of the own node and its plaintext as input. handle. Furthermore, as a result of this calculation, a ciphertext block is output.
  • the tag corresponding to each node corresponds to the result of MAC calculation using the concatenation of nonces of a plurality of child nodes as plain text for nodes other than leaf nodes, and inputting the nonce of the own node and its plain text.
  • Equations 42, 43, and 44 are expressed as Equation 45 below.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • Tag (i, j_i) MAC_ ⁇ K_2 ⁇ (N(i, j_i), N(i+1, 2j_i-1)
  • the tag generation unit 102c outputs the tag set TagLeaf to the leaf node generation unit 103c. Furthermore, the tag generation unit 102c outputs the tag set TagInter to the intermediate node generation unit 104. Furthermore, the tag generation unit 102c outputs the tag set TagRoot to the root node generation unit 105.
  • the leaf node generation unit 103c generates tree-structured leaf nodes using the ciphertext and tag set TagLeaf output by the tag generation unit 102c.
  • the j_d-th leaf node is generated as shown in Equation 46 below. (Formula 46) (N(d,j_d), C[j_d], Tag(d,j_d))
  • Leaf ((N(d,1),C[1],Tag(d,1)),((N(d,2),C[2],Tag(d,2)),..., (N(d, 2 ⁇ d), C[2 ⁇ d], Tag(d, 2 ⁇ d)))
  • each leaf node is expressed as in Equation 48 below.
  • Leaf ((N(3,1),C[1],Tag(3,1)),(N(3,2),C[2],Tag(3,2)),...,( N(3,8),C[8],Tag(3,8)))
  • the leaf node generation unit 103c outputs the generated leaf node set Leaf to the tree structure output unit 106.
  • the intermediate node generation unit 104 is substantially the same as the intermediate node generation unit 104 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the root node generation unit 105 is substantially the same as the root node generation unit 105 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the tree structure output unit 106 is substantially the same as the tree structure output unit 106 in the memory structure initialization device 10 of the first embodiment, so a description thereof will be omitted.
  • the memory verification device 20c includes a tree structure input section 200, a verification location input section 202, a tag verification section 203c, and a verification result output section 204.
  • the tree structure input unit 200 is substantially the same as the tree structure input unit 200 in the memory verification device 20 of the first embodiment, so a description thereof will be omitted.
  • the verification location input unit 202 is substantially the same as the verification location input unit 202 in the memory verification device 20 of the first embodiment, so a description thereof will be omitted.
  • the tag verification unit 203c uses the tree structure Tree, the verification location CheckNode, and the secret keys K_1 and K_2 to verify whether the memory specified by the CheckNode has been tampered with.
  • the tag verification unit 203c then outputs the verification result to the verification result output unit 204.
  • the tag verification unit 203c generates a path from the CheckNode-th leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • the tag verification unit 203c calculates the following equation 51 using the tree structure Tree that is the output of the tree structure input unit 200 and the secret keys K_1 and K_2. (Formula 51) A.E. Dec_ ⁇ K_1 ⁇ (N(d, p_d), C[p_d], Tag(d, p_d))
  • AE Dec_ ⁇ K_1 ⁇ ( ⁇ , ⁇ , ⁇ ) is the method AE. This is a decoding function corresponding to Enc_ ⁇ K_1 ⁇ . Further, NCK indicates that information on nodes related to the path has been tampered with.
  • MAC_ ⁇ K_2 ⁇ ( ⁇ ) is substantially the same as the MAC method used in the tag generation unit 102c of the memory structure initialization device 10c in the third embodiment, so the explanation will be omitted.
  • Tag'(i, p_i) inputs the nonce of the node in the nonce part of the input of the MAC function, and inputs the nonce of the node of the node in the plain text part of the input of the MAC function. It can be obtained by inputting two concatenated nonces.
  • the tag verification unit 203c obtains a value expressed by the following equation 53 from the tree structure Tree that is the output of the tree structure input unit 200.
  • PathTag (Tag(d-1,p_ ⁇ d-1 ⁇ ),...,Tag(0,p_0))
  • Tag'(i, p_i) ⁇ Tag(i, p_i) If this holds true, the tag verification unit 203c sets the verification result to NCK.
  • the tag verification unit 203c outputs verification result B.
  • the verification result output unit 204 is substantially the same as the verification result output unit 204 in the memory verification device 20 of the first embodiment, so a description thereof will be omitted.
  • the memory update device 30c includes a tree structure input section 300, an update location input section 302, a memory verification section 303c, a nonce update section 304, a tag update section 305c, and an update result output section 306. , an update determination unit 310 , and a plaintext update unit 312 .
  • the tree structure input unit 300 is substantially the same as the tree structure input unit 300 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the update location input unit 302 is substantially the same as the update location input unit 302 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the update determination unit 310 is substantially the same as the update determination unit 310 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the memory verification unit 303c uses the tree structure Tree, memory update information UpdateNode, and secret keys K_1 and K_2 to verify whether the memory specified by UpdateNode has been tampered with. That is, the memory verification unit 303c verifies whether the node corresponding to the path regarding the leaf node specified by UpdateNode has been tampered with.
  • the verification process performed by the memory verification unit 303c is substantially the same as that of the tag verification unit 203c in the memory verification device 20c of the third embodiment, but the output results are different.
  • the tag verification unit 203c in the memory verification device 20c of the third embodiment outputs the verification result B, but the memory verification unit 303c also outputs the path from the node to the root node along with the verification result B.
  • the memory verification unit 303c outputs the verification result B to the plaintext update unit 312, the nonce update unit 304, the tag update unit 305c, and the update result output unit 306. Furthermore, the memory verification unit 303c outputs the path Path to the nonce update unit 304 and the tag update unit 305c.
  • the other functions of the memory verification unit 303c are substantially the same as the functions of the memory verification unit 303 according to the first embodiment, so a description thereof will be omitted. That is, like the memory verification unit 303, the memory verification unit 303c may not verify the tag of the leaf node depending on the determination result of the update determination unit 310.
  • the plaintext update unit 312 is substantially the same as the plaintext update unit 312 in the memory update device 30 of the first embodiment, so a description thereof will be omitted. Further, since the nonce update unit 304 is substantially the same as the nonce update unit 304 in the memory update device 30 of the first embodiment, a description thereof will be omitted.
  • the tag update unit 305c uses the update result tree structure NewTree', the nonce set N, the memory update information UpdateNode, the verification result B, the path Path, and the secret keys K_1 and K_2, which are specified by Path. Update a node's tag.
  • the update result output unit 306 is substantially the same as the update result output unit 306 in the memory update device 30 of the first embodiment, so a description thereof will be omitted.
  • the effect of the third embodiment is that in addition to the effect of the first embodiment, it is possible to hide the memory.
  • MAC is used to detect tampering with plaintext messages.
  • the third embodiment by performing AE processing on the plaintext message, it is possible to conceal the plaintext message in addition to detecting tampering.
  • the amount of calculation for AE is generally greater than the amount of calculation for MAC. Therefore, as in this embodiment, by making it possible to eliminate the need for integrity verification of leaf nodes during update processing, it is possible to reduce AE calculations, which require a large amount of calculation. The amount of calculation required for this can be further reduced. Therefore, when updating the contents of the memory, it is possible to perform node verification processing more efficiently.
  • the AE used is a rate 1 method such as OCB, that is, a method that can realize encryption of plaintext and generation of an authentication tag at the cost of encryption alone, and It is assumed that a method can be adopted in which the amount of data is the same. In this case, compared to the first embodiment, the data amount of the entire tree structure and the amount of calculation required by each device are almost unchanged. In other words, the third embodiment enables concealment in addition to tampering detection with the same data amount and calculation amount as the first embodiment. Further, although the tree structure of the third embodiment assumes a binary tree, it is naturally possible to use a tree structure with an increased number of branches as in the second embodiment.
  • a tree structure configured by a memory protection system has two branches and a depth of d.
  • the number of leaf nodes in the fourth embodiment is 2 ⁇ d.
  • the depth of the root node is defined as 0, and the depth of the leaf node is defined as d.
  • the memory protection system 1 (information processing system) according to the fourth embodiment includes a memory structure initialization device 12, a memory verification device 22, and a memory update device 32.
  • the memory protection system 1 of the fourth embodiment replaces the memory structure initialization device 10, memory verification device 20, and memory update device 30 of FIG. 1 with the memory structure initialization device 12, memory verification device 22, and memory update device, respectively.
  • the memory structure initialization device 12, the memory verification device 22, and the memory update device 32 may be physically integrated or may be separate. Furthermore, the constituent elements of each device described later using FIGS. 14 to 16 may be realized by separate devices.
  • the memory structure initialization device 12 may be expressed as memory structure initialization devices 12a and 12c.
  • the memory verification device 22 may be referred to as memory verification devices 22a and 22c.
  • the memory update device 32 may be expressed as memory update devices 32a and 32c. Note that the same applies to the constituent elements shown in FIGS. 14 to 16.
  • FIG. 14 is a block diagram showing a configuration example of the memory structure initialization device 12 according to the fourth embodiment.
  • FIG. 15 is a block diagram showing a configuration example of the memory verification device 22 according to the fourth embodiment.
  • FIG. 16 is a block diagram showing a configuration example of the memory update device 32 according to the fourth embodiment.
  • FIG. 17 is a flowchart showing an example of a processing procedure of the memory structure initialization device 12 according to the fourth embodiment.
  • FIG. 18 is a flowchart illustrating an example of the processing procedure of the memory verification device 22 according to the fourth embodiment.
  • 19 to 21 are flowcharts showing examples of processing procedures of the memory update device 32 according to the fourth embodiment. FIGS. 14 to 21 will be described later.
  • the memory structure initialization device 12 receives the plaintext (plaintext message) for which tampering detection is to be performed as input, and generates a tree structure in an initial state and a memory address set of each node in the tree structure. Outputs .
  • the plaintext is represented by a combination of 2 ⁇ d plaintext blocks.
  • the memory verification device 22 inputs the storage location and tree structure of the plaintext (plaintext block) to be checked for tampering, and the memory address of each node in the tree structure, and checks whether the memory corresponding to the storage location has been tampered with. Verify.
  • the memory update device 32 receives as input the storage location of the plaintext (plaintext block) to be updated, the update contents thereof, the tree structure, and the memory address of each node in the tree structure. Then, the memory update device 32 outputs the updated tree structure or an error message indicating that tampering has been detected.
  • FIG. 22 is a diagram showing an example of a tree structure constructed by the memory protection system 1 according to the fourth embodiment.
  • FIG. 14 is a block diagram showing a configuration example of the memory structure initialization device 12 according to the fourth embodiment.
  • the memory structure initialization device 12 according to the fourth embodiment includes a plaintext input section 120, a memory address allocation section 121, and a tag generation section 122.
  • the memory structure initialization device 12 also includes a leaf node generation section 123, an intermediate node generation section 124, a root node generation section 125, a tree structure output section 126, and a memory address output section 127.
  • the plaintext input unit 120 has a function as a plaintext input means.
  • the memory address allocation unit 121 has a function as a memory address allocation means.
  • the tag generation unit 122 has a function as a tag generation means.
  • the leaf node generation unit 123 has a function as leaf node generation means.
  • the intermediate node generation unit 124 has a function as intermediate node generation means.
  • the root node generation unit 125 has a function as a root node generation means.
  • the tree structure output unit 126 has a function as a tree structure output means.
  • the memory address output section 127 has a function as a memory address output means.
  • the memory structure initialization device 12 is, for example, a computer. Note that the memory structure initialization device 12 may realize each component shown in FIG. 14 by executing a software program in a central processing unit. Further, each component implemented in the memory structure initialization device 12 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the plaintext input unit 120 receives input of plaintext M to be protected.
  • the plaintext input unit 120 outputs the received plaintext M to the tag generation unit 122.
  • the method by which the plaintext input unit 120 receives input of the plaintext M is not limited to a specific method.
  • the plaintext input unit 120 may include a character input device such as a keyboard, and may accept a user operation to input the plaintext M.
  • the plaintext input unit 120 may receive the plaintext M from another device.
  • the memory address allocation unit 121 allocates node-specific memory address information to each node in the tree structure. Then, the memory address allocation section 121 outputs the memory address information to the tag generation section 122 and the memory address output section 127.
  • the memory address allocation section 121 since the number of nodes and the data amount of each node are determined in advance, it is possible to allocate memory addresses before defining the information on the contents of each node. Further, due to its nature, memory address information is uniquely determined for each node. That is, memory address information is unique to each node. This makes it possible to prevent data swapping attacks between nodes.
  • add(0,1) corresponds to the memory address of the root node.
  • add(d, 1), . . . , add(d, 2 ⁇ d) corresponds to memory addresses of multiple leaf nodes. Note that the others correspond to memory addresses of intermediate nodes.
  • a indicates the depth in the tree structure of the node to which the memory address is assigned.
  • b indicates the order (ordinal number) at depth a of the node to which the memory address is assigned. This also applies to the tag notation Tag (a, b), which will be described later.
  • the tag generation unit 122 generates a tag for tampering detection using the plaintext M output from the plaintext input unit 120, the memory address set Add output from the memory address allocation unit 121, and the secret key K.
  • the above-mentioned MAC function is used for tag generation.
  • the tag generation unit 122 generates data expressed by the following equation 57 as a tag used in a leaf node.
  • TagLeaf ((M[1], Tag(d, 1)), (M[2], Tag(d, 2)), ..., (M[2 ⁇ d], Tag(d, 2 ⁇ d )))
  • Tag (d, j_d) MAC_K (add (d, j_d)
  • ctr(d, j_d) represents the counter value of the j_d-th leaf node at depth d, and is incremented by 1 each time the node is updated.
  • ctr(d, j_d) 0 ⁇ CTR-1 ⁇
  • CTR is the bit length of the local counter value stored in each node, and "0 ⁇ CTR-1 ⁇ " represents a bit string in which CTR-1 0s are concatenated. It is assumed that the value of CTR is predetermined.
  • TagInter (Tag(1,1),...,Tag(d-1,2 ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_K (add (i, j_i)
  • TagRoot (Tag(0,1))
  • Tag (0, 1) MAC_K (add (0, 1)
  • the tags corresponding to each node are as follows.
  • the concatenation of the memory address of the own node and the local counter value is used as a nonce
  • the plaintext block corresponding to the own node is used as plaintext
  • the nonce and plaintext are used as input.
  • the tag corresponding to each node uses the concatenation of the memory address of the own node and the local counter value as a nonce, and the concatenation of the local counter values of multiple child nodes as plain text, and the nonce and This corresponds to the MAC calculation result using plaintext as input.
  • the tag corresponding to each node is expressed by the following equation 60.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • Tag(i,j_i) MAC_K(add(i,j_i)
  • ctr(i+1,2j_i) ) (For i 3)
  • Tag (i, j_i) MAC_K (add (i, j_i)
  • the tag generation unit 122 outputs the tag set TagLeaf to the leaf node generation unit 123. Further, the tag generation unit 122 outputs the tag set TagInter to the intermediate node generation unit 124. Further, the tag generation unit 122 outputs the tag set TagRoot to the root node generation unit 125.
  • the leaf node generation unit 123 generates tree-structured leaf nodes using the tag set TagLeaf output by the tag generation unit 122.
  • the j_d-th leaf node is generated as shown in Equation 61 below. (Formula 61) (ctr(d,j_d), M[j_d], Tag(d,j_d))
  • leaf nodes are described as shown in Equation 62 below.
  • Leaf ((ctr(d, 1), M[1], Tag(d, 1)), ((ctr(d, 2), M[2], Tag(d, 2)), ..., (ctr(d, 2 ⁇ d), M[2 ⁇ d], Tag(d, 2 ⁇ d)))
  • the leaf node generation unit 123 outputs the generated leaf node set Leaf to the tree structure output unit 126.
  • the intermediate node generation unit 124 generates a tree-structured intermediate node using the tag set TagInter output by the tag generation unit 122.
  • the j_i-th intermediate node at depth i is generated as shown in Equation 63 below. (Formula 63) (ctr(i, j_i), Tag(i, j_i))
  • ctr(i, j_i) 0 ⁇ CTR-1 ⁇
  • each intermediate node is expressed as in Equation 65 below.
  • Inter ((ctr(1,1), Tag(1,1)), (ctr(1,2), Tag(1,2)), ..., (ctr(2,4), Tag(2 ,4)))
  • the intermediate node generation unit 124 outputs the generated intermediate node set Inter to the tree structure output unit 126.
  • the root node generation unit 125 generates a tree-structured root node using the tag TagRoot output by the tag generation unit 122.
  • 1. (Formula 66) Root (ctr(0,1), Tag(0,1)) Further, the root node generation unit 125 outputs the generated root node Root to the tree structure output unit 126.
  • the tree structure output unit 126 connects the leaf node set Leaf output from the leaf node generation unit 123, the intermediate node set Inter output from the intermediate node generation unit 124, and the root node Root output from the root node generation unit 125. . Then, the tree structure output unit 126 outputs the concatenated data string to a computer display, printer, etc. as data indicating a tree structure (tree structure Tree).
  • the memory address output unit 127 outputs the memory address Add output by the memory address allocation unit 121 to a computer display, printer, or the like.
  • FIG. 15 is a block diagram showing a configuration example of the memory verification device 22 according to the fourth embodiment.
  • the memory verification device 22 according to the fourth embodiment includes a tree structure input section 220, a memory address input section 221, a verification location input section 222, a tag verification section 223, and a verification result output section. 224.
  • the tree structure input unit 220 has a function as a tree structure input means.
  • the memory address input section 221 has a function as a memory address input means.
  • the verification point input section 222 has a function as a verification point input means.
  • the tag verification unit 223 has a function as a tag verification means.
  • the verification result output unit 224 has a function as a verification result output means.
  • the memory verification device 22 is, for example, a computer. Note that the memory verification device 22 may realize each component shown in FIG. 15 by executing a software program in a central processing unit. Further, each component implemented in the memory verification device 22 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the tree structure input unit 220 receives input of a tree structure Tree for protecting the memory to be verified.
  • the tree structure input unit 220 then outputs the tree structure Tree to the tag verification unit 223.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the tree structure Tree may be a data string output by the tree structure output unit 126 in which a leaf node set Leaf, an intermediate node set Inter, and a root node Root are connected.
  • the verification point input unit 222 receives an input of a memory verification point CheckNode. Then, the verification location input unit 222 outputs the verification location CheckNode to the tag verification unit 223.
  • CheckNode is data indicating a node corresponding to a memory verification location. Specifically, CheckNode is a numerical value of 1 or more and 2 ⁇ d or less, and indicates that the verification location is the CheckNode-th of the leaf node. That is, CheckNode indicates the position (order; ordinal number) of the leaf node corresponding to the verification location.
  • the tag verification unit 223 uses the tree structure Tree, the memory address set Add, the verification location CheckNode, and the secret key K to verify whether the memory specified by the CheckNode has been tampered with. Then, the tag verification section 223 outputs the verification result to the verification result output section 224. First, the tag verification unit 223 generates a path from the CheckNode-th leaf node to the root node.
  • the path Path is data indicating the path of a node from the leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • p_d CheckNode
  • the tag verification unit 223 calculates the following equation 70 using Add, which is the output of the memory address input unit 221, the tree structure Tree, which is the output of the tree structure input unit 220, and the secret key K. .
  • PathTag' (Tag' (d, p_d), Tag' (d-1, p_ ⁇ d-1 ⁇ ), ..., Tag' (0, p_0))
  • Tag'(d, p_d) MAC_K(add(d, p_d)
  • Tag' (i, p_i) MAC_K (add (i, p_i)
  • Tag'(i, p_i) inputs the concatenation of the address of the node and the local counter in the nonce part of the input of the MAC function, and inputs the local counter of the child node of the node in the plaintext part of the input of the MAC function. It can be obtained by connecting two and inputting them.
  • the tag verification unit 223 obtains a value expressed by the following equation 71 from the tree structure Tree that is the output of the tree structure input unit 220.
  • PathTag (Tag(d, p_d), Tag(d-1, p_ ⁇ d-1 ⁇ ), ..., Tag(0, p_0))
  • the tag verification unit 223 outputs verification result B to the verification result output unit 224.
  • the verification result output unit 224 outputs the verification result B output by the tag verification unit 223 to a computer display, printer, or the like.
  • FIG. 16 is a block diagram showing a configuration example of the memory update device 32 according to the fourth embodiment.
  • the memory update device 32 according to the fourth embodiment includes a tree structure input section 320, a memory address input section 321, an update location input section 322, a memory verification section 323, and a counter update section. 324, a tag update section 325, and an update result output section 326.
  • the memory update device 32 according to the fourth embodiment includes an update determination section 330 and a plaintext update section 332.
  • the tree structure input unit 320 has a function as a tree structure input means.
  • the memory address input section 321 has a function as a memory address input means.
  • the update location input section 322 has a function as an update location input means.
  • the memory verification section 323 has a function as a memory verification means.
  • the counter updating section 324 has a function as a counter updating means.
  • the tag update unit 325 has a function as a tag update unit.
  • the update result output unit 326 has a function as update result output means.
  • the update determination unit 330 has a function as update determination means.
  • the plaintext updating unit 332 has a function as a plaintext updating means.
  • the memory update device 32 is, for example, a computer. Note that the memory update device 32 may realize each component shown in FIG. 16 by executing a software program in a central processing unit. Further, each component implemented in the memory update device 32 may be implemented as an individual device, a functional unit, or an electronic circuit. This also applies to other embodiments described below.
  • the tree structure input unit 320 receives input of a tree structure Tree for protecting the memory to be updated. Then, the tree structure input unit 320 outputs the tree structure Tree to the memory verification unit 323 and the counter update unit 324, as shown by the dashed line in FIG. Furthermore, the tree structure input unit 320 may output the tree structure Tree to the plaintext update unit 332.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root. Note that the function of the tree structure input unit 320 is substantially the same as the function of the tree structure input unit 220 in the memory verification device 22 according to the fourth embodiment, so a description thereof will be omitted.
  • the memory address input unit 321 receives an input of a memory address set Add assigned to a tree structure for protecting the memory to be verified. Then, the memory address input unit 321 outputs the memory address set Add to the memory verification unit 323 and the tag update unit 325, as shown by the solid line in FIG. Note that the function of the memory address input section 321 is substantially the same as the function of the memory address input section 221 in the memory verification device 22 according to the fourth embodiment, so a description thereof will be omitted.
  • the update location input unit 322 accepts input of memory update information UpdateNode. Then, the update location input unit 322 outputs the memory update information UpdateNode to the update determination unit 330, plaintext update unit 332, memory verification unit 323, and tag update unit 325, as shown by the dotted line in FIG.
  • the memory update information UpdateNode is information regarding the node to be updated in the tree structure. UpdateNode is substantially the same as that of the first embodiment described above, so a description thereof will be omitted.
  • the update determination unit 330 uses the update information UpdateNode to determine whether the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update.
  • the functions of the update determination unit 330 are substantially the same as those of the update determination unit 310 according to the first embodiment, so the description thereof will be omitted.
  • the memory verification unit 323 uses the tree structure Tree, the memory address set Add, the memory update information UpdateNode, and the secret key K to verify whether the memory specified by UpdateNode has been tampered with. That is, the memory verification unit 323 verifies whether the node corresponding to the path regarding the leaf node specified by UpdateNode has been tampered with.
  • the processing performed by the memory verification unit 323 is substantially the same as the processing performed by the tag verification unit 223 in the memory verification device 22 of the fourth embodiment, but the output results are different.
  • the tag verification unit 223 in the memory verification device 22 of the fourth embodiment outputs the verification result B, but the memory verification unit 323 also outputs the path from the node to the root node along with the verification result B.
  • the memory verification unit 323 outputs the verification result B to the counter update unit 324, tag update unit 325, and update result output unit 326, as shown by the thick broken line in FIG. Further, the memory verification unit 323 may output the verification result B to the plaintext update unit 332. Further, the memory verification unit 323 outputs the path Path to the counter update unit 324 and the tag update unit 325, as shown by the thick solid line in FIG.
  • the memory verification unit 323 generates a path Path from the leaf node to the root node in the tree structure.
  • the memory verification unit 323 is used for verification at each node in the path by inputting to the MAC as a nonce the concatenation of at least a memory address unique to each node and a local counter stored in each node. Generate tags. Thereby, the memory verification unit 323 verifies the tags stored in each node. That is, the memory verification unit 323 generates a tag Tag' for each node in the path Path by calculating the above-mentioned equation 70.
  • the memory verification unit 323 compares the generated tag Tag' and the stored tag Tag (tag related to Tree) for each node, and determines whether the two match. Thereby, the memory verification unit 323 verifies whether or not each node has been tampered with. That is, the memory verification unit 323 performs integrity verification for each node. Then, the memory verification unit 323 outputs verification result B.
  • the memory verification unit 323 according to the fourth embodiment does not verify the tag of the leaf node according to the determination result of the update determination unit 330. There is. Specifically, if the update content of the leaf node does not depend on the plain text before update, the memory verification unit 323 verifies the tag of the node other than the leaf node in the path Path. On the other hand, if the updated contents of the leaf node depend on the plain text before the update, the memory verification unit 323 verifies the tags of all nodes including the leaf node in the path Path.
  • the plaintext update unit 332 updates the plaintext to be updated in the leaf node based on the update information UpdateNode.
  • the function of the plaintext update unit 332 is substantially the same as that of the plaintext update unit 312 according to the first embodiment, so a description thereof will be omitted.
  • MAC_K is the same as the method used in the tag generation unit 122 of the memory structure initialization device 12 and the tag verification unit 223 of the memory verification device 22 in the fourth embodiment.
  • Tag(i, p_i) is obtained by inputting the concatenation of the address of the node and the local counter into the nonce part of the input of the MAC function, and inputting the concatenation of two local counters of the child nodes of the node into the plaintext part of the input of the MAC function.
  • the tag update unit 325 outputs the update result tree structure NewTree to the update result output unit 326.
  • the new tree structure NewTree is composed of an updated leaf node set Leaf, an updated intermediate node set Inter, and an updated root node Root. Note that, as shown in Equation 62, the updated plaintext information is included in the updated leaf node set Leaf.
  • FIG. 17 is a flowchart showing the operation of the memory structure initialization device 12 (memory structure initialization method).
  • the plaintext input unit 120 receives an input of plaintext M to be protected.
  • the memory address allocation unit 121 allocates a memory address to each node of the tree structure and generates a memory address set Add.
  • the tag generation unit 122 generates a tag set (TagLeaf, TagInter, TagRoot) for tampering detection using the plaintext M and the memory address set Add.
  • step S124 the leaf node generation unit 123 uses the tag set TagLeaf output by the tag generation unit 122 to generate a tree-structured leaf node set Leaf.
  • step S125 the intermediate node generation unit 124 uses the tag set TagInter output by the tag generation unit 122 to generate a tree-structured intermediate node set Inter.
  • step S126 the root node generation unit 125 uses the tag TagRoot output by the tag generation unit 122 to generate a tree-structured root node Root.
  • step S127 the tree structure output unit 126 connects the leaf node set Leaf, the intermediate node set Inter, and the root node Root, and outputs the connected data string showing the tree structure to a computer display, printer, etc. . Furthermore, the memory address output unit 127 outputs the memory address Add output by the memory address allocation unit 121 to a computer display, printer, or the like. After step S127, the memory structure initialization device 12 ends the process of FIG. 17.
  • FIG. 18 is a flowchart showing the operation of the memory verification device 22 (memory verification method).
  • the tree structure input unit 220 receives an input of a tree structure Tree for protecting the memory to be verified.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the memory address input unit 221 receives an input of a memory address set Add assigned to a tree structure for protecting the memory to be verified.
  • the verification point input unit 222 receives an input of a verification point CheckNode in the memory.
  • step S222 the tag verification unit 223 verifies the tag of each node using the tree structure Tree, the memory address set Add, and the verification location CheckNode. Thereby, the tag verification unit 223 verifies whether or not the memory specified by CheckNode has been tampered with. Further, the tag verification unit 223 determines acceptance (ACK) or non-acceptance (NCK), and outputs verification result B. In step S223, the verification result output unit 224 outputs the verification result B to a computer display, printer, or the like. After step S223, the memory verification device 22 ends the process of FIG. 18.
  • step S320 the tree structure input unit 320 receives an input of a tree structure Tree for protecting the memory to be updated.
  • the tree structure Tree is composed of a leaf node set Leaf, an intermediate node set Inter, and a root node Root.
  • the memory address input unit 321 receives an input of a memory address set Add assigned to a tree structure for protecting the memory to be verified.
  • the update location input unit 322 receives input of memory update information UpdateNode.
  • step S321 the update determination unit 330 determines whether the update content UpdateInfo of the update information UpdateNode is for replacing the plaintext block corresponding to the update location UpdateIndex with a fixed value. Specifically, the update determination unit 330 may determine whether the update content UpdateInfo of the update information UpdateNode includes a fixed value. If the update content UpdateInfo of the update information UpdateNode is to replace a plaintext block with a fixed value (if the determination result in S321 is YES), the process proceeds to step S322. On the other hand, if the update content UpdateInfo of the update information UpdateNode does not replace the plaintext block with a fixed value (if the determination result in S321 is NO), the process proceeds to step S332.
  • ACK acceptance
  • NCK non-acceptance
  • step S323 the update result output unit 326 outputs the verification result B output by the memory verification unit 323 to a computer display, printer, etc.
  • step S323 the memory update device 32 ends the process.
  • step S324 the counter update unit 324 uses the tree structure Tree output by the tree structure input unit 320 and the path Path output by the memory verification unit 323 to update the counter of the node specified by Path. Then, the counter update unit 324 outputs a new tree structure NewTree' as the update result.
  • step S325 the plain text of the leaf node and the tag corresponding to the path Path are updated using the tree structure NewTree', the path Path, and the memory update information UpdateNode.
  • the plaintext update unit 332 updates the plaintext (plaintext block) of the leaf node indicated by the update information UpdateNode.
  • the tag update unit 325 also updates the tag of the node indicated by Path. Then, the tag update unit 325 outputs a new tree structure NewTree as the update result.
  • step S326 the update result output unit 326 outputs the tree structure NewTree output by the tag update unit 325. After step S326, the memory update device 32 ends the process.
  • step S332 the memory verification unit 323 verifies the tags of all nodes on the path. Specifically, the memory verification unit 323 uses the tree structure Tree, the memory address set Add, and the memory update information UpdateNode to verify the tags of all nodes on the path regarding the leaf node specified by UpdateNode. conduct. Thereby, the memory verification unit 323 verifies whether or not each node has been tampered with. Further, the memory verification unit 323 determines acceptance (ACK) or non-acceptance (NCK), and outputs verification result B. Then, the memory verification unit 323 outputs the verification result B and the path Path used for memory verification.
  • ACK acceptance
  • NCK non-acceptance
  • step S333 the update result output unit 326 outputs the verification result B output by the memory verification unit 323 to a computer display, printer, or the like.
  • step S333 the memory update device 32 ends the process.
  • step S334 the counter update unit 324 uses the tree structure Tree output by the tree structure input unit 320 and the path Path output by the memory verification unit 323 to update the counter of the node specified by Path. Update. Then, the counter update unit 324 outputs a new tree structure NewTree' as the update result.
  • step S335 the plaintext of the leaf node and the tag corresponding to the path Path are updated using the tree structure NewTree', the path Path, and the memory update information UpdateNode.
  • the plaintext update unit 332 updates the plaintext (plaintext block) of the leaf node indicated by the update information UpdateNode.
  • the tag update unit 325 also updates the tag of the node indicated by Path. Then, the tag update unit 325 outputs a new tree structure NewTree as the update result.
  • step S336 the update result output unit 326 outputs the tree structure NewTree output by the tag update unit 325.
  • the memory update device 32 ends the process.
  • the memory update device 32 uses the update information so that the update content of the leaf node including the plaintext to be updated depends on the plaintext before the update. Determine whether or not it is. Then, the memory update device 32 verifies the tags of nodes other than the leaf node in the path from the leaf node to the root node when the update content of the leaf node does not depend on the plaintext before update.
  • verification is performed for all nodes on the path, regardless of the updated content. Therefore, with the above configuration, it is possible to reduce the amount of calculation required for verification compared to the technique disclosed in Patent Document 3. Therefore, as in the case of the first embodiment, it is possible to efficiently perform node verification processing when updating the contents of the memory.
  • the tree structure may be tampered with.
  • the fourth embodiment as in the case of the first embodiment, if the update content of a leaf node does not depend on the plaintext before update, even if the plaintext included in the leaf node before update is tampered with, , the plaintext is updated to data that is not based on the tampered plaintext. Therefore, memory safety is not compromised. Further, even if the local counter is tampered with, the tampering with the local counter is detected, similar to the case where the nonce is tampered with in the first embodiment described above. Therefore, if the updated content of a leaf node does not depend on the plaintext before the update, security will not be compromised even if tag verification for the leaf node is not required.
  • the amount of calculation required for verification is the same for all nodes, in the case of a tree structure with a depth of d, the amount of calculation for memory verification processing in the memory update device 32 according to the present embodiment is as described in Patent Document 2.
  • the amount of calculation required for the technology is multiplied by (d-1)/d.
  • the cost of verification processing for leaf nodes is greater than the cost of verification processing for other nodes, the effect of reducing the amount of calculation by the method according to this embodiment becomes even greater.
  • the depth d is usually about one digit of an integer and is relatively small.
  • (d-1)/d is smaller as d is smaller. Therefore, the effect of reducing the amount of calculation by the method according to this embodiment is relatively large.
  • the fifth embodiment is a modification of the fourth embodiment. Therefore, in the following description, the differences from the fourth embodiment described above will be mainly explained.
  • the configuration according to the fifth embodiment corresponds to an improved configuration of the above-mentioned patent document 3.
  • the number of branches in the tree structure is different from that in the fourth embodiment.
  • an example will be described in which the tree structure configured by the memory protection system has b branches and has a depth of d. In other words, the number of leaf nodes in the fifth embodiment is b ⁇ d.
  • FIG. 23 is a diagram showing an example of a tree structure configured by the memory protection system according to the fifth embodiment.
  • the memory protection system 1 includes a memory structure initialization device 12a, a memory verification device 22a, and a memory update device 32a.
  • the memory structure initialization device 12a receives as input the plaintext for which tampering is to be detected, and outputs a tree structure in an initial state and a memory address set of each node in the tree structure.
  • plaintext is represented by a combination of b ⁇ d plaintext blocks.
  • equation 75 holds true.
  • M M[1]
  • one plaintext block is defined as a Block bit.
  • the memory verification device 22a inputs the storage location and tree structure of the plaintext block whose tampering is to be checked, and the memory address of each node in the tree structure, and verifies whether the memory corresponding to the storage location has been tampered with.
  • the memory update device 32a receives as input the storage location of the plaintext block to be updated, the update contents thereof, the tree structure, and the memory address of each node in the tree structure.
  • the memory update device 32a outputs the updated tree structure or an error message indicating that tampering has been detected.
  • the memory structure initialization device 12a according to the fifth embodiment includes a plaintext input section 120, a memory address allocation section 121a, and a tag generation section 122a. Further, the memory structure initialization device 12a according to the fifth embodiment includes a leaf node generation section 123a, an intermediate node generation section 124a, a root node generation section 125, a tree structure output section 126, and a memory address output section 127. and. Note that the plaintext input unit 120 is substantially the same as the plaintext input unit 120 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address allocation unit 121a allocates memory address information to each node of the tree structure.
  • the memory address assigned to the j_i-th node at depth i is represented by add(i, j_i).
  • the memory address information assigned to all nodes of the tree structure is written as a memory address set Add as shown in the following equation 76.
  • Add (add(0,1), add(1,1), add(1,2),..., add(1,b), add(2,1), add(2,2), ⁇ ..., add (d, b ⁇ d-1), add (d, b ⁇ d))
  • the tag generation unit 122a uses the plaintext M output by the plaintext input unit 120, the memory address set Add output by the memory address allocation unit 121a, and the secret key K to generate a tag for tampering detection. Generate tags for . First, the tag generation unit 122a generates data expressed by the following equation 77 as a tag used in a leaf node.
  • TagLeaf ((M[1], Tag(d, 1)), (M[2], Tag(d, 2)), ..., (M[b ⁇ d], Tag(d, b ⁇ d )))
  • Tag (d, j_d) MAC_K (add (d, j_d)
  • ctr(d, j_d) represents the counter value of the j_d-th leaf node at depth d, and is incremented by 1 each time the node is updated.
  • ctr(d, j_d) 0 ⁇ CTR-1 ⁇
  • CTR is the bit length of the local counter value stored in each node, and "0 ⁇ CTR-1 ⁇ " represents a bit string in which CTR-1 0s are concatenated. It is assumed that the value of CTR is predetermined.
  • TagInter (Tag(1,1),...,Tag(d-1,b ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_K ((add (i, j_i)
  • ctr(1,b)" indicates a concatenation of local counter values of b child nodes of the root node (0,1).
  • the tags corresponding to each node are as follows.
  • the concatenation of the memory address of the own node and the local counter value is used as a nonce
  • the plaintext block corresponding to the own node is used as plaintext
  • the nonce and plaintext are used as input.
  • the tag corresponding to each node uses the concatenation of the memory address of the own node and the local counter value as a nonce, and the concatenation of the local counter values of multiple child nodes as plain text, and the nonce and This corresponds to the MAC calculation result using plaintext as input.
  • the tag corresponding to each node is expressed by the following equation 80.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • Tag(i,j_i) MAC_K(add(i,j_i)
  • Tag (i, j_i) MAC_K (add (i, j_i)
  • the tag generation unit 122a outputs the tag set TagLeaf to the leaf node generation unit 123a. Furthermore, the tag generation unit 122a outputs the tag set TagInter to the intermediate node generation unit 124a. Furthermore, the tag generation unit 122a outputs the tag set TagRoot to the root node generation unit 125.
  • the leaf node generation unit 123a Similar to the leaf node generation unit 123, the leaf node generation unit 123a generates tree-structured leaf nodes using the tag set TagLeaf output by the tag generation unit 122a.
  • leaf nodes are described as shown in equation 82 below.
  • Leaf ((ctr(d,1),M[1],Tag(d,1)),(ctr(d,2),M[2],Tag(d,2)),...,( ctr(d, b ⁇ d), M[b ⁇ d], Tag(d, b ⁇ d)))
  • the leaf node generation unit 123a outputs the generated leaf node set Leaf to the tree structure output unit 126.
  • the intermediate node generation unit 124a Similar to the intermediate node generation unit 124, the intermediate node generation unit 124a generates a tree-structured intermediate node using the tag set TagInter output by the tag generation unit 122a.
  • the j_i-th intermediate node at depth i is generated as shown in equation 83 below. (Formula 83) (ctr(i, j_i), Tag(i, j_i))
  • ctr(i, j_i) 0 ⁇ CTR-1 ⁇
  • each intermediate node is expressed as in Equation 85 below.
  • Inter ((ctr(1,1), Tag(1,1)), (ctr(1,2), Tag(1,2)), ..., (ctr(2,9), Tag(2 ,9)))
  • the intermediate node generation unit 124a outputs the generated intermediate node set Inter to the tree structure output unit 126.
  • the root node generation unit 125 is substantially the same as the root node generation unit 125 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the tree structure output unit 126 is substantially the same as the tree structure output unit 126 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address output unit 127 is substantially the same as the memory address output unit 127 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the memory verification device 22a includes a tree structure input unit 220, a memory address input unit 221a, a verification location input unit 222a, a tag verification unit 223a, and a verification result output unit 224.
  • the tree structure input unit 220 is substantially the same as the tree structure input unit 220 in the memory verification device 22 according to the fourth embodiment, and therefore a description thereof will be omitted.
  • the memory address input unit 221a receives an input of a memory address set Add assigned to a tree structure for protecting the memory to be verified. Then, the memory address input unit 221a outputs the memory address set Add to the tag verification unit 223a.
  • the verification location input unit 222a receives input of the verification location CheckNode of the memory. Then, the verification location input unit 222a outputs the verification location CheckNode to the tag verification unit 223a.
  • CheckNode is a numerical value greater than or equal to 1 and less than or equal to b ⁇ d, and represents that the verification location is the CheckNode-th of the leaf node.
  • the tag verification unit 223a uses the tree structure Tree, the memory address set Add, the verification location CheckNode, and the secret key K to check whether the memory specified by the CheckNode has been tampered with. Verify. Then, the tag verification section 223a outputs the verification result to the verification result output section 224. First, the tag verification unit 223a generates a path from the CheckNode-th leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • p_d CheckNode
  • the tag verification unit 223a calculates the following equation 89 using Add, which is the output of the memory address input unit 221a, Tree, which is the output of the tree structure input unit 220, and the secret key K.
  • PathTag' (Tag' (d, p_d), Tag' (d-1, p_ ⁇ d-1 ⁇ ), ..., Tag' (0, p_0))
  • Tag'(d, p_d) MAC_K(add(d, p_d)
  • Tag' (i, p_i) MAC_K (add (i, p_i)
  • Tag'(i, p_i) inputs the concatenation of the address of the node and the local counter in the nonce part of the input of the MAC function, and inputs the local counter of the child node of the node in the plaintext part of the input of the MAC function. It is obtained by concatenating and inputting b pieces.
  • the tag verification unit 223a obtains a value expressed by the following equation 90 from the tree structure Tree that is the output of the tree structure input unit 220.
  • PathTag (Tag(d, p_d), Tag(d-1, p_ ⁇ d-1 ⁇ ), ..., Tag(0, p_0))
  • the tag verification section 223a outputs the verification result B to the verification result output section 224.
  • the verification result output unit 224 is substantially the same as the verification result output unit 224 in the memory verification device 22 of the fourth embodiment, so a description thereof will be omitted.
  • the memory update device 32a includes a tree structure input section 320, a memory address input section 321a, an update location input section 322a, a memory verification section 323a, a counter update section 324, and a tag update section 325a. and an update result output unit 326. Furthermore, the memory update device 32 according to the fifth embodiment includes an update determination section 330 and a plaintext update section 332.
  • the tree structure input unit 320 is substantially the same as the tree structure input unit 320 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address input unit 321a receives an input of a memory address set Add assigned to a tree structure for protecting the memory to be verified. Then, the memory address input unit 321a outputs the memory address set Add to the memory verification unit 323a and the tag update unit 325a.
  • the function of the memory address input section 321a is substantially the same as the function of the memory address input section 221a in the memory verification device 22a of the fifth embodiment, so a description thereof will be omitted.
  • the update location input unit 322a accepts input of memory update information UpdateNode. Then, the update location input unit 322a outputs the memory update information UpdateNode to the update determination unit 330, plaintext update unit 332, memory verification unit 323a, and tag update unit 325a.
  • the memory update information UpdateNode is information regarding the node to be updated in the tree structure. UpdateNode is substantially the same as that of the second embodiment described above, so a description thereof will be omitted.
  • the update determination unit 330 is substantially the same as the update determination unit 330 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the memory verification unit 323a uses the tree structure Tree, memory address set Add, memory update information UpdateNode, and secret key K to determine whether the memory specified by UpdateNode has been tampered with. Verify if there are any. That is, the memory verification unit 323a verifies whether the node corresponding to the path regarding the leaf node specified by UpdateNode has been tampered with.
  • the verification process performed by the memory verification unit 323a is substantially the same as that of the tag verification unit 223a in the memory verification device 22a of the fifth embodiment, but the output results are different.
  • the tag verification unit 223a in the memory verification device 22a of the fifth embodiment outputs the verification result B, but the memory verification unit 323a also outputs the path from the node to the root node along with the verification result B.
  • the memory verification section 323a outputs the verification result B to the counter update section 324, the plaintext update section 332, the tag update section 325a, and the update result output section 326. Furthermore, the memory verification unit 323a outputs the path Path to the counter update unit 324 and the tag update unit 325a.
  • the other functions of the memory verification unit 323a are substantially the same as the functions of the memory verification unit 323 according to the fourth embodiment, so a description thereof will be omitted. That is, like the memory verification unit 323, the memory verification unit 323a may not verify the tag of the leaf node depending on the determination result of the update determination unit 330.
  • the plaintext update unit 332 is substantially the same as the plaintext update unit 332 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the counter update unit 324 is substantially the same as the counter update unit 324 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the tag update unit 325a uses the update result tree structure NewTree', the memory address set Add, the memory update information UpdateNode, the verification result B, the path Path, and the secret key K to update the node specified by Path. Update the tag.
  • MAC_K is substantially the same as the method used in the tag generation unit 122a of the memory structure initialization device 12a and the tag verification unit 223a of the memory verification device 22a in the fifth embodiment, so the explanation will be omitted. Omitted.
  • the update result output unit 326 is substantially the same as the update result output unit 326 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the effects achieved by the fifth embodiment are substantially the same as those achieved by the fourth embodiment.
  • the constructed tree structure is assumed to be a binary tree, but in the fifth embodiment, the number of branches of the tree structure is set to be arbitrary. Therefore, the effects of the fourth embodiment can be achieved even for a tree structure with an arbitrary number of branches.
  • the sixth embodiment is a modification of the fourth embodiment. Therefore, in the following description, the differences from the fourth embodiment described above will be mainly explained.
  • the tree structure configured by the memory protection system 1 according to the sixth embodiment is defined to have two branches and a depth of d, similarly to the fourth embodiment.
  • FIG. 24 is a diagram showing an example of a tree structure configured by the memory protection system 1 according to the sixth embodiment.
  • the memory protection system 1 includes a memory structure initialization device 12c, a memory verification device 22c, and a memory update device 32c.
  • the memory protection system 1 performs memory tampering detection and concealment.
  • the memory structure initialization device 12c according to the sixth embodiment receives as input the plaintext to be tampered with and concealed, and outputs a tree structure in an initial state and a memory address set of each node in the tree structure.
  • the memory verification device 22c inputs the storage location of the ciphertext block whose tampering is to be checked, the tree structure, and the memory address of each node in the tree structure, and verifies whether the memory has been tampered with.
  • the memory update device 32c receives as input the storage location of the ciphertext block to be updated, the update contents thereof, the tree structure, and the memory address of each node in the tree structure.
  • the memory update device 32c outputs the updated tree structure or an error message indicating that tampering has been detected.
  • the memory protection system 1 uses authentication encryption (AE) as an elemental technology similarly to the third embodiment.
  • AE authentication encryption
  • Enc_K uses the encryption function AE.
  • Enc_K uses this encryption function AE.
  • A.E. Enc_K inputs nonce N and plaintext M and outputs ciphertext C and authentication tag Tag.
  • the encryption function is described by a formula, it becomes the following formula 93. (Formula 93)
  • A.E. Enc_K(N,M) (C,T)
  • the memory structure initialization device 12c according to the sixth embodiment includes a plaintext input section 120, a memory address allocation section 121, and a tag generation section 122c. Further, the memory structure initialization device 12c according to the sixth embodiment includes a leaf node generation section 123c, an intermediate node generation section 124, a root node generation section 125, a tree structure output section 126, and a memory address output section 127. and.
  • the plaintext input unit 120 is substantially the same as the plaintext input unit 120 in the memory structure initialization device of the fourth embodiment, so a description thereof will be omitted.
  • the memory address allocation unit 121 is substantially the same as the memory address allocation unit 121 in the memory structure initialization device of the fourth embodiment, so a description thereof will be omitted.
  • the tag generation unit 122c uses the plaintext M output by the plaintext input unit 120, the memory address set Add output by the memory address allocation unit 121, and the secret keys K_1 and K_2 to generate a tag and ciphertext for tampering detection. generate. It is assumed that MAC is used to generate tags for intermediate nodes and root nodes, and authenticated encryption (AE) is used to encrypt plaintext (leaf nodes) and generate tags.
  • MAC is used to generate tags for intermediate nodes and root nodes
  • AE authenticated encryption
  • the tag generating unit 122c generates data expressed by the following formula 95 as the ciphertext and tag to be used in the leaf node.
  • Enc_ ⁇ K_1 ⁇ ( ⁇ , ⁇ ) represents the encryption function of AE.
  • C[j_d] indicates the j_d-th ciphertext block.
  • TagInter (Tag(1,1),...,Tag(d-1,2 ⁇ d-1 ⁇ ))
  • Tag (i, j_i) MAC_ ⁇ K_2 ⁇ ((add (i, j_i)
  • TagRoot (Tag(0,1))
  • Tag (0, 1) MAC_ ⁇ K_2 ⁇ (add (0, 1)
  • the tags corresponding to each node are as follows.
  • the concatenation of the memory address of the own node and the local counter value is used as a nonce
  • the plaintext block corresponding to the own node is used as plaintext
  • the nonce and plaintext are used as input.
  • a ciphertext block is output.
  • the tag corresponding to each node uses the concatenation of the memory address of the own node and the local counter value as a nonce, and the concatenation of the local counter values of multiple child nodes as plain text, and the nonce and This corresponds to the MAC calculation result using plaintext as input.
  • Equation 95, 96, and 97 are expressed as Equation 98 below.
  • i is the depth index.
  • j_i is the index (order; ordinal number) of the node at depth i.
  • the leaf node generation unit 123c generates tree-structured leaf nodes using the ciphertext and tag set TagLeaf output by the tag generation unit 122c.
  • Leaf ((ctr(d, 1), C[1], Tag(d, 1)), ..., (ctr(d, 2 ⁇ d), C[2 ⁇ d], Tag(d, 2 ⁇ d)))
  • each leaf node is expressed as in equation 101 below.
  • Leaf ((ctr(3,1),C[1],Tag(3,1)),(ctr(3,2),C[2],Tag(3,2)),...,( ctr(3,8),C[8],Tag(3,8)))
  • the leaf node generation unit 123c outputs the generated leaf node set Leaf to the tree structure output unit 126.
  • the intermediate node generation unit 124 is substantially the same as the intermediate node generation unit 124 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the root node generation unit 125 is substantially the same as the root node generation unit 125 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the tree structure output unit 126 is substantially the same as the tree structure output unit 126 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address output unit 127 is substantially the same as the memory address output unit 127 in the memory structure initialization device 12 of the fourth embodiment, so a description thereof will be omitted.
  • the memory verification device 22c includes a tree structure input section 220, a memory address input section 221, a verification location input section 222, a tag verification section 223c, and a verification result output section 224.
  • the tree structure input unit 220 is substantially the same as the tree structure input unit 220 in the memory verification device 22 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address input section 221 is substantially the same as the memory address input section 221 in the memory verification device 22 of the fourth embodiment, so a description thereof will be omitted.
  • the verification location input unit 222 is substantially the same as the verification location input unit 222 in the memory verification device 22 of the fourth embodiment, so a description thereof will be omitted.
  • the tag verification unit 223c uses the tree structure Tree, the memory address set Add, the verification location CheckNode, and the secret keys K_1 and K_2 to verify whether the memory specified by CheckNode has been tampered with. Then, the tag verification section 223c outputs the verification result to the verification result output section 224. First, the tag verification unit 223c generates a path from the CheckNode-th leaf node to the root node.
  • each element (i, j_i) of Path represents the j_i-th node at depth i. That is, j_i indicates the ordinal number of the node at depth i.
  • p_d CheckNode
  • the tag verification unit 223c calculates the following equation 104 using Add, which is the output of the memory address input unit 221, Tree, which is the output of the tree structure input unit 220, and the secret keys K_1 and K_2.
  • Add which is the output of the memory address input unit 221
  • Tree which is the output of the tree structure input unit 220
  • B NCK
  • Dec_ ⁇ K_1 ⁇ ( ⁇ , ⁇ , ⁇ ) is the method AE. It is a decoding function of Enc_ ⁇ K_1 ⁇ . Further, NCK indicates that information on nodes related to the path has been tampered with.
  • MAC_ ⁇ K_2 ⁇ ( ⁇ ) is substantially the same as the MAC method used in the tag generation unit 122c of the memory structure initialization device 12c in the sixth embodiment, so the explanation will be omitted.
  • Tag'(i, p_i) inputs the concatenation of the address of the node and the local counter in the nonce part of the input of the MAC function, and inputs the local counter of the child node of the node in the plaintext part of the input of the MAC function. It can be obtained by connecting two and inputting them.
  • the tag verification unit 223c obtains a value expressed by the following equation 106 from the tree structure Tree that is the output of the tree structure input unit 220.
  • PathTag (Tag(d-1,p_ ⁇ d-1 ⁇ ),...,Tag(0,p_0))
  • Tag'(i, p_i) ⁇ Tag(i, p_i) If this holds true, the tag verification unit 223 sets the verification result to NCK.
  • the tag verification unit 223 outputs verification result B.
  • the verification result output unit 224 is substantially the same as the verification result output unit 224 in the memory verification device 22 of the fourth embodiment, so a description thereof will be omitted.
  • the memory update device 32c according to the sixth embodiment includes a tree structure input section 320, a memory address input section 321, an update location input section 322, a memory verification section 323c, a counter update section 324, and a tag update section 325c. and an update result output unit 326. Further, the memory update device 32c according to the sixth embodiment includes an update determination section 330 and a plaintext update section 332.
  • the tree structure input unit 320 is substantially the same as the tree structure input unit 320 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the memory address input section 321 is substantially the same as the memory address input section 321 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the update location input unit 322 is substantially the same as the update location input unit 322 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the update determination unit 330 is substantially the same as the update determination unit 330 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the memory verification unit 323c verifies whether the memory specified by UpdateNode has been tampered with using the tree structure Tree, memory address set Add, memory update information UpdateNode, and secret keys K_1 and K_2. That is, the memory verification unit 323c verifies whether the node corresponding to the path related to the leaf node specified by UpdateNode has been tampered with.
  • the verification process performed by the memory verification unit 323c is substantially the same as that of the tag verification unit 223c in the memory verification device 22c of the sixth embodiment, but the output results are different.
  • the tag verification unit 223c in the memory verification device 22c of the sixth embodiment outputs the verification result B, but the memory verification unit 323c also outputs the path from the node to the root node along with the verification result B.
  • the memory verification unit 323c outputs the verification result B to the plaintext update unit 332, the counter update unit 324, the tag update unit 325c, and the update result output unit 326.
  • the memory verification unit 323c also outputs the path Path to the counter update unit 324 and tag update unit 325c.
  • the other functions of the memory verification unit 323c are substantially the same as the functions of the memory verification unit 323 according to the fourth embodiment, so the description thereof will be omitted. That is, like the memory verification unit 323, the memory verification unit 323c may not verify the tag of the leaf node depending on the determination result of the update determination unit 330.
  • the plaintext update unit 332 is substantially the same as the plaintext update unit 332 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the counter updating unit 324 is substantially the same as the counter updating unit 324 in the memory updating device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the tag update unit 325c uses the update result tree structure NewTree', the memory address set Add, the memory update information UpdateNode, the verification result B, the path Path, and the secret keys K_1 and K_2 to Update the tag of the node.
  • the update result output unit 326 is substantially the same as the update result output unit 326 in the memory update device 32 of the fourth embodiment, so a description thereof will be omitted.
  • the effect of the sixth embodiment is that, in addition to the effect of the fourth embodiment, it is possible to hide the memory.
  • MAC is used to detect tampering with plaintext messages.
  • the sixth embodiment by performing AE processing on the plaintext message, it becomes possible to conceal the plaintext message in addition to detecting tampering.
  • the amount of calculation for AE is generally greater than the amount of calculation for MAC. Therefore, as in this embodiment, by making it possible to eliminate the need for integrity verification of leaf nodes during update processing, it is possible to reduce AE calculations, which require a large amount of calculation. The amount of calculation required for this can be further reduced. Therefore, when updating the contents of the memory, it is possible to perform node verification processing more efficiently.
  • the AE used is a rate 1 method such as OCB, that is, a method that can realize encryption of plaintext and generation of an authentication tag at the cost of encryption alone, and It is assumed that a method can be adopted in which the amount of data is the same. In this case, compared to the fourth embodiment, the data amount of the entire tree structure and the amount of calculation required by each device are almost unchanged. In other words, the sixth embodiment enables concealment in addition to tampering detection with the same data amount and calculation amount as the fourth embodiment. Further, although the tree structure of the sixth embodiment assumes a binary tree, it is naturally possible to use a tree structure with an increased number of branches as in the fifth embodiment.
  • FIG. 25 is a diagram showing the configuration of a memory update device 500 according to the seventh embodiment.
  • a memory update device 500 according to the seventh embodiment corresponds to the memory update device 30 and the memory update device 32 described above.
  • the memory update device 500 includes an input section 502, an update determination section 504, a memory verification section 506, a plaintext update section 508, and a tag update section 510.
  • the input unit 502 has a function as an input means.
  • the update determination unit 504 has a function as update determination means.
  • the memory verification unit 506 has a function as a memory verification means.
  • the plaintext updating unit 508 has a function as a plaintext updating means.
  • the tag update unit 510 has a function as a tag update unit.
  • the input unit 502 can be realized by substantially the same functions as those of the tree structure input unit 300, tree structure input unit 320, update location input unit 302, and update location input unit 322 described above.
  • the update determination unit 504 can be realized by substantially the same functions as those of the update determination unit 310 and update determination unit 330 described above.
  • the memory verification section 506 can be realized by substantially the same functions as those of the memory verification section 303 and the memory verification section 323 described above.
  • the plaintext update unit 508 can be realized by substantially the same functions as those of the plaintext update unit 312 and the plaintext update unit 332 described above.
  • the tag update unit 510 can be realized by substantially the same functions as those of the tag update unit 305 and the tag update unit 325 described above.
  • the input unit 502 inputs a tree structure configured to protect memory and update information that is information regarding nodes to be updated in the tree structure.
  • the update determination unit 504 uses the update information to determine whether the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update.
  • the memory verification unit 506 generates a path from the leaf node to the root node in the tree structure. Furthermore, at each node in the path, the memory verification unit 506 generates a tag used for verification by inputting at least a nonce unique to each node into the message authentication code, and verifies the tag stored in each node. . The memory verification unit 506 thereby verifies whether each node has been tampered with and outputs the verification result.
  • the plaintext update unit 508 updates the plaintext to be updated in the leaf node based on the update information.
  • the tag update unit 510 generates an updated tag by inputting a unique nonce to the message authentication code at least in each node.
  • the memory verification unit 506 verifies the tag of the node other than the leaf node in the path.
  • the update determination unit 504 determines that the update content of the leaf node is It may be determined that it does not depend on the plaintext of .
  • the plaintext update unit 508 may update the plaintext by replacing the plaintext to be updated in the leaf node with a fixed value.
  • the update determination unit 504 may determine that the update content of the leaf node does not depend on the plaintext before the update. Further, the above fixed value may be specified by the user.
  • the memory update device 500 when the memory update device 500 according to the seventh embodiment described above corresponds to the memory update device 30 according to the first embodiment or the second embodiment, the memory update device 500 is configured as follows. may be done.
  • the memory verification unit 506 inputs a nonce and plaintext unique to each node, or a nonce and a concatenation of nonces in multiple child nodes of each node, into the message authentication code at each node in the above path. You may also generate tags that can be used.
  • the memory update device 500 may further include a component (nonce update unit; nonce update means) corresponding to the nonce update unit 304. In this case, the nonce updating unit may update the nonce value at each node in the path when the verification result indicates that no tampering has been detected.
  • the tag update unit 510 converts the updated nonce and updated plaintext in each node, or the concatenation of the updated nonce and updated nonces in multiple child nodes of each node into a message authentication code.
  • An updated tag may be generated by inputting the information.
  • the memory update device 500 may be configured as follows.
  • the memory verification unit 506 may generate a path from the leaf node that includes the ciphertext to be updated to the root node in the tree structure. Furthermore, the memory verification unit 506 may generate a tag used for verification by inputting a nonce and a concatenation of nonces in a plurality of child nodes of each node into the message authentication code at each node in the path.
  • the memory verification unit 506 also verifies whether the ciphertext has been tampered with by inputting the nonce, the ciphertext, and the tag used for verification into the authentication cipher and verifying whether the plaintext has been tampered with. You can also output the verification results. Furthermore, the tag update unit 510 inputs the updated nonce and the concatenation of the updated nonces in the plurality of child nodes of each node into the message authentication code, and inputs the updated nonce and the updated plaintext into the authentication code. In this way, an updated ciphertext and an updated tag may be generated.
  • the memory update device 500 is configured as follows. may be done.
  • the input unit 502 may input a memory address assigned to the tree structure.
  • the memory verification unit 506 may set the connection between the memory address unique to each node and the local counter stored in each node as a nonce. Then, the memory verification unit 506 may generate a tag used for verification by inputting a nonce and plain text, or a concatenation of a nonce and local counters in a plurality of child nodes of each node, into the message authentication code.
  • the memory update device 500 may further include a component (counter update unit; counter update means) corresponding to the counter update unit 324.
  • the counter updating unit may update the value of the local counter at each node in the path when the verification result indicates that no tampering has been detected.
  • the tag update unit 510 may set the connection between the memory address unique to each node and the updated local counter of each node as a nonce. Then, the tag update unit 510 generates an updated tag by inputting the nonce and the updated plaintext, or the concatenation of the nonce and the updated local counters of multiple child nodes of each node into the message authentication code. You may.
  • the memory update device 500 may be configured as follows.
  • the memory verification unit 506 may generate a path from the leaf node that includes the ciphertext to be updated to the root node in the tree structure. Furthermore, the memory verification unit 506 may set the connection between the unique memory address of each node and the local counter stored in each node as a nonce at each node on the path. Furthermore, the memory verification unit 506 may generate a tag used for verification by inputting a nonce and a concatenation of local counters in a plurality of child nodes of each node into the message authentication code.
  • the memory verification unit 506 verifies whether the ciphertext has been tampered with by inputting the nonce, the ciphertext, and the tag used for verification into the authentication cipher and verifying whether the plaintext has been tampered with. You can also output the verification results.
  • the tag update unit 510 may use a nonce to connect the unique memory address of each node and the updated local counter of each node. In addition, the tag update unit 510 inputs the nonce and the concatenation of updated local counters in multiple child nodes of each node into the message authentication code, and inputs the nonce and updated plaintext into the authentication code. The ciphertext and updated tag may be generated.
  • FIG. 26 is a flowchart showing a memory update method executed by the memory update device 500 according to the seventh embodiment.
  • the input unit 502 inputs the tree structure and update information (step S503).
  • the update determination unit 504 uses the update information to determine whether the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update (step S504). If the determination result in S504 is NO, that is, if the update content of the leaf node that includes the plaintext to be updated does not depend on the plaintext before update, the process proceeds to S506. On the other hand, if the determination result in S504 is YES, that is, if the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before update, the process proceeds to S508.
  • the memory verification unit 506 verifies the tag of the node other than the leaf node in the path from the leaf node to the root node (step S506). Specifically, the memory verification unit 506 generates a path from a leaf node to a root node in the tree structure. Furthermore, the memory verification unit 506 generates a tag used for verification by inputting at least a unique nonce in the message authentication code at each node in the path, and stores the tag in each node other than the leaf node. Verify the tags that are present. Then, the memory verification unit 506 outputs the verification result. Then, when the verification result indicates that no tampering has been detected, the processes of S510 and S512 are executed.
  • the memory verification unit 506 verifies the tags of all nodes in the path from the leaf node to the root node (step S508). Specifically, the memory verification unit 506 generates a path from a leaf node to a root node in the tree structure. Furthermore, the memory verification unit 506 generates a tag used for verification at each node in the path by inputting at least a unique nonce in the message authentication code, and stores the tag in all nodes including leaf nodes. Verify the tags you are using. Then, the memory verification unit 506 outputs the verification result. Then, when the verification result indicates that no tampering has been detected, the processes of S510 and S512 are executed.
  • the plaintext update unit 508 updates the plaintext to be updated in the leaf node based on the update information (step S510).
  • the tag updating unit 510 generates an updated tag by inputting at least a unique nonce to the message authentication code in each node (step S512).
  • the memory update device 500 can reduce the amount of calculation required for verification compared to the techniques disclosed in Patent Document 2 and Patent Document 3. Therefore, when updating the contents of the memory, it is possible to efficiently perform node verification processing.
  • Patent Document 4 in cases where parallelization of processing is impossible, it may be possible to eliminate the need to verify tags regarding leaf nodes when verifying tags at nodes.
  • the tree structure is completely different between a case where parallelization of processing is impossible as in Patent Document 4 and a case where parallelization of processing is possible as in this embodiment.
  • the devices according to each embodiment may be physically or functionally realized using at least two calculation processing devices. Further, the device according to each embodiment may be realized as a dedicated device, or may be realized as a general-purpose information processing device.
  • FIG. 27 is a block diagram schematically showing an example of a hardware configuration of a calculation processing device that can implement the device and system according to each embodiment.
  • the calculation processing device 1000 is a computer.
  • the calculation processing device 1000 includes a CPU 1001, a volatile storage device 1002, a disk 1003, a nonvolatile recording medium 1004, and a communication IF (IF) 1007. Therefore, it can be said that the device according to each embodiment includes a CPU 1001, a volatile storage device 1002, a disk 1003, a nonvolatile recording medium 1004, and a communication IF 1007.
  • the calculation processing device 1000 may be connectable to an input device 1005 and an output device 1006.
  • the calculation processing device 1000 may include an input device 1005 and an output device 1006. Further, the calculation processing device 1000 can send and receive information to and from other calculation processing devices and communication devices via the communication IF 1007.
  • the nonvolatile recording medium 1004 is a computer-readable medium, such as a compact disc or a digital versatile disc. Further, the nonvolatile recording medium 1004 may be a USB (Universal Serial Bus) memory, a solid state drive, or the like. The non-volatile recording medium 1004 retains the program even without supplying power, making it portable. Note that the nonvolatile recording medium 1004 is not limited to the above-mentioned medium. Further, instead of the nonvolatile recording medium 1004, such a program may be supplied via the communication IF 1007 and the communication network.
  • USB Universal Serial Bus
  • the volatile storage device 1002 is computer readable and can temporarily store data.
  • the volatile storage device 1002 is a memory such as DRAM (dynamic random access memory) or SRAM (static random access memory).
  • the CPU 1001 copies a software program (computer program: hereinafter simply referred to as a "program") stored on the disk 1003 to the volatile storage device 1002 when executing it, and executes arithmetic processing.
  • the CPU 1001 reads data necessary for program execution from the volatile storage device 1002. If display is necessary, the CPU 1001 displays the output result on the output device 1006.
  • the CPU 1001 acquires the program from the input device 1005.
  • the CPU 1001 interprets and executes programs corresponding to the functions (processing) of each component shown in FIGS. 2 to 4, 14 to 16, and 25 described above.
  • the CPU 1001 executes the processing described in each of the embodiments described above. In other words, the functions of each component shown in FIGS. 2 to 4, FIGS. It can be realized.
  • each embodiment can be considered to be achieved by the programs described above. Furthermore, each of the above-described embodiments can be realized by a computer-readable non-volatile recording medium on which the above-described program is recorded.
  • Patent Document 2 and Patent Document 3 are improved as a technology that enables parallelization of processing of each node in updating processing of memory contents, but the present disclosure
  • the configuration is not limited to this.
  • the technology according to the present disclosure is also applicable to technologies other than Patent Document 2 and Patent Document 3 that enable parallelization of node processing.
  • the program includes instructions (or software code) that, when loaded into a computer, cause the computer to perform one or more of the functions described in the embodiments.
  • the program may be stored on a non-transitory computer readable medium or a tangible storage medium.
  • computer readable or tangible storage media may include random-access memory (RAM), read-only memory (ROM), flash memory, solid-state drive (SSD) or other memory technology, CD - Including ROM, digital versatile disk (DVD), Blu-ray disk or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device.
  • the program may be transmitted on a transitory computer-readable medium or a communication medium.
  • transitory computer-readable or communication media includes electrical, optical, acoustic, or other forms of propagating signals.
  • an input means for inputting a tree structure configured to protect memory and update information that is information regarding nodes to be updated in the tree structure; an update determination unit that uses the update information to determine whether the update content of a leaf node that includes the plaintext to be updated depends on the plaintext before the update;
  • a path is generated from the leaf node to the root node, and at each node in the path, a tag used for verification is generated by inputting at least a unique nonce to a message authentication code at each node.
  • a memory verification means for verifying whether each node has been tampered with by verifying a tag stored in each node and outputting a verification result
  • Plaintext updating means for updating the plaintext to be updated in the leaf node based on the update information when the verification result indicates that no tampering has been detected; If the verification result indicates that no tampering has been detected, a tag updating means generates an updated tag by inputting a unique nonce to the message authentication code at least in each node; has The memory verification means verifies tags of nodes other than the leaf node in the path if the update content of the leaf node does not depend on plaintext before update. Memory update device.
  • the memory verification means verifies tags of all nodes including the leaf node in the path when the update content of the leaf node depends on plaintext before update.
  • the memory update device according to supplementary note 1.
  • the update determination means determines that when the update content of the leaf node is to replace the plaintext to be updated with a fixed value independent of the plaintext, the update content of the leaf node depends on the plaintext before the update. It is judged that it is not a thing,
  • the plaintext updating means updates the plaintext by replacing the plaintext to be updated in the leaf node with the fixed value.
  • the memory update device according to supplementary note 1.
  • the update determination means determines that the update content of the leaf node does not depend on the plain text before update, when the update information includes the fixed value.
  • the memory update device according to appendix 3. (Appendix 5)
  • the update determination means determines that the update content of the leaf node does not depend on the plaintext before update when the update information includes a fixed value independent of the plaintext to be updated;
  • the plaintext updating means updates the plaintext by replacing the plaintext to be updated in the leaf node with the fixed value.
  • the memory update device according to supplementary note 1. (Appendix 6)
  • the fixed value in the update information is specified by a user, The memory update device according to appendix 4 or 5.
  • the memory verification means verifies, at each node in the path, a nonce unique to each node and the plain text, or a concatenation of the nonce and nonces in a plurality of child nodes of each node, by inputting it into a message authentication code.
  • the tag updating means updates the updated nonce and the updated plaintext in each node, or the updated nonce and the updated nonce in a plurality of child nodes of each node.
  • the memory update device according to supplementary note 1. (Appendix 8)
  • the memory verification means generates, in the tree structure, a path from the leaf node including the ciphertext to be updated to a root node, and in each node on the path, the nonce and a plurality of child nodes of each node.
  • a tag used for verification is generated by inputting the concatenation of nonces in the message authentication code, and the nonce, the ciphertext, and the tag used for verification are input into the authentication cipher to confirm that the plaintext has not been tampered with.
  • the tag update means inputs the updated nonce and the concatenation of the updated nonces in the plurality of child nodes of each node into the message authentication code, and updates the message authentication code. Generate updated ciphertext and updated tag by inputting the new nonce and updated plaintext into the authentication cipher.
  • the input means inputs a memory address allocated to the tree structure
  • the memory verification means in each node on the path, uses a nonce that is a concatenation of the memory address unique to each node and a local counter stored in each node, and the nonce and the plain text, or the nonce and the plain text.
  • the tag updating means sets the concatenation of the memory address unique to each node and the updated local counter of each node as a nonce, and updates the nonce and the updated local counter. or a concatenation of the nonce and the updated local counters of the plurality of child nodes of each node into the message authentication code, thereby generating an updated tag.
  • the memory update device according to supplementary note 1. (Appendix 10)
  • the memory verification means generates a path from the leaf node including the ciphertext to be updated to a root node in the tree structure, and at each node in the path, the memory address unique to each node and each node.
  • the tag updating means sets the concatenation of the memory address unique to each node and the updated local counter of each node as a nonce, and updates the nonce and each of the nodes.
  • (Appendix 11) a memory structure initialization device that receives plaintext for which tampering detection is to be performed as input and outputs a tree structure that is at least an initial tree structure and is configured to protect memory; a memory verification device that receives at least a storage location and a tree structure of plaintext whose tampering is to be checked as input, and verifies whether or not the memory corresponding to the storage location has been tampered with; A memory update device that takes as input at least the storage location of the plaintext to be updated, its updated contents, and the tree structure, and outputs the updated tree structure or an error message indicating that tampering has been detected; has The memory update device includes: input means for inputting the tree structure and update information that is information regarding nodes to be updated in the tree structure; an update determination unit that uses the update information to determine whether the update content of a leaf node that includes the plaintext to be updated depends on the plaintext before the update; In the tree structure, a path is generated from the leaf node to the root node
  • a memory verification means for verifying whether each node has been tampered with by verifying a tag stored in each node and outputting a verification result
  • Plaintext updating means for updating the plaintext to be updated in the leaf node based on the update information when the verification result indicates that no tampering has been detected; If the verification result indicates that no tampering has been detected, a tag updating means generates an updated tag by inputting a unique nonce to the message authentication code at least in each node; has The memory verification means verifies tags of nodes other than the leaf node in the path if the update content of the leaf node does not depend on plaintext before update. Information processing system.
  • (Appendix 12) Input a tree structure configured to protect memory and update information that is information about nodes to be updated in the tree structure, Using the update information, determine whether the update content of the leaf node that includes the plaintext to be updated depends on the plaintext before the update, If the updated content of the leaf node does not depend on the plain text before update, in the tree structure, a path from the leaf node to the root node is generated, and each node in the path has at least a unique nonce.
  • the update information includes a fixed value that is independent of the plaintext to be updated, determining that the update content of the leaf node does not depend on the plaintext before update, updating the plaintext by replacing the plaintext to be updated in the leaf node with the fixed value;
  • the fixed value in the update information is specified by a user, The memory update method according to appendix 15 or 16.
  • Appendix 18 At each node in the path, a tag used for verification is generated by inputting a unique nonce at each node and the plaintext, or a concatenation of the nonce and nonces at multiple child nodes of each node into a message authentication code.
  • a nonce is a concatenation of the memory address unique to each node and a local counter stored in each node, and the nonce and the plaintext, or the nonce and a plurality of Generate a tag used for verification by inputting the concatenation of the local counters in the child node into a message authentication code, If the verification result indicates that no tampering has been detected, updating the value of the local counter at each node in the path; If the verification result indicates that no tampering has been detected, the concatenation of the memory address unique to each node and the updated local counter of each node is set as a nonce, and the nonce and the updated plaintext, or the generating an updated tag by inputting a nonce and a concatenation of updated local counters in a plurality of child nodes of each node into a message authentication code;
  • a path is generated from the leaf node containing the ciphertext to be updated to the root node, and in each node on the path, the memory address unique to each node and the memory address stored in each node are generated.
  • a tag used for verification is generated by inputting the connection with the local counter as a nonce, and the connection of the nonce and the local counter in the plurality of child nodes of each node into the message authentication code, and the nonce and the ciphertext are and the tag used for the verification into an authentication cipher, verifying whether the plaintext has been tampered with, thereby verifying whether the ciphertext has been tampered with, and outputting a verification result; If the verification result indicates that no tampering has been detected, the concatenation of the memory address unique to each node and the updated local counter of each node is set as a nonce, and the nonce and a plurality of child nodes of each node are inputting the updated local counter concatenation in the message authentication code, and inputting the nonce and the updated plaintext into the authentication cipher to generate an updated ciphertext and an updated tag;
  • the memory update method described in Appendix 20 The memory update method described in Appendix 20.
  • a non-transitory computer-readable medium that stores a program that causes a computer to execute.
  • Memory protection system 10 Memory structure initialization device 100 Plaintext input section 101 Nonce allocation section 102 Tag generation section 103 Leaf node generation section 104 Intermediate node generation section 105 Root node generation section 106 Tree structure output section 12 Memory structure initialization device 120 Plaintext Input unit 121 Memory address allocation unit 122 Tag generation unit 123 Leaf node generation unit 124 Intermediate node generation unit 125 Root node generation unit 126 Tree structure output unit 127 Memory address output unit 20 Memory verification device 200 Tree structure input unit 202 Verification location input unit 203 Tag verification section 204 Verification result output section 22 Memory verification device 220 Tree structure input section 221 Memory address input section 222 Verification location input section 223 Tag verification section 224 Verification result output section 30 Memory update device 300 Tree structure input section 302 Update location input Section 303 Memory verification section 304 Nonce update section 305 Tag update section 306 Update result output section 310 Update determination section 312 Plaintext update section 32 Memory update device 320 Tree structure input section 321 Memory address input section 322 Update location input section 323 Memory verification section 324 Counter update unit 325 Tag update

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

メモリの内容を更新する際に、木構造を構成するノードの検証処理を効率的に行うことが可能なメモリ更新装置を提供する。入力部(502)は、木構造と更新情報とを入力する。更新判定部(504)は、更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。メモリ検証部(506)は、木構造において、リーフノードからルートノードへのパスを生成する。メモリ検証部(506)は、リーフノードの更新内容が更新前の平文に依存するものでない場合、パスにおけるリーフノード以外のノードのタグを検証する。平文更新部(508)は、検証結果が改ざんの検知がないことを示す場合に、更新情報に基づいて、リーフノードにおける更新対象の平文を更新する。タグ更新部(510)は、検証結果が改ざんの検知がないことを示す場合に、更新後のタグを生成する。

Description

メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体
 本開示は、メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体に関する。
 様々なデバイスがネットワークに接続している昨今、デバイスの格納データの改ざん検知や秘匿などのメモリ保護技術が重要となっている。この技術に関連し、特許文献1、特許文献2、特許文献3及び特許文献4は、メモリ保護のために、対象メモリをリーフノードとした木構造を構成している。
国際公開第2021/214922号 米国特許第7451310号明細書 米国特許第9076019号明細書 米国特許第4309569号明細書
 特許文献4にかかる技術では、木構造におけるハッシュ生成等について処理の並列化が不可能であるため、効率的な処理を行うことができないおそれがある。これに対し、特許文献2及び特許文献3にかかる技術では、メモリの内容の更新処理において各ノードの処理の並列化を可能とする。一方、更新処理において各ノードの処理の並列化が可能になったとはいっても、更新処理においてノードの検証処理をさらに効率的に行うことが望ましい。
 本開示の目的は、このような課題を解決するためになされたものであり、メモリ保護のために木構造を用いる構成において、メモリの内容を更新する際に、木構造を構成するノードの検証処理を効率的に行うことが可能な、メモリ更新装置、情報処理システム、メモリ更新方法及びプログラムを提供することにある。
 本開示にかかるメモリ更新装置は、メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、を有し、前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する。
 本開示にかかる情報処理システムは、改ざん検知を行いたい平文を入力として、少なくとも初期状態の木構造であってメモリを保護するために構成される木構造を出力するメモリ構造初期化装置と、少なくとも改ざんをチェックしたい平文の格納場所と木構造とを入力として、前記格納場所に対応するメモリが改ざんされているか否かを検証するメモリ検証装置と、少なくとも更新したい平文の格納場所とその更新内容、及び前記木構造を入力とし、更新後の木構造、又は、改ざんを検知したことを表すエラーメッセージを出力する、メモリ更新装置と、を有し、前記メモリ更新装置は、前記木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、を有し、前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する。
 本開示にかかるメモリ更新方法は、メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力し、前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定し、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力し、前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新し、前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成する。
 本開示にかかるプログラムは、メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力するステップと、前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定するステップと、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するステップと、前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新するステップと、前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するステップと、をコンピュータに実行させる。
 本開示によれば、メモリ保護のために木構造を用いる構成において、メモリの内容を更新する際に、木構造を構成するノードの検証処理を効率的に行うことが可能な、メモリ更新装置、情報処理システム、メモリ更新方法及びプログラムを提供できる。
メモリ保護システムの構成例を示すブロック図である。 第1の実施形態にかかるメモリ構造初期化装置の構成例を示すブロック図である。 第1の実施形態にかかるメモリ検証装置の構成例を示すブロック図である。 第1の実施形態にかかるメモリ更新装置の構成例を示すブロック図である。 第1の実施形態にかかるメモリ構造初期化装置の処理手順の例を示すフローチャートである。 第1の実施形態にかかるメモリ検証装置の処理手順の例を示すフローチャートである。 第1の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第1の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第1の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第1の実施形態にかかるメモリ保護システムによって構成される木構造の例を示す図である。 第1の実施形態にかかるメモリ検証装置におけるタグ検証部によって生成されるパスの例を示す図である。 第2の実施形態にかかるメモリ保護システムによって構成される木構造の例を示す図である。 第3の実施形態にかかるメモリ保護システムが構成する木構造の例を示す図である。 第4の実施形態にかかるメモリ構造初期化装置の構成例を示すブロック図である。 第4の実施形態にかかるメモリ検証装置の構成例を示すブロック図である。 第4の実施形態にかかるメモリ更新装置の構成例を示すブロック図である。 第4の実施形態にかかるメモリ構造初期化装置の処理手順の例を示すフローチャートである。 第4の実施形態にかかるメモリ検証装置の処理手順の例を示すフローチャートである。 第4の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第4の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第4の実施形態にかかるメモリ更新装置の処理手順の例を示すフローチャートである。 第4の実施形態にかかるメモリ保護システムによって構成される木構造の例を示す図である。 第5の実施形態にかかるメモリ保護システムが構成する木構造の例を示す図である。 第6の実施形態にかかるメモリ保護システムが構成する木構造の例を示す図である。 第7の実施形態にかかるメモリ更新装置の構成を示す図である。 第7の実施形態にかかるメモリ更新装置によって実行されるメモリ更新方法を示すフローチャートである。 各実施形態に係る装置およびシステムを実現可能な計算処理装置のハードウェア構成例を概略的に示すブロック図である。
(本開示にかかる実施形態の概要)
 本開示の実施の形態の説明に先立って、本開示にかかる実施の形態の概要について説明する。なお、以下、本開示の実施形態を説明するが、以下の実施形態は請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。また、以下の説明において、使用されるインデックス(英文字)は、本明細書全体で共通のものとは限らない。
 IoT(Internet of Things)機器など、様々なデバイスがネットワークに接続している昨今、デバイスへの攻撃は、そのデバイスを踏み台にネットワークを経由することで、より大規模な攻撃に繋がる可能性がある。したがって、デバイスの格納データの改ざん検知や秘匿などのメモリ保護技術は、そのデバイスだけでなく、デバイスと繋がるネットワーク上の安全性を保つ上で重要である。
 加えて近年、不揮発性メモリの需要が増加しており、電源を遮断している間もメモリが攻撃に晒される可能性が高まっているという背景からも、更に、メモリ保護技術は、重要となっている。一方、メモリ保護技術においては、近年のメモリの大容量化に伴い、大規模データのごく一部分にアクセスする場合に、アクセス部分のみの改ざん検知を効率的に行うことが求められる。
 また、メモリ保護技術においては、メモリ上にOn-chipとOff-chipという2つの領域を仮定する。On-chipは、セキュアな領域である。したがって、On-chipに格納されたデータに対する、攻撃者による盗聴及び改ざんは不可能である。一方、Off-chipはセキュアではない領域である。したがって、Off-chipに格納されたデータに対する、攻撃者による盗聴及び改ざんは可能である。例えば、On-chipはCPU(Central Processing Unit)内のメモリ等により実現され、Off-chipは主記憶装置又は補助記憶装置等により実現される。ここで、Off-chipと比較してOn-chipの実現コストの方が圧倒的に大きいため、より少ないOn-chipで、大規模データの一部分の改ざん検知を行いたいという課題がある。
 この課題を解決するメモリ保護技術の例として、特許文献1、特許文献2及び特許文献3にかかる技術が挙げられる。上述したように、特許文献1、特許文献2及び特許文献3にかかる技術では、メモリ保護のために、対象メモリをリーフノードとした木構造を構成している。ここで、木構造を構成するにあたって用いられる要素技術として、メッセージ認証コード(Message Authentication Code;MAC)及び認証暗号(Authenticated Encryption;AE)が挙げられる。
 メッセージ認証コード(MAC)とは、通信を行う二者間で事前に共有された秘密鍵を用いて、平文メッセージに対して、改ざん検知用の認証タグ計算を行う技術である。通信路にMACを適用することにより、平文メッセージに対する不正な改ざんの検知が可能となる。木構造を用いたメモリ保護技術においては、On-chipに秘密鍵を格納し、Off-chipに平文メッセージと認証タグとを格納することで、平文メッセージの改ざん検知を行うことができる。
 認証暗号(AE)とは、通信を行う二者間で事前に共有された秘密鍵を用いて、平文メッセージに対して、暗号化及び改ざん検知用の認証タグ計算を行う技術である。通信路に認証暗号を適用することにより、盗聴に対する内容の秘匿と、暗号文に対する不正な改ざんの検知とが可能となり、結果として通信内容に対して強力な保護が実現される。木構造を用いたメモリ保護技術においては、MACと同様に、On-chipに秘密鍵を格納し、Off-chipに暗号文と認証タグとを格納することで、平文メッセージの秘匿と改ざん検知とを行うことができる。
 ここで、上述したように、特許文献2及び特許文献3にかかる技術では、メモリの内容(平文)の更新処理において各ノードの処理の並列化を可能とする。一方、更新処理において各ノードの処理の並列化が可能になったとはいっても、更新処理においてノードの検証処理をさらに効率的に行うことが望ましい。特に、特許文献2及び特許文献3にかかる技術では、更新処理においてノードの検証処理を行う際に、更新内容によっては全てのノードについて検証処理を行う必要がない場合であっても、全てのノードについて検証処理を行うように構成されている。これにより、メモリの内容を更新する際に、ノードの検証処理を効率的に行うことができないおそれがある。これに対し、本実施形態では、以下に説明するように、メモリの内容を更新する際に、ノードの検証処理を効率的に行うことが可能である。
(第1の実施形態)
 以下、実施の形態について、図面を参照しながら説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。なお、第1の実施形態にかかる構成は、上述した特許文献2の構成を改良したものに対応する。
 第1の実施形態では、メモリ保護システムで構成される木構造が、分岐数が2であり、深さがdの場合の例について説明する。つまり、第1の実施形態におけるリーフノードの数は、2^d個となる。また、ルートノードの深さは0、リーフノードの深さはdと定義する。本システムにおいて、ノードの個数及び各ノードのデータ量は、予め定められていると仮定する。ここで、「ノード」とは、木構造を構成する各要素に対応する。また、「ルートノード」は、木構造において最も深さが浅いノードである。また、「リーフノード」は、木構造において最も深さが深いノードである。
 図1は、メモリ保護システム1の構成例を示すブロック図である。メモリ保護システム1は、例えばコンピュータである。したがって、メモリ保護システム1は、情報処理システムとして機能する。なお、メモリ保護システム1は、中央演算装置においてソフトウェアプログラムを実行することで、図1に示す各構成要素を実現してもよい。また、メモリ保護システム1において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 図1に示すように、第1の実施形態にかかるメモリ保護システム1(情報処理システム)は、メモリ構造初期化装置10と、メモリ検証装置20と、メモリ更新装置30と、を備える。メモリ構造初期化装置10、メモリ検証装置20およびメモリ更新装置30は、物理的に一体であってもよいし、別個であってもよい。また、図2~図4を用いて後述する各装置の構成要素が、別の装置で実現されてもよい。メモリ保護システム1は、メモリの改ざん検知を行う。
 なお、後述する他の実施形態で参照する場合、メモリ構造初期化装置10は、メモリ構造初期化装置10a,10cと表記され得る。同様に、後述する他の実施形態で参照する場合、メモリ検証装置20は、メモリ検証装置20a,20cと表記され得る。同様に、後述する他の実施形態で参照する場合、メモリ更新装置30は、メモリ更新装置30a,30cと表記され得る。なお、図2~図4で示す構成要素についても同様である。
 図2は、第1の実施形態にかかるメモリ構造初期化装置10の構成例を示すブロック図である。図3は、第1の実施形態にかかるメモリ検証装置20の構成例を示すブロック図である。図4は、第1の実施形態にかかるメモリ更新装置30の構成例を示すブロック図である。また、図5は、第1の実施形態にかかるメモリ構造初期化装置10の処理手順の例を示すフローチャートである。図6は、第1の実施形態にかかるメモリ検証装置20の処理手順の例を示すフローチャートである。図7~図9は、第1の実施形態にかかるメモリ更新装置30の処理手順の例を示すフローチャートである。図2~図9については後述する。
 第1の実施形態にかかるメモリ保護システム1において、メモリ構造初期化装置10は、改ざん検知を行いたい平文(平文メッセージ)を入力として、初期状態の木構造を出力する。なお、木構造の各ノードには、各ノードに固有のナンスが対応付けられている。言い換えると、ナンスは、各ノードに固有の値である。したがって、木構造は、ナンスの集合を含んでもよい。このことは、後述する第2の実施形態及び第3の実施形態においても同様である。なお、メモリ構造初期化装置10は、メモリ処理装置としても機能し得る。
 また、平文は、2^d個の平文ブロックの結合で表される。つまり、以下の式1が成り立つ。
(式1)
 M=M[1]||M[2]||・・・||M[2^d]
 ここで、Mは平文を示し、M[k]はk番目の平文ブロックを示す。また、「||」は連結を表す。また、1つの平文ブロックはBlockビットと定義される。
 メモリ検証装置20は、改ざんをチェックしたい平文(平文ブロック)の格納場所と木構造とを入力として、その格納場所に対応するメモリが改ざんされているか否かを検証する。メモリ更新装置30は、更新したい平文(平文ブロック)の格納場所とその更新内容、および木構造を入力とする。そして、メモリ更新装置30は、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
 図10は、第1の実施形態にかかるメモリ保護システム1によって構成される木構造の例を示す図である。図10には、d=3の場合の木構造が示されている。なお、Root,Inter,Leafについては後述する。
 また、メモリ保護システム1は、要素技術として、メッセージ認証コード(MAC)を用いる。秘密鍵Kを用いたMAC関数MAC_Kは、ナンスN、および平文Mを入力として、認証タグTagを出力する。つまり、メモリ保護システム1は、以下の式2で表される計算を行う。
(式2)
 MAC_K(N,M)=Tag
 また、メモリ保護システム1は、検証を行いたいナンスN’、平文M’、および認証タグTag’に対しては、MAC_K(N’,M’)を計算し、その計算結果とTag’の一致/不一致を検証する。もし両者が一致していればナンスN’と平文M’は改ざんされていないと判断され、不一致であればこれらが改ざんされていると判断される。つまり、メモリ保護システム1は、以下の式3で表される計算を行う。
(式3)
 MAC_K(N’,M’)=Tag’’
 メモリ保護システム1は、Tag’’=Tag’であれば改ざんなし、Tag’’≠Tag’であれば改ざんありと判定できる。
[メモリ構造初期化装置の構成の説明]
 図2は、第1の実施形態にかかるメモリ構造初期化装置10の構成例を示すブロック図である。図2に示すように、第1の実施形態にかかるメモリ構造初期化装置10は、平文入力部100と、ナンス割り当て部101と、タグ生成部102と、を備える。また、メモリ構造初期化装置10は、リーフノード生成部103と、中間ノード生成部104と、ルートノード生成部105と、木構造出力部106と、を備える。
 平文入力部100は、平文入力手段としての機能を有する。ナンス割り当て部101は、ナンス割り当て手段としての機能を有する。タグ生成部102は、タグ生成手段としての機能を有する。リーフノード生成部103は、リーフノード生成手段としての機能を有する。中間ノード生成部104は、中間ノード生成手段としての機能を有する。ルートノード生成部105は、ルートノード生成手段としての機能を有する。木構造出力部106は、木構造出力手段としての機能を有する。
 メモリ構造初期化装置10は、例えばコンピュータである。なお、メモリ構造初期化装置10は、中央演算装置においてソフトウェアプログラムを実行することで、図2に示す各構成要素を実現してもよい。また、メモリ構造初期化装置10において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 平文入力部100は、保護対象となる平文Mの入力を受け付ける。平文入力部100は、受け付けた平文Mをタグ生成部102に出力する。ここで、平文入力部100が平文Mの入力を受け付ける方法は、特定の方法に限定されない。例えば、平文入力部100が、キーボードなどの文字入力装置を備え、平文Mを入力するユーザ操作を受け付けるようにしてもよい。あるいは、平文入力部100が、他の装置から平文Mを受信するようにしてもよい。
 ナンス割り当て部101は、木構造の各ノードに、ノード固有のナンス情報を割り当てる。そして、ナンス割り当て部101は、ナンス情報を、タグ生成部102に出力する。ここで、ナンスは、その性質上、各ノードに対して一意に定まるものである。つまり、ナンス情報は、各ノードに対して固有である。言い換えると、ナンスは、木構造全体で重複がないように、各ノードに割り当てられる。つまり、ナンスは、各ノードに割り当てられたナンス値が他のノードに割り当てられたナンス値と重複がないように、各ノードに割り当てられる。このように、木構造全体で重複がないようにナンスが割り当てられることによって、ノード間のデータ入れ替え攻撃を防止することができる。また、ノードの個数及び各ノードのデータ量は予め定められている。したがって、各ノードの中身の情報を定義する前に、各ノードにナンスを割り当てることが可能である。つまり、各ノードに対するナンスの割り当て方法は予め定められているので、各ノードに対して並列にナンスを割り当てることが可能である。
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、深さiでj_i番目のノードに割り当てるナンスを、N(i,j_i)で表す。なお、「<=」は「≦」を意味している。つまり、a<=bは、「bはa以上(又はaはb以下)」を意味する。そして、木構造の全てのノードに割り当てられたナンス情報を、ナンス集合Nとして、以下の式4のように記述する。
(式4)
 N=(N(0,1),N(1,1),N(1,2),N(2,1),N(2,2),・・・,N(d,2^d-1),N(d,2^d))
 ここで、「N(0,1)」は、ルートノードのナンスに対応する。また、「N(d,1),・・・,N(d,2^d)」は、複数のリーフノードのナンスに対応する。なお、その他は中間ノードのナンスに対応する。また、ナンス集合Nは、木構造に含まれ得る。
 また、ナンスをN(a,b)と表記する場合、aは、そのナンスが割り当てられるノードの、木構造における深さを示す。また、bは、そのナンスが割り当てられるノードの、深さaにおける順番(序数)を示す。このことは、後述するタグの表記Tag(a,b)についても同様である。
 また、木構造全体で重複がないようにナンスを割り当てるため、ナンスの割り当て方法は、例えば、以下のような条件Aを満たすようにしてもよい。
 ・木構造における深さが浅いノードほど、小さなナンス値が割り当てられる。
 ・深さが同じノードでは、その深さにおける順番が早いほど(その深さにおける序数が小さいほど)、小さなナンス値が割り当てられる。
 上記のような条件Aでナンスが各ノードに割り当てられる場合、式4で示されるナンス集合では、N(0,1)<N(1,1)<N(1<2)<N(2<1)<N(2<2)<・・・<N(d<2^d-1)<N(d<2^d)となる。
 タグ生成部102は、平文入力部100が出力する平文Mと、ナンス割り当て部101が出力するナンス集合Nと、秘密鍵Kとを用いて、改ざん検知用のタグを生成する。タグ生成には、上述したMAC関数が用いられる。まず、タグ生成部102は、リーフノードで用いるタグとして、以下の式5で表されるデータを生成する。
(式5)
 TagLeaf=((M[1],Tag(d,1)),(M[2],Tag(d,2)),・・・,(M[2^d],Tag(d,2^d)))
 Tag(d,j_d)=MAC_K(N(d,j_d),M[j_d])
 ただし、1<=j_d<=2^d
 次に、タグ生成部102は、中間ノードで用いるタグとして、以下の式6で表されるデータを生成する。
(式6)
 TagInter=(Tag(1,1),・・・,Tag(d-1,2^{d-1}))
 Tag(i,j_i)=MAC_K((N(i,j_i),N(i+1,2j_i-1)||N(i+1,2j_i))
 ただし、1<=i<=d-1,1<=j_i<=2^i
 次に、タグ生成部102は、ルートノードで用いるタグとして、以下の式7で表されるデータを生成する。
(式7)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_K(N(0,1),N(1,1)||N(1,2))
 式5,式6,式7から、各ノードに対応するタグは、リーフノードでは、自ノードに対応する平文ブロックを平文として、自ノードのナンスとその平文とを入力としたMACの計算結果に対応する。また、各ノードに対応するタグは、リーフノード以外のノードでは、複数の子ノードのナンスの連結を平文とし、自ノードのナンスとその平文とを入力としたMACの計算結果に対応する。
 図10に例示するように、木構造全体の深さdがd=3の場合、各ノードに対応するタグは、以下の式8で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式8)
For 0<=i<=3,1<=j_i<=2^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_K(N(i,j_i),N(i+1,2j_i-1)||N(i+1,2j_i))
 (For i=3) Tag(i,j_i)=MAC_K(N(i,j_i),M[j_i])
 そして、タグ生成部102は、タグ集合TagLeafをリーフノード生成部103に出力する。また、タグ生成部102は、タグ集合TagInterを中間ノード生成部104に出力する。また、タグ生成部102は、タグ集合TagRootをルートノード生成部105に出力する。
 リーフノード生成部103は、タグ生成部102が出力するタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=2^dである。そして、j_d番目のリーフノードは、以下の式9で示すように生成される。
(式9)
 (N(d,j_d),M[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式10のように記述する。
(式10)
 Leaf=((N(d,1),M[1],Tag(d,1)),((N(d,2),M[2],Tag(d,2)),・・・,(N(d,2^d),M[2^d],Tag(d,2^d)))
 図10に示すように、木構造全体の深さがd=3の場合、各リーフノードは、以下の式11のように表される。
(式11)
 Leaf=((N(3,1),M[1],Tag(3,1)),(N(3,2),M[2],Tag(3,2)),・・・,(N(3,8),M[8],Tag(3,8)))
 なお、Leafは、リーフノードの集合を示すデータである。リーフノード生成部103は、生成されたリーフノード集合Leafを木構造出力部106に出力する。
 中間ノード生成部104は、タグ生成部102が出力するタグ集合TagInterを用いて、木構造の中間ノードを生成する。ここで、中間ノードでは、1<=i<=d-1,1<=j_i<=2^iである。そして、深さiにおけるj_i番目の中間ノードは、以下の式12で示すように生成される。
(式12)
 (N(i,j_i),Tag(i,j_i))
 また、全ての中間ノードを以下の式13のように記述する。
(式13)
 Inter=((N(1,1),Tag(1,1)),(N(1,2),Tag(1,2)),・・・,(N(d-1,2^{d-1}),Tag(d-1,2^{d-1})))
 図10に示すように、木構造全体の深さがd=3の場合、各中間ノードは、以下の式14のように表される。
(式14)
 Inter=((N(1,1),Tag(1,1)),(N(1,2),Tag(1,2)),・・・,(N(2,4),Tag(2,4)))
 なお、Interは、中間ノードの集合を示すデータである。中間ノード生成部104は、生成された中間ノード集合Interを木構造出力部106に出力する。
 ルートノード生成部105は、タグ生成部102が出力するタグTagRootを用いて、木構造のルートノードを生成する。ルートノードRootは、以下の式15で示すように生成される。ルートノード生成部105は、生成されたルートノードRootを木構造出力部106に出力する。
(式15)
 Root=(N(0,1),Tag(0,1))
 木構造出力部106は、リーフノード生成部103が出力するリーフノード集合Leafと、中間ノード生成部104が出力する中間ノード集合Interと、ルートノード生成部105が出力するルートノードRootとを連結する。そして、木構造出力部106は、連結されたデータ列を、木構造を示すデータ(木構造Tree)として、コンピュータディスプレイやプリンタなどへ出力する。なお、上述したように、木構造を示すデータには、ナンス集合Nを示すデータが含まれている。
[メモリ検証装置の構成の説明]
 図3は、第1の実施形態にかかるメモリ検証装置20の構成例を示すブロック図である。図3に示すように、第1の実施形態にかかるメモリ検証装置20は、木構造入力部200と、検証箇所入力部202と、タグ検証部203と、検証結果出力部204と、を備える。
 木構造入力部200は、木構造入力手段としての機能を有する。検証箇所入力部202は、検証箇所入力手段としての機能を有する。タグ検証部203は、タグ検証手段としての機能を有する。検証結果出力部204は、検証結果出力手段としての機能を有する。
 メモリ検証装置20は、例えばコンピュータである。なお、メモリ検証装置20は、中央演算装置においてソフトウェアプログラムを実行することで、図3に示す各構成要素を実現してもよい。また、メモリ検証装置20において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 木構造入力部200は、検証対象となるメモリを保護するための木構造Treeの入力を受け付ける。そして、木構造入力部200は、木構造Treeをタグ検証部203に出力する。ここで、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、及び、ルートノードRootにより構成される。木構造Treeは、木構造出力部106によって出力された、リーフノード集合Leafと中間ノード集合InterとルートノードRootとが連結されたデータ列であってもよい。なお、上述したように、ナンス集合Nの情報は、木構造Treeに含まれている。
 検証箇所入力部202は、メモリの検証箇所CheckNodeの入力を受け付ける。そして、検証箇所入力部202は、検証箇所CheckNodeをタグ検証部203に出力する。なお、CheckNodeは、メモリの検証箇所に対応するノードを示すデータである。具体的には、CheckNodeは、1以上2^d以下の数値であり、検証箇所がリーフノードのCheckNode番目であることを表す。つまり、CheckNodeは、検証箇所に対応するリーフノードの位置(順番;序数)を示す。
 タグ検証部203は、木構造Treeと、検証箇所CheckNodeと、秘密鍵Kとを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部203は、検証結果を検証結果出力部204に出力する。まず、タグ検証部203は、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。ここで、パスPathとは、当該リーフノードからルートノードまでのノードの道のりを示すデータである。パスPathは、以下の式16で表される。
(式16)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、Pathの各要素(i,j_i)は、深さiにおけるj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式17で定義される。
(式17)
 p_i=ceiling(p_{i+1}/2)
 但し、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 図11は、第1の実施形態にかかるメモリ検証装置20におけるタグ検証部203によって生成されるパスの例を示す図である。例えば、d=4、CheckNode=10のとき、図11に示すように、Pathは以下のようになる。
 Path=((4,10),(3,5),(2,3),(1,2),(0,1))
 次に、タグ検証部203は、木構造入力部200の出力である木構造Treeと、秘密鍵Kとを用いて、以下の式18を計算する。
(式18)
 PathTag’=(Tag’(d,p_d),Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(d,p_d)=MAC_K(N(d,p_d),M[p_d])
 Tag’(i,p_i)=MAC_K(N(i,p_i),N(i+1,2p_i-1)||N(i+1,2p_i))
 ただし、0<=i<=d-1
 ここで、MAC_Kは、第1の実施形態におけるメモリ構造初期化装置10のタグ生成部102で用いられている方式と実質的に同じであるので、説明を省略する。また、Tag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのナンスを入力し、MAC関数の入力の平文部分に当該ノードの子ノードのナンスを2個連結して入力することによって、得られる。
 次に、タグ検証部203は、木構造入力部200の出力である木構造Treeから、以下の式19で表される値を取得する。
(式19)
 PathTag=(Tag(d,p_d),Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部203は、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=dのとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部203は、検証結果をACKに設定する。ここで、ACKは、パスに関わるノードの情報が改ざんされていないことを示す。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=dのとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部203は、検証結果をNCKに設定する。ここで、NCKは、パスに関わるノードの情報が改ざんされていることを示す。また、検証結果がNCKであることを、B=NCKと表記する。
 タグ検証部203は、検証結果Bを検証結果出力部204に出力する。
 検証結果出力部204は、タグ検証部203が出力する検証結果Bを、コンピュータディスプレイやプリンタなどへ出力する。
[メモリ更新装置の構成の説明]
 図4は、第1の実施形態にかかるメモリ更新装置30の構成例を示すブロック図である。図4に示すように、第1の実施形態にかかるメモリ更新装置30は、木構造入力部300と、更新箇所入力部302と、メモリ検証部303と、ナンス更新部304と、タグ更新部305と、更新結果出力部306と、を備える。また、第1の実施形態にかかるメモリ更新装置30は、更新判定部310と、平文更新部312と、を備える。
 木構造入力部300は、木構造入力手段としての機能を有する。更新箇所入力部302は、更新箇所入力手段としての機能を有する。メモリ検証部303は、メモリ検証手段としての機能を有する。ナンス更新部304は、ナンス更新手段としての機能を有する。タグ更新部305は、タグ更新手段としての機能を有する。更新結果出力部306は、更新結果出力手段としての機能を有する。更新判定部310は、更新判定手段としての機能を有する。平文更新部312は、平文更新手段としての機能を有する。
 メモリ更新装置30は、例えばコンピュータである。なお、メモリ更新装置30は、中央演算装置においてソフトウェアプログラムを実行することで、図4に示す各構成要素を実現してもよい。また、メモリ更新装置30において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 木構造入力部300は、更新対象となるメモリを保護するための木構造Treeの入力を受け付ける。そして、木構造入力部300は、図4の一点鎖線で示すように、木構造Treeをメモリ検証部303及びナンス更新部304に出力する。また、木構造入力部300は、木構造Treeを平文更新部312に出力してもよい。ここで、上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、ルートノードRootにより構成される。なお、木構造入力部300の機能は、第1の実施形態にかかるメモリ検証装置20における木構造入力部200の機能と実質的に同じであるので、説明を省略する。
 更新箇所入力部302は、メモリの更新情報UpdateNodeの入力を受け付ける。そして、更新箇所入力部302は、図4の点線で示すように、メモリの更新情報UpdateNodeを、更新判定部310、平文更新部312、メモリ検証部303及びタグ更新部305に出力する。ここで、メモリの更新情報UpdateNodeは、木構造において更新されるノードに関する情報である。UpdateNodeは、更新されるノード(ノードの位置)を示すデータ、および、更新されるノードに関する平文の更新内容を示すデータを含む。つまり、UpdateNodeは、更新されるノード(更新箇所)を示すデータ、および、更新対象の平文が含まれるリーフノードの更新内容を示すデータを含む。
 ここで、UpdateNode=(UpdateIndex,UpdateInfo)と定義する。UpdateIndexは、更新箇所に対応するリーフノードを示すデータである。例えば、更新箇所UpdateIndexは、1以上2^d以下の数値であり、更新箇所がリーフノードのUpdateIndex番目であることを表す。つまり、UpdateIndexは、深さdにおける、更新箇所に対応するリーフノードの順番(序数)を示す。
 UpdateInfoは、更新内容を示すデータである。UpdateInfoは、UpdateIndex番目のリーフノードに含まれる情報である平文ブロックM[UpdateIndex]を更新するためのBlockビットの情報を表す。平文ブロックM[UpdateIndex]は、更新内容UpdateInfoに従って、更新され得る。
 更新判定部310は、更新情報UpdateNodeを用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。具体的には、更新判定部310は、更新内容UpdateInfoに基づいて、更新箇所UpdateIndexで示されるリーフノードに含まれる平文ブロックM[UpdateIndex]の更新内容を判定する。そして、更新判定部310は、更新内容UpdateInfoが、更新前の平文(平文ブロック)を用いて平文(平文ブロック)が更新されることを示しているか否かを判定する。更新内容UpdateInfoが、更新前の平文を用いて平文(平文ブロック)が更新されることを示している場合、更新判定部310は、更新対象の平文(平文ブロック)が含まれるリーフノードの更新内容が更新前の平文に依存するものであると判定する。一方、更新内容UpdateInfoが、更新前の平文を用いないで平文(平文ブロック)が更新されることを示している場合、更新判定部310は、更新対象の平文(平文ブロック)が含まれるリーフノードの更新内容が更新前の平文に依存するものでないと判定する。
 ここで、更新前の平文ブロックの値をxとし、更新後の平文ブロックの値をx’とする。このとき、x’がxに依存する場合、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであると判定する。例えば、更新内容UpdateInfoがx’=x+1を示す場合、x’はxに依存する。また、例えば、更新内容UpdateInfoがx’=2*xを示す場合、x’はxに依存する。これらの場合、更新前の平文ブロックを用いて平文ブロックが更新される。したがって、この場合、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであると判定する。
 また、j1_d番目のリーフノードj1_dの更新前の平文ブロックの値をx1とし、j2_d番目のリーフノードj2_dの更新前の平文ブロックの値をx2とする。そして、リーフノードj1_dの更新後の平文ブロックの値をx1’とする。この場合において、更新内容UpdateInfoがx1’=x1+x2を示す場合、x1’は更新前の平文に依存する。つまり、更新前の平文を用いて平文が更新される。したがって、この場合、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであると判定する。
 一方、cを固定値とし、更新内容がx’=cを示す場合、x’は更新前の平文(平文ブロック)に依存しない。言い換えると、更新に使用される固定値cは更新前の平文とは独立している。この場合、更新前の平文ブロックを用いないで平文ブロックが更新される。したがって、この場合、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものでないと判定する。すなわち、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する際に、更新対象の平文を当該平文とは独立した固定値で置き換えるものであるか否かを判定するようにしてもよい。なお、固定値cは、更新対象のリーフノードとは異なるリーフノードについて以前のタイミングで更新済みの平文ブロックの値に対応してもよい。ただし、更新前の平文ブロックxがx=x1+x2で表されるとし、更新内容がx’=c+x2を示す場合は、平文ブロックの一部(x1)のみが固定値で置き換わるため、更新内容は更新前の平文(平文ブロックの一部であるx2)に依存している。したがって、この場合は、更新判定部310は、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであると判定する。
 なお、更新に使用される固定値は、更新内容UpdateInfoに含まれていてもよい。つまり、更新に使用される固定値は、更新情報UpdateNodeに含まれていてもよい。また、更新情報UpdateNodeにおける固定値は、ユーザによって指定されてもよい。これにより、平文(平文ブロック)の更新内容を、ユーザが容易に指定することができる。また、更新判定部310は、更新に使用される固定値が更新情報UpdateNodeに含まれる場合に、更新対象の平文(平文ブロック)が含まれるリーフノードの更新内容が更新前の平文に依存するものでないと判定してもよい。
 あるいは、更新に使用される固定値は、更新内容UpdateInfoに含まれていなくてもよい。例えば、更新に使用される固定値は、メモリ更新装置30の記憶装置に予め格納されていてもよい。この場合、更新内容UpdateInfoは、固定値が格納されている記憶装置の場所(アドレス)を示してもよい。また、この場合、更新に使用される固定値は、メモリのOn-chipの領域(セキュア領域)に格納されていてもよい。
 メモリ検証部303は、木構造Treeと、メモリの更新情報UpdateNodeと、秘密鍵Kとを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部303は、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部303が行う処理は、第1の実施形態のメモリ検証装置20におけるタグ検証部203の処理と実質的に同じであるが、出力結果が異なる。第1の実施形態のメモリ検証装置20におけるタグ検証部203は検証結果Bを出力するが、メモリ検証部303は、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。
 メモリ検証部303は、図4の太い破線で示すように、検証結果Bを、ナンス更新部304、タグ更新部305及び更新結果出力部306に出力する。また、メモリ検証部303は、検証結果Bを、平文更新部312に出力してもよい。また、メモリ検証部303は、図4の太い実線で示すように、パスPathを、ナンス更新部304及びタグ更新部305に出力する。
 Pathは以下の式20のように表される。
(式20)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここでは、メモリ検証部303が行う操作から、p_d=UpdateIndexとなることが分かる。
 つまり、メモリ検証部303は、木構造において、リーフノードからルートノードへのパスPathを生成する。また、メモリ検証部303は、パスPathにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コード(MAC)に入力することで検証に用いられるタグを生成(計算)して各ノードに格納されているタグを検証する。つまり、メモリ検証部303は、上述した式18を計算することにより、パスPathにおける各ノードについて、タグTag’を生成する。メモリ検証部303は、各ノードについて、生成されたタグTag’と格納されているタグTag(Treeに関するタグ)とを比較して、両者が一致するか否かを判定する。これにより、メモリ検証部303は、各ノードについて改ざんがなされていないかを検証する。つまり、メモリ検証部303は、各ノードについて完全性検証を行う。そして、メモリ検証部303は、検証結果Bを出力する。
 ここで、第1の実施形態にかかるメモリ検証部303は、更新判定部310の判定結果に応じて、リーフノードのタグを検証しない場合がある。具体的には、リーフノードの更新内容が更新前の平文に依存するものでない場合、メモリ検証部303は、パスPathにおけるリーフノード以外のノードのタグを検証する。一方、リーフノードの更新内容が更新前の平文に依存するものである場合、メモリ検証部303は、パスPathにおけるリーフノードを含む全てのノードのタグを検証する。
 平文更新部312は、検証結果Bが改ざんの検知がないことを示す場合に、更新情報UpdateNodeに基づいて、リーフノードにおける更新対象の平文を更新する。具体的には、平文更新部312は、平文ブロックM[UpdateIndex]を、更新内容UpdateInfoに従って、更新する。例えば、更新内容UpdateInfoに、更新に使用される固定値が含まれる場合、平文更新部312は、平文ブロックM[UpdateIndex]の値を、その固定値に置き換えることで、平文ブロックM[UpdateIndex]を更新する。また、更新内容UpdateInfoが上述したx’=x+1を示す場合、平文更新部312は、平文ブロックM[UpdateIndex]を、更新前の値xから、x’=x+1に更新する。平文更新部312は、更新後の平文(平文ブロック)に関する情報(UpdateNode)を、タグ更新部305に出力する。
 ナンス更新部304は、Pathに関するリーフノード(平文ブロック)の更新処理が行われるごとに、そのPathに関する各ノードに関するナンスを更新する。これにより、リプレイ攻撃を防止できる。ナンス更新部304は、木構造Treeと、検証結果Bと、パスPathとを用いて、Pathで指定されるノードのナンスを更新する。具体的には、B=ACKである場合に、ナンス更新部304は、Pathで指定されるノードのナンスを更新する。そして、ナンス更新部304は、更新結果の新たな木構造NewTree’を、タグ更新部305に出力する。一方、B=NCKの場合は、ナンス更新部304は処理を行わず、何も出力しない。
 ここで、各ノードに割り当てられたナンスの更新方法は、予め定められている。例えば、上述した条件Aのようにナンスが各ノードに割り当てられた場合、ルートノードのナンス値N(0,1)を、更新前において最も大きなナンス値であるN(d,2^d)に1を加算するようにして、更新してもよい。そして、Pathにおける各ノードについて、上記の条件Aを満たすように、ナンス値を更新してもよい。これにより、Pathにおけるルートノードに含まれる平文ブロックの更新処理が終了しなくても各ノードのナンスを更新可能であるので、各ノードについて並列にナンスの更新が可能である。
 タグ更新部305は、更新結果の木構造NewTree’と、ナンス集合Nと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵Kとを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部305は、0<=i<=d-1に対して、以下の式21の計算を行う。
(式21)
 Tag(d,p_d)←MAC_K(N(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_K(N(i,p_i),N(i+1,2p_i-1)||N(i+1,2p_i))
 なお、(d,p_d)は、更新対象のリーフノードを示し、p_dは、深さdにおける更新対象のリーフノードの順番(序数)を示す。また、「UpdateInfo」は、更新対象のリーフノードにおける更新後の平文ブロックを示す。なお、MAC_Kは、第1の実施形態におけるメモリ構造初期化装置10のタグ生成部102や、メモリ検証装置20のタグ検証部203で用いられている方式と同じである。また、Tag(i,p_i)は、MAC関数の入力のナンス部分に当該ノードの更新後のナンスを入力し、MAC関数の入力の平文部分に当該ノードの子ノードの更新後のナンスを2個連結して入力することによって、得られる。
 そして、タグ更新部305は、更新結果の木構造NewTreeを、更新結果出力部306に出力する。新たな木構造NewTreeは、更新後のリーフノード集合Leafと、更新後の中間ノード集合Interと、更新後のルートノードRootとによって構成される。なお、式11に示すように、更新後の平文の情報は、更新後のリーフノード集合Leafに含まれている。一方、B=NCKの場合は、タグ更新部305は処理を行わず、何も出力しない。
 更新結果出力部306は、メモリ検証部303が出力する検証結果Bと、タグ更新部305が出力する木構造NewTreeを用いて、更新結果を出力する。B=ACKである場合、更新結果出力部306は、NewTreeをコンピュータディスプレイやプリンタなどへ出力する。なお、更新結果出力部306は、NewTreeとは別個にUpdateNodeを出力してもよい。一方、B=NCKである場合、更新結果出力部306は、検証結果B=NCKをコンピュータディスプレイやプリンタなどへ出力する。
[動作の説明]
 図5は、メモリ構造初期化装置10の動作(メモリ構造初期化方法)を示すフローチャートである。ステップS101において、平文入力部100は、保護対象となる平文Mの入力を受け付ける。ステップS102において、ナンス割り当て部101は、木構造の各ノードにナンスを割り当て、ナンス集合Nを生成する。ステップS103において、タグ生成部102は、平文Mとナンス集合Nを用いて、改ざん検知用のタグ集合(TagLeaf,TagInter,TagRoot)を生成する。
 ステップS104において、リーフノード生成部103は、タグ生成部102が出力するタグ集合TagLeafを用いて、木構造のリーフノード集合Leafを生成する。ステップS105において、中間ノード生成部104は、タグ生成部102が出力するタグ集合TagInterを用いて、木構造の中間ノード集合Interを生成する。ステップS106において、ルートノード生成部105は、タグ生成部102が出力するタグTagRootを用いて、木構造のルートノードRootを生成する。
 ステップS107において、木構造出力部106は、リーフノード集合Leafと、中間ノード集合Interと、ルートノードRootとを連結して、木構造を示す連結されたデータ列をコンピュータディスプレイやプリンタなどへ出力する。ステップS107の後、メモリ構造初期化装置10は、図5の処理を終了する。
 図6は、メモリ検証装置20の動作(メモリ検証方法)を示すフローチャートである。ステップS201において、木構造入力部200は、検証対象となるメモリを保護するための木構造Treeの入力を受け付ける。なお、上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、及び、ルートノードRootにより構成される。また、上述したように、木構造Treeには、検証対象となるメモリを保護するための木構造に割り当てられているナンス集合Nが含まれている。さらに、検証箇所入力部202は、メモリの検証箇所CheckNodeの入力を受け付ける。
 ステップS202において、タグ検証部203は、木構造Treeと、検証箇所CheckNodeとを用いて、各ノードのタグの検証を行う。これにより、タグ検証部203は、CheckNodeが指定するメモリが改ざんされていないか否かの検証を行う。さらに、タグ検証部203は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。ステップS203において、検証結果出力部204は、検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS203の後、メモリ検証装置20は、図6の処理を終了する。
 図7~図9は、メモリ更新装置30の動作(メモリ更新方法)を示すフローチャートである。ステップS300において、木構造入力部300は、更新対象となるメモリを保護するための木構造Treeの入力を受け付ける。上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、ルートノードRootにより構成される。そして、木構造Treeは、ナンス集合Nを含む。また、ステップS300において、更新箇所入力部302は、メモリの更新情報UpdateNodeの入力を受け付ける。上述したように、更新情報UpdateNodeは、UpdateNode=(UpdateIndex,UpdateInfo)と定義される。
 ステップS301において、更新判定部310は、更新情報UpdateNodeの更新内容UpdateInfoが、更新箇所UpdateIndexに対応する平文ブロックを固定値に置き換えるものであるか否かを判定する。このとき、更新判定部310は、更新情報UpdateNodeの更新内容UpdateInfoに固定値が含まれるか否かを判定してもよい。更新情報UpdateNodeの更新内容UpdateInfoが、平文ブロックを固定値に置き換えるものである場合(S301の判定結果がYESの場合)、処理はステップS302に進む。一方、更新情報UpdateNodeの更新内容UpdateInfoが、平文ブロックを固定値に置き換えるものでない場合(S301の判定結果がNOの場合)、処理はステップS312に進む。
 図8に示すように、ステップS302において、メモリ検証部303は、木構造Treeと、メモリの更新情報UpdateNodeとを用いて、リーフノード以外のノードのタグの検証を行う。これにより、メモリ検証部303は、各ノードについて改ざんがなされていないかを検証する。さらに、メモリ検証部303は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。そして、メモリ検証部303は、検証結果B、及び、メモリ検証のために用いたパスPathを出力する。B=ACK、すなわちメモリ改ざんが検知されない場合(S302:B=ACK(受理)の場合)、処理はステップS304へ進む。一方、B=NCK、すなわちメモリ改ざんが検知された場合(S302:B=NCK(不受理)の場合)、処理はステップS303へ進む。
 ステップS303において、更新結果出力部306は、メモリ検証部303が出力する検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS303の後、メモリ更新装置30は、処理を終了する。
 ステップS304において、ナンス更新部304は、木構造入力部300が出力する木構造Treeと、メモリ検証部303が出力するパスPathを用いて、Pathで指定されるノードのナンスを更新する。そして、ナンス更新部304は、更新結果の新たな木構造NewTree’を出力する。
 ステップS305において、木構造NewTree’と、パスPathと、メモリの更新情報UpdateNodeとを用いて、リーフノードの平文、及び、パスPathに対応するタグが更新される。具体的には、平文更新部312は、更新情報UpdateNodeで示されるリーフノードの平文(平文ブロック)を更新する。また、タグ更新部305は、Pathで示されるノードのタグを更新する。そして、タグ更新部305は、更新結果の新たな木構造NewTreeを出力する。
 ステップS306において、更新結果出力部306は、タグ更新部305が出力する木構造NewTreeを出力する。ステップS306の後、メモリ更新装置30は、処理を終了する。
 一方、図9に示すように、ステップS312において、メモリ検証部303は、木構造Treeと、メモリの更新情報UpdateNodeとを用いて、UpdateNodeによって指定されるリーフノードに関するパスの全てのノードのタグの検証を行う。これにより、メモリ検証部303は、各ノードについて改ざんがなされていないかを検証する。さらに、メモリ検証部303は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。そして、メモリ検証部303は、検証結果B、及び、メモリ検証のために用いたパスPathを出力する。B=ACK、すなわちメモリ改ざんが検知されない場合(S312:B=ACK(受理)の場合)、処理はステップS314へ進む。一方、B=NCK、すなわちメモリ改ざんが検知された場合(S312:B=NCK(不受理)の場合)、処理はステップS313へ進む。
 S303と同様にして、ステップS313において、更新結果出力部306は、メモリ検証部303が出力する検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS313の後、メモリ更新装置30は、処理を終了する。
 S304と同様にして、ステップS314において、ナンス更新部304は、木構造入力部300が出力するTreeと、メモリ検証部303が出力するパスPathを用いて、Pathで指定されるノードのナンスを更新する。そして、ナンス更新部304は、更新結果の新たな木構造NewTree’を出力する。
 S305と同様にして、ステップS315において、木構造NewTree’と、パスPathと、メモリの更新情報UpdateNodeとを用いて、リーフノードの平文、及び、パスPathに対応するタグが更新される。具体的には、平文更新部312は、更新情報UpdateNodeで示されるリーフノードの平文(平文ブロック)を更新する。また、タグ更新部305は、Pathで示されるノードのタグを更新する。そして、タグ更新部305は、更新結果の新たな木構造NewTreeを出力する。
 S306と同様にして、ステップS316において、更新結果出力部306は、タグ更新部305が出力する木構造NewTreeを出力する。ステップS316の後、メモリ更新装置30は、処理を終了する。
[効果の説明]
 第1の実施形態にかかるメモリ更新装置30は、リーフノードに対応する平文を更新する場合に、更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。そして、メモリ更新装置30は、リーフノードの更新内容が更新前の平文に依存するものでないときに、リーフノードからルートノードへのパスにおけるリーフノード以外のノードのタグを検証する。ここで、特許文献2にかかる技術では、更新内容によらないで、パスの全てのノードについて検証が行われる。したがって、上記のような構成によって、検証に要する計算量を、特許文献2にかかる技術と比較して削減することが可能となる。したがって、メモリの内容を更新する際に、ノードの検証処理を効率的に行うことが可能となる。
 ここで、メモリの内容を更新する際に、木構造に対して改ざんが行われる可能性がある。したがって、メモリの更新の際に、更新前のリーフノードに含まれる平文が改ざんされる可能性がある。したがって、リーフノードの更新内容が更新前の平文に依存する場合、改ざんされた更新前の平文を用いて平文が更新される可能性があるので、メモリの安全性が損なわれる可能性がある。したがって、パスPathにおけるリーフノードを含む全てのノードのタグの検証が必要である。一方、更新対象の平文が固定値で置き換わるなど、リーフノードの更新内容が更新前の平文に依存しない場合、更新前のリーフノードに含まれる平文が改ざんされたとしても、その平文は、改ざんされた平文によらないデータに更新される。したがって、メモリの安全性が損なわれない。
 また、リーフノードのタグは、式5で示すように、そのリーフノードの平文とナンスとに基づいて生成される。したがって、リーフノードのタグは、そのリーフノードの平文とナンスとが正当であれば、正当に生成される。平文については、上述したように、リーフノードの更新内容が更新前の平文に依存しない場合は、正当である。
 ナンスについては、ナンスに改ざんがなされたとしても、その上のノード(親ノード等)での検証によって、改ざんを検出できる。ここで、図10に示した木構造において、攻撃者がリプレイ攻撃を行うと想定する。そして、攻撃者が、リーフノード(N(3,1),M[1],Tag(3,1))のナンスの値N(3,1)を改ざんして別の値N(3,1)’にしたとする。この場合、攻撃者は、合わせて、親ノードのTag(2,1)及びN(2,1)を改ざんして、Tag(2,1)’及びN(2,1)’とする必要がある。そうしなければ、MACの安全性により、ノード(N(2,1),Tag(2,1))におけるMACの完全性検証の際に、改ざんが検出されてしまうからである。なお、Tag(2,1)’=MAC_K(N(2,1)’,N(3,1)’||N(3,2))である。
 ここで、攻撃者がTag(2,1)’及びN(2,1)’を事前に知っていたとする。つまり、N(3,1)’<N(3,1)且つN(2,1)’<N(2,1)であること、及び、MAC_K(N(2,1)’,N(3,1)’||N(3,2))が、事前に攻撃者にとって既知であるとする。この場合、攻撃者は、ロールバックにより、Tag(2,1)’及びN(2,1)’を正しく偽造することができる。このような改ざんは、MACによる完全性検証では検出できない。そして、攻撃者は、同様にして、ノード(N(2,1),Tag(2,1))の親ノードであるノード(N(1,1),Tag(1,1))についても、タグ及びナンスを改ざんして、それぞれ、Tag(1,1)’及びN(1,1)’とする。このような改ざんは、MACによる完全性検証では検出できない。
 一方、攻撃者は、N(1,1)を改ざんしてN(1,1)’としたことで、これに合わせて、ルートノード(N(0,1),Tag(0,1))のTag(0,1)及びN(0,1)も改ざんする必要がある。そうしなければ、MACの安全性により、ルートノードにおけるMACの完全性検証の際に、改ざんが検出されてしまうからである。したがって、攻撃者は、Tag(0,1)及びN(0,1)を改ざんして、Tag(0,1)’及びN(0,1)’とする必要がある。なお、Tag(0,1)’=MAC_K(N(0,1)’,N(1,1)’||N(1,2))であることに留意されたい。しかしながら、N(0,1)は、セキュアな領域であるOn-chipに格納されている。したがって、N(0,1)を改ざんすることは不可能である。したがって、ノード(N(1,1),Tag(1,1))で改ざんが検出されないとしても、ルートノードにおいて必ず改ざんが検出される。したがって、リーフノードの更新内容が更新前の平文に依存しない場合、リーフノードのナンスが改ざんされたとしても、上位のノードにおける検証によって、改ざんが検出されることとなる。したがって、リーフノードの更新内容が更新前の平文に依存しない場合は、リーフノードについてのタグの検証を不要としても、安全性は損なわれない。
 また、全てのノードにおいて検証に必要な計算量が同じと仮定すると、深さdの木構造の場合、本実施形態にかかるメモリ更新装置30におけるメモリ検証処理の計算量は、特許文献2にかかる技術にかかる計算量に対して、(d-1)/d倍となる。リーフノードの検証処理のコストがそれ以外のノードの検証処理のコストよりも大きい場合、本実施形態にかかる方法による計算量の削減効果は、より大きくなる。また、深さdは、通常、整数1桁程度であり、比較的小さい。ここで、(d-1)/dは、dが小さいほど小さい。したがって、本実施形態にかかる方法による計算量の削減効果は、比較的大きい。
(第2の実施形態)
 次に、第2の実施形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。したがって、以下の説明では、上述した第1の実施形態と異なる箇所について主に説明する。第2の実施形態にかかる構成は、上述した特許文献2の構成を改良したものに対応する。そして、第2の実施形態では、第1の実施形態と比較して、木構造の分岐数が異なる。第2の実施形態では、メモリ保護システムが構成する木構造の分岐数がbであり、深さがdである例について説明する。つまり、第2の実施形態におけるリーフノードの数はb^d個となる。
 図12は、第2の実施形態にかかるメモリ保護システム1によって構成される木構造の例を示す図である。図12には、分岐数b=3、深さd=3の場合の木構造が示されている。なお、Root,Inter,Leafについては、上述した第1の実施形態の場合と実質的に同様である。また、第2の実施形態において、分岐数bは、3以上の任意の整数であり得る。
 第2の実施形態にかかるメモリ保護システム1は、メモリ構造初期化装置10aと、メモリ検証装置20aと、メモリ更新装置30aと、を備える。第2の実施形態にかかるメモリ構造初期化装置10aは、改ざん検知を行いたい平文(平文メッセージ)を入力として、初期状態の木構造を出力する。
 第2の実施形態において、平文は、b^d個の平文ブロックの結合で表される。つまり、以下の式22が成り立つ。
(式22)
 M=M[1]||M[2]||・・・||M[b^d]
 また、1つの平文ブロックはBlockビットと定義される。
 メモリ検証装置20aは、改ざんをチェックしたい平文ブロックの格納場所と木構造とを入力として、その格納場所に対応するメモリが改ざんされているか否かを検証する。メモリ更新装置30aは、更新したい平文ブロックの格納場所とその更新内容、および木構造を入力とする。メモリ更新装置30aは、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
[メモリ構造初期化装置の構成の説明]
 第2の実施形態にかかるメモリ構造初期化装置10aは、平文入力部100と、ナンス割り当て部101aと、タグ生成部102aと、を備える。また、第2の実施形態にかかるメモリ構造初期化装置10aは、リーフノード生成部103aと、中間ノード生成部104aと、ルートノード生成部105と、木構造出力部106と、を備える。なお、平文入力部100は、第1の実施形態のメモリ構造初期化装置10における平文入力部100と実質的に同じであるので、説明を省略する。
 ナンス割り当て部101aは、ナンス割り当て部101と同様に、木構造の各ノードに、ノード固有のナンス情報を割り当てる。ここで、0<=i<=d,1<=j_i<=b^{i}のとき、深さiでj_i番目のノードに割り当てるナンスを、N(i,j_i)で表す。そして、木構造の全てのノードに割り当てられたナンス情報を、ナンス集合Nとして、以下の式23のように記述する。
(式23)
 N=(N(0,1),N(1,1),N(1,2),・・・,N(1,b),N(2,1),N(2,2),・・・,N(d,b^d-1),N(d,b^d))
 タグ生成部102aは、タグ生成部102と同様に、平文入力部100が出力する平文Mと、ナンス割り当て部101aが出力するナンス集合Nと、秘密鍵Kとを用いて、改ざん検知用のタグを生成する。まず、タグ生成部102aは、リーフノードで用いるタグとして、以下の式24で表されるデータを生成する。
(式24)
 TagLeaf=((M[1],Tag(d,1)),(M[2],Tag(d,2)),・・・,(M[b^d],Tag(d,b^d)))
 Tag(d,j_d)=MAC_K(N(d,j_d),M[j_d])
 ただし、1<=j_d<=b^d
 次に、タグ生成部102aは、中間ノードで用いるタグとして、以下の式25で表されるデータを生成する。
(式25)
 TagInter=(Tag(1,1),・・・,Tag(d-1,b^{d-1}))
 Tag(i,j_i)=MAC_K((N(i,j_i),N(i+1,b・j_i-(b-1))||・・・||N(i+1,b・j_i))
 ただし、1<=i<=d-1,1<=j_i<=b^i
 また、「N(i+1,b・j_i-(b-1))||・・・||N(i+1,b・j_i)」は、ノード(i,j_i)のb個の子ノードのナンスを連結したものである。
 次に、タグ生成部102aは、ルートノードで用いるタグとして、以下の式26で表されるデータを生成する。
(式26)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_K(N(0,1),N(1,1)||・・・||N(1,b))
 なお、「N(1,1)||・・・||N(1,b)」は、ルートノード(0,1)のb個の子ノードのナンスを連結したものを示す。
 式24,式25,式26から、各ノードに対応するタグは、リーフノードでは、自ノードに対応する平文ブロックを平文として、自ノードのナンスとその平文とを入力としたMACの計算結果に対応する。また、各ノードに対応するタグは、リーフノード以外のノードでは、複数の子ノードのナンスの連結を平文とし、自ノードのナンスとその平文とを入力としたMACの計算結果に対応する。
 図12に例示するように、木構造全体の深さdがd=3であり、分岐数bがb=3である場合、各ノードに対応するタグは、以下の式27で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式27)
For 0<=i<=3,1<=j_i<=3^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_K(N(i,j_i),N(i+1,3j_i-2)||N(i+1,3j_i-1)||N(i+1,3j_i))
 (For i=3) Tag(i,j_i)=MAC_K(N(i,j_i),M[j_i])
 そして、タグ生成部102aは、タグ集合TagLeafをリーフノード生成部103aに出力する。また、タグ生成部102aは、タグ集合TagInterを中間ノード生成部104aに出力する。また、タグ生成部102aは、タグ集合TagRootをルートノード生成部105に出力する。
 リーフノード生成部103aは、リーフノード生成部103と同様に、タグ生成部102aが出力するタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=b^dである。そして、j_d番目のリーフノードは、以下の式28で示すように生成される。
(式28)
 (N(d,j_d),M[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式29のように記述する。
(式29)
 Leaf=((N(d,1),M[1],Tag(d,1)),((N(d,2),M[2],Tag(d,2)),・・・,(N(d,b^d),M[b^d],Tag(d,b^d)))
 図12に示すように、木構造全体の深さがd=3の場合、各リーフノードは、以下の式30のように表される。
(式30)
 Leaf=((N(3,1),M[1],Tag(3,1)),(N(3,2),M[2],Tag(3,2)),・・・,(N(3,27),M[27],Tag(3,27)))
 また、リーフノード生成部103aは、生成されたリーフノード集合Leafを木構造出力部106に出力する。
 中間ノード生成部104aは、中間ノード生成部104と同様に、タグ生成部102aが出力するタグ集合TagInterを用いて、木構造の中間ノードを生成する。ここで、中間ノードでは、1<=i<=d-1,1<=j_i<=b^iである。そして、深さiにおけるj_i番目の中間ノードは、以下の式31で示すように生成される。
(式31)
 (N(i,j_i),Tag(i,j_i))
 また、全ての中間ノードを以下の式32のように記述する。
(式32)
 Inter=((N(1,1),Tag(1,1)),(N(1,2),Tag(1,2)),・・・,(N(d-1,b^{d-1}),Tag(d-1,b^{d-1})))
 図12に示すように、木構造全体の深さがd=3の場合、各中間ノードは、以下の式33のように表される。
(式33)
 Inter=((N(1,1),Tag(1,1)),(N(1,2),Tag(1,2)),・・・,(N(2,9),Tag(2,9)))
 また、中間ノード生成部104aは、生成された中間ノード集合Interを木構造出力部106に出力する。
 ルートノード生成部105は、第1の実施形態のメモリ構造初期化装置10におけるルートノード生成部105と実質的に同じであるので、説明を省略する。木構造出力部106は、第1の実施形態のメモリ構造初期化装置10における木構造出力部106と実質的に同じであるので、説明を省略する。
[メモリ検証装置の構成の説明]
 第2の実施形態にかかるメモリ検証装置20aは、木構造入力部200と、検証箇所入力部202aと、タグ検証部203aと、検証結果出力部204と、を備える。木構造入力部200は、第1の実施形態のメモリ検証装置20における木構造入力部200と実質的に同じであるので、説明を省略する。なお、木構造入力部200に入力される木構造Treeには、上述した式23で示されるようなナンス集合Nが含まれる。
 検証箇所入力部202aは、検証箇所入力部202と同様に、メモリの検証箇所CheckNodeの入力を受け付ける。そして、検証箇所入力部202aは、検証箇所CheckNodeをタグ検証部203aに出力する。ここで、第2の実施形態において、CheckNodeは、1以上b^d以下の数値であり、検証箇所がリーフノードのCheckNode番目であることを表す。
 タグ検証部203aは、タグ検証部203と同様に、木構造Treeと、検証箇所CheckNodeと、秘密鍵Kとを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部203は、検証結果を検証結果出力部204に出力する。まず、タグ検証部203は、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。パスPathは、以下の式34で表される。
(式34)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=b^{i}のとき、Pathの各要素(i,j_i)は、深さiにおいてj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式35で定義される。
(式35)
 p_i=ceiling(p_{i+1}/b)
 ただし、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 次に、タグ検証部203aは、木構造入力部200の出力である木構造Treeと、秘密鍵Kとを用いて、以下の式36を計算する。
(式36)
 PathTag’=(Tag’(d,p_d),Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(d,p_d)=MAC_K(N(d,p_d),M[p_d])
 Tag’(i,p_i)=MAC_K(N(i,p_i),N(i+1,b・p_i-(b-1))||・・・||N(i+1,b・p_i-1)||N(i+1,b・p_i))
 ただし、0<=i<=d-1
 ここで、MAC_Kは、第2の実施形態におけるメモリ構造初期化装置10aのタグ生成部102aで用いられている方式と実質的に同じであるので、説明を省略する。またTag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのナンスを入力し、MAC関数の入力の平文部分に当該ノードの子ノードのナンスをb個連結して入力することによって、得られる。
 次に、タグ検証部203aは、木構造入力部200の出力である木構造Treeから、以下の式37で表される値を取得する。
(式37)
 PathTag=(Tag(d,p_d),Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部203aは、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=dのとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部203aは、検証結果をACKに設定する。ここで、ACKは、パスに関わるノードの情報が改ざんされていないことを示す。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=dのとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部203aは、検証結果をNCKに設定する。ここで、NCKは、パスに関わるノードの情報が改ざんされていることを示す。また、検証結果がNCKであることを、B=NCKと表記する。
 タグ検証部203aは検証結果Bを検証結果出力部204に出力する。
 検証結果出力部204は、第1の実施形態のメモリ検証装置20における検証結果出力部204と実質的に同じであるので、説明を省略する。
[メモリ更新装置の構成の説明]
 第2の実施形態にかかるメモリ更新装置30aは、木構造入力部300と、更新箇所入力部302aと、メモリ検証部303aと、ナンス更新部304と、タグ更新部305aと、更新結果出力部306と、更新判定部310と、平文更新部312と、を備える。木構造入力部300は、第1の実施形態のメモリ更新装置30における木構造入力部300と実質的に同じであるので、説明を省略する。なお、木構造入力部300に入力される木構造Treeには、上述した式23で示されるようなナンス集合Nが含まれる。
 更新箇所入力部302aは、更新箇所入力部302と同様に、メモリの更新情報UpdateNodeの入力を受け付ける。そして、更新箇所入力部302aは、メモリの更新情報UpdateNodeを、更新判定部310、平文更新部312、メモリ検証部303a及びタグ更新部305aに出力する。
 ここで、UpdateNode=(UpdateIndex,UpdateInfo)と定義する。UpdateIndexは、更新箇所に対応するリーフノードを示すデータである。例えば、UpdateIndexは、1以上b^d以下の数値であり、更新箇所がリーフノードのUpdateIndex番目であることを表す。つまり、UpdateIndexは、深さdにおける、更新箇所に対応するリーフノードの順番(序数)を示す。
 UpdateInfoは、更新内容を示すデータである。UpdateInfoは、UpdateIndex番目のリーフノードに含まれる情報である平文ブロックM[UpdateIndex]を更新するためのBlockビットの情報を表す。平文ブロックM[UpdateIndex]は、更新内容UpdateInfoに従って、更新され得る。
 更新判定部310は、第1の実施形態のメモリ更新装置30における更新判定部310と実質的に同様であるので、説明を省略する。
 メモリ検証部303aは、メモリ検証部303と同様に、木構造Treeと、メモリの更新情報UpdateNodeと、秘密鍵Kとを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部303aは、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部303aが行う検証処理は、第2の実施形態のメモリ検証装置20aにおけるタグ検証部203aと実質的に同じであるが、出力結果が異なる。第2の実施形態のメモリ検証装置20aにおけるタグ検証部203aは検証結果Bを出力するが、メモリ検証部303aは、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。メモリ検証部303aは、検証結果Bを、ナンス更新部304、平文更新部312、タグ更新部305a及び更新結果出力部306に出力する。また、メモリ検証部303aは、パスPathを、ナンス更新部304及びタグ更新部305aに出力する。
 Pathは以下の式38のように表される。
(式38)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここでは、メモリ検証部303aが行う操作から、p_d=UpdateIndexとなることが分かる。
 なお、メモリ検証部303aのその他の機能については、第1の実施形態にかかるメモリ検証部303の機能と実質的に同様であるので、説明を省略する。つまり、メモリ検証部303aは、メモリ検証部303と同様に、更新判定部310の判定結果に応じて、リーフノードのタグを検証しない場合がある。
 平文更新部312は、第1の実施形態のメモリ更新装置30における平文更新部312と実質的に同様であるので、説明を省略する。また、ナンス更新部304は、第1の実施形態のメモリ更新装置30におけるナンス更新部304と実質的に同じであるので、説明を省略する。
 タグ更新部305aは、更新結果の木構造NewTree’と、ナンス集合Nと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵Kとを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部305は、0<=i<=d-1に対して、以下の式39の計算を行う。
(式39)
 Tag(d,p_d)←MAC_K(N(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_K(N(i,p_i),N(i+1,b・p_i-(b-1))||・・・||N(i+1,b・p_i))
 なお、MAC_Kは、第2の実施形態におけるメモリ構造初期化装置10aのタグ生成部102aや、メモリ検証装置20aのタグ検証部203aで用いられている方式と実質的に同じであるので、説明を省略する。またTag(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのナンスを入力し、MAC関数の入力の平文部分に当該ノードの子ノードのナンスをb個連結して入力することによって、得られる。そして、タグ更新部305aは、更新結果の木構造NewTreeを、更新結果出力部306に出力する。一方、B=NCKの場合は、タグ更新部305aは処理を行わず、何も出力しない。
 更新結果出力部306は、第1の実施形態のメモリ更新装置30における更新結果出力部306と実質的に同じであるので、説明を省略する。
[効果の説明]
 第2の実施形態が奏する効果は第1の実施形態が奏する効果と実質的に同じである。但し、第1の実施形態では、構成される木構造は2分木を仮定していたが、第2の実施形態では、木構造の分岐数を任意にしている。したがって、任意の分岐数の木構造についても、第1の実施形態が奏する効果を実現できる。
(第3の実施形態)
 次に、第3の実施形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。第3の実施形態は、第1の実施形態を変形したものである。したがって、以下の説明では、上述した第1の実施形態と異なる箇所について主に説明する。第3の実施形態にかかる構成は、上述した特許文献2の構成を改良したものに対応する。そして、第3の実施形態では、メモリ検証に加えて、入力される平文を暗号化して秘匿するメモリ保護システムの例について説明する。但し、第3の実施形態にかかるメモリ保護システム1が構成する木構造は、第1の実施形態と同様に、分岐数が2であり、深さがdであると定義する。
 図13は、第3の実施形態にかかるメモリ保護システム1が構成する木構造の例を示す図である。図13には、分岐数b=2、深さd=3の場合の木構造が示されている。なお、Root,Inter,Leafについては、上述した第1の実施形態の場合と実質的に同様である。
 第3の実施形態にかかるメモリ保護システム1は、メモリ構造初期化装置10cと、メモリ検証装置20cと、メモリ更新装置30cと、を備える。メモリ保護システム1は、メモリの改ざん検知および秘匿を行う。第3の実施形態にかかるメモリ構造初期化装置10cは、改ざん検知および秘匿を行いたい平文を入力として、初期状態の木構造を出力する。
 メモリ検証装置20cは、改ざんをチェックしたい暗号文ブロックの格納場所と木構造とを入力として、その格納場所に対応するメモリが改ざんされているか否かを検証する。メモリ更新装置30cは、更新したい暗号文ブロックの格納場所とその更新内容、および木構造を入力とする。メモリ更新装置30cは、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
 第3の実施形態にかかるメモリ保護システム1は、第1の実施形態におけるメモリ保護システム1で用いたMACに加えて、要素技術として認証暗号(AE)を用いる。秘密鍵Kを用いたAEは、暗号化関数AE.Enc_Kと、この暗号化関数AE.Enc_Kと対となる復号関数AE.Dec_Kとの、2つの関数により定義される。AE.Enc_Kは、ナンスN、および平文Mを入力として、暗号文Cと認証タグTagとを出力する。暗号化関数は、以下の式40のように表される。
(式40)
 AE.Enc_K(N,M)=(C,T)
 AE.Dec_Kは、ナンスN、暗号文C、および認証タグTの3つを入力として、改ざんが検知されない場合は復号結果の平文Mを出力し、改ざんが検知された場合はエラーメッセージ⊥を出力する。このことを式で記述すると以下の式41のようになる。
(式41)
 AE.Dec_K(N,C,T)=M(改ざんが検知されない場合)
 AE.Dec_K(N,C,T)=⊥(改ざんが検知された場合)
[メモリ構造初期化装置の構成の説明]
 第3の実施形態にかかるメモリ構造初期化装置10cは、平文入力部100と、ナンス割り当て部101と、タグ生成部102cと、を備える。また、第3の実施形態にかかるメモリ構造初期化装置10cは、リーフノード生成部103cと、中間ノード生成部104と、ルートノード生成部105と、木構造出力部106と、を備える。
 平文入力部100は、第1の実施形態のメモリ構造初期化装置における平文入力部100と実質的に同じであるので、説明を省略する。ナンス割り当て部101は、第1の実施形態のメモリ構造初期化装置におけるナンス割り当て部101と実質的に同じであるので、説明を省略する。
 タグ生成部102cは、平文入力部100が出力する平文Mと、ナンス割り当て部101が出力するナンス集合Nと、秘密鍵K_1,K_2とを用いて、改ざん検知用のタグおよび暗号文を生成する。中間ノードとルートノードのためのタグ生成にはMACを用いるとし、平文(リーフノード)の暗号化およびタグ生成には認証暗号(AE)を用いるとする。AEのアルゴリズムには、例えばOCB(Offset CodeBook)などが挙げられる。
 まず、タグ生成部102cは、リーフノードで用いる暗号文とタグとして、以下の式42で表されるデータを生成する。
(式42)
 TagLeaf=((C[1],Tag(d,1)),(C[2],Tag(d,2)),・・・,(C[2^d],Tag(d,2^d)))
 (C[j_d],Tag(d,j_d))=AE.Enc_{K_1}(N(d,j_d),M[j_d])
 ただし、1<=j_d<=2^d
 なお、AE.Enc_{K_1}(・,・)はAEの暗号化関数を表す。また、C[j_d]は、j_d番目の暗号文ブロックを示す。
 次に、タグ生成部102cは、中間ノードで用いるタグとして、以下の式43で表されるデータを生成する。
(式43)
 TagInter=(Tag(1,1),・・・,Tag(d-1,2^{d-1}))
 Tag(i,j_i)=MAC_{K_2}((N(i,j_i),N(i+1,2j_i-1)||N(i+1,2j_i))
 ただし、1<=i<=d-1,1<=j_i<=2^i
 次に、タグ生成部102cは、ルートノードで用いるタグとして、以下の式44で表されるデータを生成する。
(式44)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_{K_2}(N(0,1),N(1,1)||N(1,2))
 式42,式43,式44から、各ノードに対応するタグは、リーフノードでは、自ノードに対応する平文ブロックを平文として、自ノードのナンスとその平文とを入力としたAEの計算結果に対応する。また、この計算結果として、暗号文ブロックが出力される。また、各ノードに対応するタグは、リーフノード以外のノードでは、複数の子ノードのナンスの連結を平文とし、自ノードのナンスとその平文とを入力としたMACの計算結果に対応する。
 図13に例示するように、木構造全体の深さdがd=3の場合、式42,式43,式44は、以下の式45で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式45)
For 0<=i<=3,1<=j_i<=2^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_{K_2}(N(i,j_i),N(i+1,2j_i-1)||N(i+1,2j_i))
 (For i=3) (C[j_i],Tag(i,j_i))=AE.Enc_{K_1}(N(i,j_i),M[j_i])
 そして、タグ生成部102cは、タグ集合TagLeafをリーフノード生成部103cに出力する。また、タグ生成部102cは、タグ集合TagInterを中間ノード生成部104に出力する。また、タグ生成部102cは、タグ集合TagRootをルートノード生成部105に出力する。
 リーフノード生成部103cは、タグ生成部102cが出力する暗号文およびタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=2^dである。そして、j_d番目のリーフノードは、以下の式46で示すように生成される。
(式46)
 (N(d,j_d),C[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式47のように記述する。
(式47)
 Leaf=((N(d,1),C[1],Tag(d,1)),((N(d,2),C[2],Tag(d,2)),・・・,(N(d,2^d),C[2^d],Tag(d,2^d)))
 図13に示すように、木構造全体の深さがd=3の場合、各リーフノードは、以下の式48のように表される。
(式48)
 Leaf=((N(3,1),C[1],Tag(3,1)),(N(3,2),C[2],Tag(3,2)),・・・,(N(3,8),C[8],Tag(3,8)))
 リーフノード生成部103cは、生成されたリーフノード集合Leafを木構造出力部106に出力する。
 中間ノード生成部104は、第1の実施形態のメモリ構造初期化装置10における中間ノード生成部104と実質的に同じであるので、説明を省略する。ルートノード生成部105は、第1の実施形態のメモリ構造初期化装置10におけるルートノード生成部105と実質的に同じであるので、説明を省略する。木構造出力部106は、第1の実施形態のメモリ構造初期化装置10における木構造出力部106と実質的に同じであるので、説明を省略する。
[メモリ検証装置の構成の説明]
 第3の実施形態にかかるメモリ検証装置20cは、木構造入力部200と、検証箇所入力部202と、タグ検証部203cと、検証結果出力部204と、を備える。木構造入力部200は、第1の実施形態のメモリ検証装置20における木構造入力部200と実質的に同じであるので、説明を省略する。検証箇所入力部202は、第1の実施形態のメモリ検証装置20における検証箇所入力部202と実質的に同じであるので、説明を省略する。
 タグ検証部203cは、木構造Treeと、検証箇所CheckNodeと、秘密鍵K_1,K_2とを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部203cは、検証結果を検証結果出力部204に出力する。まず、タグ検証部203cは、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。ここで、パスPathとは、当該リーフノードからルートノードまでのノードの道のりを示すもので、以下の式49で表される。
(式49)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、Pathの各要素(i,j_i)は、深さiにおけるj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式50で定義される。
(式50)
 p_i=ceiling(p_{i+1}/2)
 但し、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 次に、タグ検証部203cは、木構造入力部200の出力である木構造Treeと、秘密鍵K_1,K_2とを用いて以下の式51を計算する。
(式51)
 AE.Dec_{K_1}(N(d,p_d),C[p_d],Tag(d,p_d))
 上記の計算結果がエラーメッセージ⊥の場合、タグ検証部203cは、検証結果BをB=NCKと定義し、Bを出力して処理を終了する。なお、AE.Dec_{K_1}(・,・,・)は、第3の実施形態におけるメモリ構造初期化装置10cのタグ生成部102cで用いられている方式AE.Enc_{K_1}に対応する復号関数である。また、NCKは、パスに関わるノードの情報が改ざんされていることを示す。
 一方、上記の計算結果が平文M[p_d]である場合、つまり、暗号文C[p_d]が正しく復号されたことを示す場合、タグ検証部203cは、続けて以下の式52を計算する。
(式52)
 PathTag’=(Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(i,p_i)=MAC_{K_2}(N(i,p_i),N(i+1,2p_i-1)||N(i+1,2p_i))
 ただし、0<=i<=d-1
 ここで、MAC_{K_2}(・)は、第3の実施形態におけるメモリ構造初期化装置10cのタグ生成部102cで用いられているMAC方式と実質的に同じであるので、説明を省略する。また、第1の実施形態と同様に、Tag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのナンスを入力し、MAC関数の入力の平文部分に当該ノードの子ノードのナンスを2個連結して入力することによって、得られる。
 次に、タグ検証部203cは、木構造入力部200の出力である木構造Treeから、以下の式53で表される値を取得する。
(式53)
 PathTag=(Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部203cは、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=d-1のとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部203cは、検証結果をACKに設定する。ここで、ACKは、パスに関わるノードの情報が改ざんされていないことを示す。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=d-1のとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部203cは、検証結果をNCKに設定する。
 タグ検証部203cは検証結果Bを出力する。
 検証結果出力部204は、第1の実施形態のメモリ検証装置20における検証結果出力部204と実質的に同じであるので、説明を省略する。
[メモリ更新装置の構成の説明]
 第3の実施形態にかかるメモリ更新装置30cは、木構造入力部300と、更新箇所入力部302と、メモリ検証部303cと、ナンス更新部304と、タグ更新部305cと、更新結果出力部306と、更新判定部310と、平文更新部312と、を備える。木構造入力部300は、第1の実施形態のメモリ更新装置30における木構造入力部300と実質的に同じであるので、説明を省略する。更新箇所入力部302は、第1の実施形態のメモリ更新装置30における更新箇所入力部302と実質的に同じであるので、説明を省略する。更新判定部310は、第1の実施形態のメモリ更新装置30における更新判定部310と実質的に同じであるので、説明を省略する。
 メモリ検証部303cは、木構造Treeと、メモリの更新情報UpdateNodeと、秘密鍵K_1,K_2とを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部303cは、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部303cが行う検証処理は、第3の実施形態のメモリ検証装置20cにおけるタグ検証部203cと実質的に同じであるが、出力結果が異なる。第3の実施形態のメモリ検証装置20cにおけるタグ検証部203cは検証結果Bを出力するが、メモリ検証部303cは、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。メモリ検証部303cは、検証結果Bを、平文更新部312、ナンス更新部304、タグ更新部305c及び更新結果出力部306に出力する。また、メモリ検証部303cは、パスPathを、ナンス更新部304及びタグ更新部305cに出力する。
 なお、メモリ検証部303cのその他の機能については、第1の実施形態にかかるメモリ検証部303の機能と実質的に同様であるので、説明を省略する。つまり、メモリ検証部303cは、メモリ検証部303と同様に、更新判定部310の判定結果に応じて、リーフノードのタグを検証しない場合がある。
 平文更新部312は、第1の実施形態のメモリ更新装置30における平文更新部312と実質的に同様であるので、説明を省略する。また、ナンス更新部304は、第1の実施形態のメモリ更新装置30におけるナンス更新部304と実質的に同じであるので、説明を省略する。
 タグ更新部305cは、更新結果の木構造NewTree’と、ナンス集合Nと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵K_1,K_2とを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部305cは、0<=i<=d-1に対して、以下の式54の計算を行う。
(式54)
 (C[p_d],Tag(d,p_d))←AE.Enc_{K_1}(N(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_{K_2}(N(i,p_i),N(i+1,2p_i-1)||N(i+1,2p_i))
 なお、AE.Enc_{K_1}(・,・)およびMAC_{K_2}(・)、は、第3の実施形態におけるメモリ構造初期化装置10cのタグ生成部102cや、メモリ検証装置20cのタグ検証部203cで用いられている方式と実質的に同じである。そして、タグ更新部305cは、更新結果の木構造NewTreeを出力する。一方、B=NCKの場合は、タグ更新部305cは処理を行わず、何も出力しない。
 更新結果出力部306は、第1の実施形態のメモリ更新装置30における更新結果出力部306と実質的に同じであるので、説明を省略する。
[効果の説明]
 第3の実施形態が奏する効果は、第1の実施形態が奏する効果に加えて、メモリの秘匿が可能であることである。第1の実施形態では、平文メッセージの改ざん検知のためにMACを用いていた。これに対し、第3の実施形態では、平文メッセージにAE処理を施すことにより、改ざん検知に加えて平文メッセージの秘匿が可能となる。また、一般的に、AEの計算量は、MACの計算量以上である。したがって、本実施形態のように、更新処理の際にリーフノードの完全性検証を不要にすることを可能にすることで、計算量の大きなAEの計算を削減することができ、これにより、検証に要する計算量をさらに削減することができる。したがって、メモリの内容を更新する際に、ノードの検証処理をさらに効率的に行うことが可能となる。
 また、用いるAEが、OCBのようなレート1の方式、すなわち平文の暗号化と認証タグ生成とを暗号化のみのコストで実現できるという性質を持つ方式であって、かつ、平文と暗号文のデータ量が同一になるような方式を採用できるとする。この場合、第1の実施形態と比較して、木構造全体のデータ量や、各装置で必要な計算量は、ほぼ変化しない。つまり、第3の実施形態は、第1の実施形態と同等のデータ量及び計算量で、改ざん検知に加えて秘匿も可能となる。また、第3の実施形態の木構造では2分木を仮定していたが、第2の実施形態のように、分岐数を増やした木構造を用いることも当然に可能である。
(第4の実施形態)
 次に、第4の実施形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。第4の実施形態にかかる構成は、上述した特許文献3の構成を改良したものに対応する。
 第4の実施形態では、メモリ保護システムで構成される木構造が、分岐数が2であり、深さがdの場合の例について説明する。つまり、第4の実施形態におけるリーフノードの数は、2^d個となる。また、ルートノードの深さは0、リーフノードの深さはdと定義する。
 第4の実施形態にかかるメモリ保護システム1(情報処理システム)は、メモリ構造初期化装置12と、メモリ検証装置22と、メモリ更新装置32と、を備える。第4の実施形態のメモリ保護システム1は、図1のメモリ構造初期化装置10、メモリ検証装置20およびメモリ更新装置30を、それぞれ、メモリ構造初期化装置12、メモリ検証装置22およびメモリ更新装置32に置き換えたものに対応する。メモリ構造初期化装置12、メモリ検証装置22およびメモリ更新装置32は、物理的に一体であってもよいし、別個であってもよい。また、図14~図16を用いて後述する各装置の構成要素が、別の装置で実現されてもよい。
 なお、後述する他の実施形態で参照する場合、メモリ構造初期化装置12は、メモリ構造初期化装置12a,12cと表記され得る。同様に、後述する他の実施形態で参照する場合、メモリ検証装置22は、メモリ検証装置22a,22cと表記され得る。同様に、後述する他の実施形態で参照する場合、メモリ更新装置32は、メモリ更新装置32a,32cと表記され得る。なお、図14~図16で示す構成要素についても同様である。
 図14は、第4の実施形態にかかるメモリ構造初期化装置12の構成例を示すブロック図である。図15は、第4の実施形態にかかるメモリ検証装置22の構成例を示すブロック図である。図16は、第4の実施形態にかかるメモリ更新装置32の構成例を示すブロック図である。また、図17は、第4の実施形態にかかるメモリ構造初期化装置12の処理手順の例を示すフローチャートである。図18は、第4の実施形態にかかるメモリ検証装置22の処理手順の例を示すフローチャートである。図19~図21は、第4の実施形態にかかるメモリ更新装置32の処理手順の例を示すフローチャートである。図14~図21については後述する。
 第4の実施形態にかかるメモリ保護システム1において、メモリ構造初期化装置12は、改ざん検知を行いたい平文(平文メッセージ)を入力として、初期状態の木構造と木構造における各ノードのメモリアドレス集合とを出力する。ただし、平文は2^d個の平文ブロックの結合で表す。つまり、以下の式55が成り立つ。
(式55)
 M=M[1]||M[2]||・・・||M[2^d]
 また、1つの平文ブロックはBlockビットと定義される。
 メモリ検証装置22は、改ざんをチェックしたい平文(平文ブロック)の格納場所と木構造、および木構造における各ノードのメモリアドレスを入力として、その格納場所に対応するメモリが改ざんされているか否かを検証する。メモリ更新装置32は、更新したい平文(平文ブロック)の格納場所とその更新内容、木構造、および木構造における各ノードのメモリアドレスを入力とする。そして、メモリ更新装置32は、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
 図22は、第4の実施形態にかかるメモリ保護システム1によって構成される木構造の例を示す図である。図22には、d=3の場合の木構造が示されている。なお、Root,Inter,Leafについては後述する。
[メモリ構造初期化装置の構成の説明]
 図14は、第4の実施形態にかかるメモリ構造初期化装置12の構成例を示すブロック図である。図14に示すように、第4の実施形態にかかるメモリ構造初期化装置12は、平文入力部120と、メモリアドレス割り当て部121と、タグ生成部122と、を備える。また、メモリ構造初期化装置12は、リーフノード生成部123と、中間ノード生成部124と、ルートノード生成部125と、木構造出力部126と、メモリアドレス出力部127と、を備える。
 平文入力部120は、平文入力手段としての機能を有する。メモリアドレス割り当て部121は、メモリアドレス割り当て手段としての機能を有する。タグ生成部122は、タグ生成手段としての機能を有する。リーフノード生成部123は、リーフノード生成手段としての機能を有する。中間ノード生成部124は、中間ノード生成手段としての機能を有する。ルートノード生成部125は、ルートノード生成手段としての機能を有する。木構造出力部126は、木構造出力手段としての機能を有する。メモリアドレス出力部127は、メモリアドレス出力手段としての機能を有する。
 メモリ構造初期化装置12は、例えばコンピュータである。なお、メモリ構造初期化装置12は、中央演算装置においてソフトウェアプログラムを実行することで、図14に示す各構成要素を実現してもよい。また、メモリ構造初期化装置12において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 平文入力部120は、保護対象となる平文Mの入力を受け付ける。平文入力部120は、受け付けた平文Mをタグ生成部122に出力する。ここで、平文入力部120が平文Mの入力を受け付ける方法は、特定の方法に限定されない。例えば、平文入力部120が、キーボードなどの文字入力装置を備え、平文Mを入力するユーザ操作を受け付けるようにしてもよい。あるいは、平文入力部120が、他の装置から平文Mを受信するようにしてもよい。
 メモリアドレス割り当て部121は、木構造の各ノードに、ノード固有のメモリアドレス情報を割り当てる。そして、メモリアドレス割り当て部121は、メモリアドレス情報を、タグ生成部122及びメモリアドレス出力部127に出力する。ここで、ノードの個数及び各ノードのデータ量は予め定められているため、各ノードの中身の情報を定義する前にメモリアドレスを割り当てることが可能である。また、メモリアドレス情報は、その性質上、各ノードに対して一意に定まるものである。つまり、メモリアドレス情報は、各ノードに対して固有である。これにより、ノード間のデータ入れ替え攻撃を防止することができる。
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、深さiでj_i番目のノードに割り当てるメモリアドレスを、add(i,j_i)で表す。そして、木構造の全てのノードに割り当てられたメモリアドレス情報を、メモリアドレス集合Addとして、以下の式56のように記述する。
(式56)
 Add=(add(0,1),add(1,1),add(1,2),add(2,1),add(2,2),・・・,add(d,2^d-1),add(d,2^d))
 ここで、「add(0,1)」は、ルートノードのメモリアドレスに対応する。また、「add(d,1),・・・,add(d,2^d)」は、複数のリーフノードのメモリアドレスに対応する。なお、その他は中間ノードのメモリアドレスに対応する。
 また、メモリアドレスをadd(a,b)と表記する場合、aは、そのメモリアドレスが割り当てられるノードの、木構造における深さを示す。また、bは、そのメモリアドレスが割り当てられるノードの、深さaにおける順番(序数)を示す。このことは、後述するタグの表記Tag(a,b)についても同様である。
 タグ生成部122は、平文入力部120が出力する平文Mと、メモリアドレス割り当て部121が出力するメモリアドレス集合Addと、秘密鍵Kとを用いて、改ざん検知用のタグを生成する。タグ生成には、上述したMAC関数が用いられる。まず、タグ生成部122は、リーフノードで用いるタグとして、以下の式57で表されるデータを生成する。
(式57)
 TagLeaf=((M[1],Tag(d,1)),(M[2],Tag(d,2)),・・・,(M[2^d],Tag(d,2^d)))
 Tag(d,j_d)=MAC_K(add(d,j_d)||ctr(d,j_d),M[j_d])
 ただし、1<=j_d<=2^d
 なお、ctr(d,j_d)は、深さdにおけるj_d番目のリーフノードのカウンタ値を表しており、当該ノードが更新されるたびに1が足される。ここでは、全てのj_dに対してctr(d,j_d)=0^{CTR-1}||1と定義する。また、CTRは各ノードに格納されるローカルカウンタ値のビット長であり、「0^{CTR-1}」は0がCTR-1個連結したビット列を表す。CTRの値は予め決定されていると仮定する。
 次に、タグ生成部122は、中間ノードで用いるタグとして、以下の式58で表されるデータを生成する。
(式58)
 TagInter=(Tag(1,1),・・・,Tag(d-1,2^{d-1}))
 Tag(i,j_i)=MAC_K(add(i,j_i)||ctr(i,j_i),ctr(i+1,2j_i-1)||ctr(i+1,2j_i))
 ただし、1<=i<=d-1,1<=j_i<=2^i
 次に、タグ生成部122は、ルートノードで用いるタグとして、以下の式59で表されるデータを生成する。
(式59)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_K(add(0,1)||ctr(0,1),ctr(1,1)||ctr(1,2))
 式57,式58,式59から、各ノードに対応するタグは、以下の通りである。すなわち、各ノードに対応するタグは、リーフノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、自ノードに対応する平文ブロックを平文とし、そのナンスと平文とを入力としたMACの計算結果に対応する。また、各ノードに対応するタグは、リーフノード以外のノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、複数の子ノードのローカルカウンタ値の連結を平文とし、そのナンスと平文とを入力としたMACの計算結果に対応する。
 図22に例示するように、木構造全体の深さdがd=3の場合、各ノードに対応するタグは、以下の式60で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式60)
For 0<=i<=3,1<=j_i<=2^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_K(add(i,j_i)||ctr(i,j_i),ctr(i+1,2j_i-1)||ctr(i+1,2j_i))
 (For i=3) Tag(i,j_i)=MAC_K(add(i,j_i)||ctr(i,j_i),M[j_i])
 そして、タグ生成部122は、タグ集合TagLeafをリーフノード生成部123に出力する。また、タグ生成部122は、タグ集合TagInterを中間ノード生成部124に出力する。また、タグ生成部122は、タグ集合TagRootをルートノード生成部125に出力する。
 リーフノード生成部123は、タグ生成部122が出力するタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=2^dである。そして、j_d番目のリーフノードは、以下の式61で示すように生成される。
(式61)
 (ctr(d,j_d),M[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式62のように記述する。
(式62)
 Leaf=((ctr(d,1),M[1],Tag(d,1)),((ctr(d,2),M[2],Tag(d,2)),・・・,(ctr(d,2^d),M[2^d],Tag(d,2^d)))
 また、リーフノード生成部123は、生成されたリーフノード集合Leafを木構造出力部126に出力する。
 中間ノード生成部124は、タグ生成部122が出力するタグ集合TagInterを用いて、木構造の中間ノードを生成する。ここで、中間ノードでは、1<=i<=d-1,1<=j_i<=2^iである。そして、深さiにおけるj_i番目の中間ノードは、以下の式63で示すように生成される。
(式63)
 (ctr(i,j_i),Tag(i,j_i))
 ただし、全てのi,j_iに対してctr(i,j_i)=0^{CTR-1}||1と定義する。
 また、全ての中間ノードを以下の式64のように記述する。
(式64)
 Inter=((ctr(1,1),Tag(1,1)),(ctr(1,2),Tag(1,2)),・・・,(ctr(d-1,2^{d-1}),Tag(d-1,2^{d-1})))
 図22に示すように、木構造全体の深さがd=3の場合、各中間ノードは、以下の式65のように表される。
(式65)
 Inter=((ctr(1,1),Tag(1,1)),(ctr(1,2),Tag(1,2)),・・・,(ctr(2,4),Tag(2,4)))
 また、中間ノード生成部124は、生成された中間ノード集合Interを木構造出力部126に出力する。
 ルートノード生成部125は、タグ生成部122が出力するタグTagRootを用いて、木構造のルートノードを生成する。ルートノードは以下の式66で示すように生成される。ただし、ctr(0,1)=0^{CTR-1}||1と定義する。
(式66)
 Root=(ctr(0,1),Tag(0,1))
 また、ルートノード生成部125は、生成されたルートノードRootを木構造出力部126に出力する。
 木構造出力部126は、リーフノード生成部123が出力するリーフノード集合Leafと、中間ノード生成部124が出力する中間ノード集合Interと、ルートノード生成部125が出力するルートノードRootとを連結する。そして、木構造出力部126は、連結されたデータ列を、木構造を示すデータ(木構造Tree)として、コンピュータディスプレイやプリンタなどへ出力する。メモリアドレス出力部127は、メモリアドレス割り当て部121が出力するメモリアドレスAddをコンピュータディスプレイやプリンタなどへ出力する。
[メモリ検証装置の構成の説明]
 図15は、第4の実施形態にかかるメモリ検証装置22の構成例を示すブロック図である。図15に示すように、第4の実施形態にかかるメモリ検証装置22は、木構造入力部220と、メモリアドレス入力部221と、検証箇所入力部222と、タグ検証部223と、検証結果出力部224と、を備える。
 木構造入力部220は、木構造入力手段としての機能を有する。メモリアドレス入力部221は、メモリアドレス入力手段としての機能を有する。検証箇所入力部222は、検証箇所入力手段としての機能を有する。タグ検証部223は、タグ検証手段としての機能を有する。検証結果出力部224は、検証結果出力手段としての機能を有する。
 メモリ検証装置22は、例えばコンピュータである。なお、メモリ検証装置22は、中央演算装置においてソフトウェアプログラムを実行することで、図15に示す各構成要素を実現してもよい。また、メモリ検証装置22において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 木構造入力部220は、検証対象となるメモリを保護するための木構造Treeの入力を受け付ける。そして、木構造入力部220は、木構造Treeをタグ検証部223に出力する。ここで、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、及び、ルートノードRootにより構成される。木構造Treeは、木構造出力部126によって出力された、リーフノード集合Leafと中間ノード集合InterとルートノードRootとが連結されたデータ列であってもよい。
 メモリアドレス入力部221は、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。そして、メモリアドレス入力部221は、メモリアドレス集合Addをタグ検証部223に出力する。なお、Addは以下の式67のように記述される。
(式67)
 Add=(add(0,1),add(1,1),add(1,2),add(2,1),add(2,2),・・・,add(d,2^d-1),add(d,2^d))
 ただし、0<=i<=d,1<=j_i<=2^{i}のとき、深さiにおいてj_i番目のノードのメモリアドレスを、add(i,j_i)で表す。
 検証箇所入力部222は、メモリの検証箇所CheckNodeの入力を受け付ける。そして、検証箇所入力部222は、検証箇所CheckNodeをタグ検証部223に出力する。なお、CheckNodeは、メモリの検証箇所に対応するノードを示すデータである。具体的には、CheckNodeは、1以上2^d以下の数値であり、検証箇所がリーフノードのCheckNode番目であることを表す。つまり、CheckNodeは、検証箇所に対応するリーフノードの位置(順番;序数)を示す。
 タグ検証部223は、木構造Treeと、メモリアドレス集合Addと、検証箇所CheckNodeと、秘密鍵Kとを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部223は、検証結果を検証結果出力部224に出力する。まず、タグ検証部223は、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。ここで、パスPathとは、当該リーフノードからルートノードまでのノードの道のりを示すデータである。パスPathは、以下の式68で表される。
(式68)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、Pathの各要素(i,j_i)は、深さiにおいてj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式69で定義される。
(式69)
 p_i=ceiling(p_{i+1}/2)
 ただし、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 次に、タグ検証部223は、メモリアドレス入力部221の出力であるAddと、木構造入力部220の出力である木構造Treeと、秘密鍵Kとを用いて、以下の式70を計算する。
(式70)
 PathTag’=(Tag’(d,p_d),Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(d,p_d)=MAC_K(add(d,p_d)||ctr(d,p_d),M[p_d])
 Tag’(i,p_i)=MAC_K(add(i,p_i)||ctr(i,p_i),ctr(i+1,2p_i-1)||ctr(i+1,2p_i))
 ただし、0<=i<=d-1
 ここで、MAC_Kは、第4の実施形態におけるメモリ構造初期化装置12のタグ生成部122で用いられている方式と実質的に同じであるので、説明を省略する。また、Tag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのアドレスとローカルカウンタとの連結を入力し、MAC関数の入力の平文部分に当該ノードの子ノードのローカルカウンタを2個連結して入力することによって、得られる。
 次に、タグ検証部223は、木構造入力部220の出力である木構造Treeから、以下の式71で表される値を取得する。
(式71)
 PathTag=(Tag(d,p_d),Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部223は、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=dのとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部223は、検証結果をACKに設定する。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=dのとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部223は、検証結果をNCKに設定する。また、検証結果がNCKであることを、B=NCKと表記する。
 タグ検証部223は、検証結果Bを検証結果出力部224に出力する。
 検証結果出力部224は、タグ検証部223が出力する検証結果Bを、コンピュータディスプレイやプリンタなどへ出力する。
[メモリ更新装置の構成の説明]
 図16は、第4の実施形態にかかるメモリ更新装置32の構成例を示すブロック図である。図16に示すように、第4の実施形態にかかるメモリ更新装置32は、木構造入力部320と、メモリアドレス入力部321と、更新箇所入力部322と、メモリ検証部323と、カウンタ更新部324と、タグ更新部325と、更新結果出力部326と、を備える。また、第4の実施形態にかかるメモリ更新装置32は、更新判定部330と、平文更新部332と、を備える。
 木構造入力部320は、木構造入力手段としての機能を有する。メモリアドレス入力部321は、メモリアドレス入力手段としての機能を有する。更新箇所入力部322は、更新箇所入力手段としての機能を有する。メモリ検証部323は、メモリ検証手段としての機能を有する。カウンタ更新部324は、カウンタ更新手段としての機能を有する。タグ更新部325は、タグ更新手段としての機能を有する。更新結果出力部326は、更新結果出力手段としての機能を有する。更新判定部330は、更新判定手段としての機能を有する。平文更新部332は、平文更新手段としての機能を有する。
 メモリ更新装置32は、例えばコンピュータである。なお、メモリ更新装置32は、中央演算装置においてソフトウェアプログラムを実行することで、図16に示す各構成要素を実現してもよい。また、メモリ更新装置32において実現される各構成要素は、個々の装置、又は機能部もしくは電子回路として実現してもよい。このことは、後述する他の実施形態についても同様である。
 木構造入力部320は、更新対象となるメモリを保護するための木構造Treeの入力を受け付ける。そして、木構造入力部320は、図16の一点鎖線で示すように、木構造Treeをメモリ検証部323及びカウンタ更新部324に出力する。また、木構造入力部320は、木構造Treeを平文更新部332に出力してもよい。ここで、上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、ルートノードRootにより構成される。なお、木構造入力部320の機能は、第4の実施形態にかかるメモリ検証装置22における木構造入力部220の機能と実質的に同じであるので、説明を省略する。
 メモリアドレス入力部321は、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。そして、メモリアドレス入力部321は、図16の実線で示すように、メモリアドレス集合Addを、メモリ検証部323及びタグ更新部325に出力する。なお、メモリアドレス入力部321の機能は、第4の実施形態にかかるメモリ検証装置22におけるメモリアドレス入力部221の機能と実質的に同じであるので、説明を省略する。
 更新箇所入力部322は、メモリの更新情報UpdateNodeの入力を受け付ける。そして、更新箇所入力部322は、図16の点線で示すように、メモリの更新情報UpdateNodeを、更新判定部330、平文更新部332、メモリ検証部323及びタグ更新部325に出力する。ここで、上述したように、メモリの更新情報UpdateNodeは、木構造において更新されるノードに関する情報である。UpdateNodeは、上述した第1の実施形態のものと実質的に同様であるので、説明を省略する。
 更新判定部330は、更新情報UpdateNodeを用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。更新判定部330の機能は、第1の実施形態にかかる更新判定部310の機能と実質的に同様であるので説明を省略する。
 メモリ検証部323は、木構造Treeと、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、秘密鍵Kとを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部323は、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部323が行う処理は、第4の実施形態のメモリ検証装置22におけるタグ検証部223の処理と実質的に同じであるが、出力結果が異なる。第4の実施形態のメモリ検証装置22におけるタグ検証部223は検証結果Bを出力するが、メモリ検証部323は、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。メモリ検証部323は、図16の太い破線で示すように、検証結果Bを、カウンタ更新部324、タグ更新部325及び更新結果出力部326に出力する。また、メモリ検証部323は、検証結果Bを、平文更新部332に出力してもよい。また、メモリ検証部323は、図16の太い実線で示すように、パスPathを、カウンタ更新部324及びタグ更新部325に出力する。
 Pathは以下の式72のように表される。
(式72)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここでは、メモリ検証部323が行う操作から、p_d=UpdateIndexとなることが分かる。
 つまり、メモリ検証部323は、木構造において、リーフノードからルートノードへのパスPathを生成する。また、メモリ検証部323は、パスPathにおける各ノードにおいて、少なくとも各ノードで固有のメモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとしてMACに入力することで検証に用いられるタグを生成する。これにより、メモリ検証部323は、各ノードに格納されているタグを検証する。つまり、メモリ検証部323は、上述した式70を計算することにより、パスPathにおける各ノードについて、タグTag’を生成する。メモリ検証部323は、各ノードについて、生成されたタグTag’と格納されているタグTag(Treeに関するタグ)とを比較して、両者が一致するか否かを判定する。これにより、メモリ検証部323は、各ノードについて改ざんがなされていないかを検証する。つまり、メモリ検証部323は、各ノードについて完全性検証を行う。そして、メモリ検証部323は、検証結果Bを出力する。
 ここで、第4の実施形態にかかるメモリ検証部323は、第1の実施形態にかかるメモリ検証部303と同様に、更新判定部330の判定結果に応じて、リーフノードのタグを検証しない場合がある。具体的には、リーフノードの更新内容が更新前の平文に依存するものでない場合、メモリ検証部323は、パスPathにおけるリーフノード以外のノードのタグを検証する。一方、リーフノードの更新内容が更新前の平文に依存するものである場合、メモリ検証部323は、パスPathにおけるリーフノードを含む全てのノードのタグを検証する。
 平文更新部332は、検証結果Bが改ざんの検知がないことを示す場合に、更新情報UpdateNodeに基づいて、リーフノードにおける更新対象の平文を更新する。平文更新部332の機能は、第1の実施形態にかかる平文更新部312の機能と実質的に同様であるので説明を省略する。
 カウンタ更新部324は、木構造Treeと、検証結果Bと、パスPathとを用いて、Pathで指定されるノードの情報を更新する。B=ACKである場合、以下の処理を行う。まず、カウンタ更新部324は、Pathで指定されるノードのカウンタ値に1を足してカウンタ値を更新する。つまり、0<=i<=dに対して、カウンタ更新部324は以下の式73の計算を行う。
(式73)
 ctr(i,p_i)←ctr(i,p_i)+1
 ただし、a←bはaをbで更新することを表す。そして、カウンタ更新部324は、更新結果の木構造NewTree’を、タグ更新部325に出力する。一方、B=NCKの場合は、カウンタ更新部324は処理を行わず、何も出力しない。
 タグ更新部325は、更新結果の木構造NewTree’と、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵Kとを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部325は、0<=i<=d-1に対して、以下の式74の計算を行う。
(式74)
 Tag(d,p_d)←MAC_K(add(d,p_d)||ctr(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_K(add(i,p_i)||ctr(i,p_i),ctr(i+1,2p_i-1)||ctr(i+1,2p_i))
 なお、MAC_Kは、第4の実施形態におけるメモリ構造初期化装置12のタグ生成部122や、メモリ検証装置22のタグ検証部223で用いられている方式と同じである。また、Tag(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのアドレスとローカルカウンタとの連結を入力し、MAC関数の入力の平文部分に当該ノードの子ノードのローカルカウンタを2個連結して入力することによって、得られる。
 そして、タグ更新部325は、更新結果の木構造NewTreeを、更新結果出力部326に出力する。新たな木構造NewTreeは、更新後のリーフノード集合Leafと、更新後の中間ノード集合Interと、更新後のルートノードRootとによって構成される。なお、式62に示すように、更新後の平文の情報は、更新後のリーフノード集合Leafに含まれている。一方、B=NCKの場合は、タグ更新部325は処理を行わず、何も出力しない。
 更新結果出力部326は、メモリ検証部323が出力する検証結果Bと、タグ更新部325が出力する木構造NewTreeを用いて、更新結果を出力する。B=ACKである場合、更新結果出力部326は、NewTreeをコンピュータディスプレイやプリンタなどへ出力する。なお、更新結果出力部326は、NewTreeとは別個にUpdateNodeを出力してもよい。一方、B=NCKである場合、更新結果出力部326は、検証結果B=NCKをコンピュータディスプレイやプリンタなどへ出力する。
[動作の説明]
 図17は、メモリ構造初期化装置12の動作(メモリ構造初期化方法)を示すフローチャートである。ステップS121において、平文入力部120は、保護対象となる平文Mの入力を受け付ける。ステップS122において、メモリアドレス割り当て部121は、木構造の各ノードにメモリアドレスを割り当て、メモリアドレス集合Addを生成する。ステップS123において、タグ生成部122は、平文Mとメモリアドレス集合Addを用いて、改ざん検知用のタグ集合(TagLeaf,TagInter,TagRoot)を生成する。
 ステップS124において、リーフノード生成部123は、タグ生成部122が出力するタグ集合TagLeafを用いて、木構造のリーフノード集合Leafを生成する。ステップS125において、中間ノード生成部124は、タグ生成部122が出力するタグ集合TagInterを用いて、木構造の中間ノード集合Interを生成する。ステップS126において、ルートノード生成部125は、タグ生成部122が出力するタグTagRootを用いて、木構造のルートノードRootを生成する。
 ステップS127において、木構造出力部126は、リーフノード集合Leafと、中間ノード集合Interと、ルートノードRootとを連結して、木構造を示す連結されたデータ列をコンピュータディスプレイやプリンタなどへ出力する。また、メモリアドレス出力部127は、メモリアドレス割り当て部121が出力するメモリアドレスAddをコンピュータディスプレイやプリンタなどへ出力する。ステップS127の後、メモリ構造初期化装置12は、図17の処理を終了する。
 図18は、メモリ検証装置22の動作(メモリ検証方法)を示すフローチャートである。ステップS221において、木構造入力部220は、検証対象となるメモリを保護するための木構造Treeの入力を受け付ける。なお、上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、及び、ルートノードRootにより構成される。また、メモリアドレス入力部221は、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。さらに、検証箇所入力部222は、メモリの検証箇所CheckNodeの入力を受け付ける。
 ステップS222において、タグ検証部223は、木構造Treeと、メモリアドレス集合Addと、検証箇所CheckNodeとを用いて、各ノードのタグの検証を行う。これにより、タグ検証部223は、CheckNodeが指定するメモリが改ざんされていないか否かの検証を行う。さらに、タグ検証部223は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。ステップS223において、検証結果出力部224は、検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS223の後、メモリ検証装置22は、図18の処理を終了する。
 図19~図21は、メモリ更新装置32の動作(メモリ更新方法)を示すフローチャートである。ステップS320において、木構造入力部320は、更新対象となるメモリを保護するための木構造Treeの入力を受け付ける。上述したように、木構造Treeは、リーフノード集合Leaf、中間ノード集合Inter、ルートノードRootにより構成される。また、ステップS320において、メモリアドレス入力部321は、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。さらに、ステップS320において、更新箇所入力部322は、メモリの更新情報UpdateNodeの入力を受け付ける。上述したように、更新情報UpdateNodeは、UpdateNode=(UpdateIndex,UpdateInfo)と定義される。
 ステップS321において、更新判定部330は、更新情報UpdateNodeの更新内容UpdateInfoが、更新箇所UpdateIndexに対応する平文ブロックを固定値に置き換えるものであるか否かを判定する。具体的には、更新判定部330は、更新情報UpdateNodeの更新内容UpdateInfoに固定値が含まれるか否かを判定してもよい。更新情報UpdateNodeの更新内容UpdateInfoが、平文ブロックを固定値に置き換えるものである場合(S321の判定結果がYESの場合)、処理はステップS322に進む。一方、更新情報UpdateNodeの更新内容UpdateInfoが、平文ブロックを固定値に置き換えるものでない場合(S321の判定結果がNOの場合)、処理はステップS332に進む。
 図20に示すように、ステップS322において、メモリ検証部323は、木構造Treeと、メモリアドレス集合Addと、メモリの更新情報UpdateNodeとを用いて、リーフノード以外のノードのタグの検証を行う。これにより、メモリ検証部323は、各ノードについて改ざんがなされていないかを検証する。さらに、メモリ検証部323は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。そして、メモリ検証部323は、検証結果B、及び、メモリ検証のために用いたパスPathを出力する。B=ACK、すなわちメモリ改ざんが検知されない場合(S322:B=ACK(受理)の場合)、処理はステップS324へ進む。一方、B=NCK、すなわちメモリ改ざんが検知された場合(S322:B=NCK(不受理)の場合)、処理はステップS323へ進む。
 ステップS323において、更新結果出力部326は、メモリ検証部323が出力する検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS323の後、メモリ更新装置32は、処理を終了する。
 ステップS324において、カウンタ更新部324は、木構造入力部320が出力する木構造Treeと、メモリ検証部323が出力するパスPathを用いて、Pathで指定されるノードのカウンタを更新する。そして、カウンタ更新部324は、更新結果の新たな木構造NewTree’を出力する。
 ステップS325において、木構造NewTree’と、パスPathと、メモリの更新情報UpdateNodeとを用いて、リーフノードの平文、及び、パスPathに対応するタグが更新される。具体的には、平文更新部332は、更新情報UpdateNodeで示されるリーフノードの平文(平文ブロック)を更新する。また、タグ更新部325は、Pathで示されるノードのタグを更新する。そして、タグ更新部325は、更新結果の新たな木構造NewTreeを出力する。
 ステップS326において、更新結果出力部326は、タグ更新部325が出力する木構造NewTreeを出力する。ステップS326の後、メモリ更新装置32は、処理を終了する。
 一方、図21に示すように、ステップS332において、メモリ検証部323は、パスの全てのノードのタグの検証を行う。具体的には、メモリ検証部323は、木構造Treeと、メモリアドレス集合Addと、メモリの更新情報UpdateNodeとを用いて、UpdateNodeによって指定されるリーフノードに関するパスの全てのノードのタグの検証を行う。これにより、メモリ検証部323は、各ノードについて改ざんがなされていないかを検証する。さらに、メモリ検証部323は、受理(ACK)または不受理(NCK)を決定し、検証結果Bを出力する。そして、メモリ検証部323は、検証結果B、及び、メモリ検証のために用いたパスPathを出力する。B=ACK、すなわちメモリ改ざんが検知されない場合(S332:B=ACK(受理)の場合)、処理はステップS334へ進む。一方、B=NCK、すなわちメモリ改ざんが検知された場合(S332:B=NCK(不受理)の場合)、処理はステップS333へ進む。
 S323と同様にして、ステップS333において、更新結果出力部326は、メモリ検証部323が出力する検証結果Bをコンピュータディスプレイやプリンタなどへ出力する。ステップS333の後、メモリ更新装置32は、処理を終了する。
 S324と同様にして、ステップS334において、カウンタ更新部324は、木構造入力部320が出力する木構造Treeと、メモリ検証部323が出力するパスPathを用いて、Pathで指定されるノードのカウンタを更新する。そして、カウンタ更新部324は、更新結果の新たな木構造NewTree’を出力する。
 S325と同様にして、ステップS335において、木構造NewTree’と、パスPathと、メモリの更新情報UpdateNodeとを用いて、リーフノードの平文、及び、パスPathに対応するタグが更新される。具体的には、平文更新部332は、更新情報UpdateNodeで示されるリーフノードの平文(平文ブロック)を更新する。また、タグ更新部325は、Pathで示されるノードのタグを更新する。そして、タグ更新部325は、更新結果の新たな木構造NewTreeを出力する。
 S326と同様にして、ステップS336において、更新結果出力部326は、タグ更新部325が出力する木構造NewTreeを出力する。ステップS336の後、メモリ更新装置32は、処理を終了する。
[効果の説明]
 第4の実施形態にかかるメモリ更新装置32は、リーフノードに対応する平文を更新する場合に、更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。そして、メモリ更新装置32は、リーフノードの更新内容が更新前の平文に依存するものでないときに、リーフノードからルートノードへのパスにおけるリーフノード以外のノードのタグを検証する。ここで、特許文献3にかかる技術では、更新内容によらないで、パスの全てのノードについて検証が行われる。したがって、上記のような構成によって、検証に要する計算量を、特許文献3にかかる技術と比較して削減することが可能となる。したがって、第1の実施形態の場合と同様に、メモリの内容を更新する際に、ノードの検証処理を効率的に行うことが可能となる。
 また、上述したように、メモリの内容を更新する際に、木構造に対して改ざんが行われる可能性がある。一方、第1の実施形態の場合と同様に、第4の実施形態でも、リーフノードの更新内容が更新前の平文に依存しない場合、更新前のリーフノードに含まれる平文が改ざんされたとしても、その平文は、改ざんされた平文によらないデータに更新される。したがって、メモリの安全性が損なわれない。また、ローカルカウンタが改ざんされた場合についても、上述した第1の実施形態おいてナンスに改ざんがなされた場合と同様に、ローカルカウンタの改ざんが検出される。したがって、リーフノードの更新内容が更新前の平文に依存しない場合は、リーフノードについてのタグの検証を不要としても、安全性は損なわれない。
 また、全てのノードにおいて検証に必要な計算量が同じと仮定すると、深さdの木構造の場合、本実施形態にかかるメモリ更新装置32におけるメモリ検証処理の計算量は、特許文献2にかかる技術にかかる計算量に対して、(d-1)/d倍となる。リーフノードの検証処理のコストがそれ以外のノードの検証処理のコストよりも大きい場合、本実施形態にかかる方法による計算量の削減効果は、より大きくなる。また、深さdは、通常、整数1桁程度であり、比較的小さい。ここで、(d-1)/dは、dが小さいほど小さい。したがって、本実施形態にかかる方法による計算量の削減効果は、比較的大きい。
(第5の実施形態)
 次に、第5の実施形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。第5の実施形態は、第4の実施形態を変形したものである。したがって、以下の説明では、上述した第4の実施形態と異なる箇所について主に説明する。第5の実施形態にかかる構成は、上述した特許文献3の構成を改良したものに対応する。そして、第5の実施形態では、第4の実施形態と比較して、木構造の分岐数が異なる。第5の実施形態では、メモリ保護システムが構成する木構造の分岐数がbであり、深さがdである例について説明する。つまり、第5の実施形態におけるリーフノードの数はb^d個となる。
 図23は、第5の実施形態にかかるメモリ保護システムが構成する木構造の例を示す図である。図23には、分岐数b=3、深さd=3の場合の木構造が示されている。なお、Root,Inter,Leafについては、上述した第4の実施形態の場合と実質的に同様である。
 第5の実施形態にかかるメモリ保護システム1は、メモリ構造初期化装置12aと、メモリ検証装置22aと、メモリ更新装置32aと、を備える。第5の実施形態にかかるメモリ構造初期化装置12aは、改ざん検知を行いたい平文を入力として、初期状態の木構造と木構造における各ノードのメモリアドレス集合とを出力する。
 第5の実施形態において、平文は、b^d個の平文ブロックの結合で表される。つまり、以下の式75が成り立つ。
(式75)
 M=M[1]||M[2]||・・・||M[b^d]
 また、1つの平文ブロックはBlockビットと定義される。
 メモリ検証装置22aは、改ざんをチェックしたい平文ブロックの格納場所と木構造、および木構造における各ノードのメモリアドレスを入力として、その格納場所に対応するメモリが改ざんされているか否かを検証する。メモリ更新装置32aは、更新したい平文ブロックの格納場所とその更新内容、木構造、および木構造における各ノードのメモリアドレスを入力とする。メモリ更新装置32aは、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
[メモリ構造初期化装置の構成の説明]
 第5の実施形態にかかるメモリ構造初期化装置12aは、平文入力部120と、メモリアドレス割り当て部121aと、タグ生成部122aと、を備える。また、第5の実施形態にかかるメモリ構造初期化装置12aは、リーフノード生成部123aと、中間ノード生成部124aと、ルートノード生成部125と、木構造出力部126と、メモリアドレス出力部127と、を備える。なお、平文入力部120は、第4の実施形態のメモリ構造初期化装置12における平文入力部120と実質的に同じであるので、説明を省略する。
 メモリアドレス割り当て部121aは、木構造の各ノードにメモリアドレス情報を割り当てる。ここで、0<=i<=d,1<=j_i<=b^{i}のとき、深さiでj_i番目のノードに割り当てるメモリアドレスを、add(i,j_i)で表す。そして、木構造の全てのノードに割り当てられたメモリアドレス情報を、メモリアドレス集合Addとして、以下の式76のように記述する。
(式76)
 Add=(add(0,1),add(1,1),add(1,2),・・・,add(1,b),add(2,1),add(2,2),・・・,add(d,b^d-1),add(d,b^d))
 タグ生成部122aは、タグ生成部122と同様に、平文入力部120が出力する平文Mと、メモリアドレス割り当て部121aが出力するメモリアドレス集合Addと、秘密鍵Kとを用いて、改ざん検知用のタグを生成する。まず、タグ生成部122aは、リーフノードで用いるタグとして、以下の式77で表されるデータを生成する。
(式77)
 TagLeaf=((M[1],Tag(d,1)),(M[2],Tag(d,2)),・・・,(M[b^d],Tag(d,b^d)))
 Tag(d,j_d)=MAC_K(add(d,j_d)||ctr(d,j_d)),M[i])
 1<=j_d<=b^d
 なお、ctr(d,j_d)は、深さdにおけるj_d番目のリーフノードのカウンタ値を表しており、当該ノードが更新されるたびに1が足される。ここでは、全てのj_dに対してctr(d,j_d)=0^{CTR-1}||1と定義する。また、CTRは各ノードに格納されるローカルカウンタ値のビット長であり、「0^{CTR-1}」は0がCTR-1個連結したビット列を表す。CTRの値は予め決定されていると仮定する。
 次に、タグ生成部122aは、中間ノードで用いるタグとして、以下の式78で表されるデータを生成する。
(式78)
 TagInter=(Tag(1,1),・・・,Tag(d-1,b^{d-1}))
 Tag(i,j_i)=MAC_K((add(i,j_i)||ctr(i,j_i),ctr(i+1,b・j_i-(b-1))||・・・||ctr(i+1,b・j_i))
 ただし、1<=i<=d-1,1<=j_i<=b^i
 また、「ctr(i+1,b・j_i-(b-1))||・・・||ctr(i+1,b・j_i)」は、ノード(i,j_i)のb個の子ノードのローカルカウンタ値を連結したものである。
 次に、タグ生成部122aは、ルートノードで用いるタグとして、以下の式79で表されるデータを生成する。
(式79)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_K(add(0,1)||ctr(0,1),ctr(1,1)||・・・||ctr(1,b))
 なお、「ctr(1,1)||・・・||ctr(1,b)」は、ルートノード(0,1)のb個の子ノードのローカルカウンタ値を連結したものを示す。
 式77,式78,式79から、各ノードに対応するタグは、以下の通りである。すなわち、各ノードに対応するタグは、リーフノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、自ノードに対応する平文ブロックを平文とし、そのナンスと平文とを入力としたMACの計算結果に対応する。また、各ノードに対応するタグは、リーフノード以外のノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、複数の子ノードのローカルカウンタ値の連結を平文とし、そのナンスと平文とを入力としたMACの計算結果に対応する。
 図23に例示するように、木構造全体の深さdがd=3であり、分岐数bがb=3である場合、各ノードに対応するタグは、以下の式80で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式80)
For 0<=i<=3,1<=j_i<=3^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_K(add(i,j_i)||ctr(i,j_i),ctr(i+1,3j_i-2)||ctr(i+1,3j_i-1)||ctr(i+1,3j_i))
 (For i=3) Tag(i,j_i)=MAC_K(add(i,j_i)||ctr(i,j_i),M[j_i])
 そして、タグ生成部122aは、タグ集合TagLeafをリーフノード生成部123aに出力する。また、タグ生成部122aは、タグ集合TagInterを中間ノード生成部124aに出力する。また、タグ生成部122aは、タグ集合TagRootをルートノード生成部125に出力する。
 リーフノード生成部123aは、リーフノード生成部123と同様に、タグ生成部122aが出力するタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=b^dである。そして、j_d番目のリーフノードは、以下の式28で示すように生成される。
(式81)
 (ctr(d,j_d),M[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式82のように記述する。
(式82)
 Leaf=((ctr(d,1),M[1],Tag(d,1)),(ctr(d,2),M[2],Tag(d,2)),・・・,(ctr(d,b^d),M[b^d],Tag(d,b^d)))
 また、リーフノード生成部123aは、生成されたリーフノード集合Leafを木構造出力部126に出力する。
 中間ノード生成部124aは、中間ノード生成部124と同様に、タグ生成部122aが出力するタグ集合TagInterを用いて、木構造の中間ノードを生成する。ここで、中間ノードでは、1<=i<=d-1,1<=j_i<=b^iである。そして、深さiにおけるj_i番目の中間ノードは、以下の式83で示すように生成される。
(式83)
 (ctr(i,j_i),Tag(i,j_i))
 ただし、全てのi,j_iに対してctr(i,j_i)=0^{CTR-1}||1と定義する。
 また、全ての中間ノードを以下の式84のように記述する。
(式84)
 Inter=((ctr(1,1),Tag(1,1)),(ctr(1,2),Tag(1,2)),・・・,(ctr(d-1,b^{d-1}),Tag(d-1,b^{d-1})))
 図12に示すように、木構造全体の深さがd=3の場合、各中間ノードは、以下の式85のように表される。
(式85)
 Inter=((ctr(1,1),Tag(1,1)),(ctr(1,2),Tag(1,2)),・・・,(ctr(2,9),Tag(2,9)))
 また、中間ノード生成部124aは、生成された中間ノード集合Interを木構造出力部126に出力する。
 ルートノード生成部125は、第4の実施形態のメモリ構造初期化装置12におけるルートノード生成部125と実質的に同じであるので、説明を省略する。木構造出力部126は、第4の実施形態のメモリ構造初期化装置12における木構造出力部126と実質的に同じであるので、説明を省略する。メモリアドレス出力部127は、第4の実施形態のメモリ構造初期化装置12におけるメモリアドレス出力部127と実質的に同じであるので、説明を省略する。
[メモリ検証装置の構成の説明]
 第5の実施形態にかかるメモリ検証装置22aは、木構造入力部220と、メモリアドレス入力部221aと、検証箇所入力部222aと、タグ検証部223aと、検証結果出力部224と、を備える。木構造入力部220は、第4の実施形態のメモリ検証装置22における木構造入力部220実質的に同じであるので、説明を省略する。
 メモリアドレス入力部221aは、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。そして、メモリアドレス入力部221aは、メモリアドレス集合Addをタグ検証部223aに出力する。なお、Addは以下の式86のように記述される。
(式86)
 Add=(add(0,1),add(1,1),add(1,2),・・・,add(1,b),add(2,1),add(2,2),・・・,add(d,b^d-1),add(d,b^d))
 ただし、0<=i<=d,1<=j_i<=b^{i}のとき、深さiにおいてj_i番目のノードのメモリアドレスを、add(i,j_i)で表す。
 検証箇所入力部222aは、検証箇所入力部222と同様に、メモリの検証箇所CheckNodeの入力を受け付ける。そして、検証箇所入力部222aは、検証箇所CheckNodeをタグ検証部223aに出力する。ここで、第5の実施形態において、CheckNodeは、1以上b^d以下の数値であり、検証箇所がリーフノードのCheckNode番目であることを表す。
 タグ検証部223aは、タグ検証部223と同様に、木構造Treeと、メモリアドレス集合Addと、検証箇所CheckNodeと、秘密鍵Kとを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部223aは、検証結果を検証結果出力部224に出力する。まず、タグ検証部223aは、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。パスPathは、以下の式87で表される。
(式87)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=b^{i}のとき、Pathの各要素(i,j_i)は、深さiにおいてj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式88で定義される。
(式88)
 p_i=ceiling(p_{i+1}/b)
 ただし、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 次にタグ検証部223aは、メモリアドレス入力部221aの出力であるAddと、木構造入力部220の出力であるTreeと、秘密鍵Kを用いて以下の式89を計算する。
(式89)
 PathTag’=(Tag’(d,p_d),Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(d,p_d)=MAC_K(add(d,p_d)||ctr(d,p_d),M[p_d])
 Tag’(i,p_i)=MAC_K(add(i,p_i)||ctr(i,p_i),ctr(i+1,b・p_i-(b-1))||・・・||ctr(i+1,b・p_i-1)||ctr(i+1,b・p_i))
 ただし、0<=i<=d-1
 ここで、MAC_Kは、第5の実施形態におけるメモリ構造初期化装置12aのタグ生成部122aで用いられている方式と実質的に同じであるので、説明を省略する。また、Tag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのアドレスとローカルカウンタとの連結を入力し、MAC関数の入力の平文部分に当該ノードの子ノードのローカルカウンタをb個連結して入力することによって、得られる。
 次に、タグ検証部223aは、木構造入力部220の出力である木構造Treeから、以下の式90で表される値を取得する。
(式90)
 PathTag=(Tag(d,p_d),Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部223aは、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=dのとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部223aは、検証結果をACKに設定する。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=dのとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部223aは、検証結果をNCKに設定する。また、検証結果がNCKであることを、B=NCKと表記する。
 タグ検証部223aは検証結果Bを検証結果出力部224に出力する。
 検証結果出力部224は、第4の実施形態のメモリ検証装置22における検証結果出力部224と実質的に同じであるので、説明を省略する。
[メモリ更新装置の構成の説明]
 第5の実施形態にかかるメモリ更新装置32aは、木構造入力部320と、メモリアドレス入力部321aと、更新箇所入力部322aと、メモリ検証部323aと、カウンタ更新部324と、タグ更新部325aと、更新結果出力部326と、を備える。また、第5の実施形態にかかるメモリ更新装置32は、更新判定部330と、平文更新部332と、を備える。木構造入力部320は、第4の実施形態のメモリ更新装置32における木構造入力部320と実質的に同じであるので、説明を省略する。
 メモリアドレス入力部321aは、検証対象となるメモリを保護するための木構造に割り当てられているメモリアドレス集合Addの入力を受け付ける。そして、メモリアドレス入力部321aは、メモリアドレス集合Addを、メモリ検証部323a及びタグ更新部325aに出力する。メモリアドレス入力部321aの機能は、第5の実施形態のメモリ検証装置22aにおけるメモリアドレス入力部221aの機能と実質的に同じであるので、説明を省略する。
 更新箇所入力部322aは、メモリの更新情報UpdateNodeの入力を受け付ける。そして、更新箇所入力部322aは、メモリの更新情報UpdateNodeを、更新判定部330、平文更新部332、メモリ検証部323a及びタグ更新部325aに出力する。ここで、上述したように、メモリの更新情報UpdateNodeは、木構造において更新されるノードに関する情報である。UpdateNodeは、上述した第2の実施形態のものと実質的に同様であるので、説明を省略する。
 更新判定部330は、第4の実施形態のメモリ更新装置32における更新判定部330と実質的に同様であるので、説明を省略する。
 メモリ検証部323aは、メモリ検証部323と同様に、木構造Treeと、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、秘密鍵Kとを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部323aは、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部323aが行う検証処理は、第5の実施形態のメモリ検証装置22aにおけるタグ検証部223aと実質的に同じであるが、出力結果が異なる。第5の実施形態のメモリ検証装置22aにおけるタグ検証部223aは検証結果Bを出力するが、メモリ検証部323aは、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。メモリ検証部323aは、検証結果Bを、カウンタ更新部324、平文更新部332、タグ更新部325a及び更新結果出力部326に出力する。また、メモリ検証部323aは、パスPathを、カウンタ更新部324及びタグ更新部325aに出力する。
 Pathは以下の式91のように表される。
(式91)
Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここでは、メモリ検証部323aが行う操作から、p_d=UpdateIndexとなることが分かる。
 なお、メモリ検証部323aのその他の機能については、第4の実施形態にかかるメモリ検証部323の機能と実質的に同様であるので、説明を省略する。つまり、メモリ検証部323aは、メモリ検証部323と同様に、更新判定部330の判定結果に応じて、リーフノードのタグを検証しない場合がある。
 平文更新部332は、第4の実施形態のメモリ更新装置32における平文更新部332と実質的に同様であるので、説明を省略する。カウンタ更新部324は、第4の実施形態のメモリ更新装置32におけるカウンタ更新部324と実質的に同じであるので、説明を省略する。
 タグ更新部325aは、更新結果の木構造NewTree’と、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵Kとを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部325aは、0<=i<=d-1に対して、以下の式92の計算を行う。
(式92)
 Tag(d,p_d)←MAC_K(add(d,p_d)||ctr(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_K(add(i,p_i)||ctr(i,p_i),ctr(i+1,b・p_i-(b-1))||・・・||ctr(i+1,b・p_i))
 なお、MAC_Kは、第5の実施形態におけるメモリ構造初期化装置12aのタグ生成部122aや、メモリ検証装置22aのタグ検証部223aで用いられている方式と実質的に同じであるので、説明を省略する。Tag(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのアドレスとローカルカウンタとの連結を入力し、MAC関数の入力の平文部分に当該ノードの子ノードのローカルカウンタをb個連結して入力することによって、得られる。そして、タグ更新部325aは、更新結果の木構造NewTreeを、更新結果出力部326に出力する。一方、B=NCKの場合は、タグ更新部325aは処理を行わず、何も出力しない。
 更新結果出力部326は、第4の実施形態のメモリ更新装置32における更新結果出力部326と実質的に同じであるので、説明を省略する。
[効果の説明]
 第5の実施形態が奏する効果は第4の実施形態が奏する効果と実質的に同じである。但し、第4の実施形態では、構成される木構造は2分木を仮定していたが、第5の実施形態では、木構造の分岐数を任意にしている。したがって、任意の分岐数の木構造についても、第4の実施形態が奏する効果を実現できる。
(第6の実施形態)
 次に、第6の実施形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。第6の実施形態は、第4の実施形態を変形したものである。したがって、以下の説明では、上述した第4の実施形態と異なる箇所について主に説明する。第6の実施形態では、メモリ検証に加えて、入力される平文を暗号化して秘匿するメモリ保護システムの例について説明する。但し、第6の実施形態にかかるメモリ保護システム1が構成する木構造は、第4の実施形態と同様に、分岐数が2であり、深さがdであると定義する。
 図24は、第6の実施形態にかかるメモリ保護システム1が構成する木構造の例を示す図である。図24には、分岐数b=2、深さd=3の場合の木構造が示されている。なお、Root,Inter,Leafについては、上述した第4の実施形態の場合と実質的に同様である。
 第6の実施形態にかかるメモリ保護システム1は、メモリ構造初期化装置12cと、メモリ検証装置22cと、メモリ更新装置32cと、を備える。メモリ保護システム1は、メモリの改ざん検知および秘匿を行う。第6の実施形態にかかるメモリ構造初期化装置12cは、改ざん検知および秘匿を行いたい平文を入力として、初期状態の木構造と木構造における各ノードのメモリアドレス集合を出力する。
 メモリ検証装置22cは、改ざんをチェックしたい暗号文ブロックの格納場所と木構造、および木構造における各ノードのメモリアドレスを入力として、そのメモリが改ざんされているかどうか検証する。メモリ更新装置32cは、更新したい暗号文ブロックの格納場所とその更新内容、木構造、および木構造における各ノードのメモリアドレスを入力とする。メモリ更新装置32cは、更新後の木構造、または、改ざんを検知したことを表すエラーメッセージを出力する。
 第6の実施形態にかかるメモリ保護システム1は、第4の実施形態におけるメモリ保護システム1で用いたMACに加えて、第3の実施形態と同様に、要素技術として認証暗号(AE)を用いる。秘密鍵Kを用いたAEは、暗号化関数AE.Enc_Kと、この暗号化関数AE.Enc_K対となる復号関数AE.Dec_Kとの2つの関数により定義される。AE.Enc_Kは、ナンスN、および平文Mを入力として、暗号文Cと認証タグTagとを出力する。暗号化関数を式で記述すると以下の式93のようになる。
(式93)
 AE.Enc_K(N,M)=(C,T)
 AE.Dec_Kは、ナンスN、暗号文C、および認証タグの3つを入力として、改ざんが検知されない場合は復号結果の平文Mを出力し、改ざんが検知された場合はエラーメッセージ⊥を出力する。このことを式で記述すると以下の式94のようになる。
(式94)
 AE.Dec_K(N,C,T)=M(改ざんが検知されない場合)
 AE.Dec_K(N,C,T)=⊥(改ざんが検知された場合)
[メモリ構造初期化装置の構成の説明]
 第6の実施形態にかかるメモリ構造初期化装置12cは、平文入力部120と、メモリアドレス割り当て部121と、タグ生成部122cと、を備える。また、第6の実施形態にかかるメモリ構造初期化装置12cは、リーフノード生成部123cと、中間ノード生成部124と、ルートノード生成部125と、木構造出力部126と、メモリアドレス出力部127と、を備える。
 平文入力部120は、第4の実施形態のメモリ構造初期化装置における平文入力部120と実質的に同じであるので、説明を省略する。メモリアドレス割り当て部121は、第4の実施形態のメモリ構造初期化装置におけるメモリアドレス割り当て部121と実質的に同じであるので、説明を省略する。
 タグ生成部122cは、平文入力部120が出力する平文Mと、メモリアドレス割り当て部121が出力するメモリアドレス集合Addと、秘密鍵K_1,K_2とを用いて、改ざん検知用のタグおよび暗号文を生成する。中間ノードとルートノードのためのタグ生成にはMACを用いるとし、平文(リーフノード)の暗号化およびタグ生成には認証暗号(AE)を用いるとする。
 まず、タグ生成部122cは、リーフノードで用いる暗号文とタグとして、以下の式95で表されるデータを生成する。
(式95)
 TagLeaf=((C[1],Tag(d,1)),(C[2],Tag(d,2)),・・・,(C[2^d],Tag(d,2^d)))
 (C[j_d],Tag(d,j_d))=AE.Enc_{K_1}(add(d,j_d)||ctr(d,j_d),M[j_d])
 ただし、1<=j_d<=2^d
 なお、AE.Enc_{K_1}(・,・)はAEの暗号化関数を表す。また、C[j_d]は、j_d番目の暗号文ブロックを示す。
 次に、タグ生成部122cは、中間ノードで用いるタグとして、以下の式96で表されるデータを生成する。
(式96)
 TagInter=(Tag(1,1),・・・,Tag(d-1,2^{d-1}))
 Tag(i,j_i)=MAC_{K_2}((add(i,j_i)||ctr(i,j_i),ctr(i+1,2j_i-1)||ctr(i+1,2j_i))
 ただし、1<=i<=d-1,1<=j_i<=2^i
 次に、タグ生成部122cは、ルートノードで用いるタグとして、以下の式97で表されるデータを生成する。
(式97)
 TagRoot=(Tag(0,1))
 Tag(0,1)=MAC_{K_2}(add(0,1)||ctr(0,1),ctr(1,1)||ctr(1,2))
 式95,式96,式97から、各ノードに対応するタグは、以下の通りである。すなわち、各ノードに対応するタグは、リーフノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、自ノードに対応する平文ブロックを平文とし、そのナンスと平文とを入力としたAEの計算結果に対応する。また、この計算結果として、暗号文ブロックが出力される。また、各ノードに対応するタグは、リーフノード以外のノードでは、自ノードのメモリアドレスとローカルカウンタ値との連結をナンスとし、複数の子ノードのローカルカウンタ値の連結を平文とし、そのナンスと平文とを入力としたMACの計算結果に対応する。
 図24に例示するように、木構造全体の深さdがd=3の場合、式95,式96,式97は、以下の式98で表される。ここで、iは深さのインデックスである。また、j_iは、深さiにおけるノードのインデックス(順序;序数)である。
(式98)
For 0<=i<=3,1<=j_i<=2^i,
 (For 0<=i<=2) Tag(i,j_i)=MAC_{K_2}(add(i,j_i)||ctr(i,j_i),ctr(i+1,2j_i-1)||ctr(i+1,2j_i))
 (For i=3) (C[j_i],Tag(i,j_i))=AE.Enc_{K_1}(add(i,j_i)||ctr(i,j_i),M[j_i])
 リーフノード生成部123cは、タグ生成部122cが出力する暗号文およびタグ集合TagLeafを用いて、木構造のリーフノードを生成する。ここで、リーフノードでは、深さi=dであるので、1<=j_d<=2^dである。そして、j_d番目のリーフノードは、以下の式99で示すように生成される。
(式99)
 (ctr(d,j_d),C[j_d],Tag(d,j_d))
 また、全てのリーフノードを以下の式100のように記述する。
(式100)
 Leaf=((ctr(d,1),C[1],Tag(d,1)),・・・,(ctr(d,2^d),C[2^d],Tag(d,2^d)))
 図24に示すように、木構造全体の深さがd=3の場合、各リーフノードは、以下の式101のように表される。
(式101)
 Leaf=((ctr(3,1),C[1],Tag(3,1)),(ctr(3,2),C[2],Tag(3,2)),・・・,(ctr(3,8),C[8],Tag(3,8)))
 リーフノード生成部123cは、生成されたリーフノード集合Leafを木構造出力部126に出力する。
 中間ノード生成部124は、第4の実施形態のメモリ構造初期化装置12における中間ノード生成部124と実質的に同じであるので、説明を省略する。ルートノード生成部125は、第4の実施形態のメモリ構造初期化装置12におけるルートノード生成部125と実質的に同じであるので、説明を省略する。木構造出力部126は、第4の実施形態のメモリ構造初期化装置12における木構造出力部126と実質的に同じであるので、説明を省略する。メモリアドレス出力部127は、第4の実施形態のメモリ構造初期化装置12におけるメモリアドレス出力部127と実質的に同じであるので、説明を省略する。
[メモリ検証装置の構成の説明]
 第6の実施形態にかかるメモリ検証装置22cは、木構造入力部220と、メモリアドレス入力部221と、検証箇所入力部222と、タグ検証部223cと、検証結果出力部224と、を備える。木構造入力部220は、第4の実施形態のメモリ検証装置22における木構造入力部220と実質的に同じであるので、説明を省略する。メモリアドレス入力部221は、第4の実施形態のメモリ検証装置22におけるメモリアドレス入力部221と実質的に同じであるので、説明を省略する。検証箇所入力部222は、第4の実施形態のメモリ検証装置22における検証箇所入力部222と実質的に同じであるので、説明を省略する。
 タグ検証部223cは、木構造Treeと、メモリアドレス集合Addと、検証箇所CheckNodeと、秘密鍵K_1,K_2とを用いて、CheckNodeによって指定されるメモリが改ざんされていないか検証する。そして、タグ検証部223cは、検証結果を検証結果出力部224に出力する。まず、タグ検証部223cは、CheckNode番目のリーフノードからルートノードまでのパスPathを生成する。ここで、パスPathとは、当該リーフノードからルートノードまでのノードの道のりを示すもので、以下の式102で表される。
(式102)
 Path=((d,p_d),(d-1,p_{d-1}),(d-2,p_{d-2}),・・・,(1,p_1),(0,p_0))
 ここで、0<=i<=d,1<=j_i<=2^{i}のとき、Pathの各要素(i,j_i)は、深さiにおいてj_i番目のノードを表す。つまり、j_iは、深さiにおけるノードの序数を示す。なお、p_d=CheckNodeであり、0<=i<=d-1のとき、p_iは以下の式103で定義される。
(式103)
 p_i=ceiling(p_{i+1}/2)
 但し、ceiling(・)は天井関数を表す。また、p_0の値は必ず1となる。
 次に、タグ検証部223cは、メモリアドレス入力部221の出力であるAddと、木構造入力部220の出力であるTreeと、秘密鍵K_1,K_2とを用いて以下の式104を計算する。
(式104)
 AE.Dec_{K_1}(add(d,p_d)||ctr(d,p_d),C[p_d],Tag(d,p_d))
 上記の計算結果がエラーメッセージ⊥の場合、タグ検証部223cは、検証結果BをB=NCKと定義し、Bを出力して処理を終了する。なお、AE.Dec_{K_1}(・,・,・)は、第6の実施形態におけるメモリ構造初期化装置12cのタグ生成部122cで用いられている方式AE.Enc_{K_1}の復号関数である。また、NCKは、パスに関わるノードの情報が改ざんされていることを示す。
 一方、上記の計算結果が平文M[p_d]である場合、つまり、暗号文C[p_d]が正しく復号されたことを示す場合、タグ検証部223cは、続けて以下の式105を計算する。
(式105)
 PathTag’=(Tag’(d-1,p_{d-1}),・・・,Tag’(0,p_0))
 Tag’(i,p_i)=MAC_{K_2}(add(i,p_i)||ctr(i,p_i),ctr(i+1,2p_i-1)||ctr(i+1,2p_i))
 ただし、0<=i<=d-1
 ここで、MAC_{K_2}(・)は、第6の実施形態におけるメモリ構造初期化装置12cのタグ生成部122cで用いられているMAC方式と実質的に同じであるので、説明を省略する。また、Tag’(i,p_i)は、MAC関数の入力のナンス部分に当該ノードのアドレスとローカルカウンタとの連結を入力し、MAC関数の入力の平文部分に当該ノードの子ノードのローカルカウンタを2個連結して入力することによって、得られる。
 また、タグ検証部223cは、木構造入力部220の出力である木構造Treeから、以下の式106で表される値を取得する。
(式106)
 PathTag=(Tag(d-1,p_{d-1}),・・・,Tag(0,p_0))
 そして、タグ検証部223cは、自身が計算したPathTag’とTreeから取得したPathTagとが等しいか否かをチェックする。0<=i<=d-1のとき、全てのiに対して、
 Tag’(i,p_i)=Tag(i,p_i)
が成立する場合、タグ検証部223cは、検証結果をACKに設定する。また、検証結果をBと表記し、検証結果がACKであることを、B=ACKと表記する。
 一方、0<=i<=d-1のとき、あるiに対して、
 Tag’(i,p_i)≠Tag(i,p_i)
が成立する場合、タグ検証部223は、検証結果をNCKに設定する。
 タグ検証部223は検証結果Bを出力する。
 検証結果出力部224は、第4の実施形態のメモリ検証装置22における検証結果出力部224と実質的に同じであるので、説明を省略する。
[メモリ更新装置の構成の説明]
 第6の実施形態にかかるメモリ更新装置32cは、木構造入力部320と、メモリアドレス入力部321と、更新箇所入力部322と、メモリ検証部323cと、カウンタ更新部324と、タグ更新部325cと、更新結果出力部326と、を備える。また、第6の実施形態にかかるメモリ更新装置32cは、更新判定部330と、平文更新部332と、を備える。木構造入力部320は、第4の実施形態のメモリ更新装置32における木構造入力部320と実質的に同じであるので、説明を省略する。メモリアドレス入力部321は、第4の実施形態のメモリ更新装置32におけるメモリアドレス入力部321と実質的に同じであるので、説明を省略する。更新箇所入力部322は、第4の実施形態のメモリ更新装置32における更新箇所入力部322と実質的に同じであるので、説明を省略する。更新判定部330は、第4の実施形態のメモリ更新装置32における更新判定部330と実質的に同じであるので、説明を省略する。
 メモリ検証部323cは、木構造Treeと、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、秘密鍵K_1,K_2とを用いて、UpdateNodeによって指定されるメモリが改ざんされていないか検証する。つまり、メモリ検証部323cは、UpdateNodeによって指定されるリーフノードに関するパスに対応するノードが改ざんされていないか検証する。メモリ検証部323cが行う検証処理は、第6の実施形態のメモリ検証装置22cにおけるタグ検証部223cと実質的に同じであるが、出力結果が異なる。第6の実施形態のメモリ検証装置22cにおけるタグ検証部223cは検証結果Bを出力するが、メモリ検証部323cは、検証結果Bと共に、当該ノードからルートノードまでのパスPathも出力する。メモリ検証部323cは、検証結果Bを、平文更新部332、カウンタ更新部324、タグ更新部325c及び更新結果出力部326に出力する。また、メモリ検証部323cは、パスPathを、カウンタ更新部324及びタグ更新部325cに出力する。
 なお、メモリ検証部323cのその他の機能については、第4の実施形態にかかるメモリ検証部323の機能と実質的に同様であるので、説明を省略する。つまり、メモリ検証部323cは、メモリ検証部323と同様に、更新判定部330の判定結果に応じて、リーフノードのタグを検証しない場合がある。
 平文更新部332は、第4の実施形態のメモリ更新装置32における平文更新部332と実質的に同様であるので、説明を省略する。また、カウンタ更新部324は、第4の実施形態のメモリ更新装置32におけるカウンタ更新部324と実質的に同じであるので、説明を省略する。
 タグ更新部325cは、更新結果の木構造NewTree’と、メモリアドレス集合Addと、メモリの更新情報UpdateNodeと、検証結果BおよびパスPathと、秘密鍵K_1,K_2とを用いて、Pathで指定されるノードのタグを更新する。B=ACKである場合、タグ更新部325cは、0<=i<=d-1に対して、以下の式107の計算を行う。
(式107)
 (C[p_d],Tag(d,p_d))←AE.Enc_{K_1}(add(d,p_d)||ctr(d,p_d),UpdateInfo)
 Tag(i,p_i)←MAC_{K_2}(add(i,p_i)||ctr(i,p_i),ctr(i+1,2p_i-1)||ctr(i+1,2p_i))
 なお、AE.Enc_{K_1}(・,・)やMAC_{K_2}(・)、IncMAC_{K_2}は、第6の実施形態におけるメモリ構造初期化装置12cのタグ生成部122cや、メモリ検証装置22cのタグ検証部223cで用いられている方式と実質的に同じである。そして、タグ更新部325cは、更新結果の木構造NewTreeを出力する。一方、B=NCKの場合は、タグ更新部325cは処理を行わず、何も出力しない。
 更新結果出力部326は、第4の実施形態のメモリ更新装置32における更新結果出力部326と実質的に同じであるので、説明を省略する。
[効果の説明]
 第6の実施形態が奏する効果は、第4の実施形態が奏する効果に加えて、メモリの秘匿が可能であることである。第4の実施形態では、平文メッセージの改ざん検知のためにMACを用いていた。これに対し、第6の実施形態では、平文メッセージにAE処理を施すことにより、改ざん検知に加えて平文メッセージの秘匿が可能となる。また、一般的に、AEの計算量は、MACの計算量以上である。したがって、本実施形態のように、更新処理の際にリーフノードの完全性検証を不要にすることを可能にすることで、計算量の大きなAEの計算を削減することができ、これにより、検証に要する計算量をさらに削減することができる。したがって、メモリの内容を更新する際に、ノードの検証処理をさらに効率的に行うことが可能となる。
 また、用いるAEが、OCBのようなレート1の方式、すなわち平文の暗号化と認証タグ生成とを暗号化のみのコストで実現できるという性質を持つ方式であって、かつ、平文と暗号文のデータ量が同一になるような方式を採用できるとする。この場合、第4の実施形態と比較して、木構造全体のデータ量や、各装置で必要な計算量は、ほぼ変化しない。つまり、第6の実施形態は、第4の実施形態と同等のデータ量及び計算量で、改ざん検知に加えて秘匿も可能となる。また、第6の実施形態の木構造では2分木を仮定していたが、第5の実施形態のように、分岐数を増やした木構造を用いることも当然に可能である。
(第7の実施形態)
 次に、第7の実施形態について説明する。
 図25は、第7の実施形態にかかるメモリ更新装置500の構成を示す図である。第7の実施形態にかかるメモリ更新装置500は、上述したメモリ更新装置30及びメモリ更新装置32に対応する。メモリ更新装置500は、入力部502と、更新判定部504と、メモリ検証部506と、平文更新部508と、タグ更新部510とを有する。入力部502は、入力手段としての機能を有する。更新判定部504は、更新判定手段としての機能を有する。メモリ検証部506は、メモリ検証手段としての機能を有する。平文更新部508は、平文更新手段としての機能を有する。タグ更新部510は、タグ更新手段としての機能を有する。
 入力部502は、上述した木構造入力部300、木構造入力部320、更新箇所入力部302及び更新箇所入力部322が有している機能と実質的に同様の機能によって実現できる。更新判定部504は、上述した更新判定部310及び更新判定部330が有している機能と実質的に同様の機能によって実現できる。メモリ検証部506は、上述したメモリ検証部303及びメモリ検証部323が有している機能と実質的に同様の機能によって実現できる。平文更新部508は、上述した平文更新部312及び平文更新部332が有している機能と実質的に同様の機能によって実現できる。タグ更新部510は、上述したタグ更新部305及びタグ更新部325が有している機能と実質的に同様の機能によって実現できる。
 入力部502は、メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する。更新判定部504は、更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する。
 メモリ検証部506は、木構造において、リーフノードからルートノードへのパスを生成する。また、メモリ検証部506は、パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証する。メモリ検証部506は、これによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力する。
 平文更新部508は、検証結果が改ざんの検知がないことを示す場合に、更新情報に基づいて、リーフノードにおける更新対象の平文を更新する。タグ更新部510は、検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成する。ここで、メモリ検証部506は、リーフノードの更新内容が更新前の平文に依存するものでない場合、パスにおけるリーフノード以外のノードのタグを検証する。
 ここで、上述したように、更新判定部504は、リーフノードの更新内容が、更新対象の平文を当該平文とは独立した固定値で置き換えるものである場合に、リーフノードの更新内容が更新前の平文に依存するものでないと判定してもよい。この場合、平文更新部508は、前記リーフノードにおける更新対象の平文を固定値で置き換えることで、平文を更新してもよい。また、更新判定部504は、更新情報に更新対象の平文とは独立した固定値が含まれる場合に、リーフノードの更新内容が更新前の平文に依存するものでないと判定してもよい。また、上記の固定値は、ユーザによって指定されてもよい。
 また、上述した第7の実施形態にかかるメモリ更新装置500が、第1の実施形態又は第2の実施形態にかかるメモリ更新装置30に対応する場合、メモリ更新装置500は、以下のように構成されてもよい。メモリ検証部506は、上記のパスにおける各ノードにおいて、各ノードで固有のナンス及び平文、又は、ナンス及び各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成してもよい。また、メモリ更新装置500は、ナンス更新部304に対応する構成要素(ナンス更新部;ナンス更新手段)をさらに有してもよい。この場合、ナンス更新部は、検証結果が改ざんの検知がないことを示す場合に、パスにおける各ノードにおけるナンスの値を更新してもよい。また、この場合、タグ更新部510は、各ノードにおける更新後のナンス及び更新後の平文、又は、更新後のナンス及び各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力することで、更新後のタグを生成してもよい。
 また、上述した第7の実施形態にかかるメモリ更新装置500が、第3の実施形態にかかるメモリ更新装置30に対応する場合、メモリ更新装置500は、以下のように構成されてもよい。メモリ検証部506は、木構造において、更新対象の暗号文が含まれるリーフノードからルートノードへのパスを生成してもよい。また、メモリ検証部506は、パスにおける各ノードにおいて、ナンス及び各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成してもよい。また、メモリ検証部506は、ナンスと暗号文と検証に用いられるタグとを認証暗号に入力して、平文が改ざんされていないかを検証することにより、暗号文が改ざんされていないかを検証して、検証結果を出力してもよい。また、タグ更新部510は、更新後のナンス及び各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力し、更新後のナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成してもよい。
 また、上述した第7の実施形態にかかるメモリ更新装置500が、第4の実施形態又は第5の実施形態にかかるメモリ更新装置32に対応する場合、メモリ更新装置500は、以下のように構成されてもよい。入力部502は、木構造に割り当てられているメモリアドレスを入力してもよい。メモリ検証部506は、パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとしてもよい。そして、メモリ検証部506は、ナンス及び平文、又は、ナンス及び各ノードの複数の子ノードにおけるローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成してもよい。また、メモリ更新装置500は、カウンタ更新部324に対応する構成要素(カウンタ更新部;カウンタ更新手段)をさらに有してもよい。この場合、カウンタ更新部は、検証結果が改ざんの検知がないことを示す場合に、パスにおける各ノードにおけるローカルカウンタの値を更新してもよい。また、この場合、タグ更新部510は、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとしてもよい。そして、タグ更新部510は、ナンス及び更新後の平文、又は、ナンス及び各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力することで、更新後のタグを生成してもよい。
 また、上述した第7の実施形態にかかるメモリ更新装置500が、第6の実施形態にかかるメモリ更新装置32に対応する場合、メモリ更新装置500は、以下のように構成されてもよい。メモリ検証部506は、木構造において、更新対象の暗号文が含まれるリーフノードからルートノードへのパスを生成してもよい。また、メモリ検証部506は、パスにおける各ノードにおいて、各ノードで固有のメモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとしてもよい。また、メモリ検証部506は、ナンス及び各ノードの複数の子ノードにおけるローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成してもよい。さらに、メモリ検証部506は、ナンスと暗号文と検証に用いられるタグとを認証暗号に入力して、平文が改ざんされていないかを検証することにより、暗号文が改ざんされていないかを検証して、検証結果を出力してもよい。また、タグ更新部510は、各ノードで固有のメモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとしてもよい。また、タグ更新部510は、ナンス及び各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力し、ナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成してもよい。
 図26は、第7の実施形態にかかるメモリ更新装置500によって実行されるメモリ更新方法を示すフローチャートである。入力部502は、木構造と、更新情報とを入力する(ステップS503)。更新判定部504は、更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する(ステップS504)。S504の判定結果がNOの場合、つまり、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものでない場合、処理はS506に進む。一方、S504の判定結果がYESの場合、つまり、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものである場合、処理はS508に進む。
 リーフノードの更新内容が更新前の平文に依存するものでない場合(S504のNO)、メモリ検証部506は、リーフノードからルートノードへのパスにおけるリーフノード以外のノードのタグを検証する(ステップS506)。具体的には、メモリ検証部506は、木構造において、リーフノードからルートノードへのパスを生成する。また、メモリ検証部506は、パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して、リーフノード以外の各ノードに格納されているタグを検証する。そして、メモリ検証部506は、検証結果を出力する。そして、検証結果が改ざんの検知がないことを示す場合に、S510及びS512の処理が実行される。
 一方、リーフノードの更新内容が更新前の平文に依存するものである場合(S504のYES)、メモリ検証部506は、リーフノードからルートノードへのパスにおける全てのノードのタグを検証する(ステップS508)。具体的には、メモリ検証部506は、木構造において、リーフノードからルートノードへのパスを生成する。また、メモリ検証部506は、パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して、リーフノードを含む全てのノードに格納されているタグを検証する。そして、メモリ検証部506は、検証結果を出力する。そして、検証結果が改ざんの検知がないことを示す場合に、S510及びS512の処理が実行される。
 平文更新部508は、検証結果が改ざんの検知がないことを示す場合に、更新情報に基づいて、リーフノードにおける更新対象の平文を更新する(ステップS510)。タグ更新部510は、検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成する(ステップS512)。
 第7の実施形態にかかるメモリ更新装置500は、上述した実施形態と同様に、検証に要する計算量を、特許文献2及び特許文献3にかかる技術と比較して削減することが可能となる。したがって、メモリの内容を更新する際に、ノードの検証処理を効率的に行うことが可能となる。なお、上述した特許文献4のように、処理の並列化が不可能である場合では、ノードにおけるタグの検証の際に、リーフノードに関するタグの検証を不要とすることができる場合があり得る。しかしながら、特許文献4のように処理の並列化が不可能である場合と、本実施形態のように処理の並列化を可能とする場合とで、木構造が全く異なる。よって、リーフノードに関するタグの検証を不要とすることができるからといって、単に特許文献4の技術を用いて処理の並列化を可能とする木構造に対してリーフノードに関するタグの検証を不要としても、安全性が損なわれる可能性がある。したがって、単に、特許文献4の技術を特許文献2又は特許文献3に技術と組み合わせることで、リーフノードに関するタグの検証を不要とすることができるようにすることは、安全性の観点からは、容易ではない。
(ハードウェア構成例)
 上述した各実施形態に係る装置およびシステムを、1つの計算処理装置(情報処理装置、コンピュータ)を用いて実現するハードウェア資源の構成例について説明する。但し、各実施形態に係る装置(メモリ構造初期化装置、メモリ検証装置、及びメモリ更新装置)は、物理的または機能的に少なくとも2つの計算処理装置を用いて実現されてもよい。また、各実施形態に係る装置は、専用の装置として実現されてもよいし、汎用の情報処理装置で実現されてもよい。
 図27は、各実施形態に係る装置およびシステムを実現可能な計算処理装置のハードウェア構成例を概略的に示すブロック図である。計算処理装置1000は、コンピュータである。計算処理装置1000は、CPU1001、揮発性記憶装置1002、ディスク1003、不揮発性記録媒体1004、及び、通信IF1007(IF:Interface)を有する。したがって、各実施形態に係る装置は、CPU1001、揮発性記憶装置1002、ディスク1003、不揮発性記録媒体1004、及び、通信IF1007を有しているといえる。計算処理装置1000は、入力装置1005及び出力装置1006に接続可能であってもよい。計算処理装置1000は、入力装置1005及び出力装置1006を備えていてもよい。また、計算処理装置1000は、通信IF1007を介して、他の計算処理装置、及び、通信装置と情報を送受信することができる。
 不揮発性記録媒体1004は、コンピュータが読み取り可能な、たとえば、コンパクトディスク(Compact Disc)、デジタルバーサタイルディスク(Digital Versatile Disc)である。また、不揮発性記録媒体1004は、USB(Universal Serial Bus)メモリ、ソリッドステートドライブ(Solid State Drive)等であってもよい。不揮発性記録媒体1004は、電源を供給しなくても係るプログラムを保持し、持ち運びを可能にする。なお、不揮発性記録媒体1004は、上述した媒体に限定されない。また、不揮発性記録媒体1004の代わりに、通信IF1007及び通信ネットワークを介して、係るプログラムが供給されてもよい。
 揮発性記憶装置1002は、コンピュータが読み取り可能であって、一時的にデータを記憶することができる。揮発性記憶装置1002は、DRAM(dynamic random Access memory)、SRAM(static random Access memory)等のメモリ等である。
 すなわち、CPU1001は、ディスク1003に格納されているソフトウェアプログラム(コンピュータ・プログラム:以下、単に「プログラム」と称する)を、実行する際に揮発性記憶装置1002にコピーし、演算処理を実行する。CPU1001は、プログラムの実行に必要なデータを揮発性記憶装置1002から読み取る。表示が必要な場合、CPU1001は、出力装置1006に出力結果を表示する。外部からプログラムを入力する場合、CPU1001は、入力装置1005からプログラムを取得する。CPU1001は、上述した図2~図4,図14~図16,図25に示される各構成要素の機能(処理)に対応するプログラムを解釈し実行する。CPU1001は、上述した各実施形態において説明した処理を実行する。言い換えると、上述した図2~図4,図14~図16,図25に示される各構成要素の機能は、ディスク1003又は揮発性記憶装置1002に格納されたプログラムを、CPU1001が実行することによって実現され得る。
 すなわち、各実施形態は、上述したプログラムによっても成し得ると捉えることができる。さらに、上述したプログラムが記録されたコンピュータが読み取り可能な不揮発性の記録媒体によっても、上述した各実施形態は成し得ると捉えることができる。
(変形例)
 なお、本発明は上記実施形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、上述したフローチャートにおいて、各処理(ステップ)の順序は、適宜、変更可能である。また、複数ある処理(ステップ)のうちの1つ以上は、省略されてもよい。
 また、上述した実施形態では、メモリの内容の更新処理において各ノードの処理の並列化を可能とする技術として、特許文献2及び特許文献3にかかる技術を改良したとしているが、本開示は、このような構成に限られない。特許文献2及び特許文献3以外の、ノードの処理の並列化を可能とする技術に対しても、本開示にかかる技術は適用可能である。
 上述の例において、プログラムは、コンピュータに読み込まれた場合に、実施形態で説明された1又はそれ以上の機能をコンピュータに行わせるための命令群(又はソフトウェアコード)を含む。プログラムは、非一時的なコンピュータ可読媒体又は実体のある記憶媒体に格納されてもよい。限定ではなく例として、コンピュータ可読媒体又は実体のある記憶媒体は、random-access memory(RAM)、read-only memory(ROM)、フラッシュメモリ、solid-state drive(SSD)又はその他のメモリ技術、CD-ROM、digital versatile disk(DVD)、Blu-ray(登録商標)ディスク又はその他の光ディスクストレージ、磁気カセット、磁気テープ、磁気ディスクストレージ又はその他の磁気ストレージデバイスを含む。プログラムは、一時的なコンピュータ可読媒体又は通信媒体上で送信されてもよい。限定ではなく例として、一時的なコンピュータ可読媒体又は通信媒体は、電気的、光学的、音響的、またはその他の形式の伝搬信号を含む。
 以上、実施の形態を参照して本願発明を説明したが、本願発明は上記によって限定されるものではない。本願発明の構成や詳細には、発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
 上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
 (付記1)
 メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、
 前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、
 前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、
 前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、
 前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、
 を有し、
 前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する、
 メモリ更新装置。
 (付記2)
 前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものである場合、前記パスにおける前記リーフノードを含む全てのノードのタグを検証する、
 付記1に記載のメモリ更新装置。
 (付記3)
 前記更新判定手段は、前記リーフノードの更新内容が、前記更新対象の平文を当該平文とは独立した固定値で置き換えるものである場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
 前記平文更新手段は、前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
 付記1に記載のメモリ更新装置。
 (付記4)
 前記更新判定手段は、前記更新情報に前記固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定する、
 付記3に記載のメモリ更新装置。
 (付記5)
 前記更新判定手段は、前記更新情報に前記更新対象の平文とは独立した固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
 前記平文更新手段は、前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
 付記1に記載のメモリ更新装置。
 (付記6)
 前記更新情報における前記固定値は、ユーザによって指定される、
 付記4又は5に記載のメモリ更新装置。
 (付記7)
 前記メモリ検証手段は、前記パスにおける各ノードにおいて、各ノードで固有のナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
 前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおけるナンスの値を更新するナンス更新手段をさらに有し、
 前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードにおける更新後のナンス及び更新後の平文、又は、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
 付記1に記載のメモリ更新装置。
 (付記8)
 前記メモリ検証手段は、前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
 前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力し、更新後のナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
 付記7に記載のメモリ更新装置。
 (付記9)
 前記入力手段は、前記木構造に割り当てられているメモリアドレスを入力し、
 前記メモリ検証手段は、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
 前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおける前記ローカルカウンタの値を更新するカウンタ更新手段をさらに有し、
 前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び更新後の平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
 付記1に記載のメモリ更新装置。
 (付記10)
 前記メモリ検証手段は、前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
 前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力し、前記ナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
 付記9に記載のメモリ更新装置。
 (付記11)
 改ざん検知を行いたい平文を入力として、少なくとも初期状態の木構造であってメモリを保護するために構成される木構造を出力するメモリ構造初期化装置と、
 少なくとも改ざんをチェックしたい平文の格納場所と木構造とを入力として、前記格納場所に対応するメモリが改ざんされているか否かを検証するメモリ検証装置と、
 少なくとも更新したい平文の格納場所とその更新内容、及び前記木構造を入力とし、更新後の木構造、又は、改ざんを検知したことを表すエラーメッセージを出力する、メモリ更新装置と、
 を有し、
 前記メモリ更新装置は、
 前記木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、
 前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、
 前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、
 前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、
 前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、
 を有し、
 前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する、
 情報処理システム。
 (付記12)
 メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力し、
 前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定し、
 前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力し、
 前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新し、
 前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成する、
 メモリ更新方法。
 (付記13)
 前記リーフノードの更新内容が更新前の平文に依存するものである場合、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記パスにおける前記リーフノードを含む全てのノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証する、
 付記12に記載のメモリ更新方法。
 (付記14)
 前記リーフノードの更新内容が、前記更新対象の平文を当該平文とは独立した固定値で置き換えるものである場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
 前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
 付記12に記載のメモリ更新方法。
 (付記15)
 前記更新情報に前記固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定する、
 付記14に記載のメモリ更新方法。
 (付記16)
 前記更新情報に前記更新対象の平文とは独立した固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
 前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
 付記12に記載のメモリ更新方法。
 (付記17)
 前記更新情報における前記固定値は、ユーザによって指定される、
 付記15又は16に記載のメモリ更新方法。
 (付記18)
 前記パスにおける各ノードにおいて、各ノードで固有のナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
 前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおけるナンスの値を更新し、
 前記検証結果が改ざんの検知がないことを示す場合に、各ノードにおける更新後のナンス及び更新後の平文、又は、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
 付記12に記載のメモリ更新方法。
 (付記19)
 前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
 前記検証結果が改ざんの検知がないことを示す場合に、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力し、更新後のナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
 付記18に記載のメモリ更新方法。
 (付記20)
 前記木構造に割り当てられているメモリアドレスを入力し、
 前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
 前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおける前記ローカルカウンタの値を更新し、
 前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び更新後の平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
 付記12に記載のメモリ更新方法。
 (付記21)
 前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
 前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力し、前記ナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
 付記20に記載のメモリ更新方法。
 (付記22)
 メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力するステップと、
 前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定するステップと、
 前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するステップと、
 前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新するステップと、
 前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するステップと、
 をコンピュータに実行させるプログラムが格納された非一時的なコンピュータ可読媒体。
1 メモリ保護システム
10 メモリ構造初期化装置
100 平文入力部
101 ナンス割り当て部
102 タグ生成部
103 リーフノード生成部
104 中間ノード生成部
105 ルートノード生成部
106 木構造出力部
12 メモリ構造初期化装置
120 平文入力部
121 メモリアドレス割り当て部
122 タグ生成部
123 リーフノード生成部
124 中間ノード生成部
125 ルートノード生成部
126 木構造出力部
127 メモリアドレス出力部
20 メモリ検証装置
200 木構造入力部
202 検証箇所入力部
203 タグ検証部
204 検証結果出力部
22 メモリ検証装置
220 木構造入力部
221 メモリアドレス入力部
222 検証箇所入力部
223 タグ検証部
224 検証結果出力部
30 メモリ更新装置
300 木構造入力部
302 更新箇所入力部
303 メモリ検証部
304 ナンス更新部
305 タグ更新部
306 更新結果出力部
310 更新判定部
312 平文更新部
32 メモリ更新装置
320 木構造入力部
321 メモリアドレス入力部
322 更新箇所入力部
323 メモリ検証部
324 カウンタ更新部
325 タグ更新部
326 更新結果出力部
330 更新判定部
332 平文更新部
500 メモリ更新装置
502 入力部
504 更新判定部
506 メモリ検証部
508 平文更新部
510 タグ更新部

Claims (22)

  1.  メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、
     前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、
     前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、
     前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、
     前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、
     を有し、
     前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する、
     メモリ更新装置。
  2.  前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものである場合、前記パスにおける前記リーフノードを含む全てのノードのタグを検証する、
     請求項1に記載のメモリ更新装置。
  3.  前記更新判定手段は、前記リーフノードの更新内容が、前記更新対象の平文を当該平文とは独立した固定値で置き換えるものである場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
     前記平文更新手段は、前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
     請求項1に記載のメモリ更新装置。
  4.  前記更新判定手段は、前記更新情報に前記固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定する、
     請求項3に記載のメモリ更新装置。
  5.  前記更新判定手段は、前記更新情報に前記更新対象の平文とは独立した固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
     前記平文更新手段は、前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
     請求項1に記載のメモリ更新装置。
  6.  前記更新情報における前記固定値は、ユーザによって指定される、
     請求項4又は5に記載のメモリ更新装置。
  7.  前記メモリ検証手段は、前記パスにおける各ノードにおいて、各ノードで固有のナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
     前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおけるナンスの値を更新するナンス更新手段をさらに有し、
     前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードにおける更新後のナンス及び更新後の平文、又は、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
     請求項1に記載のメモリ更新装置。
  8.  前記メモリ検証手段は、前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
     前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力し、更新後のナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
     請求項7に記載のメモリ更新装置。
  9.  前記入力手段は、前記木構造に割り当てられているメモリアドレスを入力し、
     前記メモリ検証手段は、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
     前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおける前記ローカルカウンタの値を更新するカウンタ更新手段をさらに有し、
     前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び更新後の平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
     請求項1に記載のメモリ更新装置。
  10.  前記メモリ検証手段は、前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
     前記タグ更新手段は、前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力し、前記ナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
     請求項9に記載のメモリ更新装置。
  11.  改ざん検知を行いたい平文を入力として、少なくとも初期状態の木構造であってメモリを保護するために構成される木構造を出力するメモリ構造初期化装置と、
     少なくとも改ざんをチェックしたい平文の格納場所と木構造とを入力として、前記格納場所に対応するメモリが改ざんされているか否かを検証するメモリ検証装置と、
     少なくとも更新したい平文の格納場所とその更新内容、及び前記木構造を入力とし、更新後の木構造、又は、改ざんを検知したことを表すエラーメッセージを出力する、メモリ更新装置と、
     を有し、
     前記メモリ更新装置は、
     前記木構造と、木構造において更新されるノードに関する情報である更新情報とを入力する入力手段と、
     前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定する更新判定手段と、
     前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して各ノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するメモリ検証手段と、
     前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新する平文更新手段と、
     前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するタグ更新手段と、
     を有し、
     前記メモリ検証手段は、前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記パスにおける前記リーフノード以外のノードのタグを検証する、
     情報処理システム。
  12.  メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力し、
     前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定し、
     前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力し、
     前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新し、
     前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成する、
     メモリ更新方法。
  13.  前記リーフノードの更新内容が更新前の平文に依存するものである場合、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記パスにおける前記リーフノードを含む全てのノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証する、
     請求項12に記載のメモリ更新方法。
  14.  前記リーフノードの更新内容が、前記更新対象の平文を当該平文とは独立した固定値で置き換えるものである場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
     前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
     請求項12に記載のメモリ更新方法。
  15.  前記更新情報に前記固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定する、
     請求項14に記載のメモリ更新方法。
  16.  前記更新情報に前記更新対象の平文とは独立した固定値が含まれる場合に、前記リーフノードの更新内容が更新前の平文に依存するものでないと判定し、
     前記リーフノードにおける更新対象の前記平文を前記固定値で置き換えることで、前記平文を更新する、
     請求項12に記載のメモリ更新方法。
  17.  前記更新情報における前記固定値は、ユーザによって指定される、
     請求項15又は16に記載のメモリ更新方法。
  18.  前記パスにおける各ノードにおいて、各ノードで固有のナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
     前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおけるナンスの値を更新し、
     前記検証結果が改ざんの検知がないことを示す場合に、各ノードにおける更新後のナンス及び更新後の平文、又は、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
     請求項12に記載のメモリ更新方法。
  19.  前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、前記ナンス及び前記各ノードの複数の子ノードにおけるナンスの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
     前記検証結果が改ざんの検知がないことを示す場合に、更新後のナンス及び前記各ノードの複数の子ノードにおける更新後のナンスの連結をメッセージ認証コードに入力し、更新後のナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
     請求項18に記載のメモリ更新方法。
  20.  前記木構造に割り当てられているメモリアドレスを入力し、
     前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、
     前記検証結果が改ざんの検知がないことを示す場合に、前記パスにおける各ノードにおける前記ローカルカウンタの値を更新し、
     前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び更新後の平文、又は、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力することで、更新後のタグを生成する、
     請求項12に記載のメモリ更新方法。
  21.  前記木構造において、更新対象の暗号文が含まれる前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、各ノードで固有の前記メモリアドレスと各ノードにそれぞれ格納されているローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける前記ローカルカウンタの連結をメッセージ認証コードに入力することで検証に用いられるタグを生成し、前記ナンスと前記暗号文と前記検証に用いられるタグとを認証暗号に入力して、前記平文が改ざんされていないかを検証することにより、前記暗号文が改ざんされていないかを検証して、検証結果を出力し、
     前記検証結果が改ざんの検知がないことを示す場合に、各ノードで固有の前記メモリアドレスと各ノードの更新後のローカルカウンタとの連結をナンスとし、前記ナンス及び前記各ノードの複数の子ノードにおける更新後のローカルカウンタの連結をメッセージ認証コードに入力し、前記ナンス及び更新後の平文を認証暗号に入力することで、更新後の暗号文及び更新後のタグを生成する、
     請求項20に記載のメモリ更新方法。
  22.  メモリを保護するために構成される木構造と、木構造において更新されるノードに関する情報である更新情報とを入力するステップと、
     前記更新情報を用いて、更新対象の平文が含まれるリーフノードの更新内容が更新前の平文に依存するものであるか否かを判定するステップと、
     前記リーフノードの更新内容が更新前の平文に依存するものでない場合、前記木構造において、前記リーフノードからルートノードへのパスを生成し、前記パスにおける各ノードにおいて、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで検証に用いられるタグを生成して前記リーフノード以外のノードに格納されているタグを検証することによって、各ノードについて改ざんがなされていないかを検証して、検証結果を出力するステップと、
     前記検証結果が改ざんの検知がないことを示す場合に、前記更新情報に基づいて、前記リーフノードにおける更新対象の前記平文を更新するステップと、
     前記検証結果が改ざんの検知がないことを示す場合に、少なくとも各ノードで固有のナンスをメッセージ認証コードに入力することで、更新後のタグを生成するステップと、
     をコンピュータに実行させるプログラムが格納された非一時的なコンピュータ可読媒体。
PCT/JP2022/034251 2022-09-13 2022-09-13 メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体 WO2024057411A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/034251 WO2024057411A1 (ja) 2022-09-13 2022-09-13 メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/034251 WO2024057411A1 (ja) 2022-09-13 2022-09-13 メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体

Publications (1)

Publication Number Publication Date
WO2024057411A1 true WO2024057411A1 (ja) 2024-03-21

Family

ID=90274483

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/034251 WO2024057411A1 (ja) 2022-09-13 2022-09-13 メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体

Country Status (1)

Country Link
WO (1) WO2024057411A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005032130A (ja) * 2003-07-10 2005-02-03 Sony Corp データ管理装置、およびデータ管理方法、並びにコンピュータ・プログラム
JP2018195907A (ja) * 2017-05-15 2018-12-06 Kddi株式会社 データ管理システム、データ管理方法及びデータ管理プログラム
WO2021214922A1 (ja) * 2020-04-23 2021-10-28 日本電気株式会社 メモリ処理装置、メモリ検証装置、メモリ更新装置、メモリ保護システム、方法及びコンピュータ可読媒体

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005032130A (ja) * 2003-07-10 2005-02-03 Sony Corp データ管理装置、およびデータ管理方法、並びにコンピュータ・プログラム
JP2018195907A (ja) * 2017-05-15 2018-12-06 Kddi株式会社 データ管理システム、データ管理方法及びデータ管理プログラム
WO2021214922A1 (ja) * 2020-04-23 2021-10-28 日本電気株式会社 メモリ処理装置、メモリ検証装置、メモリ更新装置、メモリ保護システム、方法及びコンピュータ可読媒体

Similar Documents

Publication Publication Date Title
JP5770026B2 (ja) 半導体装置
KR100969740B1 (ko) 디지털 서명 및 인증을 위한 시스템 및 방법
US20190319801A1 (en) Efficient post-quantum anonymous attestation with signature-based join protocol and unlimited signatures
US20160006570A1 (en) Generating a key derived from a cryptographic key using a physically unclonable function
JP7116050B2 (ja) 認証命令を含む暗号メッセージを実現するコンピュータ・プログラム製品、コンピュータ・システム、およびコンピュータ実装方法
JP2017097376A (ja) 可変入力長調整可能暗号の構造および使用
JP2010527219A (ja) 物理的に複製不可能な機能を用いて電子機器のセキュリティを電子的に確保する方法およびシステム
JP2013005314A (ja) 半導体装置
US20170024585A1 (en) Secured electronics device
US10805090B1 (en) Address whitelisting using public/private keys and ring signature
JP6735926B2 (ja) 暗号化装置、復号装置、暗号化方法、復号方法、暗号化プログラム及び復号プログラム
EP2503482A1 (en) Electronic device with flash memory component
US9252943B1 (en) Parallelizable cipher construction
McGrew et al. RFC 8554: Leighton-Micali hash-based signatures
WO2019142307A1 (ja) 半導体装置、更新データ提供方法、更新データ受取方法およびプログラム
WO2024057411A1 (ja) メモリ更新装置、情報処理システム、メモリ更新方法及びコンピュータ可読媒体
JP7428239B2 (ja) メモリ処理装置、メモリ検証装置、メモリ更新装置、メモリ保護システム、方法及びプログラム
JP2022527904A (ja) 無線更新の有効性確認
JP2015026892A (ja) 情報処理システム
JP7012920B2 (ja) 暗号化装置、復号装置、暗号化方法、復号方法、暗号化プログラム及び復号プログラム
JP6007918B2 (ja) デバイス固有情報生成出力装置、デバイス固有情報生成方法および生成プログラム
US20110302422A1 (en) Hash function using a repeated function with shifts
JP2016012931A (ja) 半導体装置
WO2020039527A1 (ja) 署名処理装置、署名処理方法、署名処理システム、及びコンピュータ読み取り可能な記録媒体
JPWO2013002239A1 (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: 22958744

Country of ref document: EP

Kind code of ref document: A1