WO2014125639A1 - Control program management apparatus, controller apparatus, and control system - Google Patents

Control program management apparatus, controller apparatus, and control system Download PDF

Info

Publication number
WO2014125639A1
WO2014125639A1 PCT/JP2013/053812 JP2013053812W WO2014125639A1 WO 2014125639 A1 WO2014125639 A1 WO 2014125639A1 JP 2013053812 W JP2013053812 W JP 2013053812W WO 2014125639 A1 WO2014125639 A1 WO 2014125639A1
Authority
WO
WIPO (PCT)
Prior art keywords
control program
array
device identifier
pseudo
random number
Prior art date
Application number
PCT/JP2013/053812
Other languages
French (fr)
Japanese (ja)
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/JP2013/053812 priority Critical patent/WO2014125639A1/en
Priority to TW102112626A priority patent/TW201433891A/en
Publication of WO2014125639A1 publication Critical patent/WO2014125639A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/76Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in application-specific integrated circuits [ASIC] or field-programmable devices, e.g. field-programmable gate arrays [FPGA] or programmable logic devices [PLD]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence

Definitions

  • the present invention relates to a technique for obfuscating a control program used in, for example, a Factory Automation (FA) system.
  • FA Factory Automation
  • a controller device for controlling the operation of production equipment in a factory is arranged.
  • This controller is called a programmable logic controller (PLC).
  • PLC programmable logic controller
  • a control program for operating the PLC is created (designed) in a language such as a ladder using programming software.
  • the created control program (for example, ladder format) is converted into a format (machine code) that can be executed by programming software, and written to the PLC via a communication line.
  • Programming software is widely marketed as software that operates on Windows (registered trademark). If there is a computer on which Windows (registered trademark) operates, and if there is programming software, the control program is read from the PLC and the control program to the PLC. Can be easily written using a computer. For this reason, in recent years, when a control program is extracted from a PLC that has already been operated in a factory, or when a control program is written to a PLC from programming software, data flowing through a communication line has been stolen. . Due to these actions, there is a problem that imitation of PLC is manufactured by improperly diverting the control program.
  • Patent Document 1 A common measure against counterfeiting programs is to protect the program by obfuscation. By obfuscating the program, the analysis cost is increased, and even if the program is stolen, it is difficult for an attacker to obtain significant information.
  • Patent Document 1 when a program is executed, the program rewrites itself to complicate the behavior, thereby obfuscating the program and increasing the analysis cost.
  • Patent Document 2 and Patent Document 3 data in a program is encoded and obfuscated, and the program is normally executed by releasing the encoding during the execution of the program.
  • the requirements specific to the FA system when obfuscating the control program include the following. (1) The control program may be written in a language unique to the FA system such as a ladder language. (2) Since the control program is read from the PLC and edited, the control program obfuscated is controlled before it is obfuscated. (3) Execution speed does not decrease at the time of execution Since the execution timing of the process becomes very important in the control program, a decrease in the execution speed is hardly allowed. (4) The behavior at the time of execution does not change The change in the behavior may cause the execution timing of the process to shift.
  • Patent Document 1 the program self-rewrites during execution of the program, and obfuscation is performed by complicating the control.
  • Patent Document 2 and Patent Document 3 data in a program is encoded and obfuscated, and the program is normally executed by releasing the encoding during the execution of the program. Since these obfuscation techniques change the behavior of the obfuscation target and increase the processing, the execution speed decreases. Therefore, it is difficult to apply these obfuscation techniques to the control program.
  • the present invention has been made in view of the above, and has as its main purpose to effectively obfuscate the control program, increase the analysis cost of the control program, and make unauthorized use difficult.
  • the control program management device is: A control program management apparatus that manages a control program in which a device identifier that is a device identifier is described, A pseudo-random number generator that generates a pseudo-random number using a controller-specific value that is a value specific to a controller device that executes the control program; A device identifier replacement unit that replaces the device identifier described in the control program with another device identifier using the pseudo random number generated by the pseudo random number generation unit; And an output unit that outputs the control program after the device identifier is replaced by the device identifier replacement unit to the controller device.
  • the device identifier in the control program is replaced with another device identifier using a pseudo-random number using the controller unique value, the device identifier after replacement is changed from the device identifier after replacement to the device identifier before replacement. I can't get it back. For this reason, it is possible to obfuscate the control program, making it difficult to misappropriate the control program. Further, according to the present invention, since only the device identifier is replaced, the execution speed when executing the control program after returning from the device identifier after replacement to the device identifier before replacement does not decrease, The runtime behavior is not changed.
  • FIG. 2 is a diagram illustrating a configuration example of a control system according to the first embodiment.
  • FIG. 3 is a diagram illustrating a functional configuration example of a computer apparatus according to the first embodiment.
  • FIG. 3 is a diagram illustrating a functional configuration example of a controller device according to the first embodiment.
  • 2 is a diagram illustrating a hardware configuration example of a computer apparatus according to Embodiment 1.
  • FIG. 3 is a diagram illustrating an internal configuration example of an obfuscation processing unit according to the first embodiment. The figure which shows the internal structural example of the obfuscation cancellation
  • FIG. FIG. 4 is a diagram showing a processing sequence at the time of writing a control program according to the first embodiment.
  • FIG. 4 is a diagram showing a processing sequence at the time of writing a control program according to the first embodiment.
  • FIG. 3 is a flowchart showing an example of a control program execution process according to the first embodiment.
  • FIG. 4 is a diagram showing a processing sequence at the time of reading a control program according to the first embodiment.
  • FIG. 4 is a flowchart showing an example of obfuscation processing according to the first embodiment.
  • FIG. 6 is a diagram illustrating an example of a conversion table creation process according to the first embodiment.
  • FIG. 4 is a diagram showing an outline of conversion table creation processing according to the first embodiment.
  • FIG. 3 is a flowchart showing an example of a control program conversion process according to the first embodiment.
  • FIG. 3 is a diagram showing an outline of control program conversion processing according to the first embodiment.
  • FIG. 4 is a flowchart showing an example of obfuscation cancellation processing according to the first embodiment.
  • FIG. 6 is a flowchart showing an example of reverse conversion table creation processing according to the first embodiment.
  • FIG. 5 is a diagram showing an overview of reverse conversion table creation processing according to the first embodiment.
  • FIG. 3 is a flowchart showing an example of a control program reverse conversion process according to the first embodiment. The figure which shows the outline
  • FIG. FIG. 4 is a flowchart showing an example of obfuscation cancellation processing according to the first embodiment. The figure which shows the internal structural example of the obfuscation process part which concerns on Embodiment 2.
  • FIG. 4 is a flowchart showing an example of obfuscation cancellation processing according to the first embodiment.
  • FIG. 10 is a diagram showing a processing sequence at the time of writing a control program according to the second embodiment.
  • FIG. 10 is a diagram illustrating an example of a conversion table creation process according to the second embodiment.
  • FIG. 9 is a flowchart showing an example of a control program conversion process according to the second embodiment.
  • FIG. 10 is a diagram showing an outline of control program conversion processing according to the second embodiment.
  • FIG. 9 is a flowchart showing an example of reverse conversion table creation processing according to the second embodiment. The flowchart figure which shows the example of the control program reverse conversion process which concerns on Embodiment 2.
  • FIG. 10 is a diagram showing a processing sequence at the time of writing a control program according to the second embodiment.
  • FIG. 10 is a diagram illustrating an example of a conversion table creation process according to the second embodiment.
  • FIG. 9 is a flowchart showing an example of a control program conversion process according to the second embodiment.
  • FIG. 9 is a flowchart showing an example of reverse conversion table creation
  • FIG. 9 is a flowchart showing an example of a control program conversion process according to the third embodiment.
  • FIG. 10 is a diagram showing an outline of a control program conversion process according to the third embodiment.
  • FIG. 9 is a flowchart showing an example of a control program reverse conversion process according to the third embodiment.
  • FIG. 10 is a diagram showing an outline of a control program conversion process according to the third embodiment.
  • FIG. 1 shows a configuration example of a control system according to the present embodiment.
  • a computer device 101 and a controller device 102 are connected by a communication line 105.
  • the controller device 102 is a PLC.
  • the controller device 102 and the production equipment 104 are connected by a communication line 106.
  • Specific examples of the communication lines 105 and 106 include a USB (Universal Serial Bus) cable or a LAN (Local Area Network) cable compatible with Ethernet (registered trademark).
  • the production device 104 is, for example, a servo amplifier or an inverter. Note that the FA system includes a controller device 102 and a production device 104.
  • the computer apparatus 101 generates a control program to be executed by the controller apparatus 102, obfuscates the generated control program, and outputs the obfuscated control program to the controller apparatus 102.
  • the computer device 101 corresponds to an example of a control program management device.
  • a device identifier which is a device identifier is described.
  • the device identifier is a combination of a device type value (X, Y, M, etc.) and a device number (0, 1, 2, etc.).
  • a device is a variable used for control in the controller apparatus 102. Each device represents a contact, a coil, a switch, or the like.
  • the control program generated by the computer apparatus 101 can be expressed in a ladder format, for example, as shown in the control program 131 of FIG. X0, X2, X5, Y0, Y2, and Y7 shown in the control program 131 of FIG. 14 are device identifiers.
  • the X device is a variable for inputting a signal from an external input switch or the like of the controller apparatus 102.
  • the Y device is a variable for outputting a signal to the outside of the controller device 102.
  • the computer apparatus 101 converts the numerical value (device number) included in the device identifier to replace the device identifier and obfuscate the control program.
  • the device X0 of the control program 131 is replaced with the device X6 to form the obfuscation control program 132.
  • the controller device 102 executes a control program and controls the operation of the production equipment 104.
  • the controller device 102 inputs the control program after obfuscation from the computer device 101, releases the obfuscation of the input control program after obfuscation, and acquires the control program before obfuscation.
  • the controller device 102 cancels obfuscation by returning the device identifier after replacement to the device identifier before replacement in a procedure logically opposite to the device identifier replacement procedure in the computer device 101. Then, the controller device 102 executes the control program whose obfuscation has been canceled and controls the operation of the production device 104.
  • FIG. 2 shows functional blocks of the computer apparatus 101.
  • the computer device 101 includes a control program management unit 103 and a communication device 107.
  • the input unit 110 inputs (acquires) input information of the control program creator.
  • the control program creation unit 111 creates a control program based on the input information of the control program creator input by the input unit 110.
  • the control program management unit 112 performs control and management such as conversion, storage, obfuscation, and output to the controller device 102 of the created control program.
  • the control program conversion unit 113 converts the control program (ladder program) generated by the control program creation unit 111 into a format that can be executed by the controller device 102.
  • the control program storage unit 114 stores the control program 131 converted into an executable format by the control program conversion unit 113.
  • the obfuscation processing unit 115 obfuscates the control program 131. More specifically, the obfuscation processing unit 115 generates a pseudo random number using a device ID (Identification) that is a value unique to the controller device 102 and additional information 133 that is a different value each time it is generated, The device identifier in the control program 131 is replaced using the generated pseudo random number, and the control program 131 is obfuscated. In addition, the obfuscation processing unit 115 cancels obfuscation of the obfuscated control program output from the controller device 102.
  • a device ID Identity
  • the obfuscation processing unit 115 generates a pseudo random number using the device ID and the additional information 133, and uses the generated pseudo random number to replace the replaced device in the control program obfuscated.
  • the identifier is returned to the device identifier before replacement, and obfuscation is canceled.
  • the device ID corresponds to an example of a controller specific value
  • the additional information 133 corresponds to an example of one-time information.
  • the obfuscation processing unit 115 corresponds to an example of a pseudo random number generation unit and a device identifier replacement unit.
  • the control program 131 is obfuscated using the device ID and the additional information 133, but it is also possible to obfuscate the control program 131 using only the device ID.
  • the communication processing unit 116 communicates with the controller device 102 via the communication device 107 based on control from the control program management unit 112. More specifically, the communication processing unit 116 inputs the device ID from the controller device 102, outputs the control program after obfuscation to the controller device 102, and inputs the control program after obfuscation from the controller device 102. To do.
  • the communication processing unit 116 corresponds to an example of an output unit.
  • the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 in the control program management unit 103 can be realized as programs.
  • the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 can be elements of programming software.
  • FIG. 3 shows functional blocks of the controller device 102.
  • the communication control unit 121 performs communication with the computer device 101 and communication with the production device 104. For example, the communication control unit 121 outputs the device ID 134 to the computer apparatus 101, inputs the control program after obfuscation from the computer apparatus 101, and outputs the control program after obfuscation to the computer apparatus 101.
  • the communication control unit 121 communicates with each unit in the controller device 102 via the internal bus 128.
  • the device ID management unit 122 stores and manages the device ID 134.
  • the device ID management unit 122 corresponds to an example of a controller unique value storage unit.
  • the additional information management unit 123 stores and manages the additional information 133.
  • the control program storage unit 124 stores an obfuscation control program 132 that is an obfuscated control program 131.
  • the obfuscation release processing unit 125 returns the device identifier after replacement to the device identifier before replacement by a procedure logically opposite to the replacement procedure performed by the obfuscation processing unit 115 of the computer apparatus 101, and performs obfuscation control.
  • Remove obfuscation of program 132 More specifically, the obfuscation cancellation processing unit 125 generates a pseudo random number using the device ID 134 and the additional information 133, and uses the generated pseudo random number to replace the device after replacement in the obfuscation control program 132.
  • the identifier is returned to the device identifier before replacement, and obfuscation is canceled.
  • the obfuscation cancellation processing unit 125 corresponds to an example of a pseudo-random number generation unit and a device identifier restoration unit.
  • the control program execution unit 126 executes the control program after the obfuscation is canceled by the obfuscation cancellation processing unit 125.
  • FIG. 4 shows a hardware configuration example of the computer apparatus 101.
  • a CPU Central Processing Unit
  • the memory 212 is, for example, a RAM (Random Access Memory).
  • the external storage device 214 is, for example, a ROM (Read Only Memory), a flash memory, or a hard disk device.
  • the control program storage unit 114 illustrated in FIG. 2 is realized by the memory 212 and the external storage device 214.
  • the input / output device 213 is, for example, a mouse, a keyboard, a display device, or the like.
  • the communication device 107 is, for example, a NIC (Network Interface Card).
  • the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 in the control program management unit 103 illustrated in FIG. Can be realized as a program.
  • an input unit 110, a control program creation unit 111, a control program management unit 112, a control program conversion unit 113, an obfuscation processing unit 115, and a communication processing unit 116, which will be described below, are executed.
  • Function is realized.
  • the program is normally stored in the external storage device 214, and is sequentially read and executed by the CPU 211 while being loaded in the memory 212.
  • an operating system is also stored in the external storage device 214. At least a part of the OS is loaded into the memory 212, and the CPU 211 implements the functions in the control program management unit 103 while executing the OS. Run the program. Further, in the following description, “determining”, “determining”, “conversion of”, “replacement of”, “setting of”, “extraction of”, “generation of”, “ Information, data, signal values, and variable values indicating the results of the processing described as “Create”, “Selection”, “Input of”, “Output of”, etc. are stored as files in the memory 212. ing.
  • the functions of the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 are hardware such as firmware, elements, and circuits. It may be realized with.
  • the controller apparatus 102 also includes a CPU, a memory, an input / output device, an external storage device, and a communication device. Also in the controller device 102, the device ID management unit 122, the additional information management unit 123, and the control program storage unit 124 illustrated in FIG. 3 are realized by a memory and an external storage device. Also in the controller device 102, the functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 may be realized by a program. In this case, when the CPU executes these programs, the following functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 are realized. In addition, at least some of the functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 may be realized by hardware such as firmware, elements, and circuits.
  • FIG. 5 shows a detailed configuration of the obfuscation processing unit 115 of the computer apparatus 101.
  • control program conversion processing unit 301 inputs the control program 131 and replaces the device identifier in the control program 131 using data necessary for obfuscation (specifically, the conversion table 307).
  • the control program 131 is obfuscated.
  • the control program conversion processing unit 301 corresponds to an example of a device identifier replacement unit.
  • the conversion table creation processing unit 302 generates a conversion table 307 necessary for obfuscation of the control program 131 in the control program conversion processing unit 301. More specifically, the conversion table creation processing unit 302 generates a pseudo random number using the device ID 134 and the additional information 133, and generates a conversion table 307 using the generated pseudo random number.
  • the conversion table creation processing unit 302 corresponds to an example of a pseudo random number generation unit and a device identifier replacement unit.
  • the data processing unit 303 manages data (device ID, additional information) necessary for obfuscation of the control program 131.
  • the control program reverse conversion processing unit 304 inputs the obfuscation control program 132 from the controller device 102, and uses the data (specifically, the reverse conversion table 308) necessary for deobfuscation to obfuscate the control program 132. Is converted back to the control program 131.
  • the reverse conversion table creation processing unit 305 creates a reverse conversion table 308 necessary for reverse conversion of the obfuscation control program 132. More specifically, the reverse conversion table creation processing unit 305 generates a pseudo random number using the device ID 134 and the additional information 133, and generates the reverse conversion table 308 using the generated pseudo random number.
  • the additional information authentication unit 306 authenticates the additional information 133 when the obfuscation control program 132 is inversely converted.
  • FIG. 6 shows a detailed configuration of the obfuscation cancellation processing unit 125 of the controller device 102.
  • control program reverse conversion processing unit 401 reversely converts the obfuscation control program 132 into the control program 131 using data necessary for deobfuscation (specifically, the reverse conversion table 404).
  • the control program reverse conversion processing unit 401 corresponds to an example of a device identifier restoration unit.
  • the reverse conversion table creation processing unit 402 creates a reverse conversion table 404 necessary for reverse conversion of the obfuscation control program 132. More specifically, the reverse conversion table creation processing unit 305 generates a pseudo random number using the device ID 134 and the additional information 133, and generates the reverse conversion table 404 using the generated pseudo random number.
  • the inverse conversion table creation processing unit 402 corresponds to an example of a pseudo random number generation unit and a device identifier restoration unit.
  • the data processing unit 403 manages data required when obfuscation is canceled.
  • the processing procedure according to the present embodiment includes three processes. That is, the processing procedure according to the present embodiment includes (1) a process in which the control program management unit 103 creates the control program 131, obfuscates the control program 131, and writes the obfuscation control program 132 to the controller device 102. ) Processing in which the controller device 102 cancels the obfuscation of the obfuscation control program 132 and executes the control program 131. (3) The control program management unit 103 reads the obfuscation control program 132 from the controller device 102, and the obfuscation control program. The process consists of a process of releasing obfuscation 132 and restoring the control program 131.
  • control program management unit 103 creates the control program 131, obfuscates the control program 131, and writes the obfuscation control program 132 to the controller device 102 is shown in FIG. Show.
  • control program creation unit 111 creates the control program 131 based on the input information from the input unit 110.
  • control program conversion unit 113 converts the control program 131 created in the processing step 501 into a format that can be executed by the controller device 102. Note that both the control program before being converted into the executable format and the control program after being converted into the executable format are referred to as the control program 131.
  • the control program storage unit 114 stores the converted control program 131.
  • the obfuscation processing unit 115 executes the obfuscation process 511 on the control program 131 after conversion of the execution format to create the obfuscation control program 132.
  • the obfuscation processing unit 115 transmits a transmission request 531 for the device ID 134 to the controller device 102 via the control program management unit 112, the communication processing unit 116, and the communication device 107.
  • the device ID 134 of the device ID management unit 122 is transmitted from the communication control unit 121 to the computer device 101.
  • the additional information 133 is acquired by the obfuscation processing unit 115.
  • the obfuscation processing unit 115 may generate the additional information 133, or the obfuscation processing unit 115 receives the additional information 133 from the external device via the control program management unit 112, the communication processing unit 116, and the communication device 107. May be.
  • the communication processing unit 116 transmits the obfuscation control program 132 and the additional information 133 acquired by the obfuscation processing unit 115 during obfuscation to the controller device 102 via the communication device 107. To do.
  • the communication control unit 121 receives the obfuscation control program 132 and the additional information 133, and the obfuscation control program 132 is stored in the control program storage unit 124 and the additional information 133. Is stored in the additional information management unit 123.
  • FIG. 8 shows the flow of the control program execution process 610, which is the process of (2) above, that is, the controller device 102 cancels the obfuscation of the obfuscation control program 132 and executes the control program 131.
  • the obfuscation release processing unit 125 releases the obfuscation control program 132 and creates the control program 131.
  • control program execution unit 126 executes the control program 131.
  • control program management unit 103 reads the obfuscation control program 132 from the controller device 102, cancels the obfuscation of the obfuscation control program 132, and restores the control program 131.
  • the flow of this is shown in FIG.
  • the obfuscation processing unit 115 sends the obfuscation control program 132 to the controller device 102 via the control program management unit 112, the communication processing unit 116, and the communication device 107.
  • a read request 731 is transmitted.
  • the communication control unit 121 transmits the obfuscation control program 132 in the control program storage unit 124 and the device ID 134 in the device ID management unit 122.
  • the communication processing unit 116 receives the obfuscation control program 132 and the device ID 134.
  • the obfuscation cancellation processing unit 125 cancels the obfuscation of the obfuscation control program 132 received from the controller device 102 and creates the control program 131.
  • the obfuscation control program 132 cancels obfuscation using the device ID 134 and the additional information 133 received from the controller device 102.
  • control program 131 is stored in the control program storage unit 114 in the processing stage 703.
  • FIG. 10 shows the flow of the control program obfuscation process 511 in the processing stage 504.
  • the data processing unit 303 requests the device ID 134 from the controller device 102 in order to create the conversion table 307.
  • the data processing unit 303 receives the device ID 134 from the controller device 102.
  • the data processing unit 303 acquires a time stamp of the current time and uses it as additional information 133.
  • the additional information 133 does not need to be a time stamp, and may be any information as long as it has different values for each creation.
  • the conversion table creation processing unit 302 executes the conversion table creation processing 811 to create the conversion table 307.
  • control program conversion processing unit 301 executes the control program conversion processing 812.
  • the control program conversion processing unit 301 converts the device identifier of the control program 131 into the obfuscation control program 132 by randomizing the device identifier of the control program 131 using the conversion table 307 in the control program conversion processing 812.
  • FIG. 11 shows details of the conversion table creation processing 811 in the processing stage 804, and FIG. 12 shows an embodiment of the conversion table creation processing 811 in the processing stage 804.
  • the conversion table creation processing unit 302 uses the device number used in the control program 131 as an index, and a table 911 (the same as the array of numerical values before conversion and after conversion). FIG. 12) is created.
  • the conversion table creation processing unit 302 creates a pseudo random number 912 using the device ID 134 and the additional information 133 as seeds.
  • the conversion table creation processing unit 302 uses the created pseudo-random number 912 to randomly sort the converted array of the table 911, whereby the conversion table in the converted array of the table 911
  • the conversion table 307 is created using a new array in which the numerical order is changed and the numerical order is changed. As shown in FIG. 12, the array before conversion in the conversion table 307 remains the array before conversion in the table 911. Since the order of numerical values in the array after conversion of the conversion table 307 is changed from the array after conversion in the table 911, the order of numerical values is different from the array before conversion in the conversion table 307.
  • the array before conversion in the conversion table 307 corresponds to an example of the first array, and the array after conversion corresponds to an example of the second array.
  • the device number range after conversion can be matched with the device number range used in the control program 131 before conversion. For this reason, the obfuscated control program 132 after conversion can be made appropriate as a control program.
  • the numerical values used as the index when the table 911 is created in the processing stage 901 are not only the numerical values actually used in the control program 131 but all the numerical values that can be used as device numbers. Can also be used.
  • the numerical values used as the device numbers are [0, 2, 5, 7], but the numerical values that are not used as the device numbers as the numerical values before conversion as shown in FIG. [0, 1, 2, 3, 4, 5, 6, 7] can be used.
  • FIG. 13 shows details of the control program conversion processing 812 in the processing stage 805
  • FIG. 14 shows an embodiment of the control program conversion processing 812 in the processing stage 805.
  • the control program conversion processing unit 301 uses the conversion table 307 to convert the device identifier (for example, X0 or Y0) of the control program 131 into a different device identifier.
  • the control program conversion processing unit 301 reads one device identifier.
  • the control program conversion processing unit 301 converts the device identifier read in processing step 1101 with reference to the conversion table 307. Specifically, the control program conversion processing unit 301 determines the position in the array before conversion of the numerical value of the device number, extracts the numerical value in the converted array at the same position as the determined position, and extracts the device number Is converted into the extracted numerical value in the converted array, and the device identifier is replaced. If there is an unconverted device identifier in the processing stage 1103, the process returns to the processing stage 1101. The above process is repeated for all device identifiers.
  • the conversion table 307 may be discarded after the conversion from the control program 131 to the obfuscation control program 132 is completed. Further, since the additional information 133 is used to generate the reverse conversion table 404 in the controller apparatus 102, the additional information 133 is stored in the computer apparatus 101 until the reverse conversion table 404 is generated. However, the computer apparatus 101 may discard the additional information 133 after the reverse conversion table 404 is generated.
  • the data processing unit 403 reads the device ID 134 from the device ID management unit 122.
  • the data processing unit 403 reads the additional information 133 from the additional information management unit 123.
  • the reverse conversion table creation processing unit 402 executes the reverse conversion table creation processing 1311 to create the reverse conversion table 404.
  • control program reverse conversion processing unit 401 executes the control program reverse conversion processing 1312 to convert the obfuscation control program 132 into the control program 131 using the reverse conversion table 404.
  • FIG. 16 shows details of the reverse conversion table creation processing 1311
  • FIG. 17 shows an embodiment of the reverse conversion table creation processing 1311.
  • the reverse conversion table creation processing unit 402 uses the device number used in the obfuscation control program 132, and the table 1411 (the numerical value before conversion and the numerical value after conversion are the same). FIG. 17) is created.
  • the inverse conversion table creation processing unit 402 creates a pseudo random number 1412 using the device ID 134 and the additional information 133 as seeds.
  • the pseudo-random number generation algorithm in the conversion table creation processing unit 302 of the computer device 101 is the same as the pseudo-random number generation algorithm in the inverse conversion table creation processing unit 402 of the controller device 102. That is, the reverse conversion table creation processing unit 402 generates the same pseudo random number as the pseudo random number generated by the conversion table creation processing unit 302.
  • the inverse conversion table creation processing unit 402 uses the created pseudo-random number 1412 to randomly sort the array before conversion in the table 1411, thereby converting the numerical values in the array before conversion in the table 1411.
  • the reverse conversion table 404 is created using a new array in which the order is changed and the numerical order is changed. As shown in FIG. 17, the converted array in the inverse conversion table 404 remains the converted array in the table 1411. Since the order of numerical values in the array before conversion in the reverse conversion table 404 is changed from the array before conversion in the table 1411, the order of numerical values is different from the array after conversion in the reverse conversion table 404.
  • the array before conversion of the inverse conversion table 404 corresponds to an example of the fourth array, and the array after conversion corresponds to an example of the third array.
  • the reverse conversion table 404 is created using the same algorithm (logically reverse procedure) as the conversion table creation process 811 using the device ID 134 and the additional information 133 transmitted from the obfuscation processing unit 115. For this reason, the conversion table 307 and the inverse conversion table 404 used when the control program 131 is obfuscated in the control program obfuscation process 511, except that the array before conversion and the array after conversion are reversed. Are the same.
  • FIG. 18 shows details of the control program reverse conversion processing 1312
  • FIG. 19 shows an embodiment of the control program reverse conversion processing 1312.
  • the control program reverse conversion processing unit 401 uses the reverse conversion table 404 to convert the randomized obfuscation control program 132 device identifier into the original device identifier.
  • the control program inverse conversion processing unit 401 reads one device identifier.
  • the control program reverse conversion processing unit 401 converts the device number with reference to the reverse conversion table 404. Specifically, the control program reverse conversion processing unit 401 determines the position in the array before conversion of the numerical value of the device number, extracts the numerical value in the array after conversion at the same position as the determined position, and The numerical value of the number is converted into the extracted numerical value, and the device identifier is restored. If there is an unconverted device identification in the processing step 1603, the processing returns to the processing step 1601. The above process is repeated for all device identifiers.
  • the converted numerical value corresponding to the numerical value “6” in the reverse conversion table 404 is “0”.
  • the processing unit 401 converts “X6” to “X0”.
  • FIG. 20 shows details of the obfuscation cancellation processing 711 shown in FIG.
  • the data processing unit 403 reads the device ID 134 from the controller device 102.
  • the additional information authentication unit 306 confirms that the stored additional information 133 is the same as the additional information 133 created at the time of obfuscation.
  • the reverse conversion table creation processing unit 305 executes the reverse conversion table creation processing 1811 to create the reverse conversion table 308.
  • the control program reverse conversion processing unit 304 executes the control program reverse conversion processing 1812 to convert the obfuscation control program 132 into the control program 131 using the reverse conversion table 308.
  • the operation of the reverse conversion table creation process 1811 is the same as that of the reverse conversion table creation process 1311, and the operation of the control program reverse conversion process 1812 is the same as the control program reverse conversion process 1312. For this reason, the description of the reverse conversion table creation processing 1811 and the control program reverse conversion processing 1812 is omitted.
  • the control program cannot operate normally. This makes it difficult to produce counterfeit products by misappropriation.
  • a conversion table by using all the numerical values that can be used as device numbers in the index, the range of the numerical values of the device numbers after device number conversion becomes wider, making it more difficult to analyze the obfuscation method become.
  • the conversion table is made random by using different information for each creation of a time stamp or the like as additional information, and is different even when the same control program is obfuscated in association with the same controller device. Since the obfuscation result can be obtained, it becomes difficult to analyze the obfuscation method.
  • the control system including the following means has been described.
  • (1) Means for creating a conversion table for converting a numerical value into a different numerical value using a pseudo-random number generated from the device ID.
  • (2) Using the conversion table in (1) above, the device number of the control program is set.
  • Means for converting (3) Means for transmitting the control program after conversion in (2) to the controller (4)
  • control system includes means for creating a conversion table for converting a certain numerical value into a different numerical value using a pseudo-random number created from additional information that becomes different data each time the device ID is created.
  • a conversion table for converting a certain numerical value into a different numerical value using a pseudo-random number created from additional information that becomes different data each time the device ID is created.
  • control system includes means for creating a conversion table that converts a numerical value used in the control program into a different numerical value using a pseudo-random number created from the device ID. did.
  • control system includes means for creating a conversion table that converts a numerical value that can be used in the control program into a different numerical value by using a pseudo-random number created from the device ID. .
  • control system includes means for authenticating that the additional information is legitimate when reading the control program from the controller.
  • FIG. 1 In the first embodiment, one conversion table is used in the control program conversion process 812. In the present embodiment, an example in which the control program 131 is converted using a plurality of conversion tables will be described. Also in the present embodiment, the overall configuration of the control system is as shown in FIG. 1, the configuration example of the computer device 101 is as shown in FIG. 2, and the configuration example of the controller device 102 is as shown in FIG. . In the present embodiment, the configurations of the obfuscation processing unit 115 and the obfuscation release processing unit 125 are different from those of the first embodiment.
  • FIG. 21 shows a configuration example of the obfuscation processing unit 115 of the present embodiment
  • FIG. 22 shows a configuration example of the obfuscation release processing unit 125 of the present embodiment.
  • table setting information 1909 indicating the number of conversion tables to be created is added as compared with the configuration shown in FIG.
  • Elements other than the table setting information 1909 are the same as the elements shown in FIG.
  • table setting information 2005 indicating the number of conversion tables to be created is added as compared to the configuration illustrated in FIG. 6.
  • Elements other than the table setting information 2005 are the same as the elements shown in FIG.
  • FIG. 23 shows a flow of processing for writing the control program 131 in the present embodiment into the controller device 102.
  • Processing steps 2101 to 2103 are the same as the processing steps 501 to 503 in FIG.
  • the conversion table 1907 is generated and the control program 131 is obfuscated using the conversion table 1907 to generate the obfuscation control program 132, which is used for obfuscation, as in the processing stage 504 of FIG.
  • the communication processing unit 116 sends the obfuscation control program 132, the additional information 133 used to generate the conversion table 1907, and the table setting information 1909 to the controller device via the communication device 107. 102.
  • the communication control unit 121 receives the obfuscation control program 132, additional information 133, and table setting information 1909, and the obfuscation control program 132 is stored in the control program storage unit 124 and added.
  • the information 133 is stored in the additional information management unit 123, and the table setting information 1909 is stored as the table setting information 2005.
  • FIG. 24 shows details of the conversion table creation processing 811 in the present embodiment.
  • the conversion table creation processing unit 1902 sets the number of conversion tables 1907 to be created in the table setting information 1909.
  • the conversion table creation processing unit 1902 uses the device number used in the control program 131 as an index, and the table 2211 in which the numerical values before conversion and the converted numerical values are identical is the same. Create This processing is the same as the processing in the processing stage 901 in FIG.
  • processing step 2203 the conversion table creation processing unit 1902 creates a pseudo random number 2212 using the device ID 134 and the additional information 133 as seeds. This process is the same as the process in process step 902 of FIG.
  • the conversion table creation processing unit 1902 uses the created pseudo-random number 2212 to randomly sort the converted array of the table 2211, thereby ordering the numerical values in the converted array of the table 2211. And a conversion table 1907 is created using a new array whose numerical order has changed. This processing is the same as the processing in the processing stage 903 in FIG.
  • the created conversion table 1907 is associated with the count value. For example, when the quantity set in the processing stage 2201 is “2”, two conversion tables 1907 are created. The first conversion table 1907A is associated with the count value “0”, and the second conversion table 1907B is associated with the count value “1”.
  • the process returns to the processing stage 2202. If the number of created tables reaches the number set in the processing step 2201 in the processing step 2205, the processing is terminated.
  • FIG. 25 shows details of the control program conversion processing 812 according to the present embodiment
  • FIG. 26 shows an example of the control program conversion processing 812 according to the present embodiment.
  • control program conversion processing unit 1901 reads one device identifier.
  • the control program conversion processing unit 1901 confirms the count value of a predetermined counter, refers to the conversion table 1907 corresponding to the current count value, and determines the device number read in the processing stage 2301. Convert.
  • the count value of the counter takes “0” or “1”.
  • the control program conversion processing unit 1901 selects the conversion table 1907 associated with the count value “0”.
  • the device number read in the processing step 2301 is converted with reference to the array before conversion and the array after conversion of the selected conversion table 1907.
  • the device number conversion process itself using the conversion table 1907 is the same as that described in the first embodiment. Note that the converted array in the conversion table 1907 selected based on the count value corresponds to an example of the selected second array.
  • the control program conversion processing unit 1901 increments the count value of the counter at the processing stage 2304. If the count value of the counter has reached the set number of the table setting information 1909, the count value of the counter is initialized in processing step 2305.
  • the process returns to the processing stage 2301. The above process is repeated for all device identifiers.
  • the control program conversion processing unit 1901 selects the conversion table 1907A when converting the device 2401 (X0) in the control program 131. Since the converted numerical value corresponding to the numerical value “0” in the conversion table 1907A is “6”, the control program conversion processing unit 1901 converts “X0” to “X6”. Next, when converting the device 2402 (Y0) in the control program 131, the control program conversion processing unit 1901 advances the counter and selects the conversion table 1907B. Since the converted numerical value corresponding to the numerical value “0” in the conversion table 1907B is “5”, the control program conversion processing unit 1901 converts “Y0” to “Y5”.
  • FIG. 27 shows details of the reverse conversion table creation processing 1311 according to the present embodiment.
  • the reverse conversion table creation processing unit 402 sets the quantity of the table setting information 2005 to the quantity of the reverse conversion table 2004 to be created.
  • the inverse conversion table creation processing unit 402 creates a table 2511 in which the numerical value before conversion and the converted numerical value are the same, using the device number used in the obfuscation control program 132. .
  • the reverse conversion table creation processing unit 2002 creates a pseudo random number 2512 using the device ID 134 and the additional information 133 as seeds. Also in the present embodiment, the pseudo random number generation algorithm in the conversion table creation processing unit 1902 of the computer apparatus 101 and the pseudo random number generation algorithm in the inverse conversion table creation processing unit 2002 of the controller apparatus 102 are the same. That is, the reverse conversion table creation processing unit 2002 generates the same pseudo random number as the pseudo random number generated by the conversion table creation processing unit 1902.
  • the inverse conversion table creation processing unit 2002 uses the created pseudorandom number 2512 to randomly sort the array before conversion in the table 2511, so that the numerical values in the array before conversion in the table 2511 are converted.
  • the reverse conversion table 2004 is created by changing the order and using a new array whose numerical order has changed. Similar to the conversion table 1907, the created reverse conversion table 2004 is associated with the count value. For example, when the quantity set in the processing stage 2501 is “2”, two reverse conversion tables 2004 are created. The first reverse conversion table 2004A is associated with the count value “0”, and the second reverse conversion table 2004B is associated with the count value “1”.
  • the process returns to the processing stage 2502. If the number of created tables reaches the quantity set in the processing stage 2501 in the processing stage 2505, the process is terminated.
  • FIG. 28 shows details of the control program reverse conversion processing 1312 according to the present embodiment
  • FIG. 29 shows an example of the control program reverse conversion processing 1312 according to the present embodiment.
  • the control program reverse conversion processing unit 2001 reads one device identifier.
  • the control program reverse conversion processing unit 2001 converts the device number with reference to the reverse conversion table 2004 corresponding to the count value of the counter.
  • the count value of the counter is “0” or “1”.
  • the control program reverse conversion processing unit 2001 selects the reverse conversion table 2004 associated with the count value “0”.
  • the device number read in the processing step 2601 is converted with reference to the array before conversion and the array after conversion of the selected inverse conversion table 2004.
  • the device number reverse conversion process itself using the reverse conversion table 2004 is the same as that shown in the first embodiment. Note that the array before conversion of the inverse conversion table 2004 selected based on the count value corresponds to an example of the selected fourth array.
  • control program reverse conversion processing unit 2001 increments the count value of the counter in the processing step 2604. If the count value of the counter has reached the set number of the table setting information 2005, the control program reverse conversion processing unit 2001 initializes the counter in the processing step 2605. If there is an unconverted device in the process step 2603, the process returns to the process step 2601. The above process is repeated for all device identifiers.
  • the control program reverse conversion processing unit 2001 selects the reverse conversion table 2004A when the device 2701 (X6) in the obfuscation control program 132 is converted. Since the converted numerical value corresponding to the numerical value “6” in the reverse conversion table 2004A is “0”, the control program reverse conversion processing unit 2001 converts “X6” to “X0”. Next, when converting the device 2702 (Y5) in the obfuscation control program 132, the control program reverse conversion processing unit 2001 advances the counter and selects the reverse conversion table 2004B. Since the converted numerical value corresponding to the numerical value “5” in the reverse conversion table 2004B is “0”, the control program reverse conversion processing unit 2001 converts “Y5” to “Y0”.
  • Embodiment 3 a control program conversion method different from the method shown in the first embodiment will be described.
  • the control program conversion processing unit 301 uses the conversion table 307 to convert the device number, but in this embodiment, the device number is not converted but the conversion table is associated with the step number. To convert.
  • step numbers are appended to each device identifier.
  • the step number (0) is appended to the identifier “X0”.
  • the conversion table creation processing unit 302 generates the conversion table 307 in the same manner as in the first embodiment.
  • the control program reverse conversion processing unit 401 also generates the reverse conversion table 404 in the same manner as in the first embodiment.
  • control program conversion processing 812 by the control program conversion processing unit 301 and control program reverse conversion processing 1311 by the control program reverse conversion processing unit 401 are different from the first embodiment.
  • each processing will be described.
  • FIG. 30 shows details of the control program conversion processing 812
  • FIG. 31 shows an embodiment of the control program conversion processing 812.
  • control program conversion processing unit 301 reads one device identifier.
  • the control program conversion processing unit 301 converts the read device identifier into the device identifier of the step with reference to the conversion table 307. More specifically, the control program conversion processing unit 301 determines the position in the array before conversion of the numerical value of the step number added to the read device identifier. Then, the control program conversion processing unit 301 extracts a numerical value in the converted array at the same position as the determined position. Then, the control program conversion processing unit 301 identifies a device identifier in which the extracted numerical value is added as a step number, and replaces the device identifier read in the processing step 2801 with the identified device identifier.
  • process step 2803 if there is an unconverted device identifier in process step 2803, the process returns to process step 2801. The above process is repeated for all device identifiers.
  • the step number of the device 2901 (X0) is “0”.
  • the converted numerical value corresponding to the numerical value “0” in the conversion table 307 is “6”. Therefore, the control program conversion processing unit 301 converts “X0” into “Y7”, which is a device identifier to which the step number “6” is added.
  • FIG. 32 shows details of the control program reverse conversion processing 1312
  • FIG. 33 shows an embodiment of the control program reverse conversion processing 1312.
  • control program reverse conversion processing unit 401 reads one device identifier.
  • the control program reverse conversion processing unit 401 converts the read device identifier into the device identifier of the step with reference to the reverse conversion table 404. More specifically, the control program reverse conversion processing unit 401 determines the position in the array before conversion of the numerical value of the step number appended to the read device identifier. Then, the control program reverse conversion processing unit 401 extracts a numerical value in the converted array at the same position as the determined position in the array before conversion. Then, the control program reverse conversion processing unit 401 identifies a device identifier having the extracted numerical value attached as a step number, and replaces the device identifier read in the processing step 3001 with the identified device identifier.
  • the step number of the device 3101 (Y7) is “0”.
  • the converted numerical value corresponding to the numerical value “0” in the reverse conversion table 404 is “6”. Therefore, the control program reverse conversion processing unit 401 converts “Y7” into “X0”, which is a device identifier to which the step number “6” is added.
  • the numerical values “0 to 7” included in the conversion table 307 and the inverse conversion table 404 are based on the step numbers “0 to 7” in the control program 131. That is, when the device identifier is converted using the step number, the conversion table 307 needs to be generated using the numerical value of the step number. Similarly, the inverse conversion table 404 needs to be generated using the numerical value of the step number.
  • the obfuscation processing unit 115 of the computer apparatus 101 generates a plurality of conversion tables as in the second embodiment, and selects the plurality of conversion tables according to the count value.
  • the obfuscation processing unit 115 converts the device identifier using the selected conversion table with the step number interposed, as in the third embodiment.
  • the obfuscation cancellation processing unit 125 of the controller device 102 generates a plurality of inverse conversion tables as in the second embodiment, and selects the plurality of inverse conversion tables according to the count value.
  • the obfuscation cancellation processing unit 125 restores the device identifier using the selected inverse conversion table with the step number interposed, as in the third embodiment.
  • control system including means for converting the device identifier according to the number of steps of the control program using the conversion table has been described.
  • the obfuscation is canceled before the control program is executed by the controller device, so that the execution speed does not decrease and the behavior at the time of execution does not change. Further, if an inverse conversion table is used, the obfuscated control program can be inversely converted to the control program before obfuscation.
  • the obfuscation control program and additional information necessary for deobfuscation can be copied to another controller device.
  • the control program does not operate as expected, making it difficult to manufacture counterfeit products through unauthorized use.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)

Abstract

A computer apparatus (101) manages a control program wherein a device identifier which is an identifier of a device is described. Using a machine ID which is a unique value for a controller apparatus (102) which executes the control program, the computer apparatus (101) generates a pseudorandom number, and, using the generated pseudorandom number, substitutes another device identifier for the device identifier which is described in the control program. The computer apparatus (101) outputs the control program for which the device identifier has been substituted to the controller apparatus (102).

Description

制御プログラム管理装置及びコントローラ装置及び制御システムControl program management device, controller device and control system
 本発明は、例えば、ファクトリーオートメーション(Factory Automation: FA)システムで用いられる制御プログラムを難読化する技術に関する。 The present invention relates to a technique for obfuscating a control program used in, for example, a Factory Automation (FA) system.
 FAシステムでは、工場内の生産機器の動作を制御するためのコントローラ装置(以下、単にコントローラともいう)が配置されている。
 このコントローラはプログラマブルロジックコントローラ(Programmable Logic Controller:PLC)と呼ばれる。
 PLCを動作させるための制御プログラムは、プログラミングソフトウェアを用いてラダー等の言語により作成(設計)される。
 作成された制御プログラム(例えば、ラダー形式)は、プログラミングソフトウェアにより実行可能な形式(マシンコード)に変換され、通信回線を介してPLCに書き込まれる。
In the FA system, a controller device (hereinafter also simply referred to as a controller) for controlling the operation of production equipment in a factory is arranged.
This controller is called a programmable logic controller (PLC).
A control program for operating the PLC is created (designed) in a language such as a ladder using programming software.
The created control program (for example, ladder format) is converted into a format (machine code) that can be executed by programming software, and written to the PLC via a communication line.
 プログラミングソフトウェアはWindows(登録商標)上で動作するソフトウェアとして広く市販されており、Windows(登録商標)が動作するコンピュータと、プログラミングソフトウェアがあれば、PLCからの制御プログラムの読み出し、PLCへの制御プログラムの書き込みがコンピュータを用いて容易に行える。
 このため、近年では既に工場での稼働実績のあるPLCから制御プログラムが抜き取られたり、プログラミングソフトウェアからPLCに制御プログラムを書き込む際に、通信回線を流れるデータが盗難されるという事象が発生している。
 これらの行為により、制御プログラムが不正流用されてPLCの模倣品が製造されるという問題が発生している。
Programming software is widely marketed as software that operates on Windows (registered trademark). If there is a computer on which Windows (registered trademark) operates, and if there is programming software, the control program is read from the PLC and the control program to the PLC. Can be easily written using a computer.
For this reason, in recent years, when a control program is extracted from a PLC that has already been operated in a factory, or when a control program is written to a PLC from programming software, data flowing through a communication line has been stolen. .
Due to these actions, there is a problem that imitation of PLC is manufactured by improperly diverting the control program.
 一般的なプログラムの模倣品対策手法としては、難読化によるプログラムの保護がある。
 プログラムを難読化することにより解析コストを増加させ、プログラムが盗難されても攻撃者は有意な情報を得ることが難しくなる。
 具体的な例として、特許文献1では、プログラム実行時にプログラムが自身を書き換えて、挙動を複雑にすることでプログラムを難読化し、解析コストを増加させている。
 また、特許文献2、特許文献3では、プログラム内のデータを符号化して難読化を行っており、プログラム実行中に符号化を解除することでプログラムが正常に実行される。
A common measure against counterfeiting programs is to protect the program by obfuscation.
By obfuscating the program, the analysis cost is increased, and even if the program is stolen, it is difficult for an attacker to obtain significant information.
As a specific example, in Patent Document 1, when a program is executed, the program rewrites itself to complicate the behavior, thereby obfuscating the program and increasing the analysis cost.
In Patent Document 2 and Patent Document 3, data in a program is encoded and obfuscated, and the program is normally executed by releasing the encoding during the execution of the program.
特開2011-170836号公報JP 2011-170836 A 特開2007-298847号公報JP 2007-298847 A 特開2005-049925号公報JP 2005-049925 A
 しかし、制御プログラムに難読化を施す際にFAシステム特有の要件がある。
 制御プログラムの難読化に対するFAシステム特有の要件として以下が挙げられる。
 (1)制御プログラムはラダー言語等のFAシステム特有の言語で記述されている可能性があること
 (2)PLCから制御プログラムを読み出し編集を行うので、難読化した制御プログラムを難読化前の制御プログラムに戻すことができること
 (3)実行時に実行速度が低下しないこと
  制御プログラムは、処理の実行タイミングが非常に重要になるので、実行速度の低下がほとんど許されない。
 (4)実行時の挙動が変化しないこと
  挙動の変化により、処理の実行タイミングがずれてしまう可能性がある。
However, there are requirements specific to the FA system when obfuscating the control program.
The requirements specific to the FA system for obfuscation of the control program include the following.
(1) The control program may be written in a language unique to the FA system such as a ladder language. (2) Since the control program is read from the PLC and edited, the control program obfuscated is controlled before it is obfuscated. (3) Execution speed does not decrease at the time of execution Since the execution timing of the process becomes very important in the control program, a decrease in the execution speed is hardly allowed.
(4) The behavior at the time of execution does not change The change in the behavior may cause the execution timing of the process to shift.
 特許文献1ではプログラムの実行時にプログラムが自己書き換えを行い、制御を複雑化することで難読化を行っている。
 また、特許文献2、特許文献3では、プログラム内のデータを符号化して難読化を行っており、プログラム実行中に符号化を解除することでプログラムが正常に実行される。
 これらの難読化手法は難読化対象の挙動が変化し処理が増加するので、実行速度の低下がおきてしまう。
 よって、これらの難読化手法を制御プログラムに対して適用することは困難である。
In Patent Document 1, the program self-rewrites during execution of the program, and obfuscation is performed by complicating the control.
In Patent Document 2 and Patent Document 3, data in a program is encoded and obfuscated, and the program is normally executed by releasing the encoding during the execution of the program.
Since these obfuscation techniques change the behavior of the obfuscation target and increase the processing, the execution speed decreases.
Therefore, it is difficult to apply these obfuscation techniques to the control program.
 本発明は、上記に鑑みたものであり、制御プログラムに対する効果的な難読化を行い、制御プログラムの解析コストを増加させ不正流用を困難にすることを主な目的とする。 The present invention has been made in view of the above, and has as its main purpose to effectively obfuscate the control program, increase the analysis cost of the control program, and make unauthorized use difficult.
 本発明に係る制御プログラム管理装置は、
 デバイスの識別子であるデバイス識別子が記述されている制御プログラムを管理する制御プログラム管理装置であって、
 前記制御プログラムを実行するコントローラ装置に固有の値であるコントローラ固有値を用いて、疑似乱数を生成する疑似乱数生成部と、
 前記疑似乱数生成部により生成された疑似乱数を用いて、前記制御プログラムに記述されているデバイス識別子を他のデバイス識別子に置換するデバイス識別子置換部と、
 前記デバイス識別子置換部によりデバイス識別子が置換された後の制御プログラムを前記コントローラ装置に出力する出力部とを有することを特徴とする。
The control program management device according to the present invention is:
A control program management apparatus that manages a control program in which a device identifier that is a device identifier is described,
A pseudo-random number generator that generates a pseudo-random number using a controller-specific value that is a value specific to a controller device that executes the control program;
A device identifier replacement unit that replaces the device identifier described in the control program with another device identifier using the pseudo random number generated by the pseudo random number generation unit;
And an output unit that outputs the control program after the device identifier is replaced by the device identifier replacement unit to the controller device.
 本発明によれば、コントローラ固有値を用いた疑似乱数を用いて制御プログラム内のデバイス識別子を他のデバイス識別子に置換するため、コントローラ装置以外の装置では置換後のデバイス識別子から置換前のデバイス識別子に戻すことができない。
 このため、制御プログラムを難読化することができ、制御プログラムの不正流用を困難にすることができる。
 また、本発明によれば、デバイス識別子を置換するのみであるため、置換後のデバイス識別子から置換前のデバイス識別子に戻した後の制御プログラムを実行する際の実行速度は低下せず、また、実行時の挙動も変化しない。
According to the present invention, since the device identifier in the control program is replaced with another device identifier using a pseudo-random number using the controller unique value, the device identifier after replacement is changed from the device identifier after replacement to the device identifier before replacement. I can't get it back.
For this reason, it is possible to obfuscate the control program, making it difficult to misappropriate the control program.
Further, according to the present invention, since only the device identifier is replaced, the execution speed when executing the control program after returning from the device identifier after replacement to the device identifier before replacement does not decrease, The runtime behavior is not changed.
実施の形態1に係る制御システムの構成例を示す図。FIG. 2 is a diagram illustrating a configuration example of a control system according to the first embodiment. 実施の形態1に係るコンピュータ装置の機能構成例を示す図。FIG. 3 is a diagram illustrating a functional configuration example of a computer apparatus according to the first embodiment. 実施の形態1に係るコントローラ装置の機能構成例を示す図。FIG. 3 is a diagram illustrating a functional configuration example of a controller device according to the first embodiment. 実施の形態1に係るコンピュータ装置のハードウェア構成例を示す図。2 is a diagram illustrating a hardware configuration example of a computer apparatus according to Embodiment 1. FIG. 実施の形態1に係る難読化処理部の内部構成例を示す図。FIG. 3 is a diagram illustrating an internal configuration example of an obfuscation processing unit according to the first embodiment. 実施の形態1に係る難読化解除処理部の内部構成例を示す図。The figure which shows the internal structural example of the obfuscation cancellation | release process part which concerns on Embodiment 1. FIG. 実施の形態1に係る制御プログラムの書き込み時の処理シーケンスを示す図。FIG. 4 is a diagram showing a processing sequence at the time of writing a control program according to the first embodiment. 実施の形態1に係る制御プログラム実行処理の例を示すフローチャート図。FIG. 3 is a flowchart showing an example of a control program execution process according to the first embodiment. 実施の形態1に係る制御プログラムの読み出し時の処理シーケンスを示す図。FIG. 4 is a diagram showing a processing sequence at the time of reading a control program according to the first embodiment. 実施の形態1に係る難読化処理の例を示すフローチャート図。FIG. 4 is a flowchart showing an example of obfuscation processing according to the first embodiment. 実施の形態1に係る変換テーブル作成処理の例を示す図。FIG. 6 is a diagram illustrating an example of a conversion table creation process according to the first embodiment. 実施の形態1に係る変換テーブル作成処理の概要を示す図。FIG. 4 is a diagram showing an outline of conversion table creation processing according to the first embodiment. 実施の形態1に係る制御プログラム変換処理の例を示すフローチャート図。FIG. 3 is a flowchart showing an example of a control program conversion process according to the first embodiment. 実施の形態1に係る制御プログラム変換処理の概要を示す図。FIG. 3 is a diagram showing an outline of control program conversion processing according to the first embodiment. 実施の形態1に係る難読化解除処理の例を示すフローチャート図。FIG. 4 is a flowchart showing an example of obfuscation cancellation processing according to the first embodiment. 実施の形態1に係る逆変換テーブル作成処理の例を示すフローチャート図。FIG. 6 is a flowchart showing an example of reverse conversion table creation processing according to the first embodiment. 実施の形態1に係る逆変換テーブル作成処理の概要を示す図。FIG. 5 is a diagram showing an overview of reverse conversion table creation processing according to the first embodiment. 実施の形態1に係る制御プログラム逆変換処理の例を示すフローチャート図。FIG. 3 is a flowchart showing an example of a control program reverse conversion process according to the first embodiment. 実施の形態1に係る制御プログラム逆変換処理の概要を示す図。The figure which shows the outline | summary of the control program reverse conversion process which concerns on Embodiment 1. FIG. 実施の形態1に係る難読化解除処理の例を示すフローチャート図。FIG. 4 is a flowchart showing an example of obfuscation cancellation processing according to the first embodiment. 実施の形態2に係る難読化処理部の内部構成例を示す図。The figure which shows the internal structural example of the obfuscation process part which concerns on Embodiment 2. FIG. 実施の形態2に係る難読化解除処理部の内部構成例を示す図。The figure which shows the internal structural example of the obfuscation cancellation | release process part which concerns on Embodiment 2. FIG. 実施の形態2に係る制御プログラムの書き込み時の処理シーケンスを示す図。FIG. 10 is a diagram showing a processing sequence at the time of writing a control program according to the second embodiment. 実施の形態2に係る変換テーブル作成処理の例を示す図。FIG. 10 is a diagram illustrating an example of a conversion table creation process according to the second embodiment. 実施の形態2に係る制御プログラム変換処理の例を示すフローチャート図。FIG. 9 is a flowchart showing an example of a control program conversion process according to the second embodiment. 実施の形態2に係る制御プログラム変換処理の概要を示す図。FIG. 10 is a diagram showing an outline of control program conversion processing according to the second embodiment. 実施の形態2に係る逆変換テーブル作成処理の例を示すフローチャート図。FIG. 9 is a flowchart showing an example of reverse conversion table creation processing according to the second embodiment. 実施の形態2に係る制御プログラム逆変換処理の例を示すフローチャート図。The flowchart figure which shows the example of the control program reverse conversion process which concerns on Embodiment 2. FIG. 実施の形態2に係る制御プログラム逆変換処理の概要を示す図。The figure which shows the outline | summary of the control program reverse conversion process which concerns on Embodiment 2. FIG. 実施の形態3に係る制御プログラム変換処理の例を示すフローチャート図。FIG. 9 is a flowchart showing an example of a control program conversion process according to the third embodiment. 実施の形態3に係る制御プログラム変換処理の概要を示す図。FIG. 10 is a diagram showing an outline of a control program conversion process according to the third embodiment. 実施の形態3に係る制御プログラム逆変換処理の例を示すフローチャート図。FIG. 9 is a flowchart showing an example of a control program reverse conversion process according to the third embodiment. 実施の形態3に係る制御プログラム変換処理の概要を示す図。FIG. 10 is a diagram showing an outline of a control program conversion process according to the third embodiment.
 実施の形態1.
 図1は、本実施の形態に係る制御システムの構成例を示す。
 図1に示すように、本実施の形態に係る制御システムでは、コンピュータ装置101とコントローラ装置102が、通信回線105で接続されている。
 コントローラ装置102は、PLCである。
 また、コントローラ装置102と生産機器104が、通信回線106で接続されている。
 通信回線105、106の具体例として、USB(Universal Serial Bus)ケーブル、もしくはEthernet(登録商標)に対応したLAN(Local Area Network)ケーブル等が挙げられる。
Embodiment 1 FIG.
FIG. 1 shows a configuration example of a control system according to the present embodiment.
As shown in FIG. 1, in the control system according to the present embodiment, a computer device 101 and a controller device 102 are connected by a communication line 105.
The controller device 102 is a PLC.
Further, the controller device 102 and the production equipment 104 are connected by a communication line 106.
Specific examples of the communication lines 105 and 106 include a USB (Universal Serial Bus) cable or a LAN (Local Area Network) cable compatible with Ethernet (registered trademark).
 図1では、生産機器104は1台しか図示していないが、コントローラ装置102には複数台の生産機器104を接続することができる。
 生産機器104は、例えば、サーボアンプ、インバータ等である。
 なお、FAシステムは、コントローラ装置102と生産機器104で構成される。
Although only one production device 104 is illustrated in FIG. 1, a plurality of production devices 104 can be connected to the controller device 102.
The production device 104 is, for example, a servo amplifier or an inverter.
Note that the FA system includes a controller device 102 and a production device 104.
 コンピュータ装置101は、コントローラ装置102で実行される制御プログラムを生成し、また、生成した制御プログラムの難読化を行い、難読化後の制御プログラムをコントローラ装置102に出力する。
 コンピュータ装置101は、制御プログラム管理装置の例に相当する。
The computer apparatus 101 generates a control program to be executed by the controller apparatus 102, obfuscates the generated control program, and outputs the obfuscated control program to the controller apparatus 102.
The computer device 101 corresponds to an example of a control program management device.
 コンピュータ装置101が生成する制御プログラムにはデバイスの識別子であるデバイス識別子が記述されている。
 デバイス識別子は、デバイスの種別値(X、Y、M等)とデバイス番号(0、1、2等)との組合せである。
 デバイスとは、コントローラ装置102における制御に用いられる変数である。
 各デバイスは、接点、コイル、スイッチ等を表している。
 コンピュータ装置101が生成する制御プログラムは、例えば、図14の制御プログラム131に示すようにラダー形式で表現することができる。
 図14の制御プログラム131に示す、X0、X2、X5、Y0、Y2、Y7がデバイス識別子である。
 Xデバイスは、コントローラ装置102の外部入力スイッチなどから信号を入力するための変数である。
 Yデバイスは、コントローラ装置102の外部へ信号を出力するための変数である。
 コンピュータ装置101は、デバイス識別子が包含する数値(デバイス番号)を変換することにより、デバイス識別子を置換し、制御プログラムを難読化する。
 図14の例では、例えば、制御プログラム131のデバイスX0を、デバイスX6に置換して、難読化制御プログラム132としている。
In the control program generated by the computer apparatus 101, a device identifier which is a device identifier is described.
The device identifier is a combination of a device type value (X, Y, M, etc.) and a device number (0, 1, 2, etc.).
A device is a variable used for control in the controller apparatus 102.
Each device represents a contact, a coil, a switch, or the like.
The control program generated by the computer apparatus 101 can be expressed in a ladder format, for example, as shown in the control program 131 of FIG.
X0, X2, X5, Y0, Y2, and Y7 shown in the control program 131 of FIG. 14 are device identifiers.
The X device is a variable for inputting a signal from an external input switch or the like of the controller apparatus 102.
The Y device is a variable for outputting a signal to the outside of the controller device 102.
The computer apparatus 101 converts the numerical value (device number) included in the device identifier to replace the device identifier and obfuscate the control program.
In the example of FIG. 14, for example, the device X0 of the control program 131 is replaced with the device X6 to form the obfuscation control program 132.
 コントローラ装置102は、制御プログラムを実行して生産機器104の動作を制御する。
 コントローラ装置102は、コンピュータ装置101から難読化後の制御プログラムを入力し、入力した難読化後の制御プログラムの難読化を解除して、難読化前の制御プログラムを取得する。
 コントローラ装置102は、コンピュータ装置101におけるデバイス識別子の置換手順と論理的に逆の手順にて、置換後のデバイス識別子を置換前のデバイス識別子に戻して難読化を解除している。
 そして、コントローラ装置102は、難読化が解除された制御プログラムを実行して、生産機器104の動作を制御する。
The controller device 102 executes a control program and controls the operation of the production equipment 104.
The controller device 102 inputs the control program after obfuscation from the computer device 101, releases the obfuscation of the input control program after obfuscation, and acquires the control program before obfuscation.
The controller device 102 cancels obfuscation by returning the device identifier after replacement to the device identifier before replacement in a procedure logically opposite to the device identifier replacement procedure in the computer device 101.
Then, the controller device 102 executes the control program whose obfuscation has been canceled and controls the operation of the production device 104.
 図2は、コンピュータ装置101の機能ブロックを示す。
 コンピュータ装置101は、制御プログラム管理部103と通信装置107で構成される。
FIG. 2 shows functional blocks of the computer apparatus 101.
The computer device 101 includes a control program management unit 103 and a communication device 107.
 制御プログラム管理部103において、入力部110は、制御プログラム作成者の入力情報を入力(取得)する。 In the control program management unit 103, the input unit 110 inputs (acquires) input information of the control program creator.
 制御プログラム作成部111は、入力部110により入力された制御プログラム作成者の入力情報に基づいて制御プログラムを作成する。 The control program creation unit 111 creates a control program based on the input information of the control program creator input by the input unit 110.
 制御プログラム管理部112は、作成された制御プログラムの変換、記憶、難読化、コントローラ装置102への出力などの制御と管理を行う。 The control program management unit 112 performs control and management such as conversion, storage, obfuscation, and output to the controller device 102 of the created control program.
 制御プログラム変換部113は、制御プログラム作成部111により生成された制御プログラム(ラダープログラム)を、コントローラ装置102で実行可能な形式に変換する。 The control program conversion unit 113 converts the control program (ladder program) generated by the control program creation unit 111 into a format that can be executed by the controller device 102.
 制御プログラム記憶部114は、制御プログラム変換部113により実行可能形式に変換された制御プログラム131を記憶する。 The control program storage unit 114 stores the control program 131 converted into an executable format by the control program conversion unit 113.
 難読化処理部115は、制御プログラム131の難読化を行う。
 より具体的には、難読化処理部115は、コントローラ装置102に固有の値である機器ID(Identification)と、生成の度に異なる値となる付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて制御プログラム131内のデバイス識別子の置換を行い、制御プログラム131の難読化を行う。
 また、難読化処理部115は、コントローラ装置102から出力された難読化された制御プログラムの難読化の解除を行う。
 より具体的には、難読化処理部115は、機器IDと、付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて、難読化された制御プログラム内の置換後のデバイス識別子を置換前のデバイス識別子に戻し、難読化の解除を行う。
 なお、機器IDはコントローラ固有値の例に相当し、付加情報133はワンタイム情報の例に相当する。
 また、難読化処理部115は、疑似乱数生成部及びデバイス識別子置換部の例に相当する。
 なお、本実施の形態では、機器IDと付加情報133とを用いて制御プログラム131を難読化することとしているが、機器IDのみを用いて制御プログラム131を難読化することも可能である。
The obfuscation processing unit 115 obfuscates the control program 131.
More specifically, the obfuscation processing unit 115 generates a pseudo random number using a device ID (Identification) that is a value unique to the controller device 102 and additional information 133 that is a different value each time it is generated, The device identifier in the control program 131 is replaced using the generated pseudo random number, and the control program 131 is obfuscated.
In addition, the obfuscation processing unit 115 cancels obfuscation of the obfuscated control program output from the controller device 102.
More specifically, the obfuscation processing unit 115 generates a pseudo random number using the device ID and the additional information 133, and uses the generated pseudo random number to replace the replaced device in the control program obfuscated. The identifier is returned to the device identifier before replacement, and obfuscation is canceled.
The device ID corresponds to an example of a controller specific value, and the additional information 133 corresponds to an example of one-time information.
The obfuscation processing unit 115 corresponds to an example of a pseudo random number generation unit and a device identifier replacement unit.
In the present embodiment, the control program 131 is obfuscated using the device ID and the additional information 133, but it is also possible to obfuscate the control program 131 using only the device ID.
 通信処理部116は、制御プログラム管理部112からの制御に基づき、通信装置107を介してコントローラ装置102との通信を行う。
 より具体的には、通信処理部116は、コントローラ装置102から機器IDを入力し、コントローラ装置102に難読化後の制御プログラムを出力し、また、コントローラ装置102から難読化後の制御プログラムを入力する。
 通信処理部116は、出力部の例に相当する。
The communication processing unit 116 communicates with the controller device 102 via the communication device 107 based on control from the control program management unit 112.
More specifically, the communication processing unit 116 inputs the device ID from the controller device 102, outputs the control program after obfuscation to the controller device 102, and inputs the control program after obfuscation from the controller device 102. To do.
The communication processing unit 116 corresponds to an example of an output unit.
 なお、制御プログラム管理部103内の入力部110、制御プログラム作成部111、制御プログラム管理部112、制御プログラム変換部113、難読化処理部115及び通信処理部116は、プログラムとして実現することができる。
 例えば、入力部110、制御プログラム作成部111、制御プログラム管理部112、制御プログラム変換部113、難読化処理部115及び通信処理部116を、プログラミングソフトウェアの要素とすることができる。
The input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 in the control program management unit 103 can be realized as programs. .
For example, the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 can be elements of programming software.
 図3は、コントローラ装置102の機能ブロックを示す。 FIG. 3 shows functional blocks of the controller device 102.
 コントローラ装置102において、通信制御部121は、コンピュータ装置101との通信、生産機器104との通信を行う。
 例えば、通信制御部121は、コンピュータ装置101に機器ID134を出力し、コンピュータ装置101から難読化後の制御プログラムを入力し、また、コンピュータ装置101に難読化後の制御プログラムを出力する。
 また、通信制御部121は、内部バス128を介してコントローラ装置102内部の各部と通信を行う。
In the controller device 102, the communication control unit 121 performs communication with the computer device 101 and communication with the production device 104.
For example, the communication control unit 121 outputs the device ID 134 to the computer apparatus 101, inputs the control program after obfuscation from the computer apparatus 101, and outputs the control program after obfuscation to the computer apparatus 101.
The communication control unit 121 communicates with each unit in the controller device 102 via the internal bus 128.
 機器ID管理部122は、機器ID134を記憶し、管理する。
 機器ID管理部122は、コントローラ固有値記憶部の例に相当する。
The device ID management unit 122 stores and manages the device ID 134.
The device ID management unit 122 corresponds to an example of a controller unique value storage unit.
 付加情報管理部123は、付加情報133を記憶し、管理する。 The additional information management unit 123 stores and manages the additional information 133.
 制御プログラム記憶部124は、難読化された制御プログラム131である難読化制御プログラム132を記憶する。 The control program storage unit 124 stores an obfuscation control program 132 that is an obfuscated control program 131.
 難読化解除処理部125は、コンピュータ装置101の難読化処理部115で行われた置換手順と論理的に逆の手順にて置換後のデバイス識別子を置換前のデバイス識別子に戻して、難読化制御プログラム132の難読化を解除する。
 より具体的には、難読化解除処理部125は、機器ID134と、付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて、難読化制御プログラム132内の置換後のデバイス識別子を置換前のデバイス識別子に戻し、難読化の解除を行う。
 難読化解除処理部125は、疑似乱数生成部及びデバイス識別子復元部の例に相当する。
The obfuscation release processing unit 125 returns the device identifier after replacement to the device identifier before replacement by a procedure logically opposite to the replacement procedure performed by the obfuscation processing unit 115 of the computer apparatus 101, and performs obfuscation control. Remove obfuscation of program 132.
More specifically, the obfuscation cancellation processing unit 125 generates a pseudo random number using the device ID 134 and the additional information 133, and uses the generated pseudo random number to replace the device after replacement in the obfuscation control program 132. The identifier is returned to the device identifier before replacement, and obfuscation is canceled.
The obfuscation cancellation processing unit 125 corresponds to an example of a pseudo-random number generation unit and a device identifier restoration unit.
 制御プログラム実行部126は、難読化解除処理部125により難読化が解除された後の制御プログラムを実行する。 The control program execution unit 126 executes the control program after the obfuscation is canceled by the obfuscation cancellation processing unit 125.
 図4は、コンピュータ装置101のハードウェア構成例を示している。 FIG. 4 shows a hardware configuration example of the computer apparatus 101.
 コンピュータ装置101では、内部バス216にCPU(Central Processing Unit)211、メモリ212、入出力装置213、外部記憶装置214、通信装置107が接続されている。
 メモリ212は、例えばRAM(Random Access Memory)である。
 外部記憶装置214は、例えばROM(Read Only Memory)やフラッシュメモリ、ハードディスク装置である。
 図2に示した制御プログラム記憶部114は、メモリ212及び外部記憶装置214により実現される。
 入出力装置213は、例えばマウス、キーボード、ディスプレイ装置等である。
 通信装置107は、例えばNIC(Network Interface Card)である。
In the computer device 101, a CPU (Central Processing Unit) 211, a memory 212, an input / output device 213, an external storage device 214, and a communication device 107 are connected to an internal bus 216.
The memory 212 is, for example, a RAM (Random Access Memory).
The external storage device 214 is, for example, a ROM (Read Only Memory), a flash memory, or a hard disk device.
The control program storage unit 114 illustrated in FIG. 2 is realized by the memory 212 and the external storage device 214.
The input / output device 213 is, for example, a mouse, a keyboard, a display device, or the like.
The communication device 107 is, for example, a NIC (Network Interface Card).
 前述したように、図2に示した制御プログラム管理部103内の入力部110、制御プログラム作成部111、制御プログラム管理部112、制御プログラム変換部113、難読化処理部115及び通信処理部116は、プログラムとして実現することができる。
 CPU211が、これらのプログラムを実行することにより、以下にて説明する入力部110、制御プログラム作成部111、制御プログラム管理部112、制御プログラム変換部113、難読化処理部115及び通信処理部116の機能が実現される。
 プログラムは、通常は外部記憶装置214に記憶されており、メモリ212にロードされた状態で、順次CPU211に読み込まれ、実行される。
 更に、外部記憶装置214にはオペレーティングシステム(OS)も記憶されており、OSの少なくとも一部がメモリ212にロードされ、CPU211はOSを実行しながら、制御プログラム管理部103内の機能を実現するプログラムを実行する。
 また、以下の説明において、「~の判断」、「~の判定」、「~の変換」、「~の置換」、「~の設定」、「~の抽出」、「~の生成」、「~の作成」、「~の選択」、「~の入力」、「~の出力」等として説明している処理の結果を示す情報やデータや信号値や変数値がメモリ212にファイルとして記憶されている。
 また、入力部110、制御プログラム作成部111、制御プログラム管理部112、制御プログラム変換部113、難読化処理部115及び通信処理部116の機能の少なくとも一部が、ファームウェアや素子や回路といったハードウェアで実現されていてもよい。
As described above, the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 in the control program management unit 103 illustrated in FIG. Can be realized as a program.
When the CPU 211 executes these programs, an input unit 110, a control program creation unit 111, a control program management unit 112, a control program conversion unit 113, an obfuscation processing unit 115, and a communication processing unit 116, which will be described below, are executed. Function is realized.
The program is normally stored in the external storage device 214, and is sequentially read and executed by the CPU 211 while being loaded in the memory 212.
Furthermore, an operating system (OS) is also stored in the external storage device 214. At least a part of the OS is loaded into the memory 212, and the CPU 211 implements the functions in the control program management unit 103 while executing the OS. Run the program.
Further, in the following description, “determining”, “determining”, “conversion of”, “replacement of”, “setting of”, “extraction of”, “generation of”, “ Information, data, signal values, and variable values indicating the results of the processing described as “Create”, “Selection”, “Input of”, “Output of”, etc. are stored as files in the memory 212. ing.
In addition, at least some of the functions of the input unit 110, the control program creation unit 111, the control program management unit 112, the control program conversion unit 113, the obfuscation processing unit 115, and the communication processing unit 116 are hardware such as firmware, elements, and circuits. It may be realized with.
 また、コントローラ装置102にも、コンピュータ装置101と同様に、CPU、メモリ、入出力装置、外部記憶装置、通信装置が含まれている。
 コントローラ装置102においても、図3に示した機器ID管理部122、付加情報管理部123及び制御プログラム記憶部124が、メモリ及び外部記憶装置により実現される。
 また、コントローラ装置102においても、通信制御部121、難読化解除処理部125及び制御プログラム実行部126の機能をプログラムで実現してもよい。
 この場合は、CPUがこれらのプログラムを実行することで、以下に示す通信制御部121、難読化解除処理部125及び制御プログラム実行部126の機能が実現される。
 また、通信制御部121、難読化解除処理部125及び制御プログラム実行部126の機能の少なくとも一部が、ファームウェアや素子や回路といったハードウェアで実現されていてもよい。
Similarly to the computer apparatus 101, the controller apparatus 102 also includes a CPU, a memory, an input / output device, an external storage device, and a communication device.
Also in the controller device 102, the device ID management unit 122, the additional information management unit 123, and the control program storage unit 124 illustrated in FIG. 3 are realized by a memory and an external storage device.
Also in the controller device 102, the functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 may be realized by a program.
In this case, when the CPU executes these programs, the following functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 are realized.
In addition, at least some of the functions of the communication control unit 121, the obfuscation release processing unit 125, and the control program execution unit 126 may be realized by hardware such as firmware, elements, and circuits.
 図5は、コンピュータ装置101の難読化処理部115の詳細構成を示している。 FIG. 5 shows a detailed configuration of the obfuscation processing unit 115 of the computer apparatus 101.
 図5において、制御プログラム変換処理部301は、制御プログラム131を入力し、難読化時に必要なデータ(具体的には変換テーブル307)を用いて、制御プログラム131内のデバイス識別子の置換を行って、制御プログラム131を難読化する。
 制御プログラム変換処理部301は、デバイス識別子置換部の例に相当する。
In FIG. 5, the control program conversion processing unit 301 inputs the control program 131 and replaces the device identifier in the control program 131 using data necessary for obfuscation (specifically, the conversion table 307). The control program 131 is obfuscated.
The control program conversion processing unit 301 corresponds to an example of a device identifier replacement unit.
 変換テーブル作成処理部302は、制御プログラム変換処理部301における制御プログラム131の難読化に必要な変換テーブル307を生成する。
 より具体的には、変換テーブル作成処理部302は、機器ID134と付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて変換テーブル307を生成する。
 変換テーブル作成処理部302は、疑似乱数生成部及びデバイス識別子置換部の例に相当する。
The conversion table creation processing unit 302 generates a conversion table 307 necessary for obfuscation of the control program 131 in the control program conversion processing unit 301.
More specifically, the conversion table creation processing unit 302 generates a pseudo random number using the device ID 134 and the additional information 133, and generates a conversion table 307 using the generated pseudo random number.
The conversion table creation processing unit 302 corresponds to an example of a pseudo random number generation unit and a device identifier replacement unit.
 データ処理部303は、制御プログラム131の難読化に必要なデータ(機器ID、付加情報)を管理する。 The data processing unit 303 manages data (device ID, additional information) necessary for obfuscation of the control program 131.
 制御プログラム逆変換処理部304は、コントローラ装置102からの難読化制御プログラム132を入力し、難読化解除に必要なデータ(具体的には、逆変換テーブル308)を用いて、難読化制御プログラム132を制御プログラム131に逆変換する。 The control program reverse conversion processing unit 304 inputs the obfuscation control program 132 from the controller device 102, and uses the data (specifically, the reverse conversion table 308) necessary for deobfuscation to obfuscate the control program 132. Is converted back to the control program 131.
 逆変換テーブル作成処理部305は、難読化制御プログラム132の逆変換に必要な逆変換テーブル308を作成する。
 より具体的には、逆変換テーブル作成処理部305は、機器ID134と付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて逆変換テーブル308を生成する。
The reverse conversion table creation processing unit 305 creates a reverse conversion table 308 necessary for reverse conversion of the obfuscation control program 132.
More specifically, the reverse conversion table creation processing unit 305 generates a pseudo random number using the device ID 134 and the additional information 133, and generates the reverse conversion table 308 using the generated pseudo random number.
 付加情報認証部306は、難読化制御プログラム132を逆変換する際に、付加情報133の認証を行う。 The additional information authentication unit 306 authenticates the additional information 133 when the obfuscation control program 132 is inversely converted.
 図6は、コントローラ装置102の難読化解除処理部125の詳細構成を示している。 FIG. 6 shows a detailed configuration of the obfuscation cancellation processing unit 125 of the controller device 102.
 図6において、制御プログラム逆変換処理部401は、難読化解除に必要なデータ(具体的には、逆変換テーブル404)を用いて、難読化制御プログラム132を制御プログラム131に逆変換する。
 制御プログラム逆変換処理部401は、デバイス識別子復元部の例に相当する。
In FIG. 6, the control program reverse conversion processing unit 401 reversely converts the obfuscation control program 132 into the control program 131 using data necessary for deobfuscation (specifically, the reverse conversion table 404).
The control program reverse conversion processing unit 401 corresponds to an example of a device identifier restoration unit.
 逆変換テーブル作成処理部402は、難読化制御プログラム132の逆変換に必要な逆変換テーブル404を作成する。
 より具体的には、逆変換テーブル作成処理部305は、機器ID134と付加情報133とを用いて疑似乱数を生成し、生成した疑似乱数を用いて逆変換テーブル404を生成する。
 逆変換テーブル作成処理部402は、疑似乱数生成部及びデバイス識別子復元部の例に相当する。
The reverse conversion table creation processing unit 402 creates a reverse conversion table 404 necessary for reverse conversion of the obfuscation control program 132.
More specifically, the reverse conversion table creation processing unit 305 generates a pseudo random number using the device ID 134 and the additional information 133, and generates the reverse conversion table 404 using the generated pseudo random number.
The inverse conversion table creation processing unit 402 corresponds to an example of a pseudo random number generation unit and a device identifier restoration unit.
 データ処理部403は、難読化解除時に必要なデータを管理する。 The data processing unit 403 manages data required when obfuscation is canceled.
 本実施の形態に係る処理手順は、3つの処理で構成される。
 つまり、本実施の形態に係る処理手順は、(1)制御プログラム管理部103が制御プログラム131を作成し、制御プログラム131を難読化し、難読化制御プログラム132をコントローラ装置102に書き込む処理、(2)コントローラ装置102が難読化制御プログラム132の難読化を解除し、制御プログラム131を実行する処理、(3)制御プログラム管理部103がコントローラ装置102から難読化制御プログラム132を読み出し、難読化制御プログラム132の難読化を解除し、制御プログラム131を復元する処理で構成される。
The processing procedure according to the present embodiment includes three processes.
That is, the processing procedure according to the present embodiment includes (1) a process in which the control program management unit 103 creates the control program 131, obfuscates the control program 131, and writes the obfuscation control program 132 to the controller device 102. ) Processing in which the controller device 102 cancels the obfuscation of the obfuscation control program 132 and executes the control program 131. (3) The control program management unit 103 reads the obfuscation control program 132 from the controller device 102, and the obfuscation control program. The process consists of a process of releasing obfuscation 132 and restoring the control program 131.
 まず、上記の(1)の処理、すなわち、制御プログラム管理部103が制御プログラム131を作成し、制御プログラム131を難読化し、難読化制御プログラム132をコントローラ装置102に書き込む処理の流れを図7に示す。 First, the flow of the above process (1), that is, the control program management unit 103 creates the control program 131, obfuscates the control program 131, and writes the obfuscation control program 132 to the controller device 102 is shown in FIG. Show.
 図7の処理段階501にて、コンピュータ装置101では、入力部110からの入力情報に基づいて、制御プログラム作成部111が制御プログラム131を作成する。
 そして、処理段階502にて、制御プログラム変換部113が、処理段階501で作成された制御プログラム131をコントローラ装置102で実行可能な形式に変換される。
 なお、実行可能形式に変換される前の制御プログラムも、実行可能形式に変換された後の制御プログラムも、ともに制御プログラム131と表記する。
 そして、処理段階503にて、制御プログラム記憶部114が、変換後の制御プログラム131を保存する。
In the processing step 501 of FIG. 7, in the computer apparatus 101, the control program creation unit 111 creates the control program 131 based on the input information from the input unit 110.
Then, in the processing step 502, the control program conversion unit 113 converts the control program 131 created in the processing step 501 into a format that can be executed by the controller device 102.
Note that both the control program before being converted into the executable format and the control program after being converted into the executable format are referred to as the control program 131.
Then, in the processing step 503, the control program storage unit 114 stores the converted control program 131.
 次に、処理段階504にて、難読化処理部115が、実行形式の変換後の制御プログラム131に対して難読化処理511を実行し、難読化制御プログラム132を作成する。
 制御プログラム131の難読化処理511に際して、難読化処理部115が、制御プログラム管理部112、通信処理部116及び通信装置107を介して、コントローラ装置102に機器ID134の送信要求531を送信する。
 送信要求531を受信したコントローラ装置102では、機器ID管理部122の機器ID134が通信制御部121からコンピュータ装置101に送信される。
 また、図7には図示していないが、難読化処理部115により付加情報133が取得される。
 難読化処理部115が付加情報133を生成してもよいし、難読化処理部115が制御プログラム管理部112、通信処理部116及び通信装置107を介して、外部装置から付加情報133を受信してもよい。
Next, in the processing step 504, the obfuscation processing unit 115 executes the obfuscation process 511 on the control program 131 after conversion of the execution format to create the obfuscation control program 132.
During the obfuscation processing 511 of the control program 131, the obfuscation processing unit 115 transmits a transmission request 531 for the device ID 134 to the controller device 102 via the control program management unit 112, the communication processing unit 116, and the communication device 107.
In the controller device 102 that has received the transmission request 531, the device ID 134 of the device ID management unit 122 is transmitted from the communication control unit 121 to the computer device 101.
Although not illustrated in FIG. 7, the additional information 133 is acquired by the obfuscation processing unit 115.
The obfuscation processing unit 115 may generate the additional information 133, or the obfuscation processing unit 115 receives the additional information 133 from the external device via the control program management unit 112, the communication processing unit 116, and the communication device 107. May be.
 次に、処理段階505にて、通信処理部116が、難読化制御プログラム132と難読化時に難読化処理部115にて取得された付加情報133を、通信装置107を介してコントローラ装置102に送信する。 Next, in processing step 505, the communication processing unit 116 transmits the obfuscation control program 132 and the additional information 133 acquired by the obfuscation processing unit 115 during obfuscation to the controller device 102 via the communication device 107. To do.
 次に、処理段階506にて、コントローラ装置102では、通信制御部121が難読化制御プログラム132と付加情報133を受信し、難読化制御プログラム132は制御プログラム記憶部124に保存され、付加情報133は付加情報管理部123に保存される。 Next, in the processing step 506, in the controller device 102, the communication control unit 121 receives the obfuscation control program 132 and the additional information 133, and the obfuscation control program 132 is stored in the control program storage unit 124 and the additional information 133. Is stored in the additional information management unit 123.
 次に、上記(2)の処理、すなわち、コントローラ装置102が難読化制御プログラム132の難読化を解除し、制御プログラム131を実行する処理である制御プログラム実行処理610の流れを図8に示す。 Next, FIG. 8 shows the flow of the control program execution process 610, which is the process of (2) above, that is, the controller device 102 cancels the obfuscation of the obfuscation control program 132 and executes the control program 131.
 制御プログラム131の実行時は、まず、処理段階601にて、難読化解除処理部125が、難読化制御プログラム132の難読化を解除し、制御プログラム131を作成する。 When executing the control program 131, first, in the processing step 601, the obfuscation release processing unit 125 releases the obfuscation control program 132 and creates the control program 131.
 その後、処理段階602にて、制御プログラム実行部126が、制御プログラム131を実行する。 Thereafter, in the processing stage 602, the control program execution unit 126 executes the control program 131.
 最後に、上記の(3)の処理、すなわち、制御プログラム管理部103がコントローラ装置102から難読化制御プログラム132を読み出し、難読化制御プログラム132の難読化を解除し、制御プログラム131を復元する処理の流れを図9に示す。 Finally, the process (3) above, that is, the control program management unit 103 reads the obfuscation control program 132 from the controller device 102, cancels the obfuscation of the obfuscation control program 132, and restores the control program 131. The flow of this is shown in FIG.
 図9の処理段階701にて、コンピュータ装置101では、難読化処理部115が、制御プログラム管理部112、通信処理部116及び通信装置107を介して、コントローラ装置102に、難読化制御プログラム132の読み出し要求731を送信する。
 コントローラ装置102では、読み出し要求731を受信したら、通信制御部121が、制御プログラム記憶部124内の難読化制御プログラム132と機器ID管理部122内の機器ID134を送信する。
 コンピュータ装置101では、通信処理部116が難読化制御プログラム132と機器ID134を受信する。
In the processing stage 701 of FIG. 9, in the computer device 101, the obfuscation processing unit 115 sends the obfuscation control program 132 to the controller device 102 via the control program management unit 112, the communication processing unit 116, and the communication device 107. A read request 731 is transmitted.
In the controller device 102, when receiving the read request 731, the communication control unit 121 transmits the obfuscation control program 132 in the control program storage unit 124 and the device ID 134 in the device ID management unit 122.
In the computer apparatus 101, the communication processing unit 116 receives the obfuscation control program 132 and the device ID 134.
 処理段階702にて、難読化解除処理部125が、コントローラ装置102から受信した難読化制御プログラム132の難読化を解除して、制御プログラム131を作成する。
 難読化制御プログラム132の難読化の解除は、コントローラ装置102から受信した機器ID134と付加情報133を用いる。
In the processing step 702, the obfuscation cancellation processing unit 125 cancels the obfuscation of the obfuscation control program 132 received from the controller device 102 and creates the control program 131.
The obfuscation control program 132 cancels obfuscation using the device ID 134 and the additional information 133 received from the controller device 102.
 その後、処理段階703にて、制御プログラム131が制御プログラム記憶部114に保存される。 Thereafter, the control program 131 is stored in the control program storage unit 114 in the processing stage 703.
 図10に、処理段階504における制御プログラム難読化処理511の流れを示す。 FIG. 10 shows the flow of the control program obfuscation process 511 in the processing stage 504.
 まず、処理段階801にて、データ処理部303が変換テーブル307を作成するために、機器ID134をコントローラ装置102に要求する。 First, in the processing step 801, the data processing unit 303 requests the device ID 134 from the controller device 102 in order to create the conversion table 307.
 そして、処理段階802にて、データ処理部303が、コントローラ装置102から機器ID134を受け取る。 Then, in the processing stage 802, the data processing unit 303 receives the device ID 134 from the controller device 102.
 その後、処理段階803にて、データ処理部303が、現在時刻のタイムスタンプを取得し、付加情報133とする。
 なお、付加情報133はタイムスタンプである必要はなく、作成毎に異なる値となる情報であれば、どのような情報でもよい。
Thereafter, in the processing step 803, the data processing unit 303 acquires a time stamp of the current time and uses it as additional information 133.
Note that the additional information 133 does not need to be a time stamp, and may be any information as long as it has different values for each creation.
 次に、処理段階804にて、変換テーブル作成処理部302が変換テーブル作成処理811を実行し、変換テーブル307を作成する。 Next, in the processing stage 804, the conversion table creation processing unit 302 executes the conversion table creation processing 811 to create the conversion table 307.
 最後に、処理段階805にて、制御プログラム変換処理部301が制御プログラム変換処理812を実行する。
 制御プログラム変換処理部301は、制御プログラム変換処理812において、変換テーブル307を使用して制御プログラム131のデバイス識別子をランダム化することで、難読化制御プログラム132に変換する。
Finally, in the processing step 805, the control program conversion processing unit 301 executes the control program conversion processing 812.
The control program conversion processing unit 301 converts the device identifier of the control program 131 into the obfuscation control program 132 by randomizing the device identifier of the control program 131 using the conversion table 307 in the control program conversion processing 812.
 図11に処理段階804における変換テーブル作成処理811の詳細を示し、図12に処理段階804における変換テーブル作成処理811の実施例を示す。 FIG. 11 shows details of the conversion table creation processing 811 in the processing stage 804, and FIG. 12 shows an embodiment of the conversion table creation processing 811 in the processing stage 804.
 まず、処理段階901にて、変換テーブル作成処理部302は、制御プログラム131内で使用されているデバイス番号をインデックスとして使用し、変換前の数値と変換後の数値の配列が同一のテーブル911(図12)を作成する。 First, in the processing step 901, the conversion table creation processing unit 302 uses the device number used in the control program 131 as an index, and a table 911 (the same as the array of numerical values before conversion and after conversion). FIG. 12) is created.
 その後、処理段階902にて、変換テーブル作成処理部302は、機器ID134と付加情報133をシードとして擬似乱数912を作成する。 Thereafter, in a processing step 902, the conversion table creation processing unit 302 creates a pseudo random number 912 using the device ID 134 and the additional information 133 as seeds.
 最後に、処理段階903にて、変換テーブル作成処理部302は、作成した擬似乱数912を使用して、テーブル911の変換後の配列をランダムソートすることによって、テーブル911の変換後の配列内の数値の順序を変化させ、数値の順序が変化した新たな配列を用いて変換テーブル307を作成する。
 図12に示すように、変換テーブル307の変換前の配列は、テーブル911の変換前の配列のままである。
 変換テーブル307の変換後の配列は、テーブル911の変換後の配列から数値の順序が変化しているので、変換テーブル307の変換前の配列とは、数値の順序が異なる。
 なお、変換テーブル307の変換前の配列は第1配列の例に相当し、変換後の配列は第2配列の例に相当する。
Finally, in the processing step 903, the conversion table creation processing unit 302 uses the created pseudo-random number 912 to randomly sort the converted array of the table 911, whereby the conversion table in the converted array of the table 911 The conversion table 307 is created using a new array in which the numerical order is changed and the numerical order is changed.
As shown in FIG. 12, the array before conversion in the conversion table 307 remains the array before conversion in the table 911.
Since the order of numerical values in the array after conversion of the conversion table 307 is changed from the array after conversion in the table 911, the order of numerical values is different from the array before conversion in the conversion table 307.
The array before conversion in the conversion table 307 corresponds to an example of the first array, and the array after conversion corresponds to an example of the second array.
 前述の方式で変換テーブル307を生成することにより、変換後のデバイス番号の範囲を変換前の制御プログラム131で使用されていたデバイス番号の範囲と一致させることができる。
 このため、変換後の難読化制御プログラム132を制御プログラムとして妥当なものにすることができる。
 また、変換テーブル307を作成するときに、処理段階901においてテーブル911作成時のインデックスとして使用する数値を実際に制御プログラム131内で使用されている数値だけではなく、デバイス番号として使用可能な数値全てを使用することも可能である。
 図14の制御プログラム131では、デバイス番号として用いられている数値は[0、2、5、7]であるが、図12のように、変換前の数値として、デバイス番号として用いられていない数値を含む[0、1、2、3、4、5、6、7]を使用することができる。
By generating the conversion table 307 in the above-described manner, the device number range after conversion can be matched with the device number range used in the control program 131 before conversion.
For this reason, the obfuscated control program 132 after conversion can be made appropriate as a control program.
Further, when creating the conversion table 307, the numerical values used as the index when the table 911 is created in the processing stage 901 are not only the numerical values actually used in the control program 131 but all the numerical values that can be used as device numbers. Can also be used.
In the control program 131 of FIG. 14, the numerical values used as the device numbers are [0, 2, 5, 7], but the numerical values that are not used as the device numbers as the numerical values before conversion as shown in FIG. [0, 1, 2, 3, 4, 5, 6, 7] can be used.
 次に、図13に処理段階805における制御プログラム変換処理812の詳細を示し、図14に処理段階805における制御プログラム変換処理812の実施例を示す。 Next, FIG. 13 shows details of the control program conversion processing 812 in the processing stage 805, and FIG. 14 shows an embodiment of the control program conversion processing 812 in the processing stage 805.
 制御プログラム変換処理部301は、変換テーブル307を使用して、制御プログラム131のデバイス識別子(例えば、X0やY0)を異なるデバイス識別子に変換する。 The control program conversion processing unit 301 uses the conversion table 307 to convert the device identifier (for example, X0 or Y0) of the control program 131 into a different device identifier.
 具体的には、まず、処理段階1101にて、制御プログラム変換処理部301は、デバイス識別子を一つ読み出す。
 そして、処理段階1102にて、制御プログラム変換処理部301は、処理段階1101で読み出したデバイス識別子を、変換テーブル307を参照して変換する。
 具体的には、制御プログラム変換処理部301は、デバイス番号の数値の変換前の配列内の位置を判定し、判定した位置と同じ位置にある変換後の配列内の数値を抽出し、デバイス番号の数値を、抽出した変換後の配列内の数値に変換して、デバイス識別子の置換を行う。
 処理段階1103にて、未変換のデバイス識別子があれば、処理段階1101に処理が戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
Specifically, first, in the processing step 1101, the control program conversion processing unit 301 reads one device identifier.
In processing step 1102, the control program conversion processing unit 301 converts the device identifier read in processing step 1101 with reference to the conversion table 307.
Specifically, the control program conversion processing unit 301 determines the position in the array before conversion of the numerical value of the device number, extracts the numerical value in the converted array at the same position as the determined position, and extracts the device number Is converted into the extracted numerical value in the converted array, and the device identifier is replaced.
If there is an unconverted device identifier in the processing stage 1103, the process returns to the processing stage 1101.
The above process is repeated for all device identifiers.
 図14の例では、制御プログラム131内のデバイス1201の識別子「X0」の場合は、変換テーブル307の数値「0」に対応する変換後の数値は「6」なので、制御プログラム変換処理部301は、「X0」を「X6」に置換する。 In the example of FIG. 14, in the case of the identifier “X0” of the device 1201 in the control program 131, the converted numerical value corresponding to the numerical value “0” in the conversion table 307 is “6”. , “X0” is replaced with “X6”.
 なお、制御プログラム131から難読化制御プログラム132への変換が終了した後は、変換テーブル307を破棄してもよい。
 また、付加情報133は、コントローラ装置102における逆変換テーブル404の生成に用いられるので、逆変換テーブル404が生成されるまでは、コンピュータ装置101において付加情報133を保存しておく。
 但し、逆変換テーブル404が生成された後は、コンピュータ装置101は付加情報133を破棄してもよい。
Note that the conversion table 307 may be discarded after the conversion from the control program 131 to the obfuscation control program 132 is completed.
Further, since the additional information 133 is used to generate the reverse conversion table 404 in the controller apparatus 102, the additional information 133 is stored in the computer apparatus 101 until the reverse conversion table 404 is generated.
However, the computer apparatus 101 may discard the additional information 133 after the reverse conversion table 404 is generated.
 次に、コントローラ装置102での難読化解除処理611の詳細を図15に示す。 Next, the details of the obfuscation cancellation processing 611 in the controller apparatus 102 are shown in FIG.
 まず、処理段階1301にて、データ処理部403が機器ID管理部122から機器ID134を読み出す。 First, in the processing stage 1301, the data processing unit 403 reads the device ID 134 from the device ID management unit 122.
 次に、処理段階1302にて、データ処理部403が付加情報管理部123から付加情報133を読み出す。 Next, in the processing stage 1302, the data processing unit 403 reads the additional information 133 from the additional information management unit 123.
 その後、処理段階1303にて、逆変換テーブル作成処理部402が逆変換テーブル作成処理1311を実行し、逆変換テーブル404を作成する。 Thereafter, in the processing stage 1303, the reverse conversion table creation processing unit 402 executes the reverse conversion table creation processing 1311 to create the reverse conversion table 404.
 その後、処理段階1304にて、制御プログラム逆変換処理部401が制御プログラム逆変換処理1312を実行し、逆変換テーブル404を使用して難読化制御プログラム132を、制御プログラム131に変換する。 Thereafter, in the processing step 1304, the control program reverse conversion processing unit 401 executes the control program reverse conversion processing 1312 to convert the obfuscation control program 132 into the control program 131 using the reverse conversion table 404.
 図16に逆変換テーブル作成処理1311の詳細を示し、図17に逆変換テーブル作成処理1311の実施例を示す。 FIG. 16 shows details of the reverse conversion table creation processing 1311, and FIG. 17 shows an embodiment of the reverse conversion table creation processing 1311.
 まず、処理段階1401にて、逆変換テーブル作成処理部402が、難読化制御プログラム132内で使用されているデバイス番号を使用して、変換前の数値と変換後の数値が同一のテーブル1411(図17)を作成する。 First, in the processing step 1401, the reverse conversion table creation processing unit 402 uses the device number used in the obfuscation control program 132, and the table 1411 (the numerical value before conversion and the numerical value after conversion are the same). FIG. 17) is created.
 その後、処理段階1402にて、逆変換テーブル作成処理部402は、機器ID134と付加情報133をシードとして擬似乱数1412を作成する。
 なお、コンピュータ装置101の変換テーブル作成処理部302における疑似乱数の生成アルゴリズムと、コントローラ装置102の逆変換テーブル作成処理部402における疑似乱数の生成アルゴリズムは同じである。
 つまり、逆変換テーブル作成処理部402は、変換テーブル作成処理部302で生成された疑似乱数と同じ疑似乱数を生成する。
Thereafter, in the processing step 1402, the inverse conversion table creation processing unit 402 creates a pseudo random number 1412 using the device ID 134 and the additional information 133 as seeds.
Note that the pseudo-random number generation algorithm in the conversion table creation processing unit 302 of the computer device 101 is the same as the pseudo-random number generation algorithm in the inverse conversion table creation processing unit 402 of the controller device 102.
That is, the reverse conversion table creation processing unit 402 generates the same pseudo random number as the pseudo random number generated by the conversion table creation processing unit 302.
 処理段階1403にて、逆変換テーブル作成処理部402は、作成した擬似乱数1412を使用して、テーブル1411の変換前の配列をランダムソートすることによって、テーブル1411の変換前の配列内の数値の順序を変化させ、数値の順序が変化した新たな配列を用いて逆変換テーブル404を作成する。
 図17に示すように、逆変換テーブル404の変換後の配列は、テーブル1411の変換後の配列のままである。
 逆変換テーブル404の変換前の配列は、テーブル1411の変換前の配列から数値の順序が変化しているので、逆変換テーブル404の変換後の配列とは、数値の順序が異なる。
 なお、逆変換テーブル404の変換前の配列は第4配列の例に相当し、変換後の配列は第3配列の例に相当する。
In processing step 1403, the inverse conversion table creation processing unit 402 uses the created pseudo-random number 1412 to randomly sort the array before conversion in the table 1411, thereby converting the numerical values in the array before conversion in the table 1411. The reverse conversion table 404 is created using a new array in which the order is changed and the numerical order is changed.
As shown in FIG. 17, the converted array in the inverse conversion table 404 remains the converted array in the table 1411.
Since the order of numerical values in the array before conversion in the reverse conversion table 404 is changed from the array before conversion in the table 1411, the order of numerical values is different from the array after conversion in the reverse conversion table 404.
The array before conversion of the inverse conversion table 404 corresponds to an example of the fourth array, and the array after conversion corresponds to an example of the third array.
 逆変換テーブル404は、機器ID134と難読化処理部115から送信された付加情報133を使用して、変換テーブル作成処理811と同一のアルゴリズム(論理的に逆の手順)を用いて作成する。
 このため、制御プログラム難読化処理511で制御プログラム131の難読化を行った際に使用した変換テーブル307と逆変換テーブル404は、変換前の配列と変換後の配列が逆になっている以外は、同一である。
The reverse conversion table 404 is created using the same algorithm (logically reverse procedure) as the conversion table creation process 811 using the device ID 134 and the additional information 133 transmitted from the obfuscation processing unit 115.
For this reason, the conversion table 307 and the inverse conversion table 404 used when the control program 131 is obfuscated in the control program obfuscation process 511, except that the array before conversion and the array after conversion are reversed. Are the same.
 次に、図18に制御プログラム逆変換処理1312の詳細を示し、図19に制御プログラム逆変換処理1312の実施例を示す。 Next, FIG. 18 shows details of the control program reverse conversion processing 1312, and FIG. 19 shows an embodiment of the control program reverse conversion processing 1312.
 制御プログラム逆変換処理部401は、逆変換テーブル404を使用して、ランダム化された難読化制御プログラム132のデバイス識別子を本来のデバイス識別子に変換する。 The control program reverse conversion processing unit 401 uses the reverse conversion table 404 to convert the randomized obfuscation control program 132 device identifier into the original device identifier.
 具体的には、処理段階1601にて、制御プログラム逆変換処理部401は、デバイス識別子を一つ読み出す。
 そして、処理段階1602にて、制御プログラム逆変換処理部401は、デバイス番号を、逆変換テーブル404を参照して変換する。
 具体的には、制御プログラム逆変換処理部401は、デバイス番号の数値の変換前の配列内の位置を判定し、判定した位置と同じ位置にある変換後の配列内の数値を抽出し、デバイス番号の数値を、抽出した数値に変換して、デバイス識別子の復元を行う。
 処理段階1603にて、未変換のデバイス識別があれば、処理段階1601に戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
Specifically, in the processing step 1601, the control program inverse conversion processing unit 401 reads one device identifier.
In process step 1602, the control program reverse conversion processing unit 401 converts the device number with reference to the reverse conversion table 404.
Specifically, the control program reverse conversion processing unit 401 determines the position in the array before conversion of the numerical value of the device number, extracts the numerical value in the array after conversion at the same position as the determined position, and The numerical value of the number is converted into the extracted numerical value, and the device identifier is restored.
If there is an unconverted device identification in the processing step 1603, the processing returns to the processing step 1601.
The above process is repeated for all device identifiers.
 図19の例では、難読化制御プログラム132内のデバイス1701の識別子「X6」の場合は、逆変換テーブル404の数値「6」に対応する変換後の数値は「0」なので、制御プログラム逆変換処理部401は、「X6」を「X0」に変換する。 In the example of FIG. 19, in the case of the identifier “X6” of the device 1701 in the obfuscation control program 132, the converted numerical value corresponding to the numerical value “6” in the reverse conversion table 404 is “0”. The processing unit 401 converts “X6” to “X0”.
 次に、図20に、図9に示した難読化解除処理711の詳細を示す。 Next, FIG. 20 shows details of the obfuscation cancellation processing 711 shown in FIG.
 まず、処理段階1801にて、データ処理部403がコントローラ装置102から機器ID134を読み出す。
 次に、処理段階1802にて、付加情報認証部306が、保存されている付加情報133が難読化時に作成された付加情報133と同一のものであることを確認する。
 その後、処理段階1803にて、逆変換テーブル作成処理部305が、逆変換テーブル作成処理1811を実行し、逆変換テーブル308を作成する。
 その後、処理段階1804にて、制御プログラム逆変換処理部304が制御プログラム逆変換処理1812を実行し、逆変換テーブル308を使用して難読化制御プログラム132を、制御プログラム131に変換する。
 なお、逆変換テーブル作成処理1811の動作は逆変換テーブル作成処理1311と同様であり、制御プログラム逆変換処理1812の動作は制御プログラム逆変換処理1312と同様である。
 このため、逆変換テーブル作成処理1811及び制御プログラム逆変換処理1812の説明は省略する。
First, in the processing step 1801, the data processing unit 403 reads the device ID 134 from the controller device 102.
Next, in the processing step 1802, the additional information authentication unit 306 confirms that the stored additional information 133 is the same as the additional information 133 created at the time of obfuscation.
Thereafter, in the processing step 1803, the reverse conversion table creation processing unit 305 executes the reverse conversion table creation processing 1811 to create the reverse conversion table 308.
Thereafter, in the processing step 1804, the control program reverse conversion processing unit 304 executes the control program reverse conversion processing 1812 to convert the obfuscation control program 132 into the control program 131 using the reverse conversion table 308.
The operation of the reverse conversion table creation process 1811 is the same as that of the reverse conversion table creation process 1311, and the operation of the control program reverse conversion process 1812 is the same as the control program reverse conversion process 1312.
For this reason, the description of the reverse conversion table creation processing 1811 and the control program reverse conversion processing 1812 is omitted.
 以上に示した本実施の形態により、以下の効果が得られる。 According to this embodiment described above, the following effects can be obtained.
 (1)制御プログラムとデバイスの入出力の関係は制御プログラムを解析するためには非常に重要なので、デバイス番号の入れ替えにより、制御プログラムの解析は困難になる。
 (2)コントローラ装置で難読化制御プログラムの難読化を解除してから制御プログラムを実行しているように、難読化制御プログラムから元の制御プログラムへの逆変換が可能である。
 (3)制御プログラム実行前に難読化を解除するので、制御プログラムの実行速度の低下がなく、挙動も変化しない。
 (4)変換後のデバイス番号はコントローラ装置で制御可能なデバイス番号なので、難読化後の制御プログラムはコントローラ装置で実行できる。
  しかし、機器IDの異なるコントローラ装置や、正規のコントローラ装置(難読化を解除する機能を有するコントローラ装置)以外の機器で制御プログラムを実行した場合は、制御プログラムが正常に動作できないようにしてあるので、不正流用による模倣品の製造を困難にできる。
 (5)変換テーブルを作成するときに、インデックスにデバイス番号として使用可能な数値全てを使用することで、デバイス番号変換後のデバイス番号の数値の範囲が広くなるので難読化方式の解析が更に困難になる。
 (6)付加情報にタイムスタンプなどの作成毎に異なる情報を使用することで変換テーブルにランダム性を持たせており、同じ制御プログラムを同じコントローラ装置と対応付けて難読化した際にも、異なる難読化結果を得ることができるので、難読化方式の解析が困難になる。
(1) Since the relationship between the control program and the input / output of the device is very important for analyzing the control program, the analysis of the control program becomes difficult by exchanging the device numbers.
(2) The inverse conversion from the obfuscation control program to the original control program is possible, as the control program is executed after the obfuscation of the obfuscation control program is canceled by the controller device.
(3) Since obfuscation is canceled before execution of the control program, the execution speed of the control program does not decrease and the behavior does not change.
(4) Since the converted device number is a device number that can be controlled by the controller device, the control program after obfuscation can be executed by the controller device.
However, if the control program is executed on a device other than a controller device with a different device ID or a regular controller device (a controller device having a function of canceling obfuscation), the control program cannot operate normally. This makes it difficult to produce counterfeit products by misappropriation.
(5) When creating a conversion table, by using all the numerical values that can be used as device numbers in the index, the range of the numerical values of the device numbers after device number conversion becomes wider, making it more difficult to analyze the obfuscation method become.
(6) The conversion table is made random by using different information for each creation of a time stamp or the like as additional information, and is different even when the same control program is obfuscated in association with the same controller device. Since the obfuscation result can be obtained, it becomes difficult to analyze the obfuscation method.
 以上、本実施の形態では、以下の手段を備えた制御システムを説明した。
 (1)機器IDから作成した擬似乱数を使用して、ある数値を異なる数値に変換する変換テーブルを作成する手段
 (2)上記(1)の変換テーブルを使用して、制御プログラムのデバイス番号を変換する手段
 (3)上記(2)の変換後の制御プログラムをコントローラに送信する手段
 (4)変換後制御プログラムを逆変換する手段
As described above, in the present embodiment, the control system including the following means has been described.
(1) Means for creating a conversion table for converting a numerical value into a different numerical value using a pseudo-random number generated from the device ID. (2) Using the conversion table in (1) above, the device number of the control program is set. Means for converting (3) Means for transmitting the control program after conversion in (2) to the controller (4) Means for inversely converting the control program after conversion
 また、本実施の形態に係る制御システムは、機器IDと作成するたびに異なるデータとなる付加情報から作成した擬似乱数を使用して、ある数値を異なる数値に変換する変換テーブルを作成する手段を備えることを説明した。 In addition, the control system according to the present embodiment includes means for creating a conversion table for converting a certain numerical value into a different numerical value using a pseudo-random number created from additional information that becomes different data each time the device ID is created. Explained to prepare.
 また、本実施の形態に係る制御システムは、機器IDから作成した擬似乱数を使用して、制御プログラム内で使用されている数値を異なる数値に変換する変換テーブルを作成する手段を備えることを説明した。 In addition, the control system according to the present embodiment includes means for creating a conversion table that converts a numerical value used in the control program into a different numerical value using a pseudo-random number created from the device ID. did.
 また、本実施の形態に係る制御システムは、機器IDから作成した擬似乱数を使用して、制御プログラム内で使用可能な数値を異なる数値に変換する変換テーブルを作成する手段を備えることを説明した。 Further, it has been described that the control system according to the present embodiment includes means for creating a conversion table that converts a numerical value that can be used in the control program into a different numerical value by using a pseudo-random number created from the device ID. .
 また、本実施の形態に係る制御システムは、コントローラから制御プログラムを読み出す際に、付加情報が正規のものであることを認証する手段を備えることを説明した。 Also, it has been described that the control system according to the present embodiment includes means for authenticating that the additional information is legitimate when reading the control program from the controller.
 実施の形態2.
 実施の形態1では、制御プログラム変換処理812において1つの変換テーブルを使用しているが、本実施の形態では、複数の変換テーブルを使用して制御プログラム131の変換を行う例を説明する。
 本実施の形態においても、制御システムの全体構成は図1に示す通りであり、コンピュータ装置101の構成例は図2に示す通りであり、コントローラ装置102の構成例は図3に示す通りである。
 本実施の形態では、難読化処理部115と難読化解除処理部125の構成が実施の形態1と異なる。
Embodiment 2. FIG.
In the first embodiment, one conversion table is used in the control program conversion process 812. In the present embodiment, an example in which the control program 131 is converted using a plurality of conversion tables will be described.
Also in the present embodiment, the overall configuration of the control system is as shown in FIG. 1, the configuration example of the computer device 101 is as shown in FIG. 2, and the configuration example of the controller device 102 is as shown in FIG. .
In the present embodiment, the configurations of the obfuscation processing unit 115 and the obfuscation release processing unit 125 are different from those of the first embodiment.
 図21に本実施の形態の難読化処理部115の構成例を示し、図22に本実施の形態の難読化解除処理部125の構成例を示す。 FIG. 21 shows a configuration example of the obfuscation processing unit 115 of the present embodiment, and FIG. 22 shows a configuration example of the obfuscation release processing unit 125 of the present embodiment.
 図21の難読化処理部115の構成では、図5に示した構成と比較して、作成する変換テーブルの個数が示されるテーブル設定情報1909が加わっている。
 テーブル設定情報1909以外の要素は、図5に示す要素と同じである。
 同様に、図22の難読化解除処理部125の構成では、図6に示した構成と比較して、作成する変換テーブルの個数が示されるテーブル設定情報2005が加わっている。
 テーブル設定情報2005以外の要素は、図6に示す要素と同じである。
In the configuration of the obfuscation processing unit 115 in FIG. 21, table setting information 1909 indicating the number of conversion tables to be created is added as compared with the configuration shown in FIG.
Elements other than the table setting information 1909 are the same as the elements shown in FIG.
Similarly, in the configuration of the obfuscation cancellation processing unit 125 in FIG. 22, table setting information 2005 indicating the number of conversion tables to be created is added as compared to the configuration illustrated in FIG. 6.
Elements other than the table setting information 2005 are the same as the elements shown in FIG.
 次に、本実施の形態では、制御プログラム131をコントローラ装置102に書き込む処理が実施の形態1と異なる。
 本実施の形態での制御プログラム131をコントローラ装置102に書き込む処理の流れを図23に示す。
Next, in the present embodiment, the process for writing the control program 131 to the controller device 102 is different from that in the first embodiment.
FIG. 23 shows a flow of processing for writing the control program 131 in the present embodiment into the controller device 102.
 処理段階2101~2103までは図7の処理段階501~503と同様である。
 処理段階2104では、図7の処理段階504と同様に、変換テーブル1907を生成し、変換テーブル1907を用いて制御プログラム131を難読化して、難読化制御プログラム132を生成するが、難読化に用いる変換テーブル1907が複数である。
Processing steps 2101 to 2103 are the same as the processing steps 501 to 503 in FIG.
In the processing stage 2104, the conversion table 1907 is generated and the control program 131 is obfuscated using the conversion table 1907 to generate the obfuscation control program 132, which is used for obfuscation, as in the processing stage 504 of FIG. There are a plurality of conversion tables 1907.
 次に、処理段階2105にて、通信処理部116が、難読化制御プログラム132と、変換テーブル1907の生成に用いられた付加情報133と、テーブル設定情報1909を、通信装置107を介してコントローラ装置102に送信する。 Next, in processing step 2105, the communication processing unit 116 sends the obfuscation control program 132, the additional information 133 used to generate the conversion table 1907, and the table setting information 1909 to the controller device via the communication device 107. 102.
 コントローラ装置102では、処理段階2106にて、通信制御部121が難読化制御プログラム132と付加情報133とテーブル設定情報1909を受信し、難読化制御プログラム132は制御プログラム記憶部124に保存され、付加情報133は付加情報管理部123に保存され、テーブル設定情報1909はテーブル設定情報2005として保存される。 In the controller device 102, in the processing step 2106, the communication control unit 121 receives the obfuscation control program 132, additional information 133, and table setting information 1909, and the obfuscation control program 132 is stored in the control program storage unit 124 and added. The information 133 is stored in the additional information management unit 123, and the table setting information 1909 is stored as the table setting information 2005.
 図24に、本実施の形態における変換テーブル作成処理811の詳細を示す。 FIG. 24 shows details of the conversion table creation processing 811 in the present embodiment.
 まず、処理段階2201にて、変換テーブル作成処理部1902が、作成する変換テーブル1907の個数をテーブル設定情報1909に設定する。 First, in the processing step 2201, the conversion table creation processing unit 1902 sets the number of conversion tables 1907 to be created in the table setting information 1909.
 次に、処理段階2202にて、変換テーブル作成処理部1902は、制御プログラム131内で使用されているデバイス番号をインデックスとして使用し、変換前の数値と変換後の数値の配列が同一のテーブル2211を作成する。
 この処理は、図11の処理段階901の処理と同じである。
Next, in the processing stage 2202, the conversion table creation processing unit 1902 uses the device number used in the control program 131 as an index, and the table 2211 in which the numerical values before conversion and the converted numerical values are identical is the same. Create
This processing is the same as the processing in the processing stage 901 in FIG.
 処理段階2203にて、変換テーブル作成処理部1902は、機器ID134と付加情報133をシードとして擬似乱数2212を作成する。
 この処理は、図11の処理段階902の処理と同じである。
In processing step 2203, the conversion table creation processing unit 1902 creates a pseudo random number 2212 using the device ID 134 and the additional information 133 as seeds.
This process is the same as the process in process step 902 of FIG.
 処理段階2204にて、変換テーブル作成処理部1902は、作成した擬似乱数2212を使用して、テーブル2211の変換後の配列をランダムソートすることによって、テーブル2211の変換後の配列内の数値の順序を変化させ、数値の順序が変化した新たな配列を用いて変換テーブル1907を作成する。
 この処理は、図11の処理段階903の処理と同じである。
 なお、作成した変換テーブル1907は、カウント値と対応付けられる。
 例えば、処理段階2201で設定された数量が「2」である場合は、変換テーブル1907は2つ作成される。
 そして、一つ目の変換テーブル1907Aはカウント値「0」と対応付けられ、2つ目の変換テーブル1907Bはカウント値「1」と対応付けられる。
In the processing step 2204, the conversion table creation processing unit 1902 uses the created pseudo-random number 2212 to randomly sort the converted array of the table 2211, thereby ordering the numerical values in the converted array of the table 2211. And a conversion table 1907 is created using a new array whose numerical order has changed.
This processing is the same as the processing in the processing stage 903 in FIG.
The created conversion table 1907 is associated with the count value.
For example, when the quantity set in the processing stage 2201 is “2”, two conversion tables 1907 are created.
The first conversion table 1907A is associated with the count value “0”, and the second conversion table 1907B is associated with the count value “1”.
 そして、処理段階2205にて、テーブルの作成数が処理段階2201で設定した数量に達していなければ、処理段階2202に戻る。
 また、処理段階2205にて、テーブルの作成数が処理段階2201で設定した数量に達していたら処理を終了する。
If the number of created tables has not reached the quantity set in the processing stage 2201 in the processing stage 2205, the process returns to the processing stage 2202.
If the number of created tables reaches the number set in the processing step 2201 in the processing step 2205, the processing is terminated.
 図25に本実施の形態に係る制御プログラム変換処理812の詳細を示し、図26に本実施の形態に係る制御プログラム変換処理812の実施例を示す。 FIG. 25 shows details of the control program conversion processing 812 according to the present embodiment, and FIG. 26 shows an example of the control program conversion processing 812 according to the present embodiment.
 まず、処理段階2301にて、制御プログラム変換処理部1901は、デバイス識別子を一つ読み出す。 First, in the processing stage 2301, the control program conversion processing unit 1901 reads one device identifier.
 そして、処理段階2302にて、制御プログラム変換処理部1901は、所定のカウンタのカウント値を確認し、現在のカウント値に対応する変換テーブル1907を参照して、処理段階2301で読み出したデバイス番号を変換する。
 テーブル設定情報1909に設定されている数量が「2」の場合は、カウンタのカウント値は「0」又は「1」をとる。
 例えば、現在のカウント値が「0」であれば、制御プログラム変換処理部1901は、カウント値「0」と対応付けられている変換テーブル1907を選択する。
 そして、選択した変換テーブル1907の変換前の配列及び変換後の配列を参照して、処理段階2301で読み出したデバイス番号を変換する。
 変換テーブル1907を用いたデバイス番号の変換処理自体は、実施の形態1で示したものと同様である。
 なお、カウント値に基づいて選択した変換テーブル1907の変換後の配列が選択第2配列の例に相当する。
In the processing stage 2302, the control program conversion processing unit 1901 confirms the count value of a predetermined counter, refers to the conversion table 1907 corresponding to the current count value, and determines the device number read in the processing stage 2301. Convert.
When the quantity set in the table setting information 1909 is “2”, the count value of the counter takes “0” or “1”.
For example, if the current count value is “0”, the control program conversion processing unit 1901 selects the conversion table 1907 associated with the count value “0”.
The device number read in the processing step 2301 is converted with reference to the array before conversion and the array after conversion of the selected conversion table 1907.
The device number conversion process itself using the conversion table 1907 is the same as that described in the first embodiment.
Note that the converted array in the conversion table 1907 selected based on the count value corresponds to an example of the selected second array.
 その後、処理段階2303にて、カウンタのカウント値がテーブル設定情報1909の設定数に達していなければ、処理段階2304にて、制御プログラム変換処理部1901は、カウンタのカウント値をインクリメントする。
 カウンタのカウント値がテーブル設定情報1909の設定数に達していたら、処理段階2305にてカウンタのカウント値を初期化する。
After that, if the count value of the counter has not reached the set number of the table setting information 1909 at the processing stage 2303, the control program conversion processing unit 1901 increments the count value of the counter at the processing stage 2304.
If the count value of the counter has reached the set number of the table setting information 1909, the count value of the counter is initialized in processing step 2305.
 処理段階2303にて、未変換のデバイス識別子があれば、処理段階2301に戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
If there is an unconverted device identifier in the processing stage 2303, the process returns to the processing stage 2301.
The above process is repeated for all device identifiers.
 図26では、制御プログラム変換処理部1901は、制御プログラム131内のデバイス2401(X0)の変換時は、変換テーブル1907Aを選択する。
 変換テーブル1907Aにおいて数値「0」に対応する変換後の数値は「6」なので、制御プログラム変換処理部1901は、「X0」を「X6」に変換する。
 次に、制御プログラム変換処理部1901は、制御プログラム131内のデバイス2402(Y0)の変換時は、カウンタを進めて変換テーブル1907Bを選択する。
 変換テーブル1907Bにおいて数値「0」に対応する変換後の数値は「5」なので、制御プログラム変換処理部1901は、「Y0」を「Y5」に変換する。
In FIG. 26, the control program conversion processing unit 1901 selects the conversion table 1907A when converting the device 2401 (X0) in the control program 131.
Since the converted numerical value corresponding to the numerical value “0” in the conversion table 1907A is “6”, the control program conversion processing unit 1901 converts “X0” to “X6”.
Next, when converting the device 2402 (Y0) in the control program 131, the control program conversion processing unit 1901 advances the counter and selects the conversion table 1907B.
Since the converted numerical value corresponding to the numerical value “0” in the conversion table 1907B is “5”, the control program conversion processing unit 1901 converts “Y0” to “Y5”.
 図27に、本実施の形態に係る逆変換テーブル作成処理1311の詳細を示す。 FIG. 27 shows details of the reverse conversion table creation processing 1311 according to the present embodiment.
 まず、処理段階2501にて、逆変換テーブル作成処理部402は、テーブル設定情報2005の数量を、作成する逆変換テーブル2004の数量に設定する。 First, in the processing stage 2501, the reverse conversion table creation processing unit 402 sets the quantity of the table setting information 2005 to the quantity of the reverse conversion table 2004 to be created.
 処理段階2502にて、逆変換テーブル作成処理部402は、難読化制御プログラム132内で使用されているデバイス番号を使用して、変換前の数値と変換後の数値が同一のテーブル2511を作成する。 In processing step 2502, the inverse conversion table creation processing unit 402 creates a table 2511 in which the numerical value before conversion and the converted numerical value are the same, using the device number used in the obfuscation control program 132. .
 その後、処理段階2503にて、逆変換テーブル作成処理部2002は、機器ID134と付加情報133をシードとして擬似乱数2512を作成する。
 本実施の形態でも、コンピュータ装置101の変換テーブル作成処理部1902における疑似乱数の生成アルゴリズムと、コントローラ装置102の逆変換テーブル作成処理部2002における疑似乱数の生成アルゴリズムは同じである。
 つまり、逆変換テーブル作成処理部2002は、変換テーブル作成処理部1902で生成された疑似乱数と同じ疑似乱数を生成する。
Thereafter, in processing step 2503, the reverse conversion table creation processing unit 2002 creates a pseudo random number 2512 using the device ID 134 and the additional information 133 as seeds.
Also in the present embodiment, the pseudo random number generation algorithm in the conversion table creation processing unit 1902 of the computer apparatus 101 and the pseudo random number generation algorithm in the inverse conversion table creation processing unit 2002 of the controller apparatus 102 are the same.
That is, the reverse conversion table creation processing unit 2002 generates the same pseudo random number as the pseudo random number generated by the conversion table creation processing unit 1902.
 処理段階2504にて、逆変換テーブル作成処理部2002は、作成した擬似乱数2512を使用して、テーブル2511の変換前の配列をランダムソートすることによって、テーブル2511の変換前の配列内の数値の順序を変化させ、数値の順序が変化した新たな配列を用いて逆変換テーブル2004を作成する。
 変換テーブル1907と同様に、作成した逆変換テーブル2004はカウント値と対応付けられる。
 例えば、処理段階2501で設定された数量が「2」である場合は、逆変換テーブル2004は2つ作成される。
 そして、一つ目の逆変換テーブル2004Aはカウント値「0」と対応付けられ、2つ目の逆変換テーブル2004Bはカウント値「1」と対応付けられる。
In processing step 2504, the inverse conversion table creation processing unit 2002 uses the created pseudorandom number 2512 to randomly sort the array before conversion in the table 2511, so that the numerical values in the array before conversion in the table 2511 are converted. The reverse conversion table 2004 is created by changing the order and using a new array whose numerical order has changed.
Similar to the conversion table 1907, the created reverse conversion table 2004 is associated with the count value.
For example, when the quantity set in the processing stage 2501 is “2”, two reverse conversion tables 2004 are created.
The first reverse conversion table 2004A is associated with the count value “0”, and the second reverse conversion table 2004B is associated with the count value “1”.
 そして、処理段階2505にて、テーブルの作成数が処理段階2501で設定した数量に達していなければ、処理段階2502に戻る。
 また、処理段階2505にて、テーブルの作成数が処理段階2501で設定した数量に達していたら処理を終了する。
If the number of created tables does not reach the quantity set in the processing stage 2501 in the processing stage 2505, the process returns to the processing stage 2502.
If the number of created tables reaches the quantity set in the processing stage 2501 in the processing stage 2505, the process is terminated.
 図28に本実施の形態に係る制御プログラム逆変換処理1312の詳細を示し、図29に本実施の形態に係る制御プログラム逆変換処理1312の実施例を示す。 28 shows details of the control program reverse conversion processing 1312 according to the present embodiment, and FIG. 29 shows an example of the control program reverse conversion processing 1312 according to the present embodiment.
 まず、処理段階2601にて、制御プログラム逆変換処理部2001は、デバイス識別子を一つ読み出す。
 処理段階2602にて、制御プログラム逆変換処理部2001は、デバイス番号をカウンタのカウント値に応じた逆変換テーブル2004を参照して変換する。
 テーブル設定情報2005に設定されている数量が「2」の場合は、カウンタのカウント値は「0」又は「1」をとる。
 例えば、現在のカウント値が「0」であれば、制御プログラム逆変換処理部2001は、カウント値「0」と対応付けられている逆変換テーブル2004を選択する。
 そして、選択した逆変換テーブル2004の変換前の配列及び変換後の配列を参照して、処理段階2601で読み出したデバイス番号を変換する。
 逆変換テーブル2004を用いたデバイス番号の逆変換処理自体は、実施の形態1で示したものと同様である。
 なお、カウント値に基づいて選択した逆変換テーブル2004の変換前の配列が選択第4配列の例に相当する。
First, in the processing step 2601, the control program reverse conversion processing unit 2001 reads one device identifier.
In processing step 2602, the control program reverse conversion processing unit 2001 converts the device number with reference to the reverse conversion table 2004 corresponding to the count value of the counter.
When the quantity set in the table setting information 2005 is “2”, the count value of the counter is “0” or “1”.
For example, if the current count value is “0”, the control program reverse conversion processing unit 2001 selects the reverse conversion table 2004 associated with the count value “0”.
Then, the device number read in the processing step 2601 is converted with reference to the array before conversion and the array after conversion of the selected inverse conversion table 2004.
The device number reverse conversion process itself using the reverse conversion table 2004 is the same as that shown in the first embodiment.
Note that the array before conversion of the inverse conversion table 2004 selected based on the count value corresponds to an example of the selected fourth array.
 その後、処理段階2603にて、カウンタの数値がテーブル設定情報2005の設定数に達していなければ、処理段階2604にて、制御プログラム逆変換処理部2001は、カウンタのカウント値をインクリメントする。
 もしカウンタのカウント値がテーブル設定情報2005の設定数に達していたら、制御プログラム逆変換処理部2001は、処理段階2605にてカウンタを初期化する。
 処理段階2603にて、未変換のデバイスがあれば、処理段階2601に戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
After that, if the counter value does not reach the set number of the table setting information 2005 in the processing step 2603, the control program reverse conversion processing unit 2001 increments the count value of the counter in the processing step 2604.
If the count value of the counter has reached the set number of the table setting information 2005, the control program reverse conversion processing unit 2001 initializes the counter in the processing step 2605.
If there is an unconverted device in the process step 2603, the process returns to the process step 2601.
The above process is repeated for all device identifiers.
 図29では、制御プログラム逆変換処理部2001は、難読化制御プログラム132内のデバイス2701(X6)の変換時は、逆変換テーブル2004Aを選択する。
 逆変換テーブル2004Aにおいて数値「6」に対応する変換後の数値は「0」なので、制御プログラム逆変換処理部2001は、「X6」を「X0」に変換する。
 次に、制御プログラム逆変換処理部2001は、難読化制御プログラム132内のデバイス2702(Y5)の変換時は、カウンタを進めて逆変換テーブル2004Bを選択する。
 逆変換テーブル2004Bにおいて数値「5」に対応する変換後の数値は「0」なので、制御プログラム逆変換処理部2001は、「Y5」を「Y0」に変換する。
In FIG. 29, the control program reverse conversion processing unit 2001 selects the reverse conversion table 2004A when the device 2701 (X6) in the obfuscation control program 132 is converted.
Since the converted numerical value corresponding to the numerical value “6” in the reverse conversion table 2004A is “0”, the control program reverse conversion processing unit 2001 converts “X6” to “X0”.
Next, when converting the device 2702 (Y5) in the obfuscation control program 132, the control program reverse conversion processing unit 2001 advances the counter and selects the reverse conversion table 2004B.
Since the converted numerical value corresponding to the numerical value “5” in the reverse conversion table 2004B is “0”, the control program reverse conversion processing unit 2001 converts “Y5” to “Y0”.
 実施の形態1では制御プログラム内の同じデバイス番号がすべて同じデバイス番号に変換されてしまうが、本実施の形態ならば前述の問題を防ぐことが可能である。 In the first embodiment, all the same device numbers in the control program are converted into the same device numbers. However, the present embodiment can prevent the above-described problem.
 以上、本実施の形態では、
 (1)機器IDから情報から作成した擬似乱数を使用して、ある数値を異なる数値に変換する変換テーブルを複数作成する手段
 (2)上記(1)の複数作成した変換テーブルを設定情報に応じて決められた順番で使用して、制御プログラムのデバイス番号を変換する手段を備えた制御システムを説明した。
As described above, in the present embodiment,
(1) Means for creating a plurality of conversion tables for converting a certain numerical value into a different numerical value using a pseudo-random number created from information from the device ID (2) According to the setting information, the plurality of conversion tables created in (1) above The control system having means for converting the device number of the control program using the determined order has been described.
 実施の形態3.
 実施の形態3では、実施の形態1で示した方式とは異なる制御プログラム変換方式について述べる。
 実施の形態1において制御プログラム変換処理部301は変換テーブル307を使用してデバイス番号の変換を行っているが、本実施の形態ではデバイス番号を変換するのではなく変換テーブルをステップ番号に紐付けて変換する。
Embodiment 3 FIG.
In the third embodiment, a control program conversion method different from the method shown in the first embodiment will be described.
In the first embodiment, the control program conversion processing unit 301 uses the conversion table 307 to convert the device number, but in this embodiment, the device number is not converted but the conversion table is associated with the step number. To convert.
 本実施の形態に係る制御プログラム131は、図31に示すように、各デバイス識別子にステップ番号が付記されている。
 デバイス2901では、識別子「X0」にステップ番号(0)が付記されている。
 本実施の形態では、変換テーブル作成処理部302は、実施の形態1と同様にして、変換テーブル307を生成する。
 また、制御プログラム逆変換処理部401も実施の形態1と同様にして、逆変換テーブル404を生成する。
 本実施の形態では、制御プログラム変換処理部301による制御プログラム変換処理812と制御プログラム逆変換処理部401による制御プログラム逆変換処理1311が実施の形態1と異なる。
 以下、各処理ついて説明する。
In the control program 131 according to the present embodiment, as shown in FIG. 31, step numbers are appended to each device identifier.
In the device 2901, the step number (0) is appended to the identifier “X0”.
In the present embodiment, the conversion table creation processing unit 302 generates the conversion table 307 in the same manner as in the first embodiment.
The control program reverse conversion processing unit 401 also generates the reverse conversion table 404 in the same manner as in the first embodiment.
In the present embodiment, control program conversion processing 812 by the control program conversion processing unit 301 and control program reverse conversion processing 1311 by the control program reverse conversion processing unit 401 are different from the first embodiment.
Hereinafter, each processing will be described.
 図30に制御プログラム変換処理812の詳細を示し、図31に制御プログラム変換処理812の実施例を示す。 30 shows details of the control program conversion processing 812, and FIG. 31 shows an embodiment of the control program conversion processing 812.
 まず、処理段階2801にて、制御プログラム変換処理部301は、デバイス識別子を一つ読み出す。 First, in the processing step 2801, the control program conversion processing unit 301 reads one device identifier.
 そして、処理段階2802にて、制御プログラム変換処理部301は、読み出したデバイス識別子を、変換テーブル307を参照して当該ステップのデバイス識別子に変換する。
 より具体的には、制御プログラム変換処理部301は、読み出したデバイス識別子に付記されているステップ番号の数値の、変換前の配列内の位置を判定する。
 そして、制御プログラム変換処理部301は、判定した位置と同じ位置にある変換後の配列内の数値を抽出する。
 そして、制御プログラム変換処理部301は、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、処理段階2801で読み出したデバイス識別子を、特定したデバイス識別子に置換する。
In process step 2802, the control program conversion processing unit 301 converts the read device identifier into the device identifier of the step with reference to the conversion table 307.
More specifically, the control program conversion processing unit 301 determines the position in the array before conversion of the numerical value of the step number added to the read device identifier.
Then, the control program conversion processing unit 301 extracts a numerical value in the converted array at the same position as the determined position.
Then, the control program conversion processing unit 301 identifies a device identifier in which the extracted numerical value is added as a step number, and replaces the device identifier read in the processing step 2801 with the identified device identifier.
 次に、処理段階2803にて、未変換のデバイス識別子があれば、処理段階2801に戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
Next, if there is an unconverted device identifier in process step 2803, the process returns to process step 2801.
The above process is repeated for all device identifiers.
 図31の例では、デバイス2901(X0)のステップ番号は「0」である。
 変換テーブル307の数値「0」に対応する変換後の数値は「6」である。
 このため、制御プログラム変換処理部301は、「X0」をステップ番号「6」が付記されたデバイス識別子である「Y7」に変換する。
In the example of FIG. 31, the step number of the device 2901 (X0) is “0”.
The converted numerical value corresponding to the numerical value “0” in the conversion table 307 is “6”.
Therefore, the control program conversion processing unit 301 converts “X0” into “Y7”, which is a device identifier to which the step number “6” is added.
 次に、図32に制御プログラム逆変換処理1312の詳細を示し、図33に制御プログラム逆変換処理1312の実施例を示す。 Next, FIG. 32 shows details of the control program reverse conversion processing 1312, and FIG. 33 shows an embodiment of the control program reverse conversion processing 1312.
 まず、処理段階3001にて、制御プログラム逆変換処理部401は、デバイス識別子を一つ読み出す。 First, in the processing stage 3001, the control program reverse conversion processing unit 401 reads one device identifier.
 そして、処理段階3002にて、制御プログラム逆変換処理部401は、読み出したデバイス識別子を、逆変換テーブル404を参照して当該ステップのデバイス識別子に変換する。
 より具体的には、制御プログラム逆変換処理部401は、読み出したデバイス識別子に付記されているステップ番号の数値の、変換前の配列内の位置を判定する。
 そして、制御プログラム逆変換処理部401は、判定した変換前の配列内の位置と同じ位置にある変換後の配列内の数値を抽出する。
 そして、制御プログラム逆変換処理部401は、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、処理段階3001で読み出したデバイス識別子を、特定したデバイス識別子に置換する。
Then, in the processing stage 3002, the control program reverse conversion processing unit 401 converts the read device identifier into the device identifier of the step with reference to the reverse conversion table 404.
More specifically, the control program reverse conversion processing unit 401 determines the position in the array before conversion of the numerical value of the step number appended to the read device identifier.
Then, the control program reverse conversion processing unit 401 extracts a numerical value in the converted array at the same position as the determined position in the array before conversion.
Then, the control program reverse conversion processing unit 401 identifies a device identifier having the extracted numerical value attached as a step number, and replaces the device identifier read in the processing step 3001 with the identified device identifier.
 次に、処理段階3003にて、未変換のデバイスがあれば、処理段階3001に戻る。
 以上の処理を、全てのデバイス識別子に対して終えるまで繰り返す。
Next, if there is an unconverted device in the process stage 3003, the process returns to the process stage 3001.
The above process is repeated for all device identifiers.
 図33の例では、デバイス3101(Y7)のステップ番号は「0」である。
 逆変換テーブル404の数値「0」に対応する変換後の数値は「6」である。
 このため、制御プログラム逆変換処理部401は、「Y7」をステップ番号「6」が付記されたデバイス識別子である「X0」に変換する。
In the example of FIG. 33, the step number of the device 3101 (Y7) is “0”.
The converted numerical value corresponding to the numerical value “0” in the reverse conversion table 404 is “6”.
Therefore, the control program reverse conversion processing unit 401 converts “Y7” into “X0”, which is a device identifier to which the step number “6” is added.
 本実施の形態では、デバイス番号だけでなくデバイスの種類もランダム化可能なので、難読化制御プログラムの解析が困難になると考えられる。 In this embodiment, since not only the device number but also the device type can be randomized, it is considered difficult to analyze the obfuscation control program.
 なお、本実施の形態では、変換テーブル307及び逆変換テーブル404に含まれる数値「0~7」は、制御プログラム131内のステップ番号「0~7」に基づく。
 つまり、ステップ番号を用いてデバイス識別子を変換する場合は、ステップ番号の数値を用いて変換テーブル307を生成する必要がある。
 同様に、逆変換テーブル404もステップ番号の数値を用いて生成する必要がある。
In the present embodiment, the numerical values “0 to 7” included in the conversion table 307 and the inverse conversion table 404 are based on the step numbers “0 to 7” in the control program 131.
That is, when the device identifier is converted using the step number, the conversion table 307 needs to be generated using the numerical value of the step number.
Similarly, the inverse conversion table 404 needs to be generated using the numerical value of the step number.
 また、実施の形態2と実施の形態3とを組み合わせて実施してもよい。
 つまり、コンピュータ装置101の難読化処理部115は、実施の形態2のように、複数の変換テーブルを生成し、複数の変換テーブルをカウント値に応じて選択する。
 また、難読化処理部115は、実施の形態3のように、ステップ番号を介在させて、選択した変換テーブルを用いてデバイス識別子を変換する。
 また、コントローラ装置102の難読化解除処理部125は、実施の形態2のように、複数の逆変換テーブルを生成し、複数の逆変換テーブルをカウント値に応じて選択する。
 また、難読化解除処理部125は、実施の形態3のように、ステップ番号を介在させて、選択した逆変換テーブルを用いてデバイス識別子を復元する。
Moreover, you may implement combining Embodiment 2 and Embodiment 3. FIG.
That is, the obfuscation processing unit 115 of the computer apparatus 101 generates a plurality of conversion tables as in the second embodiment, and selects the plurality of conversion tables according to the count value.
In addition, the obfuscation processing unit 115 converts the device identifier using the selected conversion table with the step number interposed, as in the third embodiment.
Further, the obfuscation cancellation processing unit 125 of the controller device 102 generates a plurality of inverse conversion tables as in the second embodiment, and selects the plurality of inverse conversion tables according to the count value.
Also, the obfuscation cancellation processing unit 125 restores the device identifier using the selected inverse conversion table with the step number interposed, as in the third embodiment.
 本実施の形態では、変換テーブルを使用して、制御プログラムのステップ数に応じてデバイス識別子を変換する手段を備えた制御システムを説明した。 In the present embodiment, the control system including means for converting the device identifier according to the number of steps of the control program using the conversion table has been described.
 以上のように、実施の形態1~3に示した手法を用いることで、制御プログラムの不正流用やコントローラ書き込み時の通信路での盗聴の対策を行うことが可能である。
 実施の形態1~3に示した手法では、コントローラ装置で制御プログラムを実行する前に、難読化の解除を行うので実行速度の低下が起きず、実行時の挙動も変化しない。
 また、逆変換テーブルを用いれば難読化した制御プログラムを難読化前の制御プログラムに逆変換することが可能である。
 さらに、難読化の解除の際にハードウェア固有の値である機器IDを読み出して使用することで、難読化制御プログラムと難読化の解除に必要な付加情報を他のコントローラ装置にコピーをしても制御プログラムは想定された動作はせず、不正流用による模倣品の製造を困難にできる。
As described above, by using the methods shown in the first to third embodiments, it is possible to take measures against unauthorized use of a control program and wiretapping on a communication path when writing to a controller.
In the methods shown in the first to third embodiments, the obfuscation is canceled before the control program is executed by the controller device, so that the execution speed does not decrease and the behavior at the time of execution does not change.
Further, if an inverse conversion table is used, the obfuscated control program can be inversely converted to the control program before obfuscation.
Furthermore, by reading and using the device ID, which is a hardware-specific value when obfuscation is canceled, the obfuscation control program and additional information necessary for deobfuscation can be copied to another controller device. However, the control program does not operate as expected, making it difficult to manufacture counterfeit products through unauthorized use.
 以上、本発明の実施の形態について説明したが、これらの実施の形態のうち、2つ以上を組み合わせて実施しても構わない。
 あるいは、これらの実施の形態のうち、1つを部分的に実施しても構わない。
 あるいは、これらの実施の形態のうち、2つ以上を部分的に組み合わせて実施しても構わない。
 なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
As mentioned above, although embodiment of this invention was described, you may implement in combination of 2 or more among these embodiment.
Alternatively, one of these embodiments may be partially implemented.
Alternatively, two or more of these embodiments may be partially combined.
In addition, this invention is not limited to these embodiment, A various change is possible as needed.
 101 コンピュータ装置、102 コントローラ装置、103 制御プログラム管理部、104 生産機器、105 通信回線、106 通信回線、107 通信装置、110 入力部、111 制御プログラム作成部、112 制御プログラム管理部、113 制御プログラム変換部、114 制御プログラム記憶部、115 難読化処理部、116 通信処理部、121 通信制御部、122 機器ID管理部、123 付加情報管理部、124 制御プログラム記憶部、125 難読化解除処理部、126 制御プログラム実行部、128 内部バス、131 制御プログラム、132 難読化制御プログラム、133 付加情報、134 機器ID、211 CPU、212 メモリ、213 入出力装置、214 外部記憶装置、216 内部バス、301 制御プログラム変換処理部、302 変換テーブル作成処理部、303 データ処理部、304 制御プログラム逆変換処理部、305 逆変換テーブル作成処理部、306 付加情報認証部、307 変換テーブル、308 逆変換テーブル、401 制御プログラム逆変換処理部、402 逆変換テーブル作成処理部、403 データ処理部、404 逆変換テーブル、1901 制御プログラム変換処理部、1902 変換テーブル作成処理部、1903 データ処理部、1904 制御プログラム逆変換処理部、1905 逆変換テーブル作成処理部、1906 付加情報認証部、1907 変換テーブル、1908 逆変換テーブル、1909 テーブル設定情報、2001 制御プログラム逆変換処理部、2002 逆変換テーブル作成処理部、2003 データ処理部、2004 逆変換テーブル、2005 テーブル設定情報。 101 Computer device, 102 Controller device, 103 Control program management unit, 104 Production equipment, 105 Communication line, 106 Communication line, 107 Communication device, 110 Input unit, 111 Control program creation unit, 112 Control program management unit, 113 Control program conversion Unit, 114 control program storage unit, 115 obfuscation processing unit, 116 communication processing unit, 121 communication control unit, 122 device ID management unit, 123 additional information management unit, 124 control program storage unit, 125 obfuscation release processing unit, 126 Control program execution unit, 128 internal bus, 131 control program, 132 obfuscation control program, 133 additional information, 134 device ID, 211 CPU, 212 memory, 213 input / output device, 214 external storage device 216 internal bus, 301 control program conversion processing unit, 302 conversion table creation processing unit, 303 data processing unit, 304 control program reverse conversion processing unit, 305 reverse conversion table creation processing unit, 306 additional information authentication unit, 307 conversion table, 308 reverse conversion table, 401 control program reverse conversion processing unit, 402 reverse conversion table creation processing unit, 403 data processing unit, 404 reverse conversion table, 1901 control program conversion processing unit, 1902 conversion table creation processing unit, 1903 data processing unit, 1904 Control program reverse conversion processing unit, 1905 Reverse conversion table creation processing unit, 1906 Additional information authentication unit, 1907 Conversion table, 1908 Reverse conversion table, 1909 Table setting information, 2001 Control program reverse conversion Processing unit, the inverse conversion table creation processing unit 2002, 2003 data processing unit, 2004 reverse conversion table, 2005 table setting information.

Claims (15)

  1.  デバイスの識別子であるデバイス識別子が記述されている制御プログラムを管理する制御プログラム管理装置であって、
     前記制御プログラムを実行するコントローラ装置に固有の値であるコントローラ固有値を用いて、疑似乱数を生成する疑似乱数生成部と、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記制御プログラムに記述されているデバイス識別子を他のデバイス識別子に置換するデバイス識別子置換部と、
     前記デバイス識別子置換部によりデバイス識別子が置換された後の制御プログラムを前記コントローラ装置に出力する出力部とを有することを特徴とする制御プログラム管理装置。
    A control program management apparatus that manages a control program in which a device identifier that is a device identifier is described,
    A pseudo-random number generator that generates a pseudo-random number using a controller-specific value that is a value specific to a controller device that executes the control program;
    A device identifier replacement unit that replaces the device identifier described in the control program with another device identifier using the pseudo random number generated by the pseudo random number generation unit;
    A control program management apparatus, comprising: an output unit that outputs a control program after the device identifier is replaced by the device identifier replacement unit to the controller device.
  2.  前記疑似乱数生成部は、
     生成の度に異なる値となるワンタイム情報と前記コントローラ固有値とを用いて、疑似乱数を生成し、
     前記出力部は、
     前記デバイス識別子置換部によりデバイス識別子が置換された後の制御プログラムと、前記疑似乱数生成部により疑似乱数の生成に用いられた前記ワンタイム情報とを、前記コントローラ装置に出力することを特徴とする請求項1に記載の制御プログラム管理装置。
    The pseudo-random number generator is
    Using the one-time information that becomes a different value every time of generation and the controller specific value, generate a pseudo-random number,
    The output unit is
    The control program after the device identifier is replaced by the device identifier replacement unit and the one-time information used by the pseudo random number generation unit to generate the pseudo random number are output to the controller device. The control program management apparatus according to claim 1.
  3.  前記制御プログラム管理装置は、
     複数のデバイス識別子が記述されている制御プログラムを管理し、
     前記デバイス識別子置換部は、
     前記制御プログラムに記述されている各デバイス識別子を、前記制御プログラムに記述されている他のデバイス識別子に置換することを特徴とする請求項1又は2に記載の制御プログラム管理装置。
    The control program management device comprises:
    Manage a control program that describes multiple device identifiers,
    The device identifier replacement unit
    The control program management apparatus according to claim 1 or 2, wherein each device identifier described in the control program is replaced with another device identifier described in the control program.
  4.  前記制御プログラム管理装置は、
     複数のデバイス識別子が記述されている制御プログラムを管理し、
     前記デバイス識別子置換部は、
     前記制御プログラムに記述されている各デバイス識別子を、前記制御プログラムに記述されている他のデバイス識別子及び前記制御プログラムに記述されていない他のデバイス識別子のうちのいずれかに置換することを特徴とする請求項1~3のいずれかに記載の制御プログラム管理装置。
    The control program management device comprises:
    Manage a control program that describes multiple device identifiers,
    The device identifier replacement unit
    Each device identifier described in the control program is replaced with one of another device identifier described in the control program and another device identifier not described in the control program. The control program management device according to any one of claims 1 to 3.
  5.  前記制御プログラム管理装置は、
     複数のデバイス識別子が記述され、各デバイス識別子に数値が包含されている制御プログラムを管理し、
     前記デバイス識別子置換部は、
     前記複数のデバイス識別子に包含されている数値を少なくとも含む複数の数値を所定の順序で並べて第1配列を生成し、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記第1配列内の数値の順序を変化させて、新たな配列である第2配列を生成し、
     デバイス識別子ごとに、デバイス識別子に包含されている数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記第2配列内の数値を抽出し、デバイス識別子に包含されている数値を、抽出した数値に変換して、デバイス識別子の置換を行うことを特徴とする請求項1~4のいずれかに記載の制御プログラム管理装置。
    The control program management device comprises:
    A control program in which a plurality of device identifiers are described and numerical values are included in each device identifier is managed,
    The device identifier replacement unit
    Arranging a plurality of numerical values including at least the numerical values included in the plurality of device identifiers in a predetermined order to generate a first array;
    Using the pseudo-random number generated by the pseudo-random number generator, changing the order of the numerical values in the first array to generate a second array that is a new array,
    For each device identifier, determine a position in the first array of numerical values included in the device identifier, and extract a numerical value in the second array at the same position as the determined position in the first array; 5. The control program management apparatus according to claim 1, wherein a numerical value included in the device identifier is converted into an extracted numerical value, and the device identifier is replaced.
  6.  前記疑似乱数生成部は、
     複数の疑似乱数を生成し、
     前記デバイス識別子置換部は、
     前記疑似乱数生成部により生成された前記複数の疑似乱数の各々を用いて、前記第1配列内の数値の順序を変化させて、複数の新たな配列を、複数の第2配列として生成し、
     デバイス識別子ごとに、所定の選択基準に基づき、前記複数の第2配列の中からいずれかの第2配列を選択第2配列として選択し、デバイス識別子に包含されている数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記選択第2配列内の数値を抽出し、デバイス識別子に包含されている数値を、抽出した数値に変換して、デバイス識別子の置換を行うことを特徴とする請求項5に記載の制御プログラム管理装置。
    The pseudo-random number generator is
    Generate multiple pseudo-random numbers,
    The device identifier replacement unit
    Using each of the plurality of pseudo-random numbers generated by the pseudo-random number generator, changing the order of numerical values in the first array, generating a plurality of new arrays as a plurality of second arrays,
    For each device identifier, based on a predetermined selection criterion, any one of the plurality of second arrays is selected as the selected second array, and the numerical values included in the device identifier are included in the first array. To determine the position, extract the numerical value in the selected second array at the same position as the determined position in the first array, convert the numerical value included in the device identifier to the extracted numerical value, 6. The control program management apparatus according to claim 5, wherein the device identifier is replaced.
  7.  前記制御プログラム管理装置は、
     複数のデバイス識別子が記述され、各デバイス識別子にステップ番号が付記されている制御プログラムを管理し、
     前記デバイス識別子置換部は、
     前記複数のデバイス識別子に付記されている複数のステップ番号の数値を少なくとも含む複数の数値を所定の順序で並べて第1配列を生成し、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記第1配列内の数値の順序を変化させて、新たな配列である第2配列を生成し、
     デバイス識別子ごとに、デバイス識別子に付記されているステップ番号の数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記第2配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、デバイス識別子を、特定したデバイス識別子に置換することを特徴とする請求項1~4のいずれかに記載の制御プログラム管理装置。
    The control program management device comprises:
    A control program in which a plurality of device identifiers are described and a step number is added to each device identifier is managed,
    The device identifier replacement unit
    Generating a first array by arranging a plurality of numerical values including at least numerical values of a plurality of step numbers appended to the plurality of device identifiers in a predetermined order;
    Using the pseudo-random number generated by the pseudo-random number generator, changing the order of the numerical values in the first array to generate a second array that is a new array,
    For each device identifier, the position of the numerical value of the step number appended to the device identifier is determined in the first array, and the numerical value in the second array at the same position as the determined position in the first array is determined. 5. The control program management according to claim 1, wherein a device identifier having the extracted numerical value attached as a step number is specified, and the device identifier is replaced with the specified device identifier. apparatus.
  8.  前記疑似乱数生成部は、
     複数の疑似乱数を生成し、
     前記デバイス識別子置換部は、
     前記疑似乱数生成部により生成された前記複数の疑似乱数の各々を用いて、前記第1配列内の数値の順序を変化させて、複数の新たな配列を、複数の第2配列として生成し、
     デバイス識別子ごとに、所定の選択基準に基づき、前記複数の第2配列の中からいずれかの第2配列を選択第2配列として選択し、デバイス識別子に付記されているステップ番号の数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記選択第2配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、デバイス識別子を、特定したデバイス識別子に置換することを特徴とする請求項7に記載の制御プログラム管理装置。
    The pseudo-random number generator is
    Generate multiple pseudo-random numbers,
    The device identifier replacement unit
    Using each of the plurality of pseudo-random numbers generated by the pseudo-random number generator, changing the order of numerical values in the first array, generating a plurality of new arrays as a plurality of second arrays,
    For each device identifier, on the basis of a predetermined selection criterion, any one of the plurality of second arrays is selected as a selected second array, and the numerical value of the step number added to the device identifier is selected. Determine the position in one array, extract the numerical value in the selected second array at the same position as the determined position in the first array, and specify the device identifier to which the extracted numerical value is appended as a step number The control program management apparatus according to claim 7, wherein the device identifier is replaced with the specified device identifier.
  9.  デバイスの識別子であるデバイス識別子が記述されている制御プログラムを管理する制御プログラム管理装置と、接続されているコントローラ装置であって、
     前記制御プログラム管理装置が、前記コントローラ装置に固有の値であるコントローラ固有値を用いて生成した疑似乱数を用いて所定の置換手順にてデバイス識別子を置換した後の制御プログラムを、入力する入力部と、
     前記コントローラ固有値を記憶するコントローラ固有値記憶部と、
     前記コントローラ固有値記憶部に記憶されている前記コントローラ固有値を用いて、前記制御プログラム管理装置で生成された疑似乱数と同じ疑似乱数を生成する疑似乱数生成部と、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記制御プログラム管理装置で行われた置換手順と論理的に逆の手順にて、前記入力部により入力された制御プログラムに記述されている置換後のデバイス識別子を置換前のデバイス識別子に戻すデバイス識別子復元部とを有することを特徴とするコントローラ装置。
    A control program management device that manages a control program in which a device identifier that is a device identifier is described, and a controller device that is connected;
    An input unit for inputting the control program after the device identifier is replaced by a predetermined replacement procedure using a pseudo-random number generated by the control program management device using a controller unique value that is a value unique to the controller device; ,
    A controller unique value storage unit for storing the controller unique value;
    A pseudo-random number generator that generates the same pseudo-random number as the pseudo-random number generated by the control program management device, using the controller-specific value stored in the controller-specific value storage unit;
    The pseudo random number generated by the pseudo random number generator is described in the control program input by the input unit in a logically reverse procedure to the replacement procedure performed by the control program management device. A controller device comprising: a device identifier restoring unit that returns a device identifier after replacement to a device identifier before replacement.
  10.  前記入力部は、
     前記制御プログラム管理装置が、生成の度に異なる値となるワンタイム情報と前記コントローラ固有値とを用いて生成した疑似乱数を用いてデバイス識別子を置換した後の制御プログラムと、前記ワンタイム情報とを入力し、
     前記疑似乱数生成部は、
     前記ワンタイム情報と前記コントローラ固有値とを用いて、前記制御プログラム管理装置で生成された疑似乱数と同じ疑似乱数を生成することを特徴とする請求項9に記載のコントローラ装置。
    The input unit is
    The control program management apparatus replaces the device identifier with a pseudo-random number generated using one-time information and the controller-specific value that become different values each time it is generated, and the one-time information. Input,
    The pseudo-random number generator is
    The controller device according to claim 9, wherein a pseudo-random number that is the same as the pseudo-random number generated by the control program management device is generated using the one-time information and the controller specific value.
  11.  前記コントローラ装置は、
     複数のデバイス識別子が記述され、各デバイス識別子に数値が包含されている制御プログラムを管理する制御プログラム管理装置と、接続されており、
     前記入力部は、
     前記制御プログラム管理装置が、
     前記複数のデバイス識別子に包含されている数値を少なくとも含む複数の数値を所定の順序で並べて第1配列を生成し、
     疑似乱数を用いて、前記第1配列内の数値の順序を変化させて、新たな配列である第2配列を生成し、
     デバイス識別子ごとに、デバイス識別子に包含されている数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記第2配列内の数値を抽出し、デバイス識別子に包含されている数値を、抽出した数値に変換して、デバイス識別子の置換を行った後の制御プログラムを入力し、
     前記デバイス識別子復元部は、
     前記第1配列と同じ配列である第3配列を生成し、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記制御プログラム管理装置における前記第1配列から前記第2配列への生成手順と同じ手順にて、前記第3配列から前記第2配列と同じ配列である第4配列を生成し、
     前記入力部により入力された制御プログラムに記述されている置換後のデバイス識別子ごとに、置換後のデバイス識別子に包含されている数値の前記第4配列内の位置を判定し、判定した前記第4配列内の位置と同じ位置にある前記第3配列内の数値を抽出し、置換後のデバイス識別子に包含されている数値を、抽出した数値に変換して、置換後のデバイス識別子を置換前のデバイス識別子に戻すことを特徴とする請求項9又は10に記載のコントローラ装置。
    The controller device includes:
    A plurality of device identifiers are described, and connected to a control program management apparatus that manages a control program in which numerical values are included in each device identifier,
    The input unit is
    The control program management device is
    Arranging a plurality of numerical values including at least the numerical values included in the plurality of device identifiers in a predetermined order to generate a first array;
    Using a pseudo-random number, changing the order of the numerical values in the first array to generate a second array that is a new array;
    For each device identifier, determine a position in the first array of numerical values included in the device identifier, and extract a numerical value in the second array at the same position as the determined position in the first array; Convert the numerical value included in the device identifier into the extracted numerical value, enter the control program after replacing the device identifier,
    The device identifier restoration unit
    Generating a third array that is the same array as the first array;
    Using the pseudo-random number generated by the pseudo-random number generator, in the same procedure as the generation procedure from the first array to the second array in the control program management device, from the third array to the second array Generate a fourth array which is the same array;
    For each device identifier after replacement described in the control program input by the input unit, the position in the fourth array of numerical values included in the device identifier after replacement is determined, and the determined fourth The numerical value in the third array at the same position as the position in the array is extracted, the numerical value included in the replaced device identifier is converted into the extracted numerical value, and the replaced device identifier is The controller device according to claim 9 or 10, wherein the controller identifier is returned to the device identifier.
  12.  前記入力部は、
     前記制御プログラム管理装置が、
     複数の疑似乱数を生成し、
     前記複数の疑似乱数の各々を用いて、前記第1配列内の数値の順序を変化させて、複数の新たな配列を、複数の第2配列として生成し、
     デバイス識別子ごとに、所定の選択基準に基づき、前記複数の第2配列の中からいずれかの第2配列を選択第2配列として選択し、デバイス識別子に包含されている数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記選択第2配列内の数値を抽出し、デバイス識別子に包含されている数値を、抽出した数値に変換して、デバイス識別子の置換を行った後の制御プログラムを入力し、
     前記疑似乱数生成部は、
     前記制御プログラム管理装置で生成された複数の疑似乱数と同じ複数の疑似乱数を生成し、
     前記デバイス識別子復元部は、
     前記第1配列と同じ配列である第3配列を生成し、
     前記疑似乱数生成部により生成された前記複数の疑似乱数の各々を用いて、前記制御プログラム管理装置における前記第1配列から前記複数の第2配列への生成手順と同じ手順にて、前記第3配列から前記複数の前記第2配列と同じ配列である複数の第4配列を生成し、
     前記入力部により入力された制御プログラムに記述されている置換後のデバイス識別子ごとに、前記制御プログラム管理装置の選択基準と同じ選択基準に基づき、前記複数の第4配列の中からいずれかの第4配列を選択第4配列として選択し、置換後のデバイス識別子に包含されている数値の前記選択第4配列内の位置を判定し、判定した前記選択第4配列内の位置と同じ位置にある前記第3配列内の数値を抽出し、置換後のデバイス識別子に包含されている数値を、抽出した数値に変換して、置換後のデバイス識別子を置換前のデバイス識別子に戻すことを特徴とする請求項11に記載のコントローラ装置。
    The input unit is
    The control program management device is
    Generate multiple pseudo-random numbers,
    Using each of the plurality of pseudo-random numbers, changing the order of numerical values in the first array, generating a plurality of new arrays as a plurality of second arrays,
    For each device identifier, based on a predetermined selection criterion, any one of the plurality of second arrays is selected as the selected second array, and the numerical values included in the device identifier are included in the first array. To determine the position, extract the numerical value in the selected second array at the same position as the determined position in the first array, convert the numerical value included in the device identifier to the extracted numerical value, Enter the control program after replacing the device identifier,
    The pseudo-random number generator is
    A plurality of pseudo-random numbers that are the same as the plurality of pseudo-random numbers generated by the control program management device;
    The device identifier restoration unit
    Generating a third array that is the same array as the first array;
    Using each of the plurality of pseudo-random numbers generated by the pseudo-random number generation unit, in the same procedure as the generation procedure from the first array to the plurality of second arrays in the control program management device, the third Generating a plurality of fourth arrays that are the same as the plurality of second arrays from the array;
    For each device identifier after replacement described in the control program input by the input unit, based on the same selection criterion as the selection criterion of the control program management device, any one of the plurality of fourth arrays 4 arrays are selected as the selected 4th array, the position in the selected 4th array of the numerical value included in the replaced device identifier is determined, and the determined position is the same as the position in the selected 4th array The numerical value in the third array is extracted, the numerical value included in the replaced device identifier is converted into the extracted numerical value, and the replaced device identifier is returned to the device identifier before replacement. The controller device according to claim 11.
  13.  前記コントローラ装置は、
     複数のデバイス識別子が記述され、各デバイス識別子にステップ番号が付記されている制御プログラムを管理する制御プログラム管理装置と、接続されており、
     前記入力部は、
     前記制御プログラム管理装置が、
     前記複数のデバイス識別子に付記されている複数のステップ番号の数値を少なくとも含む複数の数値を所定の順序で並べて第1配列を生成し、
     疑似乱数を用いて、前記第1配列内の数値の順序を変化させて、新たな配列である第2配列を生成し、
     デバイス識別子ごとに、デバイス識別子に付記されているステップ番号の数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記第2配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、デバイス識別子を、特定したデバイス識別子に置換した後の制御プログラムを入力し、
     前記デバイス識別子復元部は、
     前記第1配列と同じ配列である第3配列を生成し、
     前記疑似乱数生成部により生成された疑似乱数を用いて、前記制御プログラム管理装置における前記第1配列から前記第2配列への生成手順と同じ手順にて、前記第3配列から前記第2配列と同じ配列である第4配列を生成し、
     前記入力部により入力された制御プログラムに記述されている置換後のデバイス識別子ごとに、置換後のデバイス識別子に付記されているステップ番号の数値の前記第4配列内の位置を判定し、判定した前記第4配列内の位置と同じ位置にある前記第3配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を置換前のデバイス識別子として特定し、置換後のデバイス識別子を、特定した置換前のデバイス識別子に戻すことを特徴とする請求項9又は10に記載のコントローラ装置。
    The controller device includes:
    A plurality of device identifiers are described, connected to a control program management apparatus that manages a control program in which a step number is added to each device identifier,
    The input unit is
    The control program management device is
    Generating a first array by arranging a plurality of numerical values including at least numerical values of a plurality of step numbers appended to the plurality of device identifiers in a predetermined order;
    Using a pseudo-random number, changing the order of the numerical values in the first array to generate a second array that is a new array;
    For each device identifier, the position of the numerical value of the step number appended to the device identifier is determined in the first array, and the numerical value in the second array at the same position as the determined position in the first array is determined. Extract, specify the device identifier with the extracted numerical value attached as a step number, enter the control program after replacing the device identifier with the specified device identifier,
    The device identifier restoration unit
    Generating a third array that is the same array as the first array;
    Using the pseudo-random number generated by the pseudo-random number generator, in the same procedure as the generation procedure from the first array to the second array in the control program management device, from the third array to the second array Generate a fourth array which is the same array;
    For each device identifier after replacement described in the control program input by the input unit, the position in the fourth array of the numerical value of the step number appended to the device identifier after replacement is determined and determined. A numerical value in the third array at the same position as the position in the fourth array is extracted, a device identifier to which the extracted numerical value is added as a step number is specified as a device identifier before replacement, and a device after replacement The controller device according to claim 9 or 10, wherein the identifier is returned to the identified device identifier before replacement.
  14.  前記入力部は、
     前記制御プログラム管理装置が、
     複数の疑似乱数を生成し、
     前記複数の疑似乱数の各々を用いて、前記第1配列内の数値の順序を変化させて、複数の新たな配列を、複数の第2配列として生成し、
     デバイス識別子ごとに、所定の選択基準に基づき、前記複数の第2配列の中からいずれかの第2配列を選択第2配列として選択し、デバイス識別子に付記されているステップ番号の数値の前記第1配列内の位置を判定し、判定した前記第1配列内の位置と同じ位置にある前記選択第2配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を特定し、デバイス識別子を、特定したデバイス識別子に置換した後の制御プログラムを入力し、
     前記疑似乱数生成部は、
     前記制御プログラム管理装置で生成された複数の疑似乱数と同じ複数の疑似乱数を生成し、
     前記デバイス識別子復元部は、
     前記第1配列と同じ配列である第3配列を生成し、
     前記疑似乱数生成部により生成された前記複数の疑似乱数の各々を用いて、前記制御プログラム管理装置における前記第1配列から前記複数の第2配列への生成手順と同じ手順にて、前記第3配列から前記複数の前記第2配列と同じ配列である複数の第4配列を生成し、
     前記入力部により入力された制御プログラムに記述されている置換後のデバイス識別子ごとに、前記制御プログラム管理装置の選択基準と同じ選択基準に基づき、前記複数の第4配列の中からいずれかの第4配列を選択第4配列として選択し、置換後のデバイス識別子に付記されているステップ番号の数値の前記選択第4配列内の位置を判定し、判定した前記選択第4配列内の位置と同じ位置にある前記第3配列内の数値を抽出し、抽出した数値がステップ番号として付記されているデバイス識別子を置換前のデバイス識別子として特定し、置換後のデバイス識別子を、特定した置換前のデバイス識別子に戻すことを特徴とする請求項13に記載のコントローラ装置。
    The input unit is
    The control program management device is
    Generate multiple pseudo-random numbers,
    Using each of the plurality of pseudo-random numbers, changing the order of numerical values in the first array, generating a plurality of new arrays as a plurality of second arrays,
    For each device identifier, on the basis of a predetermined selection criterion, any one of the plurality of second arrays is selected as a selected second array, and the numerical value of the step number added to the device identifier is selected. Determine the position in one array, extract the numerical value in the selected second array at the same position as the determined position in the first array, and specify the device identifier to which the extracted numerical value is appended as a step number And input the control program after replacing the device identifier with the specified device identifier,
    The pseudo-random number generator is
    A plurality of pseudo-random numbers that are the same as the plurality of pseudo-random numbers generated by the control program management device;
    The device identifier restoration unit
    Generating a third array that is the same array as the first array;
    Using each of the plurality of pseudo-random numbers generated by the pseudo-random number generation unit, in the same procedure as the generation procedure from the first array to the plurality of second arrays in the control program management device, the third Generating a plurality of fourth arrays that are the same as the plurality of second arrays from the array;
    For each device identifier after replacement described in the control program input by the input unit, based on the same selection criterion as the selection criterion of the control program management device, any one of the plurality of fourth arrays 4 arrays are selected as the selected 4th array, the position of the numerical value of the step number added to the replaced device identifier is determined in the selected 4th array, and the determined position is the same as the determined position in the selected 4th array A numerical value in the third array at the position is extracted, a device identifier to which the extracted numerical value is added as a step number is specified as a device identifier before replacement, and a device identifier after replacement is specified as the specified device before replacement The controller device according to claim 13, wherein the controller device is returned to the identifier.
  15.  請求項1に記載の制御プログラム管理装置と請求項9に記載のコントローラ装置とを備えることを特徴とする制御システム。 A control system comprising the control program management device according to claim 1 and the controller device according to claim 9.
PCT/JP2013/053812 2013-02-18 2013-02-18 Control program management apparatus, controller apparatus, and control system WO2014125639A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2013/053812 WO2014125639A1 (en) 2013-02-18 2013-02-18 Control program management apparatus, controller apparatus, and control system
TW102112626A TW201433891A (en) 2013-02-18 2013-04-10 Control program management apparatus, controller apparatus, and control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/053812 WO2014125639A1 (en) 2013-02-18 2013-02-18 Control program management apparatus, controller apparatus, and control system

Publications (1)

Publication Number Publication Date
WO2014125639A1 true WO2014125639A1 (en) 2014-08-21

Family

ID=51353664

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/053812 WO2014125639A1 (en) 2013-02-18 2013-02-18 Control program management apparatus, controller apparatus, and control system

Country Status (2)

Country Link
TW (1) TW201433891A (en)
WO (1) WO2014125639A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328207A (en) * 2020-11-30 2021-02-05 中国石油大学(华东) True random number generator based on singlechip random source working parameters and generating method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02297626A (en) * 1989-05-12 1990-12-10 Nec Corp System for masking contents of program and data
JP2002073190A (en) * 2000-09-04 2002-03-12 Funai Electric Co Ltd Device and method for converting program
JP2009110113A (en) * 2007-10-26 2009-05-21 Mitsubishi Electric Corp Program converter, program, and program conversion method
JP2011165041A (en) * 2010-02-12 2011-08-25 Mitsubishi Electric Corp Control device and management device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02297626A (en) * 1989-05-12 1990-12-10 Nec Corp System for masking contents of program and data
JP2002073190A (en) * 2000-09-04 2002-03-12 Funai Electric Co Ltd Device and method for converting program
JP2009110113A (en) * 2007-10-26 2009-05-21 Mitsubishi Electric Corp Program converter, program, and program conversion method
JP2011165041A (en) * 2010-02-12 2011-08-25 Mitsubishi Electric Corp Control device and management device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328207A (en) * 2020-11-30 2021-02-05 中国石油大学(华东) True random number generator based on singlechip random source working parameters and generating method

Also Published As

Publication number Publication date
TW201433891A (en) 2014-09-01

Similar Documents

Publication Publication Date Title
KR101677557B1 (en) Stochastic processing
JP4304215B2 (en) Secret sharing apparatus, method and program
EP2388730A1 (en) Method for generating software code
CN108063756B (en) Key management method, device and equipment
CN104978167A (en) Random Number Generator and Method for Generating Random Numbers
CN103294496B (en) Programming system
US10628562B2 (en) Method for protecting a computer program from being influenced, and computer system
RU2011115207A (en) METHOD FOR PROTECTED COMMUNICATION IN A NETWORK, COMMUNICATION DEVICE, NETWORK AND COMPUTER PROGRAM FOR THIS
US20210037100A1 (en) Method and control system for controlling and/or monitoring devices
CN109462477A (en) Whitepack encryption method based on Internet of Things embedded device
Nithyanand et al. A theoretical analysis: Physical unclonable functions and the software protection problem
CN105577644A (en) Encryption and authentication method and system
JP6919973B2 (en) Computer-aided obfuscation of program code
WO2017195369A1 (en) Program development assistance device, train control and monitoring device, and program development assistance method
WO2014125639A1 (en) Control program management apparatus, controller apparatus, and control system
CN109150813B (en) Equipment verification method and device
US20220114276A1 (en) Controlling a data network with respect to a use of a distributed database
US20190268144A1 (en) Data processing method, control system, and control device
CN111339523B (en) Authorization method and device for embedded equipment
WO2020261654A1 (en) Control system, control device, and management method
JP6931331B2 (en) Blockchain management system, blockchain management method and blockchain management program
CN113228012A (en) Method and apparatus for authenticating FPGA configuration
US9530022B1 (en) Protection of designs for electronic systems
US10055194B2 (en) Operation based on two operands
JP5356583B2 (en) Semiconductor memory device

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: 13875241

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13875241

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP