WO2016002020A1 - 行列生成装置及び行列生成方法及び行列生成プログラム - Google Patents

行列生成装置及び行列生成方法及び行列生成プログラム Download PDF

Info

Publication number
WO2016002020A1
WO2016002020A1 PCT/JP2014/067609 JP2014067609W WO2016002020A1 WO 2016002020 A1 WO2016002020 A1 WO 2016002020A1 JP 2014067609 W JP2014067609 W JP 2014067609W WO 2016002020 A1 WO2016002020 A1 WO 2016002020A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
node
row
column
processing unit
Prior art date
Application number
PCT/JP2014/067609
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 CN201480080242.4A priority Critical patent/CN106471558B/zh
Priority to US15/320,239 priority patent/US20170148357A1/en
Priority to JP2016530740A priority patent/JP6104469B2/ja
Priority to EP14896317.6A priority patent/EP3166094B1/en
Priority to PCT/JP2014/067609 priority patent/WO2016002020A1/ja
Publication of WO2016002020A1 publication Critical patent/WO2016002020A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes

Definitions

  • the present invention relates to a matrix generation device, a matrix generation method, and a matrix generation program.
  • the present invention relates to an apparatus, method, and program for generating a secret sharing matrix used for encryption and decryption, for example.
  • secret information is divided into several pieces of shared information.
  • the combination of distributed information to be collected can be defined by a logical expression using logical sum or logical product.
  • the secret sharing matrix is obtained by converting the logical expression into a matrix form. Elements included in the logical expression are assigned to each row of the secret sharing matrix.
  • the secret sharing matrix is designed so that the sum or product of the rows of elements satisfying the logical expression becomes a desired value. A desired value cannot be obtained by any combination of rows of elements that do not satisfy the logical expression.
  • the logical expression F is a logical product of the variable P and the variable Q, and the variable P is assigned to the first row and the variable Q is assigned to the second row.
  • the logical expression F becomes true. That is, the combination of the variable P and the variable Q satisfies the logical expression F. Neither the variable P nor the variable Q alone satisfies the logical expression F. Therefore, the secret sharing matrix M is designed so that the first row and the second row are not desired values, and the sum or product of the first row and the second row is a desired value.
  • the secret sharing matrix is used for functional encryption (for example, see Patent Document 1).
  • Non-Patent Documents 1 and 2 Conventionally, several methods for generating a secret sharing matrix have been proposed (see, for example, Non-Patent Documents 1 and 2).
  • Non-Patent Document 1 In the method described in Non-Patent Document 1, three values of 1, 1, ⁇ 1, and 0 must be used as matrix components. Even in the method described in Non-Patent Document 2, many values are used. In the conventional method, the secret sharing matrix cannot be generated efficiently.
  • An object of the present invention is to efficiently generate a matrix from a logical expression, for example.
  • a matrix generation device includes: A tree structure generation unit that receives an input of a logical expression and generates tree structure data representing the logical expression; Among the elements of the logical expression, a route processing unit that determines a type of an element expressed by a root of the tree structure data generated by the tree structure generation unit, and generates a matrix according to the determined type; When the matrix generated by the route processing unit is stored in a memory, nodes other than the root of the tree structure data generated by the tree structure generation unit are sequentially selected, and a node having child nodes is selected.
  • the logical expression when an operation corresponding to the type of element expressed by the selected node is performed on the matrix stored in the memory and a node having no child node is selected, the logical expression The variable that is the element represented by the selected node is associated with one row of the matrix stored in the memory, and after selecting the node of the tree structure data, the matrix stored in the memory And a node processing unit that outputs information indicating a variable associated with each row of the matrix.
  • a matrix corresponding to the type of element represented by the root of the tree structure data is generated. Thereafter, an operation corresponding to the type of element represented by each node of the tree structure data is performed on the matrix. For nodes that represent variables, the variables are associated with one row of the matrix. Finally, a matrix in which variables are associated with each row is obtained. As described above, according to the present invention, it is possible to efficiently generate a matrix by tracing tree structure data representing a logical expression.
  • FIG. 6 shows an example of a matrix finally generated in the first embodiment.
  • 1 is a block diagram showing a configuration of a matrix generation device according to Embodiment 1.
  • FIG. FIG. 3 is a block diagram showing a configuration of a tree structure generation unit of the matrix generation device according to the first embodiment.
  • FIG. 3 shows an example of a binary tree generated in the first embodiment. The figure which shows the recursive structure of the binary tree of FIG.
  • FIG. 3 is a block diagram showing a configuration of a route processing unit of the matrix generation device according to the first embodiment.
  • FIG. 3 is a block diagram showing a configuration of a node processing unit of the matrix generation device according to the first embodiment.
  • 5 is a flowchart showing an operation of a route processing unit of the matrix generation device according to the first embodiment.
  • FIG. 5 is a flowchart showing an operation of a node processing unit of the matrix generation device according to the first embodiment.
  • FIG. 3 shows an example of generating a matrix in the first embodiment.
  • the figure which shows an example of the hardware constitutions of the matrix production
  • variable P is expressed by the following expression.
  • A a
  • the value a is “male” or “female”.
  • variable P is expressed by the following expression.
  • A! A
  • the rows of the matrix M are counted in ascending order from top to bottom (ie, ordinal numbers are assigned).
  • the top line is the first line.
  • the line immediately below the first line is the second line.
  • the columns of the matrix M are counted in ascending order from left to right (ie, ordinal numbers are assigned). For example, the leftmost column is the first column. The column immediately to the right of the first column is the second column.
  • mapping is established between the row number (that is, the ordinal number) of the matrix M and the variable of the logical expression F.
  • FIG. 1 is a diagram illustrating an example of a matrix M finally generated in the present embodiment.
  • a matrix M is a secret sharing matrix of L rows ⁇ r columns.
  • the mapping ⁇ associates each row of the matrix M with one variable included in the variable set ⁇ p 1 ,..., P n ⁇ . That is, all the rows of the matrix M are associated with one variable by the mapping ⁇ .
  • N 4.
  • the matrix M and the mapping ⁇ are final outputs. This output is used for functional encryption, for example.
  • the matrix M may be a matrix other than the secret sharing matrix.
  • the number of rows L, the number of columns r, and the number of variables n can be changed as appropriate.
  • the contents of each variable can also be changed as appropriate.
  • FIG. 2 is a block diagram showing a configuration of the matrix generation device 100 according to the present embodiment.
  • the matrix generation device 100 includes a tree structure generation unit 110, a route processing unit 120, and a node processing unit 130.
  • the tree structure generation unit 110 receives the logical expression F and generates a binary tree T expressing the logical expression F.
  • the logical expression F is created by combining operators such as logical product (and), logical sum (or), negation (not), and variables.
  • the operators and variables are elements of the logical expression F, respectively.
  • the logical formula F is, for example, a logical formula that defines a combination of information distributed by the secret sharing scheme.
  • Binary tree T is an example of tree structure data.
  • the binary tree T has elements of the logical expression F as nodes.
  • Each node is assigned a node number.
  • the node number of the route is 1, and the node numbers are sequentially assigned to each node with priority given to the left child node. For example, if the root has a child node on the left side, the node number of the child node is 2. If a node with a node number of 2 has a child node (that is, a grandchild node of the root) on the left side, the node number of that child node is 3. If the node with node number 2 has no child node and the root has a child node on the right side, the node number of that child node is 3. Note that the node number assignment method can be changed as appropriate.
  • the tree structure generation unit 110 outputs the generated binary tree T and the number N of nodes of the binary tree T to the route processing unit 120 and the node processing unit 130.
  • the route processing unit 120 receives the binary tree T generated by the tree structure generation unit 110 and the number N of nodes of the binary tree T, and is expressed by the root of the binary tree T among the elements of the logical expression F. Determine the type of element.
  • the route processing unit 120 generates a matrix M according to the determined type.
  • the route processing unit 120 executes a logical product process.
  • a matrix M corresponding to the logical product operator is generated.
  • the node number I next to the root node number is calculated.
  • the route processing unit 120 executes a logical sum process.
  • a matrix M corresponding to the logical sum operator is generated.
  • the node number I next to the root node number is calculated.
  • the route processing unit 120 executes variable processing.
  • variable processing a matrix M corresponding to the variable is generated.
  • the node number I next to the root node number is calculated.
  • the variable is associated with one row of the matrix M by the mapping ⁇ .
  • the route processing unit 120 outputs the generated matrix M to the node processing unit 130.
  • the route processing unit 120 also outputs the calculated node number I to the node processing unit 130. If the route processing unit 120 generates the mapping ⁇ , the route processing unit 120 also outputs the mapping ⁇ to the node processing unit 130.
  • the node processing unit 130 includes a binary tree T generated by the tree structure generation unit 110, the number N of nodes of the binary tree T, a matrix M generated by the route processing unit 120, a mapping ⁇ (if any), a node In response to the input of the number I, the binary tree T, the number N of nodes, the matrix M, the node number I, and the mapping ⁇ are stored in a memory (not shown).
  • the node processing unit 130 sequentially selects nodes other than the root of the binary tree T. Specifically, the node processing unit 130 selects a node corresponding to the node number I. The node number I is incremented by 1 until the number N of nodes is exceeded.
  • the node processing unit 130 selects a node having child nodes, the node processing unit 130 performs an operation corresponding to the type of the element expressed by the selected node among the elements of the logical expression F on the matrix M stored in the memory. Do.
  • the node processing unit 130 performs a logical product process.
  • the logical product process an operation corresponding to the logical product operator is performed on the matrix M.
  • the node processing unit 130 executes a logical OR process.
  • a logical OR process an operation corresponding to the logical sum operator is performed on the matrix M.
  • a node that is, a leaf
  • a matrix M in which variables that are elements represented by the selected node among the elements of the logical expression F are stored in the memory. Correspond to one line.
  • the node processing unit 130 executes variable processing.
  • the variable is associated with one row of the matrix M by the mapping ⁇ .
  • the node processing unit 130 After completing the selection of the nodes of the binary tree T, the node processing unit 130 outputs the matrix M and the mapping ⁇ stored in the memory.
  • the mapping ⁇ is information indicating a variable associated with each row of the matrix M.
  • FIG. 3 is a block diagram showing a configuration of the tree structure generation unit 110.
  • FIG. 4 is a diagram illustrating an example of the binary tree T generated in the present embodiment.
  • the tree structure generation unit 110 includes a logical expression input unit 111, a binary tree generation unit 112, and a binary tree output unit 113.
  • the logical expression input unit 111 receives an input of the following logical expression F, which is a combination of logical product (and), logical sum (or), and negation (not).
  • F a combination of logical product (and), logical sum (or), and negation (not).
  • This logical formula F is valid when A is not 10, B is 20, and C is not 30, or when A is not 10 and D is 40.
  • the binary tree generation unit 112 converts the logical expression F obtained by the logical expression input unit 111 into a binary tree T.
  • Priority of operations in the logical expression F is the order of logical expressions in parentheses, logical product (and), and logical sum (or). Therefore, the calculation order of the logical expression F is the logical product (and) in parentheses, the logical sum (or) in parentheses, and the logical product (and) outside the parentheses.
  • the binary tree generation unit 112 arranges the elements of the logical expression F from the root in the reverse order of the calculation order of the logical expression F. Specifically, first, the binary tree generation unit 112 arranges the operator X to be calculated last (in the example of FIG. 4, a logical product outside the parentheses) at the root.
  • the binary tree generating unit 112 applies the operator that is last calculated by the logical expression on the left side of the operator Y1 to the left child node of the operator Y1. Place variables. Similarly, the binary tree generation unit 112 places the operator or variable that is finally calculated by the logical expression on the right side of the operator Y1 in the child node on the right side of the operator Y1. Thereafter, the binary tree generating unit 112 performs the same process on the child node on the right side of the operator X.
  • the binary tree generating unit 112 performs the process on the child node on the right side of the operator X as it is.
  • the binary tree generation unit 112 alternately repeats the process for the left child node and the process for the right child node until the variables have been allocated to all the leaves.
  • the binary tree generation unit 112 assigns a node number to each node. 1 is assigned to the route. Other nodes are assigned numbers after 2 with priority on the left side.
  • the binary tree generator 112 records the maximum value of the node number as the number N of nodes.
  • the binary tree output unit 113 outputs the binary tree T generated by the binary tree generation unit 112 and the number N of nodes recorded by the binary tree generation unit 112.
  • the processing is performed using a recursive structure as shown in FIG.
  • FIG. 6 is a block diagram showing a configuration of the route processing unit 120.
  • FIG. 7 is a block diagram illustrating a configuration of the node processing unit 130.
  • FIG. 8 is a flowchart showing the operation of the route processing unit 120.
  • FIG. 9 is a flowchart showing the operation of the node processing unit 130.
  • the route processing unit 120 includes a route determination unit 121, a logical product processing unit 122a, a logical sum processing unit 122b, a variable processing unit 122c, and a processing result output unit 123.
  • the node processing unit 130 includes a node determination unit 131, a logical product processing unit 132a, a logical sum processing unit 132b, a variable processing unit 132c, a processing number determination unit 133, and a processing result output unit 134.
  • the route determination unit 121 receives input of the binary tree T and the number of nodes N.
  • the route determination unit 121 initializes the mapping ⁇ from the row number to the variable.
  • the route determination unit 121 determines whether the root of the binary tree T is a logical product, a logical sum, or a variable. If the route is a logical product, the flow proceeds to S24a. If the route is a logical sum, the flow proceeds to S24b. If the route is a variable, the flow proceeds to S24c.
  • the logical product processing unit 122a receives the input of the binary tree T from the route determination unit 121 and generates the following matrix M. The flow proceeds to S25a.
  • the logical product processing unit 122a obtains a node number I by adding 1 to the node number of the root of the binary tree T. The flow proceeds to S26.
  • the logical sum processing unit 122b receives the input of the binary tree T from the route determination unit 121 and generates the following matrix M. The flow proceeds to S25b.
  • the logical sum processing unit 122b adds 1 to the node number of the root of the binary tree T to obtain the node number I.
  • the flow proceeds to S26.
  • variable processing unit 122 c receives the binary tree T and the mapping ⁇ from the route determination unit 121 and generates the following matrix M. The flow proceeds to S25c. (1)
  • variable processing unit 122c obtains the node number I by adding 1 to the node number of the root of the binary tree T.
  • variable processing unit 122c updates the mapping ⁇ as follows. The flow proceeds to S26. ⁇ : ⁇ (1, p 1 ) ⁇
  • the processing result output unit 123 outputs the matrix M generated by any of the logical product processing unit 122a, the logical sum processing unit 122b, and the variable processing unit 122c.
  • the processing result output unit 123 also outputs the node number I calculated by any of the logical product processing unit 122a, the logical sum processing unit 122b, and the variable processing unit 122c.
  • the processing result output unit 123 further outputs the mapping ⁇ in the initial state or the mapping ⁇ updated by the variable processing unit 122c.
  • the node determination unit 131 receives inputs of the binary tree T, the number of nodes N, the matrix M, the node number I, and the mapping ⁇ .
  • the node determination unit 131 sets the processing row number CR to 1.
  • the CR row of the matrix M is a row to which variables are associated next.
  • the processing number determination unit 133 determines whether the node number I is larger than the node number N. If the node number I is smaller than or equal to the node number N (ie, I ⁇ N), the flow proceeds to S34. If the node number I is greater than the node number N (ie, I> N), the binary tree T has no more nodes to select, and the flow proceeds to S36.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • the node determination unit 131 determines whether the selected node is a logical product, a logical sum, or a variable. If the node (in this case, a node having child nodes) is a logical product, the flow proceeds to S35a. If the node (in this case, a node having child nodes) is a logical sum, the flow proceeds to S35b. If the node (in this case, a leaf) is a variable, the flow proceeds to S35c.
  • the logical product processing unit 132a receives the input of the binary tree T, the matrix M, the processing row number CR, the node number I, and the mapping ⁇ from the node determination unit 131, and executes the logical product processing. In the logical product process, the matrix M and the node number I are updated. Details of the logical product processing will be described later. The flow returns to S33.
  • the logical sum processing unit 132b receives the input of the binary tree T, the matrix M, the processing row number CR, the node number I, and the mapping ⁇ from the node determination unit 131, and executes the logical sum processing. In the logical sum process, the matrix M and the node number I are updated. Details of the logical sum processing will be described later. The flow returns to S33.
  • variable processing unit 132c receives input of the binary tree T, the matrix M, the processing row number CR, the node number I, and the mapping ⁇ from the node determining unit 131, and executes variable processing.
  • the matrix M, the processing row number CR, the node number I, and the mapping ⁇ are updated. Details of the variable processing will be described later. The flow returns to S33.
  • the processing number determination unit 133 sets the matrix M and the node number I updated by any one of the logical product processing unit 132a, the logical sum processing unit 132b, and the variable processing unit 132c. The data is passed to the node determination unit 131. If the processing line number CR and the mapping ⁇ are updated by the variable processing unit 132c, the processing number determination unit 133 also passes the updated processing line number CR and the mapping ⁇ to the node determination unit 131.
  • the processing result output unit 134 receives the matrix M and the mapping ⁇ from the processing number determination unit 133, and outputs the matrix M and the mapping ⁇ .
  • the logical product processing unit 132a receives a binary tree T, a matrix M of L ′ ⁇ r ′, a processing row number CR, a node number I, and a mapping ⁇ as inputs.
  • the logical product processing unit 132a adds a row in which all the components are 0 as the (L ′ + 1) th row in the L ′ ⁇ r ′ matrix M. Since rows are added, the matrix M is a (L ′ + 1) ⁇ r ′ matrix.
  • the logical product processing unit 132a adds a column whose components are all 0 as the (r ′ + 1) th column in the (L ′ + 1) ⁇ r ′ matrix M. Since columns are added, the matrix M is a matrix of (L ′ + 1) ⁇ (r ′ + 1).
  • the logical product processing unit 132a defines a column in which 1 is present on the leftmost side of the CR row as the CL column in the (L ′ + 1) ⁇ (r ′ + 1) matrix M.
  • the logical product processing unit 132a overwrites the (i + 1) th column with the i-th column in the (L ′ + 1) ⁇ (r ′ + 1) matrix M, where i is a value from r ′ to CL. That is, the logical product processing unit 132a copies the r ′ column to the (r ′ + 1) column, the (r′ ⁇ 1) column to the r ′ column,... The column is copied to the (CL + 1) column.
  • the logical product processing unit 132a overwrites the (j + 1) th row with the jth row in the matrix M of (L ′ + 1) ⁇ (r ′ + 1), where j is a value from L ′ to CR. That is, the logical product processing unit 132a copies the L ′ line to the (L ′ + 1) line, the (L′ ⁇ 1) line to the L ′ line,... The line is copied to the (CR + 1) line.
  • the logical product processing unit 132a sets the CR row and CL column components to 1, and the CR row (CL + 1) column components to 0 ( The component in the (CR + 1) th row and the CL column is rewritten to 0, and the component in the (CR + 1) th row (CL + 1) column is rewritten to 1.
  • the logical product processing unit 132a adds 1 to the node number I.
  • the logical product processing unit 132a outputs a binary tree T, a matrix M of (L ′ + 1) ⁇ (r ′ + 1), a processing row number CR, a node number I, and a mapping ⁇ .
  • the logical sum processing unit 132b receives as input the binary tree T, the matrix M of L ′ ⁇ r ′, the processing row number CR, the node number I, and the mapping ⁇ .
  • the logical sum processing unit 132b adds a row whose components are all 0 as the (L ′ + 1) th row in the L ′ ⁇ r ′ matrix M. Since rows are added, the matrix M is a (L ′ + 1) ⁇ r ′ matrix.
  • the logical sum processing unit 132b overwrites the (j + 1) th row with the jth row in the (L ′ + 1) ⁇ r ′ matrix M, where j is a value from L ′ to CR. That is, the logical product processing unit 132a copies the L ′ line to the (L ′ + 1) line, the (L′ ⁇ 1) line to the L ′ line,... The line is copied to the (CR + 1) line.
  • the logical sum processing unit 132b adds 1 to the node number I.
  • the logical sum processing unit 132b outputs a binary tree T, a matrix L of (L ′ + 1) ⁇ r ′, a processing row number CR, a node number I, and a mapping ⁇ .
  • variable processing unit 132c receives as input the binary tree T, the matrix M of L ′ ⁇ r ′, the processing row number CR, the node number I, and the mapping ⁇ .
  • variable processing unit 132c adds (CR, p k ) to the mapping ⁇ .
  • variable processing unit 132c adds 1 to the node number I.
  • variable processing unit 132c adds 1 to the processing line number CR.
  • the variable processing unit 132c outputs a binary tree T, a matrix M of L ′ ⁇ r ′, a processing row number CR, a node number I, and a mapping ⁇ .
  • the combination of rows in which the addition result of all the columns is 1 when the components of the same column are added is associated with each row. If the given variable is true, the logical expression F is true.
  • the variable associated with each row is Even if true, the logical expression F is false.
  • the above-described route processing and node processing are performed in the present embodiment.
  • the route processing unit 120 performs the process of S24a. That is, the route processing unit 120 calculates a matrix of 2 rows and 2 columns in which the first row, first column and second row, second column components are 1, and the first row, second column and second row, first column components are 0. A matrix M corresponding to the product operator is generated.
  • the route processing unit 120 performs the process of S24b. That is, the route processing unit 120 generates a two-row, one-column matrix in which all components are 1, as a matrix M corresponding to the logical sum operator.
  • the node processing unit 130 performs the process of S35a. That is, the node processing unit 130 adds a new row and column, sets the row to which the variable is associated next as the CR row, and selects the column with the smallest ordinal number among the columns whose CR row has a component of 1 as CL. As the column, the CR row CL column and the (CR + 1) th row (CL + 1) column component are set to 1, and the CR row (CL + 1) and (CR + 1) row CL column components are set to 0. The operation is performed on the matrix M as an operation corresponding to the logical product operator.
  • the CR line is substantially expanded to 2 lines, and the (CR + 1) th and subsequent lines are shifted downward by one line.
  • the CL column is expanded to two columns, and the (CL + 1) th column and beyond are shifted to the right by one column.
  • the component of the CR row before the expansion and the CL column is converted into the same 2-row / 2-column submatrix as the matrix generated by the processing of S24a, and the expansion (that is, the operation corresponding to the AND operator). ) Can be prevented from affecting other components. For this reason, the logical product operator expressed by the selected node can be appropriately reflected in the matrix M.
  • the node processing unit 130 performs the process of S35b. In other words, the node processing unit 130 adds a new line, and sets the component corresponding to the variable to the CR line, and sets each component in the (CR + 1) line to the same value as each component in the CR line. Is performed on the matrix M as an operation corresponding to the logical sum operator.
  • the CR line is substantially expanded to 2 lines, and the (CR + 1) th and subsequent lines are shifted downward by one line.
  • the component having a value of 1 in the CR row before the expansion is converted into a sub-matrix having the same 2-row and one-column as the matrix generated by the processing of S24b, and the expansion (that is, the operation corresponding to the logical sum operator). ) Can be prevented from affecting other components. For this reason, the logical sum operator expressed by the selected node can be appropriately reflected in the matrix M.
  • the matrix M can be efficiently generated by following the binary tree T expressing the logical expression F.
  • the node processing unit 130 executes processing for each node of the binary tree T by recursive calling. Therefore, the matrix M can be generated more efficiently.
  • the matrix generation method performs a process on the input of the logical expression F, the step of generating a tree structure equivalent to the logical expression F, and the root of the tree structure.
  • a step of determining whether or not a tree-structured node has a child node, a step of processing a child node by recursion if the node has a child node, and a node being a child node In the case of not having, the step of associating a variable with a row and returning to the parent node is included.
  • the component of the generated matrix M is 0 or 1.
  • a vector consisting of all 1s can be generated. Even if the row vectors of sub-matrices composed of rows in which the logical expression F is not established are linearly combined, a vector consisting of all 1s cannot be generated.
  • the size of the matrix M can be reduced by using this matrix generation method. Further, the conversion process from the logical expression F to the matrix M can be made efficient. Furthermore, the program size at the time of mounting can be reduced.
  • the following matrix (or partial matrix) is generated by the logical product processing of S24a and S35a.
  • the following matrix (or partial matrix) may be generated by the logical product processing of S24a and S35a.
  • the matrix M is composed of 0 and 1, but the matrix M may be composed of integer values other than 0 and 1 or real values.
  • FIG. 10 is a diagram illustrating an example of generating the matrix M in the present embodiment.
  • the route determination unit 121 receives an input of a binary tree T expressing the following logical expression F and the number of nodes N.
  • the number N of nodes having nodes is seven.
  • the route determination unit 121 initializes the mapping ⁇ .
  • the route determination unit 121 determines that the route of the binary tree T is a logical product. The flow proceeds to S24a.
  • the processing result output unit 123 outputs the matrix M, the node number I, and the mapping ⁇ .
  • the node determination unit 131 receives inputs of the binary tree T, the number of nodes N, the matrix M, the node number I, and the mapping ⁇ .
  • the number N of nodes is 7.
  • Node number I is 2.
  • the node determination unit 131 sets the processing row number CR to 1.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • variable processing unit 132c receives as input the binary tree T, 2 ⁇ 2 matrix M, processing row number CR, node number I, and mapping ⁇ .
  • the processing line number CR is 1.
  • Node number I is 2.
  • variable processing unit 132c updates the node number I from 2 to 3.
  • variable processing unit 132c updates the processing line number CR from 1 to 2.
  • variable processing unit 132c outputs a binary tree T, a 2 ⁇ 2 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • the node determination unit 131 determines that the selected node is a logical sum. The flow proceeds to S35b.
  • the logical sum processing unit 132b receives as input the binary tree T, the 2 ⁇ 2 matrix M, the processing row number CR, the node number I, and the mapping ⁇ .
  • the processing line number CR is 2.
  • Node number I is three.
  • the logical sum processing unit 132b adds a row whose components are all 0 as the third row. Since rows are added, the matrix M becomes the following 3 ⁇ 2 matrix.
  • the logical sum processing unit 132b copies the second row to the third row in the 3 ⁇ 2 matrix M.
  • the matrix M becomes the following matrix.
  • the logical sum processing unit 132b updates the node number I from 3 to 4.
  • the logical sum processing unit 132b outputs a binary tree T, a 3 ⁇ 2 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the processing result output unit 134 receives the matrix M and the mapping ⁇ from the processing number determination unit 133, and outputs the matrix M and the mapping ⁇ .
  • the node determination unit 131 selects a node corresponding to the node number I.
  • the node determination unit 131 determines that the selected node is a logical product. The flow proceeds to S35a.
  • the logical product processing unit 132a receives as input the binary tree T, the 3 ⁇ 2 matrix M, the processing row number CR, the node number I, and the mapping ⁇ .
  • the processing line number CR is 2.
  • Node number I is four.
  • the logical product processing unit 132a adds a row in which all the components are 0 as the fourth row in the 3 ⁇ 2 matrix M. Since rows are added, the matrix M becomes the following 4 ⁇ 2 matrix.
  • the logical product processing unit 132a adds a column whose components are all 0 as the third column in the 4 ⁇ 2 matrix M. Since columns are added, the matrix M is the following 4 ⁇ 3 matrix.
  • the logical product processing unit 132a defines a column in the 4 ⁇ 3 matrix M having 1 at the leftmost position of the CR row as the CL column. That is, the logical product processing unit 132a sets CL to 2.
  • the AND processing unit 132a copies the second column to the third column in the 4 ⁇ 3 matrix M.
  • the matrix M becomes the following matrix.
  • the logical product processing unit 132a copies the third row to the fourth row and copies the second row to the third row.
  • the matrix M becomes the following matrix.
  • the logical product processing unit 132a sets the CR row CL column component to 1, the CR row (CL + 1) column component to 0, and the (CR + 1) row CL column.
  • the component is rewritten to 0, and the component in the (CR + 1) th row (CL + 1) th column is rewritten to 1. That is, the logical product processing unit 132a sets the components of the second row, second column, and third row, third column to 1, and sets the components of the second row, third column, and third row, second column to 0.
  • the matrix M becomes the following matrix.
  • the logical product processing unit 132a updates the node number I from 4 to 5.
  • the logical product processing unit 132a outputs a binary tree T, a 4 ⁇ 3 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • variable processing unit 132c receives as input the binary tree T, the 4 ⁇ 3 matrix M, the processing row number CR, the node number I, and the mapping ⁇ .
  • the processing line number CR is 2.
  • the node number I is 5.
  • variable processing unit 132c updates the node number I from 5 to 6.
  • variable processing unit 132c updates the processing line number CR from 2 to 3.
  • variable processing unit 132c outputs a binary tree T, a 4 ⁇ 3 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • variable processing unit 132c receives as input the binary tree T, the 4 ⁇ 3 matrix M, the processing row number CR, the node number I, and the mapping ⁇ .
  • the processing line number CR is 3.
  • Node number I is six.
  • variable processing unit 132c updates the node number I from 6 to 7.
  • variable processing unit 132c updates the processing line number CR from 3 to 4.
  • variable processing unit 132c outputs a binary tree T, a 4 ⁇ 3 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the node determination unit 131 selects a node corresponding to the node number I.
  • variable processing unit 132c receives as input the binary tree T, the 4 ⁇ 3 matrix M, the processing row number CR, the node number I, and the mapping ⁇ .
  • the processing line number CR is 3.
  • the node number I is 7.
  • variable processing unit 132c updates the node number I from 7 to 8.
  • variable processing unit 132c updates the processing line number CR from 4 to 5.
  • variable processing unit 132c outputs a binary tree T, a 4 ⁇ 3 matrix M, a processing row number CR, a node number I, and a mapping ⁇ . The flow returns to S33.
  • the processing result output unit 134 outputs the 4 ⁇ 3 matrix M and the mapping ⁇ .
  • FIG. 11 is a diagram illustrating an example of a hardware configuration of the matrix generation device 100 according to the embodiment of the present invention.
  • the matrix generation device 100 is a computer and includes hardware such as an output device 910, an input device 920, a storage device 930, and a processing device 940.
  • the hardware is used by each unit of the matrix generation device 100 (described as “unit” in the description of the embodiment of the present invention).
  • the output device 910 is, for example, a display device such as an LCD (Liquid / Crystal / Display), a printer, or a communication module (communication circuit or the like).
  • the output device 910 is used for outputting (transmitting) data, information, and signals by what is described as “unit” in the description of the embodiment of the present invention.
  • the input device 920 is, for example, a keyboard, a mouse, a touch panel, a communication module (communication circuit or the like).
  • the input device 920 is used for inputting (receiving) data, information, and signals by what is described as a “unit” in the description of the embodiment of the present invention.
  • the storage device 930 is, for example, a ROM (Read / Only / Memory), a RAM (Random / Access / Memory), a HDD (Hard / Disk / Drive), or an SSD (Solid / State / Drive).
  • the storage device 930 stores a program 931 and a file 932.
  • the program 931 includes a program for executing processing (function) described as “unit” in the description of the embodiment of the present invention.
  • the file 932 includes data, information, signals (values), and the like that are calculated, processed, read, written, used, input, output, etc. by what is described as “parts” in the description of the embodiment of the present invention. It is.
  • the processing device 940 is, for example, a CPU (Central Processing Unit).
  • the processing device 940 is connected to other hardware devices via a bus or the like, and controls those hardware devices.
  • the processing device 940 reads the program 931 from the storage device 930 and executes the program 931.
  • the processing device 940 is used for performing calculation, processing, reading, writing, use, input, output, and the like by what is described as “unit” in the description of the embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

 行列生成装置(100)は、木構造生成部(110)、ルート処理部(120)、ノード処理部(130)を備える。木構造生成部(110)は、論理式Fを表現する二分木Tを生成する。ルート処理部(120)は、論理式Fの要素のうち、二分木Tのルートによって表現される要素の種類に応じた行列Mを生成する。ノード処理部(130)は、二分木Tのルート以外のノードを順次選択し、子ノードを持つノードによって表現される要素の種類に応じた操作を行列Mに対して行い、子ノードを持たないノードによって表現される要素である変数を行列Mの一行に対応付ける。ノード処理部(130)は、二分木Tのノードを選択し終えた後は行列M及び写像ρを出力する。写像ρは、行列Mの各行に対応付けた変数を示す情報である。

Description

行列生成装置及び行列生成方法及び行列生成プログラム
 本発明は、行列生成装置及び行列生成方法及び行列生成プログラムに関するものである。本発明は、例えば、暗号化及び復号に用いられる秘密分散行列を生成する装置及び方法及びプログラムに関するものである。
 秘密分散方式では、秘密情報がいくつかの分散情報に分けられる。秘密情報を復元するには、特定の組み合わせの分散情報を集めなければならない。どのような組み合わせの分散情報を集めればよいかは、論理和や論理積等を用いた論理式で定義することができる。秘密分散行列は、その論理式を行列形式に変換したものである。秘密分散行列の各行には、論理式に含まれる要素が割り当てられている。秘密分散行列は、論理式を満たす要素の行の和又は積が所望の値になるように設計される。論理式を満たさない要素の行をどのように組み合わせても所望の値は得られない。
 例えば、論理式Fが変数Pと変数Qとの論理積であり、秘密分散行列Mの一行目に変数P、二行目に変数Qが割り当てられているとする。この場合、変数Pと変数Qとの両方が真であれば、論理式Fが真になる。即ち、変数Pと変数Qとの組み合わせが論理式Fを満たす。変数P及び変数Qは、いずれも単独では論理式Fを満たさない。よって、秘密分散行列Mは、一行目及び二行目がいずれも所望の値ではなく、一行目と二行目との和又は積が所望の値になるように設計される。
 秘密分散行列は、関数型暗号に用いられる(例えば、特許文献1参照)。
 従来、秘密分散行列を生成するための方法がいくつか提案されている(例えば、非特許文献1及び2参照)。
国際公開第2011/135895号
A. Lewko, B. Waters, "Decentralizing Attribute-Based Encryption", Advances in Cryptology - EUROCRYPT 2011, Lecture Notes in Computer Science Volume 6632, 2011, pp 568-588 Z. Liu, Z. Cao, "On Efficiently Transferring the Linear Secret-Sharing Scheme Matrix in Ciphertext-Policy Attribute-Based Encryption", IACR Cryptology ePrint Archive, 374, 2010
 非特許文献1に記載されている方法では、行列の成分として1と-1と0という3つの値を用いなければならない。非特許文献2に記載されている方法でも、多くの値を用いている。従来の方法では、秘密分散行列を効率的に生成することができない。
 本発明は、例えば、論理式から行列を効率的に生成することを目的とする。
 本発明の一の態様に係る行列生成装置は、
 論理式の入力を受けて、前記論理式を表現する木構造データを生成する木構造生成部と、
 前記論理式の要素のうち、前記木構造生成部により生成された木構造データのルートによって表現される要素の種類を判定し、判定した種類に応じた行列を生成するルート処理部と、
 前記ルート処理部により生成された行列をメモリに格納するとともに、前記木構造生成部により生成された木構造データの前記ルート以外のノードを順次選択し、子ノードを持つノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素の種類に応じた操作を、前記メモリに格納した行列に対して行い、子ノードを持たないノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素である変数を、前記メモリに格納した行列の一行に対応付け、当該木構造データのノードを選択し終えた後は、前記メモリに格納した行列及びその行列の各行に対応付けた変数を示す情報を出力するノード処理部とを備える。
 本発明では、最初に、木構造データのルートによって表現される要素の種類に応じた行列が生成される。その後、木構造データの各ノードによって表現される要素の種類に応じた操作が行列に対して行われる。変数を表現するノードについては、その変数が行列の一行に対応付けられる。最終的には、各行に変数が対応付けられた行列が得られる。このように、本発明によれば、論理式を表現する木構造データを辿って行列を効率的に生成することができる。
実施の形態1で最終的に生成される行列の一例を示す図。 実施の形態1に係る行列生成装置の構成を示すブロック図。 実施の形態1に係る行列生成装置の木構造生成部の構成を示すブロック図。 実施の形態1で生成される二分木の一例を示す図。 図4の二分木の再帰構造を示す図。 実施の形態1に係る行列生成装置のルート処理部の構成を示すブロック図。 実施の形態1に係る行列生成装置のノード処理部の構成を示すブロック図。 実施の形態1に係る行列生成装置のルート処理部の動作を示すフローチャート。 実施の形態1に係る行列生成装置のノード処理部の動作を示すフローチャート。 実施の形態1で行列を生成する例を示す図。 本発明の実施の形態に係る行列生成装置のハードウェア構成の一例を示す図。
 以下、本発明の実施の形態について、図を用いて説明する。
 実施の形態の説明では、以下の記法を用いる。
 論理式Fの変数Pの内容が、ある種類Aの値がaであるという事象の場合、変数Pを次式で表す。
 A=a
 一例として、種類Aが「性別」であれば、値aは「男性」又は「女性」である。
 論理式Fの変数Pの内容が、ある種類Aの値がaでないという事象の場合、変数Pを次式で表す。
 A!=a
 行列Mの行は、上から下に向かって昇順で数えられる(即ち、序数が割り当てられる)。例えば、最も上の行が一行目である。一行目のすぐ下の行が二行目である。
 行列Mの列は、左から右に向かって昇順で数えられる(即ち、序数が割り当てられる)。例えば、最も左の列が一列目である。一列目のすぐ右の列が二列目である。
 行列Mの行番号(即ち、序数)と論理式Fの変数との間には、写像が成り立つ。行番号ROWと変数Pとの間に写像ρが成り立つことを次式のように記述する。
 ρ(ROW)=P
 ρ(1)=p、ρ(2)=pとなる写像ρが定義されていることを以下のように記述する。
 ρ:{(1,p),(2,p)}
 実施の形態1.
 図1は、本実施の形態で最終的に生成される行列Mの一例を示す図である。
 図1において、行列Mは、L行×r列の秘密分散行列である。写像ρは、行列Mの各行と変数の集合{p,・・・,p}に含まれる一つの変数とを対応付ける。即ち、行列Mの全ての行が写像ρによって一つの変数と対応付けられる。
 図1の例では、L=4、r=3である。即ち、行列Mは、四行三列の行列である。また、n=4である。変数p~pは、それぞれA!=10、B=20、C!=30、D=40である。即ち、変数の集合は、{A!=10,B=20,C!=30,D=40}である。
 写像ρは、以下のように定義できる。
 ρ:{(1,(A!=10)),(2,(B=20)),(3,(C!=30)),(4,(D=40))}
 本実施の形態では、行列Mと写像ρとが最終的な出力となる。この出力は、例えば、関数型暗号に用いられる。
 なお、本実施の形態において、行列Mは、秘密分散行列以外の行列であってもよい。行数L、列数r、変数の数nは、適宜変更することができる。各変数の内容も、適宜変更することができる。
 図2は、本実施の形態に係る行列生成装置100の構成を示すブロック図である。
 図2において、行列生成装置100は、木構造生成部110、ルート処理部120、ノード処理部130を備える。
 木構造生成部110は、論理式Fの入力を受けて、論理式Fを表現する二分木Tを生成する。
 論理式Fは、論理積(and)、論理和(or)、否定(not)といった演算子と、変数とを組み合わせて作成される。演算子及び変数は、それぞれ論理式Fの要素である。論理式Fは、例えば、秘密分散方式で分散された情報の組み合わせを定義する論理式である。
 二分木Tは、木構造データの一例である。二分木Tは、論理式Fの要素をノードとして持つ。各ノードには、ノード番号が割り当てられる。本実施の形態では、ルートのノード番号が1となり、左側の子ノードを優先して各ノードにノード番号が順次割り当てられる。例えば、ルートが左側に子ノードを持っていれば、その子ノードのノード番号は2となる。ノード番号が2のノードが左側に子ノード(即ち、ルートの孫ノード)を持っていれば、その子ノードのノード番号は3となる。ノード番号が2のノードが子ノードを持っておらず、ルートが右側に子ノードを持っていれば、その子ノードのノード番号が3となる。なお、ノード番号の割り当て方は、適宜変更することができる。
 木構造生成部110は、生成した二分木T及びその二分木Tのノード数Nを、ルート処理部120及びノード処理部130に出力する。
 ルート処理部120は、木構造生成部110により生成された二分木T及びその二分木Tのノード数Nの入力を受けて、論理式Fの要素のうち、二分木Tのルートによって表現される要素の種類を判定する。ルート処理部120は、判定した種類に応じた行列Mを生成する。
 例えば、ルートによって表現される要素の種類が論理積演算子であれば、ルート処理部120は、論理積処理を実行する。論理積処理では、論理積演算子に応じた行列Mが生成される。また、ルートのノード番号の次のノード番号Iが計算される。
 ルートによって表現される要素の種類が論理和演算子であれば、ルート処理部120は、論理和処理を実行する。論理和処理では、論理和演算子に応じた行列Mが生成される。また、ルートのノード番号の次のノード番号Iが計算される。
 ルートによって表現される要素の種類が変数であれば(即ち、ノード数Nが1の場合)、ルート処理部120は、変数処理を実行する。変数処理では、変数に応じた行列Mが生成される。また、ルートのノード番号の次のノード番号Iが計算される。さらに、写像ρによって変数が行列Mの一行に対応付けられる。
 ルート処理部120は、生成した行列Mをノード処理部130に出力する。ルート処理部120は、計算したノード番号Iもノード処理部130に出力する。ルート処理部120は、写像ρを生成していれば、写像ρもノード処理部130に出力する。
 ノード処理部130は、木構造生成部110により生成された二分木T及びその二分木Tのノード数Nと、ルート処理部120により生成された行列M及び写像ρ(もしあれば)と、ノード番号Iとの入力を受けて、二分木T、ノード数N、行列M、ノード番号I、写像ρをメモリ(図示していない)に格納する。
 ノード処理部130は、二分木Tのルート以外のノードを順次選択する。具体的には、ノード処理部130は、ノード番号Iに対応するノードを選択する。ノード番号Iは、ノード数Nを超えるまで1ずつインクリメントされる。
 ノード処理部130は、子ノードを持つノードを選択した場合は、論理式Fの要素のうち、選択したノードによって表現される要素の種類に応じた操作を、メモリに格納した行列Mに対して行う。
 例えば、選択したノードによって表現される要素の種類が論理積演算子であれば、ノード処理部130は、論理積処理を実行する。論理積処理では、論理積演算子に応じた操作が行列Mに対して行われる。
 選択したノードによって表現される要素の種類が論理和演算子であれば、ノード処理部130は、論理和処理を実行する。論理和処理では、論理和演算子に応じた操作が行列Mに対して行われる。
 ノード処理部130は、子ノードを持たないノード(即ち、リーフ)を選択した場合は、論理式Fの要素のうち、選択したノードによって表現される要素である変数を、メモリに格納した行列Mの一行に対応付ける。
 即ち、選択したノードによって表現される要素の種類が変数であれば、ノード処理部130は、変数処理を実行する。変数処理では、写像ρによって変数が行列Mの一行に対応付けられる。
 ノード処理部130は、二分木Tのノードを選択し終えた後は、メモリに格納した行列M及び写像ρを出力する。写像ρは、行列Mの各行に対応付けた変数を示す情報である。
 以下では、木構造生成部110の詳細について説明する。
 図3は、木構造生成部110の構成を示すブロック図である。図4は、本実施の形態で生成される二分木Tの一例を示す図である。
 図3において、木構造生成部110は、論理式入力部111、二分木生成部112、二分木出力部113を備える。
 以下では、図4の例を用いて、木構造生成部110の各部の動作を説明する。
 論理式入力部111は、論理積(and)、論理和(or)、否定(not)が組み合わされた以下の論理式Fの入力を受ける。
 A!=10 and ((B=20 and C!=30) or D=40)
 この論理式Fは、Aが10ではなく、Bが20であり、かつ、Cが30でない場合、若しくは、Aが10ではなく、かつ、Dが40である場合に成り立つ。
 二分木生成部112は、論理式入力部111によって得られた論理式Fを二分木Tに変換する。
 論理式Fにおける演算の優先順位は、括弧内の論理式、論理積(and)、論理和(or)の順である。よって、論理式Fの演算順は、括弧内の論理積(and)、括弧内の論理和(or)、括弧外の論理積(and)の順となる。二分木生成部112は、論理式Fを二分木Tに変換する際に、論理式Fの演算順の逆順に、論理式Fの要素をルートから配置していく。具体的には、まず、二分木生成部112は、最後に演算される演算子X(図4の例では、括弧外の論理積)をルートに配置する。二分木生成部112は、演算子Xの左側の子ノードに、演算子Xの左側の論理式で最後に演算される演算子Y1若しくは変数Y2(図4の例では、A!=10)を配置する。二分木生成部112は、演算子Xの右側の子ノードにも同様に、演算子Xの右側の論理式で最後に演算される演算子Z1(図4の例では、括弧内の論理和)若しくは変数Z2を配置する。次に、二分木生成部112は、演算子Xの左側の子ノードに着目する。演算子Xの左側の子ノードが演算子Y1であれば、二分木生成部112は、演算子Y1の左側の子ノードに、演算子Y1の左側の論理式で最後に演算される演算子若しくは変数を配置する。二分木生成部112は、演算子Y1の右側の子ノードにも同様に、演算子Y1の右側の論理式で最後に演算される演算子若しくは変数を配置する。その後、二分木生成部112は、演算子Xの右側の子ノードについて同様の処理を行う。一方、演算子Xの左側の子ノードが変数Y2であれば、二分木生成部112は、そのまま演算子Xの右側の子ノードについての処理を行う。二分木生成部112は、全てのリーフに変数を配置し終えるまで、左側の子ノードについての処理と右側の子ノードについての処理とを交互に繰り返す。
 二分木Tが完成したならば、二分木生成部112は、各ノードにノード番号を付与する。ルートには1が付与される。他のノードには、左側優先で2以降の番号が付与される。二分木生成部112は、ノード番号の最大値をノード数Nとして記録する。
 図4の例では、以下の7個のノードを持つ二分木Tが生成される。
・ノード番号1(ルート):論理積(and)
・ノード番号2(リーフ):A!=10
・ノード番号3:論理和(or)
・ノード番号4:論理積(and)
・ノード番号5(リーフ):B=20
・ノード番号6(リーフ):C!=30
・ノード番号7(リーフ):D=40
 二分木出力部113は、二分木生成部112により生成された二分木Tと、二分木生成部112により記録されたノード数Nとを出力する。
 以下では、ルート処理部120及びノード処理部130の詳細について説明する。処理は図5に示すような再帰構造を用いて行われる。
 図6は、ルート処理部120の構成を示すブロック図である。図7は、ノード処理部130の構成を示すブロック図である。図8は、ルート処理部120の動作を示すフローチャートである。図9は、ノード処理部130の動作を示すフローチャートである。
 図6において、ルート処理部120は、ルート判定部121、論理積処理部122a、論理和処理部122b、変数処理部122c、処理結果出力部123を備える。
 図7において、ノード処理部130は、ノード判定部131、論理積処理部132a、論理和処理部132b、変数処理部132c、処理数判定部133、処理結果出力部134を備える。
 以下では、図8を参照しながら、ルート処理部120の各部の動作を説明する。
 S21において、ルート判定部121は、二分木T及びノード数Nの入力を受ける。
 S22において、ルート判定部121は、行番号から変数への写像ρを初期化する。
 S23において、ルート判定部121は、二分木Tのルートが論理積と論理和と変数とのいずれであるかを判定する。ルートが論理積であれば、フローはS24aに進む。ルートが論理和であれば、フローはS24bに進む。ルートが変数であれば、フローはS24cに進む。
 S24aにおいて、論理積処理部122aは、ルート判定部121から二分木Tの入力を受けて、以下の行列Mを生成する。フローはS25aに進む。
Figure JPOXMLDOC01-appb-M000001
 S25aにおいて、論理積処理部122aは、二分木Tのルートのノード番号に1を加算してノード番号Iを得る。フローはS26に進む。
 S24bにおいて、論理和処理部122bは、ルート判定部121から二分木Tの入力を受けて、以下の行列Mを生成する。フローはS25bに進む。
Figure JPOXMLDOC01-appb-M000002
 S25bにおいて、論理和処理部122bは、二分木Tのルートのノード番号に1を加算してノード番号Iを得る。フローはS26に進む。
 S24cにおいて、変数処理部122cは、ルート判定部121から二分木Tと写像ρとの入力を受けて、以下の行列Mを生成する。フローはS25cに進む。
 (1)
 S25cにおいて、変数処理部122cは、二分木Tのルートのノード番号に1を加算してノード番号Iを得る。また、変数処理部122cは、以下の写像ρを定義する。
 ρ(1)=p
 即ち、変数処理部122cは、以下のように写像ρを更新する。フローはS26に進む。
 ρ:{(1,p)}
 S26において、処理結果出力部123は、論理積処理部122aと論理和処理部122bと変数処理部122cとのいずれかにより生成された行列Mを出力する。処理結果出力部123は、論理積処理部122aと論理和処理部122bと変数処理部122cとのいずれかにより計算されたノード番号Iも出力する。処理結果出力部123は、さらに、初期状態の写像ρ、或いは、変数処理部122cにより更新された写像ρを出力する。
 以下では、図9を参照しながら、ノード処理部130の各部の動作を説明する。
 S31において、ノード判定部131は、二分木T、ノード数N、行列M、ノード番号I、写像ρの入力を受ける。
 S32において、ノード判定部131は、処理行番号CRを1に設定する。行列MのCR行目は、次に変数が対応付けられる行である。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより大きいかどうかを判定する。ノード番号Iがノード数Nより小さいか、ノード数Nと同じである(即ち、I≦N)場合、フローはS34に進む。ノード番号Iがノード数Nより大きい(即ち、I>N)場合、二分木Tにはこれ以上選択するノードがないため、フローはS36に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが論理積と論理和と変数とのいずれであるかを判定する。ノード(この場合、子ノードを持つノード)が論理積であれば、フローはS35aに進む。ノード(この場合、子ノードを持つノード)が論理和であれば、フローはS35bに進む。ノード(この場合、リーフ)が変数であれば、フローはS35cに進む。
 S35aにおいて、論理積処理部132aは、ノード判定部131から二分木T、行列M、処理行番号CR、ノード番号I、写像ρの入力を受けて、論理積処理を実行する。論理積処理では、行列M及びノード番号Iが更新される。論理積処理の詳細については、後述する。フローはS33に戻る。
 S35bにおいて、論理和処理部132bは、ノード判定部131から二分木T、行列M、処理行番号CR、ノード番号I、写像ρの入力を受けて、論理和処理を実行する。論理和処理では、行列M及びノード番号Iが更新される。論理和処理の詳細については、後述する。フローはS33に戻る。
 S35cにおいて、変数処理部132cは、ノード判定部131から二分木T、行列M、処理行番号CR、ノード番号I、写像ρの入力を受けて、変数処理を実行する。変数処理では、行列M、処理行番号CR、ノード番号I、写像ρが更新される。変数処理の詳細については、後述する。フローはS33に戻る。
 フローがS33に戻り、再びS34に進む場合、処理数判定部133は、論理積処理部132aと論理和処理部132bと変数処理部132cとのいずれかにより更新された行列M及びノード番号Iをノード判定部131に渡す。処理数判定部133は、変数処理部132cにより処理行番号CR及び写像ρが更新されていれば、更新された処理行番号CR及び写像ρもノード判定部131に渡す。
 S36において、処理結果出力部134は、処理数判定部133から行列Mと写像ρとの入力を受けて、行列Mと写像ρとを出力する。
 以下では、S35aで実行される論理積処理の詳細について説明する。
 論理積処理部132aは、入力として、二分木T、L’×r’の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。
 論理積処理部132aは、L’×r’の行列Mにおいて、(L’+1)行目として成分が全て0である行を追加する。行が追加されるため、行列Mは(L’+1)×r’の行列となる。
 論理積処理部132aは、(L’+1)×r’の行列Mにおいて、(r’+1)列目として成分が全て0である列を追加する。列が追加されるため、行列Mは(L’+1)×(r’+1)の行列となる。
 論理積処理部132aは、(L’+1)×(r’+1)の行列Mにおいて、CR行目の最も左に1が存在する列をCL列目と定義する。
 論理積処理部132aは、iをr’からCLまでの値として、(L’+1)×(r’+1)の行列Mにおいて、(i+1)列目をi列目で上書きする。即ち、論理積処理部132aは、r’列目を(r’+1)列目にコピーし、(r’-1)列目をr’列目にコピーし、・・・、最後に、CL列目を(CL+1)列目にコピーする。
 論理積処理部132aは、jをL’からCRまでの値として、(L’+1)×(r’+1)の行列Mにおいて、(j+1)行目をj行目で上書きする。即ち、論理積処理部132aは、L’行目を(L’+1)行目にコピーし、(L’-1)行目をL’行目にコピーし、・・・、最後に、CR行目を(CR+1)行目にコピーする。
 論理積処理部132aは、(L’+1)×(r’+1)の行列Mにおいて、CR行目CL列目の成分を1に、CR行目(CL+1)列目の成分を0に、(CR+1)行目CL列目の成分を0に、(CR+1)行目(CL+1)列目の成分を1に書き換える。
 論理積処理部132aは、ノード番号Iに1を加算する。
 論理積処理部132aは、二分木T、(L’+1)×(r’+1)の行列M、処理行番号CR、ノード番号I、写像ρを出力する。
 以下では、S35bで実行される論理和処理の詳細について説明する。
 論理和処理部132bは、入力として、二分木T、L’×r’の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。
 論理和処理部132bは、L’×r’の行列Mにおいて、(L’+1)行目として成分が全て0である行を追加する。行が追加されるため、行列Mは(L’+1)×r’の行列となる。
 論理和処理部132bは、jをL’からCRまでの値として、(L’+1)×r’の行列Mにおいて、(j+1)行目をj行目で上書きする。即ち、論理積処理部132aは、L’行目を(L’+1)行目にコピーし、(L’-1)行目をL’行目にコピーし、・・・、最後に、CR行目を(CR+1)行目にコピーする。
 論理和処理部132bは、ノード番号Iに1を加算する。
 論理和処理部132bは、二分木T、(L’+1)×r’の行列M、処理行番号CR、ノード番号I、写像ρを出力する。
 以下では、S35cで実行される変数処理の詳細について説明する。
 変数処理部132cは、入力として、二分木T、L’×r’の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。
 変数処理部132cは、処理行番号CRとノード番号Iのリーフの変数pとの間に、以下の写像ρを定義する。
 ρ(CR)=p
 即ち、変数処理部132cは、写像ρに(CR,p)を追加する。
 変数処理部132cは、ノード番号Iに1を加算する。
 変数処理部132cは、処理行番号CRに1を加算する。
 変数処理部132cは、二分木T、L’×r’の行列M、処理行番号CR、ノード番号I、写像ρを出力する。
 本実施の形態では、ノード処理部130により出力される行列Mの行のうち、同じ列の成分を加算した場合に全ての列の加算結果が1になる行の組み合わせについては、各行に対応付けられた変数が真であれば、論理式Fが真となる。逆に、ノード処理部130により出力される行列Mの行のうち、同じ列の成分を加算した場合に少なくとも一列の加算結果が1にならない行の組み合わせについては、各行に対応付けられた変数が真であっても、論理式Fが偽となる。このような性質を持つ行列Mを生成するために、本実施の形態では、前述したルート処理及びノード処理が行われる。
 例えば、ルート処理部120は、論理式Fの要素のうち、二分木Tのルートによって表現される要素の種類が論理積演算子である場合は、S24aの処理を行う。即ち、ルート処理部120は、一行目一列目及び二行目二列目の成分が1、一行目二列目及び二行目一列目の成分が0である二行二列の行列を、論理積演算子に応じた行列Mとして生成する。
 例えば、ルート処理部120は、論理式Fの要素のうち、二分木Tのルートによって表現される要素の種類が論理和演算子である場合は、S24bの処理を行う。即ち、ルート処理部120は、全ての成分が1である二行一列の行列を、論理和演算子に応じた行列Mとして生成する。
 例えば、ノード処理部130は、論理式Fの要素のうち、子ノードを持つノードによって表現される要素の種類が論理積演算子である場合は、S35aの処理を行う。即ち、ノード処理部130は、新たな行及び列を追加するとともに、次に変数を対応付ける行をCR行目とし、CR行目の成分が1である列のうち、序数が最小の列をCL列目として、CR行目CL列目及び(CR+1)行目(CL+1)列目の成分を1、CR行目(CL+1)列目及び(CR+1)行目CL列目の成分を0に設定する操作を、論理積演算子に応じた操作として行列Mに対して行う。
 S35aの処理では、実質的には、CR行目を2行に拡張して、(CR+1)行目以降を1行ずつ下にずらしている。また、CL列目を2列に拡張して、(CL+1)列目以降を1列ずつ右にずらしている。これにより、拡張前のCR行目CL列目の成分を、S24aの処理で生成される行列と同じ二行二列の部分行列に変換しつつ、拡張(即ち、論理積演算子に応じた操作)の影響が他の成分に及ぶことを回避できる。このため、選択したノードによって表現される論理積演算子を適切に行列Mに反映することができる。
 例えば、ノード処理部130は、論理式Fの要素のうち、子ノードを持つノードによって表現される要素の種類が論理和演算子である場合は、S35bの処理を行う。即ち、ノード処理部130は、新たな行を追加するとともに、次に変数を対応付ける行をCR行目として、(CR+1)行目の各成分をCR行目の各成分と同じ値に設定する操作を、論理和演算子に応じた操作として行列Mに対して行う。
 S35bの処理では、実質的には、CR行目を2行に拡張して、(CR+1)行目以降を1行ずつ下にずらしている。これにより、拡張前のCR行目で値が1の成分を、S24bの処理で生成される行列と同じ二行一列の部分行列に変換しつつ、拡張(即ち、論理和演算子に応じた操作)の影響が他の成分に及ぶことを回避できる。このため、選択したノードによって表現される論理和演算子を適切に行列Mに反映することができる。
 このように、本実施の形態によれば、論理式Fを表現する二分木Tを辿って行列Mを効率的に生成することができる。
 本実施の形態では、ノード処理部130が、二分木Tのノードごとの処理を再帰呼び出しにより実行する。そのため、行列Mをより効率的に生成することができる。
 以上説明したように、本実施の形態に係る行列生成方法は、論理式Fの入力を受けるステップと、論理式Fと等価な木構造を生成するステップと、木構造のルートに対して処理を行うステップと、木構造のノードに対して、子ノードを持つかどうかを判定するステップと、ノードが子ノードを持つ場合は再帰呼び出しにより子ノードに対して処理を行うステップと、ノードが子ノードを持たない場合は変数を行に対応付け、親ノードへ戻るステップとを含むものである。
 この行列生成方法において、生成される行列Mの成分は0又は1である。論理式Fが成立する行からなる部分行列の行ベクトルを線形結合すると、全て1からなるベクトルを生成することができる。論理式Fが成立しない行からなる部分行列の行ベクトルを線形結合しても全て1からなるベクトルを生成することはできない。
 また、この行列生成方法において、ノードが論理積(and)の場合は、行列Mの中に論理積(and)を表す部分行列が生成される。ノードが論理和(or)の場合は、行列Mの中に処理行と同じ行が追加される。
 この行列生成方法を用いることで、行列Mのサイズを小さくすることができる。また、論理式Fから行列Mへの変換処理を効率化することができる。さらに、実装時のプログラムサイズを小さくすることができる。
 なお、本実施の形態は、必要に応じて種々の変更が可能である。
 例えば、本実施の形態では、S24a及びS35aの論理積処理によって、以下のような行列(又は部分行列)が生成される。
Figure JPOXMLDOC01-appb-M000003
 しかし、S24a及びS35aの論理積処理によって、以下のような行列(又は部分行列)が生成されてもよい。
Figure JPOXMLDOC01-appb-M000004
 また、本実施の形態では、行列Mが0及び1で構成されるが、行列Mが0及び1以外の整数値、若しくは、実数値で構成されてもよい。
 図10は、本実施の形態で行列Mを生成する例を示す図である。
 図10の例では、図4の例を適用している。
 以下では、図8を参照しながら、図10の例におけるルート処理部120の各部の動作を説明する。
 S21において、ルート判定部121は、以下の論理式Fを表現する二分木T及びノード数Nの入力を受ける。
 A!=10 and ((B=20 and C!=30) or D=40)
 ノードを持つノード数Nは7である。二分木Tは、以下の7個のノードを持つ。
・ノード番号1(ルート):論理積(and)
・ノード番号2(リーフ):A!=10
・ノード番号3:論理和(or)
・ノード番号4:論理積(and)
・ノード番号5(リーフ):B=20
・ノード番号6(リーフ):C!=30
・ノード番号7(リーフ):D=40
 S22において、ルート判定部121は、写像ρを初期化する。
 S23において、ルート判定部121は、二分木Tのルートが論理積であると判定する。フローはS24aに進む。
 S24aにおいて、論理積処理部122aは、以下の行列Mを生成する。フローはS25aに進む。
Figure JPOXMLDOC01-appb-M000005
 S25aにおいて、論理積処理部122aは、ノード番号を1から2に更新する。フローはS26に進む。
 S26において、処理結果出力部123は、行列M、ノード番号I、写像ρを出力する。
 以下では、図9を参照しながら、図10の例におけるノード処理部130の各部の動作を説明する。
 S31において、ノード判定部131は、二分木T、ノード数N、行列M、ノード番号I、写像ρの入力を受ける。ノード数Nは7である。ノード番号Iは2である。
 S32において、ノード判定部131は、処理行番号CRを1に設定する。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより小さい(即ち、I=2、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが変数(A!=10)であると判定する。フローはS35cに進む。
 S35cにおいて、変数処理部132cは、入力として、二分木T、2×2の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは1である。ノード番号Iは2である。
 変数処理部132cは、処理行番号CRとノード番号Iのリーフの変数(A!=10)との間に、以下の写像ρを定義する。
 ρ(1)=(A!=10)
 即ち、変数処理部132cは、写像ρに(1,(A!=10))を追加する。
 変数処理部132cは、ノード番号Iを2から3に更新する。
 変数処理部132cは、処理行番号CRを1から2に更新する。
 変数処理部132cは、二分木T、2×2の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより小さい(即ち、I=3、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが論理和であると判定する。フローはS35bに進む。
 S35bにおいて、論理和処理部132bは、入力として、二分木T、2×2の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは2である。ノード番号Iは3である。写像ρは{(1,(A!=10))}である。
 論理和処理部132bは、2×2の行列Mにおいて、三行目として成分が全て0である行を追加する。行が追加されるため、行列Mは以下の3×2の行列となる。
Figure JPOXMLDOC01-appb-M000006
 論理和処理部132bは、3×2の行列Mにおいて、二行目を三行目にコピーする。その結果、行列Mは以下の行列となる。
Figure JPOXMLDOC01-appb-M000007
 論理和処理部132bは、ノード番号Iを3から4に更新する。
 論理和処理部132bは、二分木T、3×2の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより小さい(即ち、I=4、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S36において、処理結果出力部134は、処理数判定部133から行列Mと写像ρとの入力を受けて、行列Mと写像ρとを出力する。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが論理積であると判定する。フローはS35aに進む。
 S35aにおいて、論理積処理部132aは、入力として、二分木T、3×2の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは2である。ノード番号Iは4である。写像ρは{(1,(A!=10))}である。
 論理積処理部132aは、3×2の行列Mにおいて、四行目として成分が全て0である行を追加する。行が追加されるため、行列Mは以下の4×2の行列となる。
Figure JPOXMLDOC01-appb-M000008
 論理積処理部132aは、4×2の行列Mにおいて、三列目として成分が全て0である列を追加する。列が追加されるため、行列Mは以下の4×3の行列となる。
Figure JPOXMLDOC01-appb-M000009
 論理積処理部132aは、4×3の行列Mにおいて、CR行目の最も左に1が存在する列をCL列目と定義する。即ち、論理積処理部132aは、CLを2に設定する。
 論理積処理部132aは、4×3の行列Mにおいて、二列目を三列目にコピーする。その結果、行列Mは以下の行列となる。
Figure JPOXMLDOC01-appb-M000010
 論理積処理部132aは、4×3の行列Mにおいて、三行目を四行目にコピーし、二行目を三行目にコピーする。その結果、行列Mは以下の行列となる。
Figure JPOXMLDOC01-appb-M000011
 論理積処理部132aは、4×3の行列Mにおいて、CR行目CL列目の成分を1に、CR行目(CL+1)列目の成分を0に、(CR+1)行目CL列目の成分を0に、(CR+1)行目(CL+1)列目の成分を1に書き換える。即ち、論理積処理部132aは、二行目二列目及び三行目三列目の成分を1に、二行目三列目及び三行目二列目の成分を0に設定する。その結果、行列Mは以下の行列となる。
Figure JPOXMLDOC01-appb-M000012
 論理積処理部132aは、ノード番号Iを4から5に更新する。
 論理積処理部132aは、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより小さい(即ち、I=5、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが変数(B=20)であると判定する。フローはS35cに進む。
 S35cにおいて、変数処理部132cは、入力として、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは2である。ノード番号Iは5である。写像ρは{(1,(A!=10))}である。
 変数処理部132cは、処理行番号CRとノード番号Iのリーフの変数(B=20)との間に、以下の写像ρを定義する。
 ρ(2)=(B=20)
 即ち、変数処理部132cは、写像ρに(2,(B=20))を追加する。
 変数処理部132cは、ノード番号Iを5から6に更新する。
 変数処理部132cは、処理行番号CRを2から3に更新する。
 変数処理部132cは、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより小さい(即ち、I=6、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが変数(C!=30)であると判定する。フローはS35cに進む。
 S35cにおいて、変数処理部132cは、入力として、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは3である。ノード番号Iは6である。写像ρは{(1,(A!=10)),(1,(B=20))}である。
 変数処理部132cは、処理行番号CRとノード番号Iのリーフの変数(C!=30)との間に、以下の写像ρを定義する。
 ρ(3)=(C!=30)
 即ち、変数処理部132cは、写像ρに(3,(C!=30))を追加する。
 変数処理部132cは、ノード番号Iを6から7に更新する。
 変数処理部132cは、処理行番号CRを3から4に更新する。
 変数処理部132cは、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nと同じ(即ち、I=7、N=7であるため、I≦N)と判定する。フローはS34に進む。
 S34において、ノード判定部131は、ノード番号Iに対応するノードを選択する。ノード判定部131は、選択したノードが変数(D=40)であると判定する。フローはS35cに進む。
 S35cにおいて、変数処理部132cは、入力として、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを受け取る。処理行番号CRは3である。ノード番号Iは7である。写像ρは{(1,(A!=10)),(1,(B=20)),(3,(C!=30))}である。
 変数処理部132cは、処理行番号CRとノード番号Iのリーフの変数(D=40)との間に、以下の写像ρを定義する。
 ρ(4)=(D=40)
 即ち、変数処理部132cは、写像ρに(4,(D=40))を追加する。
 変数処理部132cは、ノード番号Iを7から8に更新する。
 変数処理部132cは、処理行番号CRを4から5に更新する。
 変数処理部132cは、二分木T、4×3の行列M、処理行番号CR、ノード番号I、写像ρを出力する。フローはS33に戻る。
 S33において、処理数判定部133は、ノード番号Iがノード数Nより大きい(即ち、I=8、N=7であるため、I>N)と判定する。フローはS36に進む。
 S36において、処理結果出力部134は、4×3の行列Mと写像ρとを出力する。写像ρは{(1,(A!=10)),(1,(B=20)),(3,(C!=30)),(4,(D=40))}である。
 図11は、本発明の実施の形態に係る行列生成装置100のハードウェア構成の一例を示す図である。
 図11において、行列生成装置100は、コンピュータであり、出力装置910、入力装置920、記憶装置930、処理装置940といったハードウェアを備える。ハードウェアは、行列生成装置100の各部(本発明の実施の形態の説明において「部」として説明するもの)によって利用される。
 出力装置910は、例えば、LCD(Liquid・Crystal・Display)等の表示装置、プリンタ、通信モジュール(通信回路等)である。出力装置910は、本発明の実施の形態の説明において「部」として説明するものによってデータ、情報、信号の出力(送信)のために利用される。
 入力装置920は、例えば、キーボード、マウス、タッチパネル、通信モジュール(通信回路等)である。入力装置920は、本発明の実施の形態の説明において「部」として説明するものによってデータ、情報、信号の入力(受信)のために利用される。
 記憶装置930は、例えば、ROM(Read・Only・Memory)、RAM(Random・Access・Memory)、HDD(Hard・Disk・Drive)、SSD(Solid・State・Drive)である。記憶装置930には、プログラム931、ファイル932が記憶される。プログラム931には、本発明の実施の形態の説明において「部」として説明するものの処理(機能)を実行するプログラムが含まれる。ファイル932には、本発明の実施の形態の説明において「部」として説明するものによって演算、加工、読み取り、書き込み、利用、入力、出力等が行われるデータ、情報、信号(値)等が含まれる。
 処理装置940は、例えば、CPU(Central・Processing・Unit)である。処理装置940は、バス等を介して他のハードウェアデバイスと接続され、それらのハードウェアデバイスを制御する。処理装置940は、記憶装置930からプログラム931を読み出し、プログラム931を実行する。処理装置940は、本発明の実施の形態の説明において「部」として説明するものによって演算、加工、読み取り、書き込み、利用、入力、出力等を行うために利用される。
 本発明の実施の形態の説明において「部」として説明するものは、「部」を「回路」、「装置」、「機器」に読み替えたものであってもよい。また、本発明の実施の形態の説明において「部」として説明するものは、「部」を「工程」、「手順」、「処理」に読み替えたものであってもよい。即ち、本発明の実施の形態の説明において「部」として説明するものは、ソフトウェアのみ、ハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせで実現される。ソフトウェアは、プログラム931として、記憶装置930に記憶される。プログラム931は、本発明の実施の形態の説明において「部」として説明するものとしてコンピュータを機能させるものである。或いは、プログラム931は、本発明の実施の形態の説明において「部」として説明するものの処理をコンピュータに実行させるものである。
 以上、本発明の実施の形態について説明したが、この実施の形態を部分的に実施しても構わない。例えば、この実施の形態の説明において「部」として説明するもののうち、いずれか1つのみを採用してもよいし、いくつかの任意の組み合わせを採用してもよい。なお、本発明は、この実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
 100 行列生成装置、110 木構造生成部、111 論理式入力部、112 二分木生成部、113 二分木出力部、120 ルート処理部、121 ルート判定部、122a 論理積処理部、122b 論理和処理部、122c 変数処理部、123 処理結果出力部、130 ノード処理部、131 ノード判定部、132a 論理積処理部、132b 論理和処理部、132c 変数処理部、133 処理数判定部、134 処理結果出力部、910 出力装置、920 入力装置、930 記憶装置、931 プログラム、932 ファイル、940 処理装置。

Claims (12)

  1.  論理式の入力を受けて、前記論理式を表現する木構造データを生成する木構造生成部と、
     前記論理式の要素のうち、前記木構造生成部により生成された木構造データのルートによって表現される要素の種類を判定し、判定した種類に応じた行列を生成するルート処理部と、
     前記ルート処理部により生成された行列をメモリに格納するとともに、前記木構造生成部により生成された木構造データの前記ルート以外のノードを順次選択し、子ノードを持つノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素の種類に応じた操作を、前記メモリに格納した行列に対して行い、子ノードを持たないノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素である変数を、前記メモリに格納した行列の一行に対応付け、当該木構造データのノードを選択し終えた後は、前記メモリに格納した行列及びその行列の各行に対応付けた変数を示す情報を出力するノード処理部と
    を備えることを特徴とする行列生成装置。
  2.  前記ルート処理部は、判定した種類が論理和演算子である場合は、全ての成分が1である二行一列の行列を、論理和演算子に応じた行列として生成することを特徴とする請求項1の行列生成装置。
  3.  前記ノード処理部は、選択したノードによって表現される要素の種類が論理和演算子である場合は、新たな行を追加するとともに、次に変数を対応付ける行をCR行目として、(CR+1)行目の各成分をCR行目の各成分と同じ値に設定する操作を、論理和演算子に応じた操作として行うことを特徴とする請求項2の行列生成装置。
  4.  前記ルート処理部は、判定した種類が論理積演算子である場合は、一行目一列目及び二行目二列目の成分が1、一行目二列目及び二行目一列目の成分が0である二行二列の行列を、論理積演算子に応じた行列として生成することを特徴とする請求項1から3のいずれかの行列生成装置。
  5.  前記ノード処理部は、選択したノードによって表現される要素の種類が論理積演算子である場合は、新たな行及び列を追加するとともに、次に変数を対応付ける行をCR行目とし、CR行目の成分が1である列のうち、序数が最小の列をCL列目として、CR行目CL列目及び(CR+1)行目(CL+1)列目の成分を1、CR行目(CL+1)列目及び(CR+1)行目CL列目の成分を0に設定する操作を、論理積演算子に応じた操作として行うことを特徴とする請求項4の行列生成装置。
  6.  前記ルート処理部は、判定した種類が論理積演算子である場合は、一行目一列目及び二行目二列目の成分が0、一行目二列目及び二行目一列目の成分が1である二行二列の行列を、論理積演算子に応じた行列として生成することを特徴とする請求項1から3のいずれかの行列生成装置。
  7.  前記ノード処理部は、選択したノードによって表現される要素の種類が論理積演算子である場合は、新たな行及び列を追加するとともに、次に変数を対応付ける行をCR行目とし、CR行目の成分が1である列のうち、序数が最小の列をCL列目として、CR行目CL列目及び(CR+1)行目(CL+1)列目の成分を0、CR行目(CL+1)列目及び(CR+1)行目CL列目の成分を1に設定する操作を、論理積演算子に応じた操作として行うことを特徴とする請求項6の行列生成装置。
  8.  前記ノード処理部により出力される行列の行のうち、同じ列の成分を加算した場合に全ての列の加算結果が1になる行の組み合わせについては、各行に対応付けられた変数が真であれば、前記論理式が真となり、
     前記ノード処理部により出力される行列の行のうち、同じ列の成分を加算した場合に少なくとも一列の加算結果が1にならない行の組み合わせについては、各行に対応付けられた変数が真であっても、前記論理式が偽となることを特徴とする請求項1から7のいずれかの行列生成装置。
  9.  前記ノード処理部は、前記木構造データのノードごとの処理を再帰呼び出しにより実行することを特徴とする請求項1から8のいずれかの行列生成装置。
  10.  前記論理式は、秘密分散方式で分散された情報の組み合わせを定義する論理式であることを特徴とする請求項1から9のいずれかの行列生成装置。
  11.  コンピュータが、論理式の入力を受けて、前記論理式を表現する木構造データを生成し、
     前記コンピュータが、前記論理式の要素のうち、前記木構造データのルートによって表現される要素の種類を判定し、判定した種類に応じた行列を生成し、
     前記コンピュータが、生成した行列をメモリに格納するとともに、前記木構造データの前記ルート以外のノードを順次選択し、子ノードを持つノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素の種類に応じた操作を、前記メモリに格納した行列に対して行い、子ノードを持たないノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素である変数を、前記メモリに格納した行列の一行に対応付け、前記木構造データのノードを選択し終えた後は、前記メモリに格納した行列及びその行列の各行に対応付けた変数を示す情報を出力することを特徴とする行列生成方法。
  12.  コンピュータに、
     論理式の入力を受けて、前記論理式を表現する木構造データを生成する木構造生成処理と、
     前記論理式の要素のうち、前記木構造生成処理により生成された木構造データのルートによって表現される要素の種類を判定し、判定した種類に応じた行列を生成するルート処理と、
     前記ルート処理により生成された行列をメモリに格納するとともに、前記木構造生成処理により生成された木構造データの前記ルート以外のノードを順次選択し、子ノードを持つノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素の種類に応じた操作を、前記メモリに格納した行列に対して行い、子ノードを持たないノードを選択した場合は、前記論理式の要素のうち、選択したノードによって表現される要素である変数を、前記メモリに格納した行列の一行に対応付け、当該木構造データのノードを選択し終えた後は、前記メモリに格納した行列及びその行列の各行に対応付けた変数を示す情報を出力するノード処理と
    を実行させることを特徴とする行列生成プログラム。
PCT/JP2014/067609 2014-07-02 2014-07-02 行列生成装置及び行列生成方法及び行列生成プログラム WO2016002020A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201480080242.4A CN106471558B (zh) 2014-07-02 2014-07-02 矩阵生成装置及矩阵生成方法
US15/320,239 US20170148357A1 (en) 2014-07-02 2014-07-02 Matrix generation apparatus, matrix generation method, and non-transitory computer-readable recording medium storing matrix generation program
JP2016530740A JP6104469B2 (ja) 2014-07-02 2014-07-02 行列生成装置及び行列生成方法及び行列生成プログラム
EP14896317.6A EP3166094B1 (en) 2014-07-02 2014-07-02 Matrix generation device, matrix generation method, and matrix generation program
PCT/JP2014/067609 WO2016002020A1 (ja) 2014-07-02 2014-07-02 行列生成装置及び行列生成方法及び行列生成プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/067609 WO2016002020A1 (ja) 2014-07-02 2014-07-02 行列生成装置及び行列生成方法及び行列生成プログラム

Publications (1)

Publication Number Publication Date
WO2016002020A1 true WO2016002020A1 (ja) 2016-01-07

Family

ID=55018620

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/067609 WO2016002020A1 (ja) 2014-07-02 2014-07-02 行列生成装置及び行列生成方法及び行列生成プログラム

Country Status (5)

Country Link
US (1) US20170148357A1 (ja)
EP (1) EP3166094B1 (ja)
JP (1) JP6104469B2 (ja)
CN (1) CN106471558B (ja)
WO (1) WO2016002020A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520131A (zh) * 2018-03-30 2018-09-11 河南理工大学 基于节点重合和关联矩阵的井下高压电网短路计算方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787755B (zh) * 2018-12-14 2021-11-12 魏勇 一种密钥生成方法、密钥生成装置及电子设备
US20200264970A1 (en) * 2019-02-19 2020-08-20 Nvidia Corporation Memory management system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012203182A (ja) * 2011-03-25 2012-10-22 Mitsubishi Electric Corp 暗号処理システム、鍵生成装置、暗号化装置、復号装置、暗号処理方法及び暗号処理プログラム
US8559631B1 (en) * 2013-02-09 2013-10-15 Zeutro Llc Systems and methods for efficient decryption of attribute-based encryption
JP2014095847A (ja) * 2012-11-12 2014-05-22 Nippon Telegr & Teleph Corp <Ntt> 関数型暗号システム、鍵生成装置、暗号化装置、復号装置、関数型暗号方法、およびプログラム

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7415110B1 (en) * 1999-03-24 2008-08-19 Intel Corporation Method and apparatus for the generation of cryptographic keys
JP2001154771A (ja) * 1999-12-01 2001-06-08 Nec Corp 論理式の図式化方法、及び情報処理装置
CN101394271A (zh) * 2008-10-28 2009-03-25 上海电力学院 传感器网络中同时建立对密钥和组密钥的方法
KR101362443B1 (ko) * 2009-08-03 2014-02-11 니뽄 덴신 덴와 가부시키가이샤 함수 암호 응용 시스템, 정보 출력 장치, 정보 처리 장치, 암호 프로토콜 실행 방법, 정보 출력 방법, 정보 처리 방법, 프로그램, 및 기록 매체
JP5424974B2 (ja) * 2010-04-27 2014-02-26 三菱電機株式会社 暗号処理システム、鍵生成装置、暗号化装置、復号装置、署名処理システム、署名装置及び検証装置
CN102315935A (zh) * 2010-07-02 2012-01-11 中国人民解放军总参谋部第六十一研究所 无线传感器网与计算机网融合网络密钥管理方法
JP5466763B2 (ja) * 2010-07-23 2014-04-09 日本電信電話株式会社 暗号化装置、復号装置、暗号化方法、復号方法、プログラム、及び記録媒体
JP5379914B2 (ja) * 2010-07-23 2013-12-25 日本電信電話株式会社 秘密分散システム、分散装置、分散管理装置、取得装置、秘密分散方法、プログラム、及び記録媒体
CN102164367B (zh) * 2011-04-14 2014-04-16 北京理工大学 一种用于无线传感器网络的密钥管理方法
US8516244B2 (en) * 2011-06-10 2013-08-20 Zeutro Llc System, apparatus and method for decentralizing attribute-based encryption information
CN102665210B (zh) * 2012-05-19 2014-10-08 佛山科学技术学院 分区的无线传感器网络的安全密钥设置方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012203182A (ja) * 2011-03-25 2012-10-22 Mitsubishi Electric Corp 暗号処理システム、鍵生成装置、暗号化装置、復号装置、暗号処理方法及び暗号処理プログラム
JP2014095847A (ja) * 2012-11-12 2014-05-22 Nippon Telegr & Teleph Corp <Ntt> 関数型暗号システム、鍵生成装置、暗号化装置、復号装置、関数型暗号方法、およびプログラム
US8559631B1 (en) * 2013-02-09 2013-10-15 Zeutro Llc Systems and methods for efficient decryption of attribute-based encryption

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520131A (zh) * 2018-03-30 2018-09-11 河南理工大学 基于节点重合和关联矩阵的井下高压电网短路计算方法

Also Published As

Publication number Publication date
JPWO2016002020A1 (ja) 2017-04-27
EP3166094B1 (en) 2018-12-26
EP3166094A1 (en) 2017-05-10
CN106471558B (zh) 2018-03-20
CN106471558A (zh) 2017-03-01
EP3166094A4 (en) 2018-02-14
JP6104469B2 (ja) 2017-03-29
US20170148357A1 (en) 2017-05-25

Similar Documents

Publication Publication Date Title
Dougherty et al. The combinatorics of LCD codes: linear programming bound and orthogonal matrices
WO2013114509A1 (ja) 多次元データ可視化装置、方法およびプログラム
Kao et al. A slacks-based measure model for calculating cross efficiency in data envelopment analysis
Eppstein The lattice dimension of a graph
JP6104469B2 (ja) 行列生成装置及び行列生成方法及び行列生成プログラム
JP2020087127A (ja) グラフ構造を有するデータのエンコードに関するプログラム、情報処理方法及び情報処理システム
JP7031682B2 (ja) 秘密計算装置、システム、方法、プログラム
CN106464484A (zh) 预定函数的混淆执行
Faure et al. Implementation of irreducible Sobol’sequences in prime power bases
JP2006157252A5 (ja)
Bamberg et al. Unitals in the Desarguesian projective plane of order 16
Leonard et al. Bayesian D-optimal screening experiments with partial replication
JP2010039723A (ja) 非負値行列分解の数値計算方法、非負値行列分解の数値計算装置、プログラムおよび記憶媒体
CN113726975B (zh) 基于混沌系统的图像加密方法、装置、介质及电子设备
JP6321216B2 (ja) 行列・キー生成装置、行列・キー生成システム、行列結合装置、行列・キー生成方法、プログラム
EP3912094A1 (en) Training in communication systems
CN111133495B (zh) 秘密读取装置、秘密写入装置、它们的方法以及记录介质
Cerreia-Vioglio et al. A characterization of probabilities with full support and the Laplace method
WO2021024300A1 (ja) 情報処理装置
JP2021135683A (ja) 学習装置、推論装置、学習方法及び推論方法
JP4313803B2 (ja) 行列における数値分解方法
JP2019008640A (ja) 類似度計算装置及び類似度計算方法
Nguyen et al. Oracle model selection for correlated data via residuals
JP7494932B2 (ja) 秘密決定木テスト装置、秘密決定木テストシステム、秘密決定木テスト方法、及びプログラム
WO2023119682A1 (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: 14896317

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016530740

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15320239

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2014896317

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014896317

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE