WO2014147748A1 - コード処理装置およびプログラム - Google Patents

コード処理装置およびプログラム Download PDF

Info

Publication number
WO2014147748A1
WO2014147748A1 PCT/JP2013/057840 JP2013057840W WO2014147748A1 WO 2014147748 A1 WO2014147748 A1 WO 2014147748A1 JP 2013057840 W JP2013057840 W JP 2013057840W WO 2014147748 A1 WO2014147748 A1 WO 2014147748A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
link
concealment
range
unit
Prior art date
Application number
PCT/JP2013/057840
Other languages
English (en)
French (fr)
Inventor
由里恵 新家
福友 中西
洋美 春木
橋本 幹生
佐野 文彦
Original Assignee
株式会社東芝
東芝ソリューション株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社東芝, 東芝ソリューション株式会社 filed Critical 株式会社東芝
Priority to PCT/JP2013/057840 priority Critical patent/WO2014147748A1/ja
Priority to CN201380074351.0A priority patent/CN105074712B/zh
Priority to JP2015506446A priority patent/JP5996777B2/ja
Publication of WO2014147748A1 publication Critical patent/WO2014147748A1/ja
Priority to US14/847,975 priority patent/US10229277B2/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/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/54Link editing before load time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • Embodiments described herein relate generally to a code processing device and a program.
  • the problem to be solved by the present invention is to provide a code processing device and a program that can be processed by a general-purpose linker while concealing the program code.
  • the code processing device of the embodiment includes a determination unit, a concealment unit, a command unit, and a restoration unit.
  • the determination unit is at least a part other than the range to be rearranged based on the rearrangement information of the first code data including the code body and the rearrangement information indicating the range of the code body to be rearranged by the linker.
  • a first range including is determined.
  • the concealment unit conceals the first range.
  • the command unit instructs the linker to process the first code data in which the first range is concealed.
  • the restoration unit restores the concealed range included in the second code data generated by the linker processing the first code data.
  • the flowchart which shows the flow of a process by a program development system.
  • the block diagram which shows the structural example of the code processing apparatus of 1st Embodiment.
  • the figure explaining the code before a link and the secret code before a link The figure explaining the data structure of the code before a link indicated by references.
  • the figure which shows the specific example of restoration code information The figure explaining the post-link concealment code and the post-link code.
  • the flowchart which shows the flow of a process by a program development system.
  • the block diagram which shows the structural example of a code concealment apparatus.
  • the block diagram which shows the structural example of the code processing apparatus of 2nd Embodiment.
  • the block diagram which shows the structural example of the code processing apparatus of 3rd Embodiment.
  • the figure which shows the specific example of the fat code before a link.
  • the figure which shows the specific example of secrecy control information The flowchart which shows the flow of the process by a code processing apparatus.
  • the code processing apparatus is an apparatus for obtaining second code data by processing an external linker while keeping the first code data secret.
  • the code processing apparatus according to the embodiment inputs, for example, protected first code data, and causes an external linker to process a part of the range of the first code data whose protection is cancelled.
  • the code processing apparatus according to the embodiment restores the concealed range of the second code data obtained by processing the first code data by the external linker and outputs the restored second code data in a protected state.
  • the code processing apparatus of the embodiment discloses the first code data that is the program code developed by the developer A.
  • the developer B can be provided without processing, and the developer B can process the first code data using a general-purpose linker to generate the second code data.
  • the first code data is “pre-link code”
  • the protected first code data is “pre-link protection code”
  • the first code data whose partial range is concealed is “pre-link secret code”
  • the external code data obtained from the linker is “post-link concealment code”
  • the second code data whose concealed range is restored is “post-link code”
  • the protected second code data is “post-link protection code”.
  • the plaintext code of the concealment range portion is expressed as “original code”.
  • FIG. 1 is a block diagram illustrating a configuration example of a program development system according to the first embodiment.
  • the program development system of the first embodiment includes a computer 800 used by developer A and a computer 900 used by developer B.
  • Developer A and developer B are developers who cooperate to develop a computer program.
  • Developer A uses computer 800 to develop program code.
  • Developer B uses computer 900 to develop executable program code based on the program code developed by developer A.
  • the computer 800 used by the developer A includes a code protection device 810 and a code output device 820.
  • the code protection device 810 generates a pre-link protection code 210 by performing a protection process on the pre-link code 220 developed by the developer A.
  • the protection process is a process for preventing the program code entity from being easily known.
  • the protection process for example, a process for preventing the developer B from knowing the substance of the program code by encrypting the program code itself can be mentioned.
  • the protection process may be a process of setting access control for a file including the program code (a process that does not change the program code itself) so that the developer B cannot directly access it. Further, the protection process may protect only a part that the developer A determines not to be known to the developer B.
  • the code output device 820 outputs the pre-link protection code 210 generated by the code protection device 810.
  • the output is processing for extracting the pre-link protection code 210 from the computer 800 so that the computer 900 can use it.
  • the output may be, for example, transmission by e-mail through a computer network, transfer through a file server on a computer network, file transfer between computers shared through a network file system, etc. Also good.
  • the output may be stored in a removable storage medium not via a computer network.
  • the computer 900 used by the developer B includes a code input device 910, a linker 920, and the code processing device 100 of the first embodiment.
  • the code input device 910 inputs the pre-link protection code 210 output by the code output device 820.
  • the input is a process of making the pre-link protection code 210 output from the code output device 820 available to the computer 900.
  • the input is processing corresponding to the above-described output, for example, reception of an e-mail, reception of a file via a file server, reading from a removable storage medium, or the like.
  • the code processing device 100 generates a post-link protection code 280 from the pre-link protection code 210 input by the code input device 910 in cooperation with the external linker 920. Details of the code processing apparatus 100 will be described later.
  • the linker 920 performs conversion to make the program code executable.
  • the linker 920 processes one or more program codes, and combines a plurality of program codes to generate one executable program code.
  • processing performed by the linker 920 is referred to as link processing.
  • FIG. 1 shows an example in which the linker 920 links the pre-link concealment code 250 and the unprotected link pre-link code 930 and outputs the post-link concealment code 260.
  • the linker 920 may rewrite a part of the program code for the purpose of operating normally after combining the program code.
  • an address (address) may be attached to the program code to specify the position, but the address may change before and after the link processing.
  • the linker 920 performs a process of changing the address used in the program code so that the change in the address does not hinder the operation of the program code. Such a process is called a rearrangement process.
  • the linker 920 may be a general-purpose linker used for general program development.
  • general-purpose linkers used for general program development for example, software development on Linux (registered trademark of Linus Torvalds) is GNU ld, and software development on Windows (registered trademark of Microsoft Corporation) is LINK. exe and the like are well known and can be used as the linker 920.
  • the pre-link code 220 is a program code developed by the developer A and is a program code that can be a target of link processing by the linker 920.
  • the program code is information including instructions for causing the computer to perform processing and related data.
  • the program code may be a machine language code executed by a processor architecture such as x86, an intermediate language such as Java (registered trademark of Oracle Corporation) byte code, or JavaScript (registered trademark of Oracle Corporation). It may be a code of a simple script language.
  • the program code generated by the link process is called post-link code.
  • the pre-link protection code 210 is a program code generated when the code protection device 810 performs a protection process on the pre-link code 220.
  • the pre-link protection code 210 may be in a form that cannot be linked by the linker 920.
  • the pre-link concealment code 250 is a program code in which a part of the code body is concealed in a state where the link processing by the linker 920 is possible.
  • the concealment process is a process of concealing a part of the code body (hereinafter referred to as a concealment target range) so that it cannot be easily known, and the general-purpose linker 920 can process the processed program code. Is.
  • the concealment process may be, for example, a process of encrypting the concealment target range of the code body, or a source code included in the concealment target range of the code body is a dummy code (random number, zero, other fixed value, etc.) It may be a process of replacing with.
  • the post-link concealment code 260 is a program code obtained by linking the pre-link concealment code 250 by the linker 920, and is a post-link code in which a part of the code body is concealed.
  • the post-link concealment code 260 cannot be interpreted and executed by the computer as it is.
  • the post-link protection code 280 is a post-link code that has been protected.
  • the protection process is the same as the protection process performed by the code protection device 810, but is not necessarily the same process as the protection process for the pre-link code 220.
  • the post-link protection code 280 may be interpreted by the computer 900 used by the developer B, or may not be interpreted. Note that the pre-link concealment code 250 and the post-link concealment code 260 may be stored in a form that the developer B can easily access.
  • the unprotected code before link 930 is a program code developed by the developer B, and is a program code that can be a target of link processing by the linker 920. Since the unprotected code before link 930 is a program code developed by the developer B, it is not necessary to perform protection processing or concealment processing. In the present embodiment, the program code may be simply referred to as a code.
  • FIG. 2 is a flowchart showing the flow of processing by the program development system shown in FIG.
  • the computer 800 of the developer A performs the processing of step S11 and step S12 according to the operation by the developer A.
  • the computer 900 of the developer B performs the processes of step S13 and step S14 according to the operation of the developer B.
  • step S11 the code protection device 810 of the computer 800 performs protection processing on the pre-link code 220 and generates the pre-link protection code 210.
  • the code protection device 810 generates the pre-link protection code 210 by encrypting the pre-link code 220.
  • This pre-link protection code 210 has a format that can be decoded by the code processing device 100 of the computer 900.
  • step S12 the code output device 820 of the computer 800 outputs the pre-link protection code 210 so that the computer 900 can use it.
  • step S13 the code input device 910 of the computer 900 inputs the pre-link protection code 210 output from the computer 800.
  • step S14 the code processing device 100 of the computer 900 uses the linker 920 to generate the post-link protection code 280 from the pre-link protection code 210. Specifically, the code processing device 100 generates a pre-link concealment code 250 in a format that can be processed by the linker 920 from the pre-link protection code 210, and instructs the linker 920 to process the pre-link concealment code 250.
  • the linker 920 inputs the pre-link concealment code 250 and the unprotected pre-link code 930 developed by the developer B, performs link processing, and generates the post-link concealment code 260. Note that it is not essential to link the unprotected code before link 930.
  • the code processing device 100 restores the post-link concealment code 260, performs protection processing, and outputs the post-link protection code 280.
  • FIG. 3 is a block diagram illustrating a configuration example of the code processing device 100 according to the first embodiment.
  • the code processing device 100 of the first embodiment includes a secure input unit 110, a determination unit 120, a concealment unit 130, a link command unit 140, a restoration unit 150, a secure output unit 160, A restoration code acquisition unit 170.
  • the secure input unit 110 inputs the pre-link protection code 210, performs protection release processing, and acquires the pre-link code 220.
  • the protection release process is a process for acquiring data before the protection process from the data subjected to the protection process. For example, data that has been encrypted as protection processing is decrypted as protection cancellation processing, and data that has been subjected to access control as protection processing has access authority necessary for access as protection cancellation processing. Use to read data.
  • the determining unit 120 determines and determines a concealment target range including at least a part other than the rearrangement target area of the data body included in the pre-link code 220 based on rearrangement information described later included in the pre-link code 220.
  • the secret control information 230 indicating the secret target range is generated.
  • the concealment unit 130 performs concealment processing on the concealment target range of the pre-link code 220 based on the concealment control information 230, and generates a pre-link concealment code 250.
  • the link command unit 140 designates the pre-link concealment code 250 as a processing target, and instructs the linker 920 to perform link processing for the pre-link concealment code 250.
  • the result of the linker 920 linking the pre-link concealment code 250 according to the command from the link command unit 140 is the post-link concealment code 260.
  • the restoration code acquisition unit 170 acquires and acquires a restoration code for restoring the concealed range of the post-link concealment code 260 from the pre-link concealment code 220 or the post-link concealment code 260.
  • the restoration code information 240 indicating the restoration code and the position to be restored is generated.
  • the restoration unit 150 performs a restoration process on the post-link concealment code 260 based on the restoration code information 240 and generates a post-link code 270.
  • the restoration process is a process for restoring the data that has been concealed to the data before the concealment process. For example, the restoration process overwrites the concealed range of the post-link concealment code 260 with the restoration code.
  • the recovery code acquisition unit 170 acquires recovery data obtained by decrypting the encrypted range of the post-link security code 260, and the recovery unit 150 uses the recovery data to perform post-link processing.
  • the secret range of the secret code 260 is restored.
  • the restoration code acquisition unit 170 acquires the original code in the concealment target range from the pre-link code 220 as a restoration code, and the restoration unit 150 uses this restoration data. Then, the concealed range of the post-link concealment code 260 is restored.
  • the secure output unit 160 performs protection processing on the post-link code 270 to generate and output a post-link protection code 280.
  • FIG. 4 is a diagram for explaining the pre-link code 220 and the pre-link concealment code 250, where (a) shows the pre-link code 220 and (b) shows the pre-link concealment code 250, respectively.
  • the pre-link code 220 is a program code that can be a target of link processing by the linker 920 as described above.
  • the pre-link code 220 includes a pre-link code main body 221 and rearrangement information 222 as shown in FIG.
  • the pre-link code body 221 includes a command for causing the computer to actually perform processing, related data, and the like. As shown in FIG. 4A, the pre-link code main body 221 may be numbered to indicate a position in the code, such as address 100 or address 200. An address is a numerical value for indicating a position in a code.
  • the rearrangement information 222 is information indicating the range of the pre-link code main body 221 in which rearrangement processing is performed by the linker 920.
  • the rearrangement process is a process of rewriting a part of the code that has not been determined before the link process at the time of the link process.
  • the process of rewriting a predetermined range (relocation target area) from the position indicated by the relocation target location 223 in the pre-link code body 221 according to the relocation command 224 is the relocation process.
  • the relocation target location 223 is information indicating the position of the relocation target region in the pre-link code main body 221.
  • the “126th address” in the inter-link code main body 221 starts.
  • the rearrangement command 224 is information for instructing a rewriting method in the rearrangement process, and has a meaning such as “add a constant value 10 to the value of the target location”, for example.
  • the relocation area starting at “126 address” is rewritten by the method defined as “relocation 1”, and the relocation area starting at “142 address” is changed.
  • this is information for instructing the linker 920 that rewriting should be performed by a method defined as “relocation 2”.
  • the RELA format rearrangement command for the ELF format used in Linux includes a rearrangement type, a symbol, and an add value.
  • the symbol is information for identifying a position in the code.
  • the instruction set architecture is x86
  • the rearrangement command represented by the rearrangement type “R_386_32” indicates that “the address of the symbol xyz and 10 are set in the rearrangement target area.
  • the command is “Store the added value”.
  • a general-purpose linker such as the above-mentioned GNU ld rewrites information according to this command.
  • the pre-link concealment code 250 is a program code generated by the concealment unit 130 performing concealment processing on the concealment target range determined by the determination unit 120 in the pre-link code main body 221 included in the pre-link code 220. is there.
  • the pre-link concealment code 250 includes a pre-link concealment code body 251 and rearrangement information 222 as shown in FIG. Details of the pre-link concealment code 250 will be described later.
  • the rearrangement information 222 is the same as the rearrangement information 222 of the pre-link code 220.
  • the rearrangement information 222 of the pre-link concealment code 250 does not necessarily match the rearrangement information 222 of the pre-link code 220. For example, a part of the rearrangement information 222 is changed according to the linker 920 to be used. Also good.
  • the pre-link code 220 corresponds to a file in a common object file format (COFF) format disclosed in the following reference.
  • COFF common object file format
  • FIG. 5 is a diagram for explaining the data structure of the pre-link code 220 disclosed in the reference.
  • the pre-link code 220 includes header information 510, section information 520, pre-link code main body 221, rearrangement information 222, and symbol information 530.
  • One or more pre-link code bodies 221 and relocation information 222 are included in association with the contents of the section information 520.
  • the header information 510 is a management information area that holds the position of each element constituting the pre-link code 220 in the file.
  • the section information 520 is meta information related to a section included in the code.
  • a section is a collection of information stored in a file.
  • the code body 221 and the rearrangement information 222 are stored as sections.
  • FIG. 6 is a diagram illustrating an example of the section information 520.
  • the section information 520 includes a section name symbol 521, an arrangement destination position 522, a code body file position 523, a section size 524, a rearrangement information position 525, and flag information 526 as a list. It is.
  • Symbol information 530 is information that stores one or more symbols.
  • a symbol is meta information given to a code for the purpose of indicating a position in a program.
  • FIG. 7 is a diagram illustrating an example of the symbol information 530.
  • the symbol information 530 includes a symbol 531, a section 532, an offset 533, and a type 534 as a list.
  • FIG. 8 is a diagram illustrating a specific example of the confidential control information 230, where (a) illustrates an example of the confidential control information 230, and (b) illustrates another example of the confidential control information 230.
  • the concealment control information 230 is information indicating the concealment target range determined by the determination unit 120, and is used when the concealment unit 130 performs concealment processing on the pre-link code 220, and the restoration code acquisition unit 170 performs restoration code. Used when generating information 240.
  • the confidential information 230 shown in FIGS. 8A and 8B both are expressed as a list of ranges in which the confidential target range is continuous.
  • the example of FIG. 8A and the example of FIG. 8B are different in the expression method, but in both cases, the offset from the symbol “symbol1” is in the range of “0 bytes to 26 bytes” and from the symbol “symbol1”.
  • a range in which the offset is “30 bytes to 42 bytes” indicates that it is a concealment target range.
  • the confidential range is expressed using the offset from the symbol. Instead, the confidential range is expressed using the address information itself. You may make it do.
  • the encryption control information 230 may include an encryption key used for encryption and other information related to the encryption algorithm.
  • FIGS. 9A and 9B are diagrams showing specific examples of the pre-link code body 221 and the pre-link secret code body 251.
  • FIG. 9A shows an example of the pre-link code body 221
  • FIG. 9B shows an example of the pre-link code body 251. Each is shown.
  • the pre-link code body 221 shown in FIG. 9A is not a relocation target area, but codes “code1” and “code3” in a concealment target range, and codes “code2” and “code4” in a relocation target area.
  • the code “code5” is made out of the concealment target range according to the designation of the developer A or the like.
  • the concealment target range is determined by the determination unit 120 of the code processing device 100, and the position in the pre-link code body 221 is indicated by the concealment control information 230.
  • 9A has the symbol “symbol1” at the 100th address and the symbol “symbol2” at the 150th address.
  • the pre-link concealment code body 251 shown in FIG. 9B includes the concealment codes “concealed1” and “concealed3”, the codes “code2” and “code4” of the relocation target area, and is not the relocation target area but the developer. It consists of a code “code5” that is out of the concealment target range according to the designation of A or the like.
  • the secret code is a code that cannot easily know the original code (codes “code1” and “code3” in the secret target range in FIG. 9A) from the information.
  • the secret code may be an encrypted original code or a dummy code. Dummy code is code that has little or no relevance to the original code.
  • the dummy code may be a meaningless code such as a no-execution instruction NOP, code 0 or a random number sequence, or may be a meaningful code that is not related to the original code.
  • the code “code1” from address 100 to address 126 is the secret code “concealed1” in the pre-link secret code body 251 shown in FIG. 9B.
  • the difference is that the code “code3” from address 130 to address 142 is replaced with the secret code “concealed3”.
  • This replacement is performed by the concealment unit 130 of the code processing device 100 based on the concealment control information 230. Therefore, for example, it is impossible or very difficult to know the contents of the codes “code1” and “code3” in the pre-link code body 221 only from the information of the pre-link secret code body 251.
  • the codes “code2”, “code4”, and “code5” are out of the concealment target range, so the pre-link shown in FIG. 9B.
  • the secret code body 251 is not replaced with the secret code.
  • FIG. 10 is a diagram illustrating a specific example of the restoration code information 240.
  • the restoration code information 240 is information that instructs the post-link secret code 260 to overwrite the code for the purpose of restoring the secret code.
  • the restoration code information 240 includes a code to be overwritten (restoration code).
  • the recovery code included in the recovery code information 240 is the same as the code (original code) “code1” and “code3” in the concealment target range in the pre-link code body 221 illustrated in FIG. belongs to.
  • These restored codes are retained in a form associated with the range (restoration target range) of the post-link concealment code 260 to be restored using the restoration code, that is, the head position of the concealed range of the post-link concealment code 260. .
  • the head position of the restoration target range is expressed by, for example, a symbol and an offset.
  • the position of the offset “0 byte” from the symbol “symbol1” is the head position of the restoration target range to be overwritten with the restoration code “code1”, and the position of the offset “30 bytes” from the symbol “symbol1”. Indicates that it is the start position of the restoration target range to be overwritten with the restoration code “code3”.
  • FIG. 11 is a diagram for explaining the data structures of the post-link concealment code 260 and the post-link concealment code 270, where (a) shows the post-link concealment code 260 and (b) shows the post-link concealment code 270, respectively.
  • the post-link concealment code 260 shown in FIG. 11A is a code generated when the linker 920 performs a link process on the pre-link concealment code 250, and includes a post-link code main body 271.
  • the post-link code 270 illustrated in FIG. 11B is obtained by the restoration unit 150 of the code processing device 100 with respect to the concealed range (restoration target range) of the post-link code main body 271 included in the post-link concealment code 260.
  • the code is obtained by performing the restoration process and includes the post-link concealment code body 261.
  • post-link code 270 As a specific form of the post-link code 270, for example, a form disclosed in the above-mentioned reference is known.
  • the post-link code 270 corresponds to a Portable Executable file disclosed in the above-mentioned reference.
  • FIG. 12 is a diagram for explaining the data structure of the post-link code 270 disclosed in the above reference.
  • the post-link code 270 includes header information 610, section information 620, post-link code body 271, and symbol information 630.
  • the header information 610 is a management information area that holds the position in the file of each element constituting the post-link code 270, the execution start position of the program, and the like.
  • the section information 620 and the symbol information 630 are the same as the section information 520 and the symbol information 530 in the pre-link code 220 shown in FIG.
  • the symbol information 630 is not necessarily included in the post-link code 270, and the linker 920 can output the symbol information 630 to an external file.
  • the symbol information file 630 output from the linker 920 may be a map file of readable text or a binary file with an extension of SYM or PDB.
  • FIG. 13A and 13B are diagrams showing specific examples of the post-link concealment code body 261 and the post-link concealment code body 271.
  • FIG. 13A shows an example of the post-link concealment code body 261
  • FIG. 13B shows an example of the post-link concealment code body 271. Each is shown.
  • the post-link concealment code body 261 shown in FIG. 13A includes concealment codes “concealed1” and “concealed3”, and codes “reloc2” and “reloc4” rewritten by the linker 920 performing relocation processing in the link processing. And a code “code5” that is out of the range to be concealed according to the designation of developer A and the like, and a code “code6” derived from another object combined by the link processing by the linker 920. 13A has a symbol “symbol 1” at address 200, a symbol “symbol 2” at address 250, and a symbol “symbol 3” at address 300.
  • the post-link concealment code main body 261 shown in FIG. 13A has an increase of 100 code addresses, and the code “code2” ”Is changed to code“ reloc2 ”, code“ code4 ”is changed to code“ reloc4 ”, and code“ code6 ”is added. Note that the fact that the address has changed compared to the pre-link concealment code 250 and that the code “code6” has been added are events that occur according to the link processing of the linker 920, and the post-link concealment code body It is not the essence of H.261.
  • the post-link code body 271 is a code obtained by performing a restoration process on the secret code portion (restoration target range) in the post-link secret code body 261.
  • the restoration process is a process for returning the secret code to the original code.
  • a post-link code body 271 shown in FIG. 13B is a code obtained by performing a restoration process on the restoration target range of the post-link concealment code body 261 shown in FIG. 13A, and the code “code1”, It consists of “reloc2”, “code3”, “reloc4”, “code5”, and “code6”.
  • the post-link code body 271 shown in FIG. 13 (b) has the secret codes “concealed1” and “concealed3” as the original codes “code1”, The difference is that “code3” is restored.
  • FIG. 14 is a flowchart showing the flow of processing by the code processing device 100 shown in FIG.
  • the secure input unit 110 inputs the pre-link protection code 210 and performs the protection release process on the pre-link protection code 210 to obtain the pre-link code 220 (step S101).
  • the determination unit 120 determines and determines the concealment target range of the pre-link code body 221 included in the pre-link code 220 based on the rearrangement information 222 included in the pre-link code 220 acquired in step S101.
  • the confidential control information 230 indicating the confidential target range is generated (step S102).
  • the determination unit 120 determines the concealment target range by excluding the rearrangement target area indicated by the rearrangement information 222 in the pre-link code body 221, so that the concealment process is performed on the concealment target range.
  • the linker 920 can perform the link processing.
  • the concealment unit 130 performs concealment processing on the concealment target range of the pre-link code main body 221 based on the concealment control information 230 generated in Step S102, and generates the pre-link concealment code 250 (Step S103). ).
  • the link command unit 140 instructs the linker 920 to perform a link process for the pre-link concealment code 250 generated in step S103, and causes the linker 920 to generate the post-link concealment code 260 (step S104).
  • the restoration code acquisition unit 170 based on the encryption control information 230 generated in step S102, the pre-link code 220 acquired in step S101.
  • a restoration code for restoring the concealed range of the post-link concealment code 260 is obtained, and the obtained restoration code and the position of the restoration target range are obtained.
  • the restored code information 240 shown is generated (step S105).
  • the restoration code acquisition unit 170 restores the original code in the concealment target range of the pre-link code body 221 from the pre-link code 220. Get as. Further, when the concealment target range of the pre-link code body 221 is concealed by encryption, the restoration code acquisition unit 170 decrypts the concealed range of the post-link concealment code body 261 included in the post-link concealment code 260. So get the recovery code. Note that the process of step S105 may be performed in parallel with the processes of step S103 and step S104, or may be performed in combination with the process of step S103 or step S104.
  • the restoration unit 150 restores the concealed range (restoration target range) of the post-link concealment code 260 generated by the linker 920 in step S104 based on the recovery code information 240 generated in step S105. Processing is performed to generate a post-link code 270 (step S106).
  • the secure output unit 160 performs protection processing on the post-link code 270 generated in step S106, and outputs the post-link protection code 280 (step S107). A series of processing by the code processing device 100 Ends.
  • the secure input unit 110 inputs the pre-link protection code 210 and performs protection release processing on the pre-link protection code 210.
  • the pre-link protection code 210 is generated by performing a protection process on the pre-link code 220, and a process for releasing the protection is a protection cancellation process.
  • the pre-link protection code 210 is the encrypted pre-link code 220
  • the protection cancellation process is a decryption process.
  • the secure input unit 110 reads the pre-link protection code 210 that is the encrypted pre-link code 220, and uses the encryption key held in the code processing device 100 to use the pre-link protection code 210. Is decoded to obtain the pre-link code 220.
  • the pre-link protection code 210 is stored in a file placed on the file system on which access control is performed.
  • the code before link 220, and the user of the code processing device 100 cannot directly access the file.
  • the secure input unit 110 reads the file using this authority to perform protection release processing, and link A front cord 220 can be obtained.
  • the operation of the code processing apparatus 100 with the authority that the user does not have can be performed by a currently widely known method. For example, in Linux (registered trademark), by using a mechanism called SUID, a user can execute a program with an authority different from the authority of the user himself / herself.
  • the pre-link code 220 acquired by the secure input unit 110 is held in a form that the user of the code processing device 100 cannot easily access. For example, if the file system is not stored in the file system as it is but is stored in the work main memory, the user of the code processing apparatus 100 cannot easily access it.
  • the determination unit 120 first determines a candidate for a concealment target range.
  • a candidate for a concealment target range In this example, only the code range (from address 100 to address 150) indicated by the symbol “symbol1” is set as a candidate for the concealment target range.
  • the determination unit 120 may protect the entire pre-link code body 221 as a candidate for a concealment target range or protect information such as information specifying a concealment target range candidate (such as developer A who developed the pre-link code 220). Based on the information given by the person who made the concealment, the candidate for the concealment target range may be determined.
  • the determination unit 120 determines the concealment target range from the concealment target range candidates.
  • the concealment target range is obtained by excluding the rearrangement target area where the rearrangement process is performed during the link process from the concealment target range candidates.
  • the reallocation target area can be specified based on the reallocation information 222 included in the pre-link code 220.
  • the rearrangement 1 indicated by the rearrangement command 224 of the rearrangement information 222 is a rearrangement command that rewrites the range of 4 bytes from the rearrangement target location 223, and the rearrangement 2 is the rearrangement target location. It is assumed that this is a relocation command that rewrites the range from 223 to 8 bytes.
  • a range from address 126 to address 130 shown as the rearrangement target location 223 corresponding to the rearrangement command 1 and a range from address 142 to 150 shown as the rearrangement location corresponding to the rearrangement command 2 Is identified as a rearrangement target area. Therefore, by excluding these rearrangement target areas from the range of addresses 100 to 150 which are candidates for the concealment target range, the ranges of address 100 to 126 and ranges from address 130 to 142 are: It is determined as a concealment target range.
  • the determination unit 120 generates confidential control information 230 indicating the determined confidential target range.
  • the concealment control information 230 represents the concealment target range as a relative address from the symbol “symbol1”. That is, the concealment target range is expressed from the 0th byte to the 26th byte and from the 30th byte to the 42nd byte starting from the symbol “symbol1”.
  • this representation method is merely an example, and the concealment target range may be expressed in the form of a size range from the 30th byte to the 12th byte starting from the symbol “symbol1” as in the example of FIG. 8B.
  • the concealment target range may be expressed using the address itself. In the example of FIG.
  • the confidential control information 230 further includes an encryption key in addition to the confidential target range. This indicates that encryption should be performed using the encryption key associated with the concealment target range. For example, it shows that the range from the 0th byte to the 26th byte of the symbol “symbol1” should be encrypted using the encryption key “73229432”.
  • the size of the rearrangement target area is determined using the rearrangement command 224 of the rearrangement information 222.
  • the size of the rearrangement target area is set.
  • the maximum value may be fixed, and for example, a range of 8 bytes from the position indicated by the relocation target location 223 may be uniformly specified as the relocation target region.
  • a range wider than the actual relocation target area for which the linker 920 performs the relocation process may be excluded from the concealment target range, but the relocation target area for which the linker 920 performs the relocation process is surely concealed. Since it is out of the target range, there is no problem in performing the link process.
  • step S102 by the determination unit 120 the relocation target area of the pre-link code body 221 is excluded from the concealment target range, thereby enabling the link process by the linker 920.
  • the determination unit 120 may appropriately perform a process of excluding the code from the concealment target range.
  • the concealment unit 130 performs concealment processing on the pre-link code body 221 based on the concealment control information 230.
  • a concealment target range of the pre-link code body 221 is concealed using a predetermined method or the concealment method indicated by the concealment control information 230.
  • the concealment unit 130 specifies the concealment target range of the pre-link code main body 221 based on the concealment control information 230 illustrated in FIG. That is, the concealment unit 130 identifies the range of the offset “0 bytes to 26 bytes” of the symbol “symbol 1” and the range of the offset “30 bytes to 42 bytes” of the symbol “symbol 1” as the concealment target range. Then, the concealment control unit 130 replaces the codes “code1” and “code3” in the concealment target range in the pre-link code main body 221 shown in FIG. The pre-link concealment code body 251 shown in 9 (b) is obtained.
  • the secret codes “concealed 1” and “concealed 3” are dummy codes.
  • the concealment control information 230 does not include information indicating the concealment method, and concealment processing using a predetermined method of replacement with a dummy code is performed.
  • the concealment unit 130 may perform the concealment process as follows based on the concealment control information 230 illustrated in FIG. That is, the concealment unit 130 reads the codes “code1” and “code3” in the concealment target range of the pre-link code body 221 shown in FIG. 9A, and uses these codes “code1” and “code3” as the corresponding encryption keys.
  • the secret codes “concealed1” and “concealed3” are obtained by encrypting with “73229432” and “30318776”, respectively.
  • the concealment unit 130 replaces the codes “code1” and “code3” in the concealment target range of the pre-link code body 221 with the concealment codes “concealed1” and “concealed3”, respectively, before the link shown in FIG. 9B.
  • a secret code body 251 is obtained.
  • the secret codes “concealed1” and “concealed3” are codes obtained by encrypting the original codes “code1” and “code3”.
  • the link command unit 140 instructs the linker 920 outside the code processing apparatus 100 to perform a link process for the pre-link concealment code 250 and acquires the post-link concealment code 260 from the linker 920 as the processing result.
  • the linker 920 performs the link process for the pre-link concealment code 250
  • a process for combining the unprotected pre-link code 930 shown in FIG. 1 may be performed if necessary.
  • the link command unit 140 may perform a part of link processing in order to assist the linker 920.
  • the pre-link concealment code 250 In order to perform the link process for the pre-link concealment code 250 using the linker 920 outside the code processing apparatus 100, it is necessary to write the pre-link concealment code 250 as a file and call the linker 920. Then, the post-link concealment code 260 can be obtained by waiting for the end of the processing of the linker 920 and reading the processing result file output by the linker 920. At this time, since the pre-link concealment code 250 is written out as a file and the post-link concealment code 260 is output as a file from the linker 920, the developer B who is a user can use the pre-link concealment code 250 or the post-link concealment code. Although the code 260 can be accessed, the pre-link concealment code 250 and the post-link concealment code 260 are codes subjected to the concealment process, so that the developer B cannot know the substance of the code.
  • the link command unit 140 and the external linker 920 do not need to perform the restoration process on the pre-link concealment code body 251 included in the pre-link concealment code 250.
  • the rearrangement information 222 referred to by the linker 920 that performs link processing and the rearrangement area in the pre-link concealment code body 251 are excluded from the concealment target range. Therefore, the link command unit 140 and the linker 920 do not need to perform the restoration process on the secret code body 251 for the link process.
  • the restoration code acquisition unit 170 performs processing for acquiring the restoration code for restoring the concealment target range concealed by the concealment unit 130 based on the concealment control information 230 and generating the restoration code information 240.
  • the restoration code acquisition unit 170 specifies the concealment target range of the pre-link code main body 221 included in the pre-link code 220 based on the concealment control information 230 illustrated in FIG.
  • the code (original code) in the concealment target range is acquired as a restoration code.
  • the identification of the concealment target range is performed in the same manner as the processing of the concealment unit 130 described above.
  • the code existing in the range of the offset “0 bytes to 26 bytes” of the symbol “symbol 1” is “code1”, and the offset “30” of the symbol “symbol 1”.
  • the code existing in the range of “byte to 42 bytes” is “code3”.
  • the restoration code acquisition unit 170 acquires “code1” and “code3” of the pre-link code body 221 shown in FIG. 9A as a restoration code, and uses the obtained restoration code as the head position (“ In the case of “code1”, the offset “0 byte” of “symbol1” is associated with the offset “30 bytes” of “symbol1” in the case of “code3”, and the restoration code information 240 is generated.
  • the restoration code acquisition unit 170 may generate the restoration code information 240 as follows based on the confidential control information 230 illustrated in FIG. That is, the restoration code acquisition unit 170 specifies the concealed range of the post-link concealment code body 261 included in the post-link concealment code 260 based on the concealment control information 230 illustrated in FIG. A secret range code of the code body 261 is acquired.
  • the code existing in the range of the offset “0 byte” to the size “26 bytes” of the symbol “symbol 1” is “concealed 1”, and the symbol “symbol 1”.
  • the code existing in the range from the offset “30 bytes” to the size “12 bytes” is “concealed3”. Therefore, the restoration code acquisition unit 170 acquires “concealed1” and “concealed3” of the post-link secret code body 261 shown in FIG. “Concealed1” is a code obtained by encrypting “code1” using the encryption key “73229432” by the concealment unit 130, and “concealed3” encrypts “code3” using the encryption key “30318776”. Code Therefore, the restoration code acquisition unit 170 acquires “code1” and “code3” as restoration codes by decrypting “concealed1” and “concealed3” using these encryption keys included in the confidentiality control information 230, respectively.
  • the restoration code acquisition unit 170 converts these restoration codes to the beginning position of the restoration target range (in the case of “code1”, the offset “0 byte” of “symbol1”, in the case of “code3”, the offset “30” of “symbol1”).
  • the restoration code information 240 is generated in association with “byte”).
  • step S106 performed by the restoration unit 150 Based on the restoration code information 240, the restoration unit 150 performs restoration by overwriting the secret code included in the post-link secret code body 261 of the post-link secret code 260 with the restoration code, and generates a post-link code 270.
  • the restoration unit 150 identifies the range to be restored in the post-link concealment code body 261, that is, the start position of the concealment range of the post-link concealment code body 261 from the symbol “symbol1” and the offset “0 byte”. .
  • the start position of the restoration target range is address 200.
  • the map file is information including the address where the code corresponding to a certain symbol is arranged after the link processing.
  • the restoration unit 150 overwrites the restoration code “code1” from the address 200 of the post-link concealment code main body 261 shown in FIG.
  • the secret code “concealed1” is stored from the address 200 to the address 226 of the post-link secret code body 261 shown in FIG. 13B, but the restoration unit 150 overwrites the restoration code “code1”, It is restored to the code “code1”.
  • the restoration unit 150 performs the same processing based on the second line (symbol “symbol1”, offset “30 bytes”, restoration code “code3”) of the restoration code information 240 illustrated in FIG.
  • the post-link cord body 271 shown in FIG. 13B can be obtained.
  • the post-link code 270 generated by the restoration process of the restoration unit 150 is held so that the user of the code processing device 100 cannot easily access, similarly to the pre-link code 220.
  • the post-link code 270 including the post-link code main body 271 shown in FIG. 13B is a code that functions normally as a result of restoring the secret codes “concealed1” and “concealed3” to “code1” and “code3”, respectively. It has become.
  • the secure output unit 160 performs protection processing on the post-link code 270 and outputs the post-link protection code 280.
  • the protection process performed by the secure output unit 160 on the post-link code 270 is the same as the protection process performed on the pre-link code 220 by the code protection device 810 of the computer 800.
  • encryption processing and access control are set. Or the like can be used.
  • the process described above is conceptual, and various changes can be made, for example, a plurality of processes are integrated. is there.
  • the restoration code information 240 may be generated as the processing of the restoration code acquisition unit 170, or the restoration unit 150 is integrated with the restoration code acquisition unit 170 to link
  • the post-link code 270 may be generated by decoding the post-secret code 260 to obtain the restored code information 240 and simultaneously overwriting the decoding result.
  • the developer A discloses the entity of the pre-link code 220 to the developer B (user of the code processing device 100).
  • the developer B can perform link processing using the general-purpose linker 920 without performing special processing such as code restoration processing in the link processing.
  • the restoration code information 240 may be encrypted and included in the pre-link concealment code 250.
  • a method of including the restoration code information 240 in the pre-link concealment code 250 for example, there is a method of compressing and encrypting the restoration code and adding it to a section different from the section storing the pre-link concealment code body 251.
  • the pre-link code 220 and the restoration code information 240 may be further encrypted so that the user of the code processing apparatus 100 cannot easily know the contents.
  • the encrypted pre-link code 200 and restoration code information 240 may be stored without protection on a location accessible by the user of the code processing apparatus 100, for example, on a file system of a hard disk.
  • FIG. 15 is a diagram showing a specific example of the confidential control information 230 when a tag is used for associating code positions.
  • FIG. 16 is a diagram showing a specific example of the pre-link code body 221 and the pre-link secret code body 251 when a tag is used for associating code positions, where (a) shows the pre-link code body 221 and (b ) Respectively indicate the pre-link concealment code main body 251.
  • the tag is information used for identification, and is small information that can be held as part of the code.
  • the determination unit 120 generates confidential control information 230 as illustrated in FIG. In the concealment control information 230 shown in FIG. 15, no symbols are included, and the start address and size of the concealment target range and tags are held in association with each other. The determination unit 120 determines the tag value so that the value does not coincide with other tags and codes as much as possible by, for example, random number generation.
  • the concealment unit 130 performs processing to replace the code in the concealment target range of the pre-link code main body 221 with a tag and a dummy code based on the concealment control information 230.
  • the code “code1” in the concealment target range in the pre-link code body 221 is replaced with the tag “39461278” and the dummy code “dummy1”, and the code “code3” in the concealment target range in the pre-link code body 221.
  • the pre-link concealment code body 251 is generated.
  • the size of the tag is 4 bytes
  • the range from the 100th address to the 104th address is replaced with the tag “39461278”
  • the range from the 104th address to the 126th address is replaced with the dummy code “dummy1”.
  • the range from address 130 to address 134 is replaced with a tag “47291023”
  • the range from address 134 to address 142 is replaced with a dummy code “dummy3”.
  • the linker 920 may rewrite the codes “code2” and “code4” in the pre-link concealment code main body 251 by the rearrangement process, but does not rewrite the tag and the dummy code portion. Accordingly, the tag remains in the post-link concealment code body 261 as it is.
  • the restoration unit 150 refers to a tag (for example, “39461278”) of the cipher control information 230, searches for a code position that matches the tag in the post-link cipher code body 261, and overwrites the restoration code from that position. By performing the above, the concealed range of the post-link concealment code body 261 can be restored.
  • the rearrangement target area of the pre-link code body 221 is outside the concealment target range.
  • the linker 920 can process the area to be rearranged without restoring the area to be concealed by performing the concealment process using a specific method even in the area to be relocated. May be included.
  • FIG. 17 is a diagram showing a specific example of the rearrangement information 222 in the ELF object format targeting the x86 processor.
  • the rearrangement information 222 is information in which the rearrangement target location 223, the rearrangement type 225, and the rearrangement symbol 226 are associated with each other.
  • the rearrangement type 225 is a type that specifies the type of calculation to be performed when the linker 920 performs the rearrangement process.
  • the rearrangement symbol 226 is a symbol used for calculation of rearrangement.
  • the linker 920 uses the value indicated by the relocation target location 223 and the address of the relocation symbol 226 to perform calculation using a calculation formula corresponding to the relocation type 225, and the original value existing at the relocation target location 223. Is rearranged into the calculation result. For example, when the rearrangement type 225 is “R_386_32”, a calculation formula is used in which the address of the rearrangement symbol 226 is added to the value indicated by the rearrangement target location 223. As in this example, when it is found that the linker 920 performs only addition / subtraction of values to / from the rearrangement target area, the rearrangement target area can be concealed by addition / subtraction secrecy.
  • Addition / subtraction concealment is a method of performing concealment and restoration by adding a certain value at the time of concealment and subtracting the value at the time of restoration.
  • addition / subtraction concealment conceals and restores a rearrangement target region by addition / subtraction concealment.
  • FIG. 18 is a diagram illustrating a specific example of calculation when addition / subtraction concealment is applied.
  • the concealment unit 120 adds a concealment value “49418638” to the value “100” of the relocation target area of the pre-link code main body 221, thereby The value “49418738” is obtained.
  • the linker 920 obtains a concealed value “49458738” after adding the value “40000” to the concealed relocation target area value “49418738”.
  • the restoration unit 150 subtracts the concealed value “49418638” from the concealed post-relocation value “49458738” to obtain the reconstructed post-relocation value “40100”. This matches the value obtained by adding the value “40000” in the link process to the original value “100” of the relocation target area.
  • FIG. 19 is a diagram illustrating a specific example of the secret control information 230 including information in which a secret scheme and a secret key are associated with each secret target range.
  • concealment processing is performed by addition / subtraction concealment using the value “49418638” for the concealment target range from the symbol “symbol1” to the offset “26 bytes” and the size “4 bytes”. It has been shown that.
  • the determination unit 120 refers to the rearrangement type 225 in the rearrangement information 222 illustrated in FIG. 17, determines whether or not the processing by the linker 920 performs normal operation even if addition / subtraction concealment is performed, and sets the rearrangement target region as the rearrangement target region. On the other hand, it is determined whether or not to perform a concealment process by addition / subtraction concealment. Specifically, the determination unit 120 may use a method such as determining a concealment method according to the rearrangement type with reference to the concealment method table 290 as illustrated in FIG. For example, with reference to the concealment method table 290 shown in FIG.
  • the determination unit 120 determines that addition / subtraction concealment is used for the rearrangement target area processed by the rearrangement type “R_386_32”, and FIG. Concealment indicating that concealment processing is performed by addition / subtraction concealment using the value “49418638” for the concealment target range having the offset “26 bytes” and the size “4 bytes” from the symbol “symbol1” as shown in the example Control information 230 is generated.
  • FIG. 21 is a block diagram illustrating a configuration example of the program development system according to the second embodiment.
  • the program development system of the second embodiment includes a computer 850 used by developer A and a computer 950 used by developer B, as shown in FIG.
  • Developer A and developer B are developers who cooperate to develop a computer program.
  • Developer A uses computer 850 to develop program code.
  • Developer B uses computer 950 to develop executable program code based on the program code developed by developer A.
  • the computer 850 used by the developer A includes a code concealment device 860 and a code output device 870.
  • the code concealment device 860 performs concealment processing on the pre-link code 220, and generates the pre-link concealment code 250 and protected restoration code information 310. Details of the code concealment device 860 will be described later.
  • the code output device 870 outputs the pre-link concealment code 250 generated by the code concealment device 860 and the protected restoration code information 310.
  • the output is a process of extracting the pre-link concealment code 250 and the protected restoration code information 310 from the computer 850 so that the computer 950 can use them, as in the first embodiment.
  • the computer 950 used by the developer B includes a code input device 960, a linker 920, and the code processing device 300 of the second embodiment.
  • the code input device 960 inputs the pre-link concealment code 250 output from the code output device 870 and the protected restoration code information 310.
  • the input is a process of making the pre-link concealment code 250 and the protected restoration code information 310 output from the code output device 870 available to the computer 950, as in the first embodiment.
  • the code processing apparatus 300 generates a post-link protection code 280 from the pre-link concealment code 250 and the protected restoration code information 310 input by the code input apparatus 960 in cooperation with the external linker 920. Details of the code processing device 300 will be described later.
  • the protected restoration code information 310 is information obtained by performing a protection process on the restoration code information 240 described in the first embodiment.
  • the protected restoration code information 310 does not have to be integral information, and may be a collection of a plurality of protected information.
  • FIG. 22 is a flowchart showing the flow of processing by the program development system shown in FIG.
  • the computer 850 of the developer A performs the processing of step S21 and step S22 according to the operation by the developer A.
  • the computer 950 of the developer B performs the processes of step S23 and step S24 according to the operation of the developer B.
  • step S21 the code concealment device 860 of the computer 850 performs a concealment process on the pre-link code 220, and generates the pre-link concealment code 250 and the protected restoration code information 310.
  • the pre-link concealment code 250 has a format that can be linked by the linker 920 of the computer 950.
  • step S22 the code output device 870 of the computer 850 outputs the pre-link concealment code 250 and the protected restoration code information 310 so that the computer 950 can use them.
  • step S23 the code input device 960 of the computer 950 inputs the pre-link concealment code 250 output from the computer 850 and the protected restoration code information 310.
  • step S24 the code processing device 300 of the computer 950 uses the linker 920 to generate the post-link protection code 260 from the pre-link concealment code 250 and the protected restoration code information 310. Specifically, the code processing device 300 performs protection release processing on the protected restoration code information 310 input by the code input device 960 to generate the restoration code information 240, and the code input device 960 inputs the code.
  • the pre-link concealment code 250 is designated, and the linker 920 is instructed to process the pre-link concealment code 250.
  • the linker 920 links the pre-link concealment code 250 and the unprotected pre-link code 930 developed by the developer B to generate a post-link concealment code 260. Note that it is not essential to link the unprotected code before link 930.
  • the code processing device 300 restores the post-link concealment code 260 using the restoration code information 240, performs protection processing, and outputs the post-link protection code 280.
  • FIG. 23 is a block diagram illustrating a configuration example of the code concealment device 860.
  • the code concealment device 860 includes a first secure input unit 111, a determination unit 120, a concealment unit 130, a first secure output unit 161, and a restoration code acquisition unit 170.
  • the first secure input unit 111 inputs the pre-link code 220. Similar to the secure input unit 110 included in the code processing device 100 of the first embodiment, the first secure input unit 111 is configured to input the pre-link protection code 220, perform protection release processing, and acquire the pre-link code 220. It may be.
  • the determination unit 120, the concealment unit 130, and the restoration code acquisition unit 170 are the same as the determination unit 120, the concealment unit 130, and the restoration code acquisition unit 170 included in the code processing device 100 of the first embodiment.
  • the first secure output unit 161 generates and outputs the restored code information 310 protected by performing a protection process on the restored code information 240 generated by the restored code acquisition unit 170.
  • the first secure input unit 111 inputs the pre-link code 220.
  • the determination unit 120 determines the concealment target range of the pre-link code main body 221 based on the rearrangement information 222 included in the pre-link code 220 and generates the concealment control information 230.
  • the concealment unit 130 performs concealment processing on the concealment target range of the pre-link code main body 221 based on the concealment control information 230 to generate the pre-link concealment code 250.
  • the restoration code acquisition unit 170 acquires a restoration code based on the confidentiality control information, and generates restoration code information 240.
  • the first secure output unit 161 performs protection processing on the restoration code information 240 and outputs the protected restoration code information 310.
  • FIG. 24 is a block diagram illustrating a configuration example of the code processing device 300 according to the second embodiment.
  • the code processing device 300 according to the second embodiment includes a second secure input unit 112, a link command unit 140, a restoration unit 150, and a second secure output unit 162.
  • the second secure input unit 112 receives the protected restoration code information 310, performs protection release processing, and obtains the restoration code information 240.
  • the link command unit 140 and the restoration unit 150 are the same as the link command unit 140 and the restoration unit 150 included in the code processing device 100 of the first embodiment.
  • the second secure output unit 162 performs the protection process on the post-link code 270 and outputs the post-link protection code 280, similarly to the secure output unit 160 included in the code processing device 100 of the first embodiment.
  • the second secure input unit 112 receives the protected restoration information 310, performs protection cancellation processing, and acquires the restoration code information 240.
  • the link command unit 140 instructs the external linker 920 to perform a link process for the pre-link concealment code 250 to generate the post-link concealment code 260.
  • the restoration unit 150 restores the concealed range of the post-link concealment code 260 based on the restoration code information 240 and generates the post-link code 270.
  • the second secure output unit 162 performs protection processing on the post-link code 270 and outputs a post-link protection code 280.
  • the computer 950 used by the developer B inputs the pre-link concealment code 250 and the restoration code information 310, and the developer B uses the entity of the pre-link code 220. I can't know. Further, the developer B can link-process the pre-link concealment code 250 provided by the developer A using the code processing device 300 and the linker 920. Therefore, according to the second embodiment, as in the first embodiment, the developer A does not disclose the substance of the pre-link code 220 to the developer B (the user of the code processing device 300), and the link is made. The developer B can be made to perform a link process using the general-purpose linker 920 without performing a special process such as a code restoration process in the process.
  • the input to the code processing device 100 is the one that protects the normal pre-link code 220 (pre-link protection code 210), and the output of the code processing device 100 outputs the post-link code 270. It was what was protected (post-link protection code 280).
  • the code processing device can input and output fat binary code.
  • the outline of the program development system of the third embodiment is the same as that of the program development system of the first embodiment shown in FIG.
  • the computer 900 used by the developer B replaces the code processing device 100 of the first embodiment with the code processing device 600 (see FIG. 25) of the third embodiment. I have.
  • the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted as appropriate.
  • FIG. 25 is a block diagram illustrating a configuration example of the code processing device 600 according to the third embodiment.
  • the code processing device 600 according to the third embodiment includes a secure input unit 610, a dividing unit 620, a determining unit 120, a concealing unit 130, a link command unit 140, and a restoration code acquisition unit 170.
  • the secure input unit 610 inputs the pre-link protection fat code 650 obtained by performing the protection process on the pre-link fat code 660, performs the protection release process, and acquires the pre-link fat code 660.
  • the separation unit 620 separates the pre-link fat code 660 into a plurality of pre-link codes 220.
  • the determination unit 120, the concealment unit 130, the link command unit 140, the restoration code acquisition unit 170, and the restoration unit 150 are the determination unit 120, the concealment unit 130, the link command unit 140, the restoration included in the code processing device 100 of the first embodiment. This is the same as the code acquisition unit 170 and the restoration unit 150.
  • the determination unit 120 of the third embodiment determines the concealment target range of the pre-link code body 221 for each of the plurality of pre-link codes 220 separated by the separation unit 620, and the plurality of pre-link code bodies 221.
  • the secret control information 235 indicating the secret target range is generated.
  • the concealment unit 130, the link command unit 140, the restoration code acquisition unit 170, and the restoration unit 150 of the third embodiment are the same as those in the first embodiment for each of the plurality of pre-link codes 220 divided by the division unit 620. Perform the process described.
  • the combining unit 630 combines a plurality of post-link codes 270 generated by the restoration process by the restoration unit 150 to generate a post-link fat code 670.
  • the secure output unit 640 generates and outputs a post-link protection fat code 680 by performing a protection process on the post-link fat code 670.
  • the pre-link fat code 660 is a code in which the pre-link code 220 is stored in the fat binary format.
  • the fat binary format is a format in which codes for a plurality of computer architectures are collectively stored, and for example, Mac OS X (registered trademark of Apple Inc.) universal binary is known.
  • FIG. 26 is a diagram illustrating a specific example of the pre-link fat code 660.
  • the pre-link fat code 660 shown in FIG. 26 holds the pre-link code 220 for a plurality of computer architectures in association with the architecture 661, respectively.
  • the post-link fat code 670 is a code in which the post-link code 270 is stored in the fat binary format.
  • FIG. 27 is a diagram illustrating a specific example of the post-link fat code 670.
  • the post-link fat code 670 shown in FIG. 27 holds post-link codes 270 for a plurality of computer architectures in association with the architecture 661, respectively.
  • the pre-link protection fat code 650 is a code generated by performing protection processing on the pre-link fat code 660.
  • the post-link protection fat code 680 is a post-link fat code 670 that has been subjected to protection processing.
  • the concealment control information 235 is information indicating the concealment target range determined by the determination unit 120 for each of the plurality of pre-link codes 220 separated by the separation unit 620 in association with the architecture 661 of each pre-link code 220. is there.
  • FIG. 28 is a diagram illustrating a specific example of the confidential control information 235.
  • the secret control information 235 shown in FIG. 28 is the range of the offset “0 to 26 bytes” from the position of the symbol “symbol1” of the prelink main body 221 for the prelink code 220 for the architecture “x86”.
  • the range of offset “30 bytes to 42 bytes” is a concealment target range
  • the pre-link code 220 for the architecture “ARM” is calculated from the position of the symbol “symbol 1” of the pre-link code body 221;
  • the range of the offset “0 bytes to 20 bytes” and the range of the offset “28 bytes to 40 bytes” indicate that the range to be concealed.
  • the pre-link code 220 may have the same concealment target range or may differ depending on the architecture.
  • FIG. 29 is a flowchart showing a flow of processing by the code processing device 600 shown in FIG.
  • the secure input unit 610 receives the pre-link protection fat code 650, and acquires the pre-link fat code 660 by performing protection release processing on the pre-link protection fat code 650 (step S301).
  • the separation unit 620 separates the pre-link fat code 660 acquired in step S301 into a plurality of pre-link codes 220 for each architecture. Separation is a process in which each of a plurality of combined codes can be processed independently as a single code. This separation process can be realized by analyzing the structure of the pre-link fat code 660 illustrated in FIG. 26 and extracting each pre-link code 220 for each architecture. As a tool for performing separation processing, for example, a lipo command of a development tool for Mac OS X (registered trademark) is known.
  • the pre-link fat code 660 and the pre-link code 220 must not be known to the user (developer B) of the code processing device 600, separation processing cannot be performed by a device outside the code processing device 600. .
  • the separation process does not necessarily require the code to be clearly separated as information. For example, specifying the start position and the end position in the fat code so that only the code in the range can be handled independently in the subsequent processing is regarded as separation processing.
  • Step S307 is repeatedly performed. Since the processing from step S303 to step S307 is the same as the processing from step S102 to step S106 of FIG. 14 described in the first embodiment, description thereof is omitted here. However, in step S303, the information on the architecture corresponding to the code currently processed by the determination unit 120 is included in the confidential control information 235 so that the code of another architecture is not erroneously processed. However, this is different from the first embodiment.
  • the combining unit 630 combines the plurality of post-link codes 270 generated for each architecture through the above repeated processing, and generates a post-link fat code 670 (step S308).
  • This combining process can be realized by creating the data structure of the post-link fat code 670 illustrated in FIG. 27 and inserting each post-link code 270 for each architecture therein.
  • a lipo command of a development tool for Mac OS X registered trademark is known as in the separation process.
  • the secure output unit 640 performs protection processing on the post-link fat code 670 generated in step S308 and outputs the post-link protection fat code 680 (step S309). This process ends.
  • the code processing device 600 of the third embodiment performs separation processing and combining processing inside the device, it can input and output fat binary format codes while concealing the codes.
  • the linker 920 performs processing on the pre-link concealment code 250 that is not in the fat binary format, but it is also possible to cause the linker 920 to process a code in the fat binary format.
  • the combining unit 630 generates a pre-link concealment fat code by combining a plurality of pre-link concealment codes 250 for each architecture, and outputs it.
  • the linker 920 processes the pre-link concealed fat code and generates a post-link concealed fat code.
  • the restoration unit 150 generates the post-link fat code 670 by restoring the pre-link secret fat code.
  • the code processing device 600 inputs the pre-link protection fat code 650 and outputs the post-link protection fat code 680, but one of the inputs and outputs is a code that is not in the fat binary format. Is also possible. That is, the code processing device 600 inputs the pre-link protection code 210 that is not the fat binary format and outputs the post-link protection fat code 680, or inputs the pre-link protection fat code 650 and outputs the post-link protection code 280. It is also possible to do.
  • Modification 3 In the third embodiment described above, the processing for the fat binary format code in which a plurality of architecture codes are collected has been described. As a mechanism similar to a fat binary code, it is common to provide codes stored in a plurality of files by combining them into a single file as library code.
  • the code processing apparatus 600 of the third embodiment can be applied as a form in which such library code can be input / output.
  • the secure input unit 610 reads the protected library code
  • the dividing unit 620 extracts the code from the library code, and performs subsequent processing.
  • the library code instead of the pre-link fat code 660 illustrated in FIG. 26 and the architecture 661 of the post-link fat code 670 illustrated in FIG. 27, the library code has a file name as information, thereby identifying each code.
  • the combining unit 630 can combine the plurality of pre-link concealment codes 250 into the pre-link concealment library code and cause the linker 920 to process them.
  • the code processing device 100 can be provided as a program executed by the computer 900 used by the developer B as an example. That is, when the computer 900 used by the developer B executes this program, each functional configuration (secure input unit 110, determination unit 120, concealment unit 130, link command unit) provided in the code processing device 100 of the first embodiment is provided. 140, a restoration unit 150, a secure output unit 160, and a restoration code acquisition unit 170).
  • the above-described code processing device 300 according to the second embodiment can be provided as a program executed by the computer 950 used by the developer B as an example. That is, when the computer 950 used by the developer B executes this program, each functional configuration (second secure input unit 112, link command unit 140, restoration unit 150, And the second secure output unit 162) can be realized.
  • the above-described code processing apparatus 600 according to the third embodiment can be provided as a program executed by the computer 900 used by the developer B as an example. That is, when the computer 900 used by the developer B executes this program, each functional configuration (secure input unit 610, separation unit 620, determination unit 120, and concealment unit 130) included in the code processing device 600 of the third embodiment. , Link command unit 140, restoration code acquisition unit 170, restoration unit 150, combination unit 630, and secure output unit 640) can be realized.
  • a program for realizing the functional configuration of the above-described code processing devices 100, 300, and 600 is, for example, a CD-ROM, a flexible disk (FD), a CD-R, a DVD (Digital) in an installable or executable file.
  • the program is recorded on a computer-readable recording medium such as Versatile Disk).
  • the program that realizes the functional configuration of the above-described code processing devices 100, 300, and 600 may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. Good. Further, a program that realizes the functional configuration of the above-described code processing devices 100, 300, and 600 may be configured to be provided or distributed via a network such as the Internet. Furthermore, a program that realizes the functional configuration of the above-described code processing devices 100, 300, and 600 may be provided by being incorporated in advance in a ROM or the like.
  • the program that realizes the functional configuration of the above-described code processing devices 100, 300, and 600 has a module configuration that includes components corresponding to each functional configuration, and the actual hardware includes a CPU (processor) of the computers 900 and 950. ) Reads out the program from the storage medium and executes it, the components are loaded onto the main storage device, and the functional configurations of the code processing devices 100, 300, and 600 are generated on the main storage device. ing.
  • code processing apparatuses 100, 300, and 600 are realized by using dedicated hardware such as ASIC (Application Specific Integrated Circuit) and FPGA (Field-Programmable Gate Array). It is also possible.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array

Landscapes

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

Abstract

 実施形態のコード処理装置(100)は、決定部(120)と、秘匿部(130)と、リンク指令部(140)と、復元部(150)と、を備える。決定部(120)は、コード本体と再配置情報とを含むリンク前コード(220)の再配置情報に基づいて、リンク前コード(220)の秘匿対象範囲を決定する。秘匿部(130)は、リンク前コード220の秘匿対象範囲を秘匿してリンク前秘匿コード(250)を生成する。リンク指令部(140)は、リンカ(920)に対して、リンク前秘匿コード(250)に対する処理を指令する。復元部(150)は、リンカ(920)がリンク前秘匿コード(250)を処理することで生成されるリンク後秘匿コード(260)の秘匿された範囲を復元し、リンク後コード(270)を生成する。

Description

コード処理装置およびプログラム
 本発明の実施形態は、コード処理装置およびプログラムに関する。
 複数のプログラム開発者が連携してコンピュータプログラムを開発する際に、あるプログラム開発者が開発したプログラムコードを、秘匿した状態で他のプログラム開発者に提供することが望まれる場合がある。例えば、プログラム開発者Aが、プログラム開発者Bに、開発の一部を委託する場合を考える。このとき、開発者Aは、自身が開発したプログラムコードを開発者Bに提供する必要があるが、開発者Aは、開発ノウハウやプログラムコードに含まれる機密情報などを開発者Bに知らせたくない場合がある。
 プログラムコードを秘匿した状態で提供する方法としては、例えば、プログラムコードを暗号化して提供することが考えられる。しかし、提供されたプログラムコードに対して開発者Bが汎用のリンカを用いて処理を行う場合、汎用のリンカは暗号化されたプログラムコードをそのまま処理することができないため、暗号化されたプログラムコードを一時的に復号してからリンカへの入力とする必要がある。この場合、一時的に復号することにより、開発者Bがプログラムコードの実体を知ることができてしまうため、目的を達成できない。また、別の解決方法としては、開発者Bが、暗号化されたファイルを受け付け可能な特殊なリンカを用いて、開発者Aが開発して暗号化したプログラムコードを処理する方法が考えられる。しかし、この場合は、リンカ自体に手を加えなければならないため、そのための開発の手間が生じるという問題があり、さらには特殊なリンカを使用できない環境では受け入れられないという問題がある。
特許第4147472号公報 特許第3033562号公報 特開2010-231477号公報
 本発明が解決しようとする課題は、プログラムコードを秘匿しつつ汎用のリンカで処理できるようにするコード処理装置およびプログラムを提供することである。
 実施形態のコード処理装置は、決定部と、秘匿部と、指令部と、復元部と、を備える。決定部は、コード本体と、リンカによって再配置されるコード本体の範囲を示す再配置情報と、を含む第1コードデータの前記再配置情報に基づいて、再配置される範囲以外の少なくとも一部を含む第1の範囲を決定する。秘匿部は、前記第1の範囲を秘匿する。指令部は、前記リンカに対して、前記第1の範囲が秘匿された前記第1コードデータに対する処理を指令する。復元部は、前記リンカが前記第1コードデータを処理することで生成される第2コードデータに含まれる前記秘匿された範囲を復元する。
第1実施形態のプログラム開発システムの構成例を示すブロック図。 プログラム開発システムによる処理の流れを示すフローチャート。 第1実施形態のコード処理装置の構成例を示すブロック図。 リンク前コードおよびリンク前秘匿コードを説明する図。 参考文献で開示されたリンク前コードのデータ構造を説明する図。 セクション情報の一例を示す図。 シンボル情報の一例を示す図。 秘匿制御情報の具体例を示す図。 リンク前コード本体とリンク前秘匿コード本体の具体例を示す図。 復元コード情報の具体例を示す図。 リンク後秘匿コードおよびリンク後コードを説明する図。 参考文献で開示されたリンク後コードのデータ構造を説明する図。 リンク後秘匿コード本体とリンク後コード本体の具体例を示す図。 コード処理装置による処理の流れを示すフローチャート。 秘匿制御情報の具体例を示す図。 リンク前コード本体とリンク前秘匿コード本体の具体例を示す図。 再配置情報の具体例を示す図。 加減算秘匿を適用した場合の計算の具体例を説明する図。 秘匿制御情報の具体例を示す図。 秘匿方式表の具体例を示す図。 第2実施形態のプログラム開発システムの構成例を示すブロック図。 プログラム開発システムによる処理の流れを示すフローチャート。 コード秘匿装置の構成例を示すブロック図。 第2実施形態のコード処理装置の構成例を示すブロック図。 第3実施形態のコード処理装置の構成例を示すブロック図。 リンク前fatコードの具体例を示す図。 リンク後fatコードの具体例を示す図。 秘匿制御情報の具体例を示す図。 コード処理装置による処理の流れを示すフローチャート。
 実施形態のコード処理装置は、第1コードデータを秘匿しつつ、外部のリンカに処理させて第2コードデータを得るための装置である。実施形態のコード処理装置は、例えば、保護された第1コードデータを入力し、保護を解除した第1コードデータの一部の範囲を秘匿した状態で外部のリンカに処理させる。そして、実施形態のコード処理装置は、外部のリンカが第1コードデータを処理することで得られる第2コードデータの秘匿された範囲を復元し、復元した第2コードデータ保護した状態で出力する。実施形態のコード処理装置は、例えば、開発者Aと開発者Bとが連携してコンピュータプログラムを開発する場合において、開発者Aが開発したプログラムコードである第1コードデータを、その実体を開示することなく開発者Bに提供し、開発者Bが汎用のリンカを用いて第1コードデータを処理して第2コードデータを生成することを可能にする。以下では、第1コードデータを「リンク前コード」、保護された第1コードデータを「リンク前保護コード」、一部の範囲が秘匿された第1コードデータを「リンク前秘匿コード」、外部のリンカから得られる第2コードデータを「リンク後秘匿コード」、秘匿された範囲が復元された第2コードデータを「リンク後コード」、保護された第2コードデータを「リンク後保護コード」、秘匿範囲箇所の平文コードを「元コード」とそれぞれ表記する。
(第1実施形態)
 図1は、第1実施形態のプログラム開発システムの構成例を示すブロック図である。第1実施形態のプログラム開発システムは、図1に示すように、開発者Aが使用するコンピュータ800と、開発者Bが使用するコンピュータ900とを備える。開発者Aと開発者Bは、連携してコンピュータプログラムを開発する開発者である。開発者Aは、コンピュータ800を使用してプログラムコードの開発を行う。開発者Bは、コンピュータ900を使用して、開発者Aが開発したプログラムコードをもとに、実行可能なプログラムコードの開発を行う。
 開発者Aが使用するコンピュータ800は、コード保護装置810と、コード出力装置820と、を備える。
 コード保護装置810は、開発者Aが開発したリンク前コード220に対して保護処理を行うことにより、リンク前保護コード210を生成する。保護処理とは、プログラムコードの実体を容易に知ることができないようにする処理である。保護処理としては、例えば、プログラムコード自体を暗号化することで、開発者Bがプログラムコードの実体を知ることができないようにする処理が挙げられる。また、保護処理は、開発者Bが直接アクセスできないように、プログラムコードを含むファイルに対してアクセス制御を設定する処理(プログラムコード自体を変更しない処理)であってもよい。また、保護処理は、開発者Aが開発者Bに知られてはならないと判断した部分のみを保護するものであってもよい。
 コード出力装置820は、コード保護装置810により生成されたリンク前保護コード210を出力する。ここで出力とは、リンク前保護コード210をコンピュータ900で利用できるようにコンピュータ800から取り出す処理である。出力は、例えば、コンピュータネットワークを介した電子メールでの送信であってもよいし、コンピュータネットワーク上のファイルサーバを介した転送やネットワークファイルシステムを通じて共有されたコンピュータ間でのファイル転送などであってもよい。また、出力は、コンピュータネットワークを介さない取り外し可能な記憶媒体への保存であってもよい。
 開発者Bが使用するコンピュータ900は、コード入力装置910と、リンカ920と、第1実施形態のコード処理装置100と、を備える。
 コード入力装置910は、コード出力装置820が出力したリンク前保護コード210を入力する。ここで入力とは、コード出力装置820が出力したリンク前保護コード210をコンピュータ900において利用可能にする処理である。入力は、前述の出力に対応する処理であり、例えば、電子メールの受信やファイルサーバを介したファイルの受信、取り外し可能な記憶媒体からの読み出しなどである。
 コード処理装置100は、外部のリンカ920と連携して、コード入力装置910が入力したリンク前保護コード210からリンク後保護コード280を生成する。コード処理装置100の詳細は後述する。
 リンカ920は、プログラムコードを実行可能な状態にするための変換を行う。例えば、リンカ920は、1つまたは複数のプログラムコードを処理し、プログラムコードが複数ある場合はそれらを結合し、1つの実行可能なプログラムコードを生成する。以下、リンカ920が行う処理をリンク処理と呼ぶ。図1においては、リンカ920が、リンク前秘匿コード250と保護対象外リンク前コード930とをリンク処理し、リンク後秘匿コード260を出力する例を示している。リンク処理においては、リンカ920は、プログラムコードを結合した後に正常に動作させることを目的に、プログラムコードの一部を書き換えることがある。例えば、プログラムコードには位置を特定するために番地(アドレス)が付されていることがあるが、リンク処理の前後でその番地が変わることがある。この場合、リンカ920は、番地が変わることによってプログラムコードの動作に支障が起きないよう、プログラムコード内で用いられている番地を変更する処理を行う。このような処理は再配置処理と呼ばれる。
 リンカ920は、一般的なプログラム開発に用いられる汎用のリンカであればよい。一般的なプログラム開発に用いられる汎用のリンカとしては、例えば、Linux(Linus Torvaldsの登録商標)上のソフトウェア開発ではGNU ld、Windows(Microsoft Corporationの登録商標)上のソフトウェア開発ではLINK.exeなどがよく知られており、これらをリンカ920として利用することができる。
 リンク前コード220は、開発者Aが開発したプログラムコードであり、リンカ920によるリンク処理の対象となりうるプログラムコードである。プログラムコードとは、コンピュータに処理を行わせるための指令や、関連するデータなどを含む情報である。プログラムコードは、x86などのプロセッサキテクチャで実行される機械語コードであってもよいし、Java(Oracle Corporationの登録商標)バイトコードのような中間言語や、JavaScript(Oracle Corporationの登録商標)のようなスクリプト言語のコードであってもよい。リンク処理によって生成されたプログラムコードをリンク後コードと呼ぶ。
 リンク前保護コード210は、リンク前コード220に対してコード保護装置810が保護処理を行うことで生成されるプログラムコードである。リンク前保護コード210は、リンカ920によるリンク処理が不可能な形態であってもよい。
 リンク前秘匿コード250は、リンカ920によるリンク処理が可能な状態で、コード本体の一部の範囲が秘匿処理されたプログラムコードである。秘匿処理とは、コード本体の一部の範囲(以下、秘匿対象範囲という。)を容易に知ることができないように秘匿する処理であって、処理後のプログラムコードを汎用のリンカ920が処理できるものである。秘匿処理は、例えば、コード本体の秘匿対象範囲を暗号化する処理であってもよいし、コード本体の秘匿対象範囲に含まれる元コードをダミーコード(乱数値やゼロ、その他の固定値など)に置き換える処理であってもよい。
 リンク後秘匿コード260は、リンク前秘匿コード250をリンカ920によってリンク処理させることで得られるプログラムコードであり、コード本体のうちの一部の範囲が秘匿されているリンク後コードである。リンク後秘匿コード260は、そのままコンピュータが解釈実行することはできない。
 リンク後保護コード280は、保護処理がなされたリンク後コードである。保護処理は、コード保護装置810が行う保護処理と同様であるが、必ずしもリンク前コード220に対する保護処理と同一の処理である必要はない。リンク後保護コード280は、開発者Bが使用するコンピュータ900により解釈実行できてもよいし、解釈実行できなくてもよい。なお、リンク前秘匿コード250およびリンク後秘匿コード260は、開発者Bが容易にアクセスできるような形態で記憶されていてもよい。
 保護対象外リンク前コード930は、開発者Bが開発したプログラムコードであり、リンカ920によるリンク処理の対象となりうるプログラムコードである。保護対象外リンク前コード930は、開発者Bが開発したプログラムコードであるため、保護処理や秘匿処理を行う必要はない。なお、本実施形態では、プログラムコードを単にコードと呼ぶことがある。
 次に、第1実施形態のプログラム開発システムによる処理の流れを説明する。図2は、図1に示したプログラム開発システムによる処理の流れを示すフローチャートである。開発者Aのコンピュータ800は、開発者Aによる操作に応じてステップS11およびステップS12の処理を行う。続いて、開発者Bのコンピュータ900は、開発者Bの操作に応じてステップS13およびステップS14の処理を行う。
 ステップS11では、コンピュータ800のコード保護装置810が、リンク前コード220に対して保護処理を行い、リンク前保護コード210を生成する。例えば、コード保護装置810は、リンク前コード220を暗号化することにより、リンク前保護コード210を生成する。このリンク前保護コード210は、コンピュータ900のコード処理装置100において復号できる形式である。
 ステップS12では、コンピュータ800のコード出力装置820が、リンク前保護コード210をコンピュータ900で利用できるように出力する。
 ステップS13では、コンピュータ900のコード入力装置910が、コンピュータ800から出力されたリンク前保護コード210を入力する。
 ステップS14では、コンピュータ900のコード処理装置100が、リンカ920を利用して、リンク前保護コード210からリンク後保護コード280を生成する。具体的には、コード処理装置100は、リンク前保護コード210から、リンカ920が処理できる形式のリンク前秘匿コード250を生成し、リンカ920に、リンク前秘匿コード250に対する処理を指令する。リンカ920は、リンク前秘匿コード250と、開発者Bが開発した保護対象外リンク前コード930を入力してリンク処理を行い、リンク後秘匿コード260を生成する。なお、保護対象外リンク前コード930をリンク処理することは必須ではない。その後、コード処理装置100は、リンク後秘匿コード260を復元してから保護処理を行い、リンク後保護コード280を出力する。
 次に、第1実施形態のコード処理装置100の詳細について説明する。図3は、第1実施形態のコード処理装置100の構成例を示すブロック図である。第1実施形態のコード処理装置100は、図3に示すように、セキュア入力部110と、決定部120と、秘匿部130と、リンク指令部140と、復元部150と、セキュア出力部160と、復元コード取得部170と、を備える。
 セキュア入力部110は、リンク前保護コード210を入力し、保護解除処理を行って、リンク前コード220を取得する。保護解除処理とは、保護処理が行われたデータから保護処理前のデータを取得する処理である。例えば、保護処理として暗号化を行ったデータに対しては保護解除処理として復号を行い、保護処理としてアクセス制御を行ったデータに対しては、保護解除処理としてアクセスのために必要なアクセス権限を用いてデータを読み出す。
 決定部120は、リンク前コード220に含まれる後述の再配置情報に基づいて、リンク前コード220に含まれるデータ本体の再配置対象領域以外の少なくとも一部を含む秘匿対象範囲を決定し、決定した秘匿対象範囲を示す秘匿制御情報230を生成する。
 秘匿部130は、秘匿制御情報230に基づき、リンク前コード220の秘匿対象範囲に対する秘匿処理を行い、リンク前秘匿コード250を生成する。
 リンク指令部140は、リンク前秘匿コード250を処理対象として指定して、リンカ920に対して、リンク前秘匿コード250に対するリンク処理を指令する。リンク指令部140の指令に応じてリンカ920がリンク前秘匿コード250をリンク処理した結果が、リンク後秘匿コード260である。
 復元コード取得部170は、秘匿制御情報230に基づいて、リンク前コード220またはリンク後秘匿コード260から、リンク後秘匿コード260の秘匿された範囲を復元するための復元コードを取得し、取得した復元コードおよび復元する位置を示す復元コード情報240を生成する。
 復元部150は、復元コード情報240に基づいて、リンク後秘匿コード260に対する復元処理を行い、リンク後コード270を生成する。復元処理とは、秘匿処理が行われたデータを秘匿処理前のデータに復元する処理であり、例えば、リンク後秘匿コード260の秘匿された範囲を復元コードで上書きする処理である。秘匿処理として暗号化が行われた場合は、復元コード取得部170がリンク後秘匿コード260の暗号化された範囲を復号した復元データを取得し、復元部150がこの復元データを用いてリンク後秘匿コード260の秘匿された範囲を復元する。また、秘匿処理としてダミーコードへの置き換えが行われた場合は、復元コード取得部170がリンク前コード220から秘匿対象範囲の元コードを復元コードとして取得し、復元部150がこの復元データを用いてリンク後秘匿コード260の秘匿された範囲を復元する。
 セキュア出力部160は、リンク後コード270に対して保護処理を行うことによりリンク後保護コード280を生成し、出力する。
 ここで、図4を参照して、リンク前コード220およびリンク前秘匿コード250について、さらに詳しく説明する。図4は、リンク前コード220およびリンク前秘匿コード250を説明する図であり、(a)がリンク前コード220、(b)がリンク前秘匿コード250をそれぞれ示している。
 リンク前コード220は、上述したように、リンカ920によるリンク処理の対象となりうるプログラムコードである。リンク前コード220は、図4(a)に示すように、リンク前コード本体221と、再配置情報222とを含む。
 リンク前コード本体221は、実際にコンピュータに処理を行わせるための指令や、関連するデータなどを含む。リンク前コード本体221は、図4(a)に示すように、100番地や200番地など、コード内の位置を示すために番地づけされていてもよい。番地とは、コード内の位置を指し示すための数値である。
 再配置情報222は、リンカ920によって再配置処理が行われるリンク前コード本体221の範囲を示す情報である。再配置処理とは、コード内でリンク処理前の時点で決定されていない部分を、リンク処理時に書き換える処理である。図4(a)に示す例では、リンク前コード本体221において再配置対象場所223によって示される位置から所定範囲(再配置対象領域)を、再配置指令224に従って書き換える処理が再配置処理である。再配置対象場所223は、リンク前コード本体221における再配置対象領域の位置を指し示す情報であり、図4(a)の例では、リンク間コード本体221の中の「126番地」を先頭とする所定範囲の領域や「142番地」を先頭とする所定範囲の領域が再配置対象領域であることを示している。再配置指令224は、再配置処理における書き換え方法を指示する情報であり、例えば「対象場所の値に定数値10を加算せよ」などの意味を持っている。図4(a)の例では、「126番地」を先頭とする再配置領域に対して「再配置1」として定められた方法で書き換えを行い、「142番地」を先頭とする再配置領域に対して「再配置2」として定められた方法で書き換えを行うべきことを、リンカ920に対して指示する情報となっている。
 再配置指令224の具体例についてより詳細に説明する。例えばLinux(登録商標)で用いられるELFフォーマットを対象とするRELAフォーマットの再配置指令は、再配置型(relocation type)とシンボル(symbol)と加算値(addend)からなる。シンボルは、コード内における位置を識別するための情報である。命令セットアーキテクチャがx86の場合、例えば、再配置型「R_386_32」、シンボル「xyz」、加算値「10」で表される再配置指令は、「再配置対象領域に、シンボルxyzの番地と10を加算した値を格納せよ」という指令になる。リンク処理時には、前述のGNU ldのような汎用のリンカは、この指令に従って情報の書き換えを行う。
 リンク前秘匿コード250は、リンク前コード220に含まれるリンク前コード本体221のうち、決定部120が決定した秘匿対象範囲に対して秘匿部130が秘匿処理を行うことで生成されるプログラムコードである。リンク前秘匿コード250は、図4(b)に示すように、リンク前秘匿コード本体251と、再配置情報222とを含む。リンク前秘匿コード250の詳細は後述する。再配置情報222は、リンク前コード220の再配置情報222と同様である。なお、リンク前秘匿コード250の再配置情報222は、リンク前コード220の再配置情報222と必ずしも一致している必要はなく、例えば、使用するリンカ920に合わせて一部を変更するようにしてもよい。
 リンク前コード220の具体的な形態としては、例えば、下記の参考文献で公開された形態が知られている。リンク前コード220は、下記の参考文献で開示されたCommon Object File Format(COFF)形式のファイルに相当する。
 参考文献:Microsoft Portable Executable and Common Object File Format Specification Revision 8.2-September 21,2010.
 図5は、参考文献で開示されたリンク前コード220のデータ構造を説明する図である。参考文献によれば、リンク前コード220には、ヘッダ情報510、セクション情報520、リンク前コード本体221、再配置情報222、およびシンボル情報530が含まれる。リンク前コード本体221と再配置情報222は、セクション情報520の内容と関連して1個または複数個含まれる。
 ヘッダ情報510は、リンク前コード220を構成する各要素のファイル内位置などを保持する管理情報領域である。
 セクション情報520は、コードに含まれるセクションに関するメタ情報である。セクションとは、ファイルに情報を格納する際のまとまりである。COFF形式においては、コード本体221や再配置情報222などがそれぞれセクションとして格納されている。図6は、セクション情報520の一例を示す図である。セクション情報520には、例えば図6に示すように、セクション名シンボル521、配置先位置522、コード本体のファイル内位置523、セクションサイズ524、再配置情報位置525、およびフラグ情報526が一覧として含まれる。
 シンボル情報530は、1つまたは複数のシンボルを格納した情報である。シンボルとは、プログラム内の位置を示すなどの目的によりコードに付与されるメタ情報である。図7は、シンボル情報530の一例を示す図である。シンボル情報530には、例えば図7に示すように、シンボル531、セクション532、オフセット533、および種別534が一覧として含まれる。
 次に、図8を参照して、決定部120が生成する秘匿制御情報230について、さらに詳しく説明する。図8は、秘匿制御情報230の具体例を示す図であり、(a)は秘匿制御情報230の一例、(b)は秘匿制御情報230の他の例をそれぞれ示している。
 秘匿制御情報230は、決定部120が決定した秘匿対象範囲を示す情報であり、秘匿部130がリンク前コード220に対して秘匿処理を行う際に用いられるとともに、復元コード取得部170が復元コード情報240を生成する際に用いられる。図8(a)および図8(b)に示す秘匿情報230の例では、ともに秘匿対象範囲が連続する範囲のリストとして表現されている。図8(a)の例と図8(b)の例は、表現方法は異なるが、いずれもシンボル「symbol1」からのオフセットが「0バイトから26バイト」の範囲と、シンボル「symbol1」からのオフセットが「30バイトから42バイト」の範囲が、秘匿対象範囲であることを示している。なお、図8(a)および図8(b)の例では、シンボルからのオフセットを用いて秘匿対象範囲を表現しているが、これに代えて、番地情報そのものを用いて秘匿対象範囲を表現するようにしてもよい。また、秘匿処理を暗号化によって行う場合は、図8(b)に示すように、暗号化に用いられる暗号鍵や、その他暗号アルゴリズムに関する情報などを秘匿制御情報230に含めるようにしてもよい。
 次に、図9を参照して、リンク前コード220に含まれるリンク前コード本体221とリンク前秘匿コード250に含まれるリンク前秘匿コード本体251の具体例について、さらに詳しく説明する。図9は、リンク前コード本体221とリンク前秘匿コード本体251の具体例を示す図であり、(a)はリンク前コード本体221の一例、(b)はリンク前秘匿コード本体251の一例をそれぞれ示している。
 図9(a)に示すリンク前コード本体221は、秘匿対象範囲のコード「code1」,「code3」と、再配置対象領域のコード「code2」,「code4」と、再配置対象領域ではないが開発者Aの指定などに応じて秘匿対象範囲外とされたコード「code5」と、からなる。秘匿対象範囲はコード処理装置100の決定部120により決定され、秘匿制御情報230によりリンク前コード本体221における位置が示される。また、図9(a)に示すリンク前コード本体221は、100番地にシンボル「symbol1」を持ち、150番地にシンボル「symbol2」を持つ。
 図9(b)に示すリンク前秘匿コード本体251は、秘匿コード「concealed1」,「concealed3」と、再配置対象領域のコード「code2」,「code4」と、再配置対象領域ではないが開発者Aの指定などに応じて秘匿対象範囲外とされたコード「code5」と、からなる。秘匿コードは、その情報からは容易に元コード(図9(a)の秘匿対象範囲のコード「code1」,「code3」)を知ることができないようなコードである。秘匿コードは、元コードを暗号化したものであってもよく、ダミーコードでもよい。ダミーコードとは、元コードと関連性がほとんどまたは全くないコードである。ダミーコードは、無実行命令NOPまたは符号0もしくは乱数の羅列のように無意味なコードであってもよく、元コードと関連性がない意味のあるコードであってもよい。
 図9(b)に示すリンク前秘匿コード本体251は、図9(a)に示すリンク前コード本体221と比較して、100番地から126番地までのコード「code1」が秘匿コード「concealed1」で置き換えられ、130番地から142番地までのコード「code3」が秘匿コード「concealed3」で置き換えらた点が異なる。この置き換えは、コード処理装置100の秘匿部130が秘匿制御情報230に基づいて行う。したがって、例えばリンク前秘匿コード本体251の情報のみから、リンク前コード本体221におけるコード「code1」,「code3」の内容を知ることは不可能であるか、非常に困難である。なお、図9(a)に示すリンク前コード本体221の例では、コード「code2」,「code4」,「code5」は秘匿対象範囲外となっているので、図9(b)に示すリンク前秘匿コード本体251でも秘匿コードに置き換えられていない。
 次に、図10を参照して、復元コード取得部170が生成する復元コード情報240の具体例について、さらに詳しく説明する。図10は、復元コード情報240の具体例を示す図である。
 復元コード情報240は、秘匿コードを復元する目的でリンク後秘匿コード260に対してコードの上書きを指示する情報である。復元コード情報240は、上書きするコード(復元コード)を含む。図10に示す例では、復元コード情報240に含まれる復元コードは、図9(a)に示したリンク前コード本体221における秘匿対象範囲のコード(元コード)「code1」,「code3」と同一のものである。これら復元コードは、当該復元コードを用いて復元するリンク後秘匿コード260の範囲(復元対象範囲)、つまりリンク後秘匿コード260の秘匿された範囲の先頭位置と対応付けたかたちで保持されている。復元対象範囲の先頭位置は、例えば、シンボルとオフセットで表現される。図10の例では、シンボル「symbol1」からオフセット「0バイト」の位置が、復元コード「code1」を上書きすべき復元対象範囲の先頭位置であり、シンボル「symbol1」からオフセット「30バイト」の位置が、復元コード「code3」を上書きすべき復元対象範囲の先頭位置であることを示している。
 次に、図11を参照して、リンク後秘匿コード260およびリンク後コード270について、さらに詳しく説明する。図11は、リンク後秘匿コード260およびリンク後コード270のデータ構造を説明する図であり、(a)がリンク後秘匿コード260、(b)がリンク後コード270をそれぞれ示している。
 図11(a)に示すリンク後秘匿コード260は、リンカ920がリンク前秘匿コード250に対してリンク処理を行うことで生成されるコードであり、リンク後コード本体271を含む。また、図11(b)に示すリンク後コード270は、コード処理装置100の復元部150が、リンク後秘匿コード260に含まれるリンク後コード本体271の秘匿された範囲(復元対象範囲)に対して復元処理を行うことで得られるコードであり、リンク後秘匿コード本体261を含む。
 リンク後コード270の具体的な形態としては、例えば、上記の参考文献で公開された形態が知られている。リンク後コード270は、上記の参考文献で開示されたPortable Executable形式のファイルに相当する。
 図12は、上記の参考文献で開示されたリンク後コード270のデータ構造を説明する図である。上記の参考文献によれば、リンク後コード270には、ヘッダ情報610、セクション情報620、リンク後コード本体271、およびシンボル情報630が含まれる。ヘッダ情報610は、リンク後コード270を構成する各要素のファイル内位置やプログラムの実行開始位置などを保持する管理情報領域である。セクション情報620およびシンボル情報630は、図5に示したリンク前コード220におけるセクション情報520およびシンボル情報530と同様である。ここで、シンボル情報630はリンク後コード270に必ずしも含まれるものではなく、リンカ920はシンボル情報630を外部ファイルに出力することもできる。なお、リンカ920の出力するシンボル情報ファイル630は、可読テキストのマップファイルの場合もあれば、SYMやPDBの拡張子を伴うバイナリファイルの場合もある。
 次に、図13を参照して、リンク後秘匿コード260に含まれるリンク後秘匿コード本体261とリンク後コード270に含まれるリンク後コード本体271の具体例について、さらに詳しく説明する。図13は、リンク後秘匿コード本体261とリンク後コード本体271の具体例を示す図であり、(a)はリンク後秘匿コード本体261の一例、(b)はリンク後コード本体271の一例をそれぞれ示している。
 図13(a)に示すリンク後秘匿コード本体261は、秘匿コード「concealed1」,「concealed3」と、リンカ920がリンク処理において再配置処理を行うことで書き換えられたコード「reloc2」,「reloc4」と、開発者Aの指定などに応じて秘匿対象範囲外とされたコード「code5」と、リンカ920によるリンク処理により結合された他のオブジェクト由来のコード「code6」と、からなる。また、図13(a)に示すリンク後秘匿コード本体261は、200番地にシンボル「symbol1」を持ち、250番地にシンボル「symbol2」を持ち、300番地にシンボル「symbol3」を持つ。
 図13(a)に示すリンク後秘匿コード本体261は、図9(b)に示したリンク前秘匿コード本体251と比較して、コードの各番地が100増加しており、さらに、コード「code2」がコード「reloc2」、コード「code4」がコード「reloc4」にそれぞれ変更され、コード「code6」が追加されている。なお、番地がリンク前秘匿コード250に比べて変化していることや、コード「code6」が追加されていることは、リンカ920のリンク処理に応じて発生する事象であり、リンク後秘匿コード本体261の本質ではない。
 リンク後コード本体271は、リンク後秘匿コード本体261における秘匿コードの部分(復元対象範囲)に対して復元処理を行うことで得られるコードである。復元処理とは、秘匿コードを元コードに戻す処理である。図13(b)に示すリンク後コード本体271は、図13(a)に示すリンク後秘匿コード本体261の復元対象範囲に対して復元処理を行って得られるコードであり、コード「code1」,「reloc2」,「code3」,「reloc4」,「code5」,「code6」からなる。図13(b)に示すリンク後コード本体271は、図13(a)に示すリンク後秘匿コード本体261と比較して、秘匿コード「concealed1」,「concealed3」が、それぞれ元コード「code1」,「code3」に復元されている点が異なる。
 次に、第1実施形態のコード処理装置100による処理の流れを説明する。図14は、図3に示したコード処理装置100による処理の流れを示すフローチャートである。
 まず、セキュア入力部110が、リンク前保護コード210を入力し、リンク前保護コード210に対して保護解除処理を行うことにより、リンク前コード220を取得する(ステップS101)。
 次に、決定部120が、ステップS101で取得されたリンク前コード220に含まれる再配置情報222に基づいて、リンク前コード220に含まれるリンク前コード本体221の秘匿対象範囲を決定し、決定した秘匿対象範囲を示す秘匿制御情報230を生成する(ステップS102)。ここで、決定部120が、リンク前コード本体221の中で、再配置情報222で示される再配置対象領域を除いて秘匿対象範囲を決定することにより、秘匿対象範囲に対して秘匿処理が行われても、リンカ920がリンク処理を行えるようにしている。
 次に、秘匿部130が、ステップS102で生成された秘匿制御情報230に基づいて、リンク前コード本体221の秘匿対象範囲に対して秘匿処理を行い、リンク前秘匿コード250を生成する(ステップS103)。
 次に、リンク指令部140が、リンカ920に対して、ステップS103で生成されたリンク前秘匿コード250に対するリンク処理を指令し、リンカ920にリンク後秘匿コード260を生成させる(ステップS104)。
 また、ステップS102で決定部120により秘匿制御情報230が生成された後、復元コード取得部170は、ステップS102で生成された秘匿制御情報230に基づいて、ステップS101で取得されたリンク前コード220、またはステップS104でリンカ920により生成されるリンク後秘匿コード260から、リンク後秘匿コード260の秘匿された範囲を復元するための復元コードを取得し、取得した復元コードと復元対象範囲の位置を示す復元コード情報240を生成する(ステップS105)。復元コード取得部170は、リンク前コード本体221の秘匿対象範囲がダミーコードへの置き換えにより秘匿される場合は、リンク前コード220から、リンク前コード本体221の秘匿対象範囲の元コードを復元コードとして取得する。また、復元コード取得部170は、リンク前コード本体221の秘匿対象範囲が暗号化により秘匿される場合は、リンク後秘匿コード260に含まれるリンク後秘匿コード本体261の秘匿された範囲を復号することで、復元コードを取得する。なお、ステップS105の処理は、ステップS103およびステップS104の処理と並行して行うようにしてもよく、また、ステップS103またはステップS104の処理と組み合わせて行ってもよい。
 次に、復元部150が、ステップS105で生成された復元コード情報240に基づいて、ステップS104でリンカ920により生成されるリンク後秘匿コード260の秘匿された範囲(復元対象範囲)に対して復元処理を行い、リンク後コード270を生成する(ステップS106)。
 そして最後に、セキュア出力部160が、ステップS106で生成されたリンク後コード270に対して保護処理を行って、リンク後保護コード280として出力し(ステップS107)、コード処理装置100による一連の処理が終了する。
 以下、図14のフローチャートにおける各ステップの処理の詳細について、適宜図面を参照しながら説明する。
 まず、セキュア入力部110によるステップS101の処理について説明する。セキュア入力部110は、リンク前保護コード210を入力して、リンク前保護コード210に対する保護解除処理を行う。リンク前保護コード210は、リンク前コード220に対して保護処理が行われることで生成され、その保護を解除する処理が保護解除処理である。
 リンク前コード220に対して行われた保護処理が暗号化処理である場合、リンク前保護コード210は、暗号化されたリンク前コード220であり、保護解除処理は復号処理である。この例においては、セキュア入力部110は、暗号化されたリンク前コード220であるリンク前保護コード210を読み込み、コード処理装置100の内部に保持している暗号鍵を用いてリンク前保護コード210を復号することによって、リンク前コード220を得る。
 また、リンク前コード220に対して行われた保護処理がOS(オペレーションシステム)によるアクセス制御である場合、リンク前保護コード210は、アクセス制御がなされたファイルシステム上に置かれたファイルに格納されたリンク前コード220であり、コード処理装置100の利用者は、直接そのファイルにアクセスすることができない。一方で、コード処理装置100をこのファイルに対してアクセスできる権限を有した状態で動作させることにより、セキュア入力部110は、この権限を用いてファイルを読み込むことで、保護解除処理を行い、リンク前コード220を得ることができる。なお、コード処理装置100を利用者が持たない権限で動作させることは、現在広く知られた方法で行うことができる。例えば、Linux(登録商標)においては、SUIDと呼ばれる仕組みを用いることで、利用者がその利用者自身の権限とは異なる権限でプログラムを実行できるようにすることが可能である。
 セキュア入力部110が取得したリンク前コード220は、コード処理装置100の利用者が容易にアクセスできない形態で保持される。例えば、ファイルシステムにそのままの形で保持するのではなく、作業用の主記憶内部に保持するようにすれば、コード処理装置100の利用者は容易にアクセスすることができない。
 次に、決定部120によるステップS102の処理について、図4、図8、および図9に示す具体例を例示しながら説明する。決定部120は、まず秘匿対象範囲の候補を決定する。本例では、シンボル「symbol1」で示されるコード範囲(100番地から150番地まで)のみを秘匿対象範囲の候補とする。なお、決定部120は、リンク前コード本体221の全体を秘匿対象範囲の候補としてもよいし、秘匿対象範囲の候補を指定する情報(リンク前コード220を開発した開発者Aなど、コードを保護した者から与えられた情報)に基づいて、秘匿対象範囲の候補を決定するようにしてもよい。
 次に、決定部120は、秘匿対象範囲の候補の中から秘匿対象範囲を決定する。本例では、秘匿対象範囲は、秘匿対象範囲の候補から、リンク処理時に再配置処理が行われる再配置対象領域を除外することで得られる。再配置対象領域は、リンク前コード220に含まれる再配置情報222に基づいて特定することができる。本例では、再配置情報222の再配置指令224で示される再配置1は、再配置対象場所223から4バイトの範囲を対象として書き換える再配置指令であり、再配置2は、再配置対象場所223から8バイトの範囲を対象として書き換える再配置指令であるものとする。この場合、再配置指令1に対応する再配置対象場所223として示される126番地から130番地までの範囲と、再配置指令2に対応する再配置場所として示される142番地から150番地までの範囲とが、再配置対象領域として特定される。したがって、秘匿対象範囲の候補である100番地から150番地の範囲から、これらの再配置対象領域を除外することで、100番地から126番地の範囲と、130番地から142番地までの範囲とが、秘匿対象範囲として決定される。
 次に、決定部120は、決定した秘匿対象範囲を示す秘匿制御情報230を生成する。秘匿制御情報230は、図8(a)の例では、秘匿対象範囲がシンボル「symbol1」からの相対アドレスとして表現されている。すなわち、シンボル「symbol1」を起点として0バイト目から26バイト目まで、30バイト目から42バイト目まで、というかたちで秘匿対象範囲を表現している。ただし、この表現方法は一例であり、図8(b)の例のように、シンボル「symbol1」を起点として30バイト目から12バイトのサイズの範囲といったかたちで秘匿対象範囲を表現してもよいし、番地そのものを用いて秘匿対象範囲を表現してもよい。また、図8(b)の例では、秘匿制御情報230が、秘匿対象範囲に加えてさらに暗号鍵を含む。これは、秘匿対象範囲に対して関連付けられた暗号鍵を用いて暗号化を行うべきことを示している。例えば、シンボル「symbol1」のオフセット0バイト目から26バイトの範囲を、暗号鍵「73294332」を用いて暗号化すべきことを示している。
 なお、本例では、再配置情報222の再配置指令224を利用して再配置対象領域のサイズを決めているが、再配置指令224を利用せずに、例えば、再配置対象領域のサイズを最大値で固定とし、再配置対象場所223が示す位置から例えば一律に8バイトの範囲を再配置対象領域として特定するようにしてもよい。この場合、リンカ920が再配置処理を行う実際の再配置対象領域よりも広い範囲を秘匿対象範囲から除外する可能性があるが、リンカ920が再配置処理を行う再配置対象領域は確実に秘匿対象範囲外となるため、リンク処理を行う上で支障は生じない。
 決定部120によるステップS102の処理において、リンク前コード本体221の再配置対象領域を秘匿対象範囲から除外することで、リンカ920によるリンク処理が可能となる。ここでは再配置対象領域を秘匿対象範囲から除外することのみを述べたが、再配置対象領域以外でも、コードの一部がリンク処理時に参照され用いられる可能性がある。そのようなコードについて、決定部120は、秘匿対象範囲から適宜除外する処理を行っても構わない。
 次に、秘匿部130によるステップS103の処理について、図8および図9に示す具体例を例示しながら説明する。秘匿部130は、秘匿制御情報230に基づいて、リンク前コード本体221に対して秘匿処理を行う。秘匿処理では、所定の方法もしくは秘匿制御情報230で示された秘匿方法を用いて、リンク前コード本体221の秘匿対象範囲を秘匿する処理を行う。
 例えば、秘匿部130は、図8(a)に示す秘匿制御情報230に基づいて、リンク前コード本体221の秘匿対象範囲を特定する。すなわち、秘匿部130は、シンボル「symbol1」のオフセット「0バイトから26バイト」の範囲と、シンボル「symbol1」のオフセット「30バイトから42バイト」の範囲とを、それぞれ秘匿対象範囲として特定する。そして、秘匿制御部130は、図9(a)に示すリンク前コード本体221における秘匿対象範囲のコード「code1」,「code3」を、それぞれ秘匿コード「concealed1」,「concealed3」に置き換えて、図9(b)に示すリンク前秘匿コード本体251を得る。この例においては、秘匿コード「concealed1」,「concealed3」はダミーコードである。この場合、秘匿制御情報230には秘匿方法を示す情報は含まれておらず、ダミーコードへの置き換えという所定の方法を用いた秘匿処理を行う。
 また、秘匿部130は、図8(b)に示す秘匿制御情報230に基づいて、以下のように秘匿処理を行ってもよい。すなわち、秘匿部130は、図9(a)に示すリンク前コード本体221の秘匿対象範囲のコード「code1」,「code3」を読み込み、これらコード「code1」,「code3」を、対応する暗号鍵「73294332」,「30318776」でそれぞれ暗号化することにより、秘匿コード「concealed1」,「concealed3」を得る。そして、秘匿部130は、リンク前コード本体221の秘匿対象範囲のコード「code1」,「code3」を、それぞれ秘匿コード「concealed1」,「concealed3」に置き換えて、図9(b)に示すリンク前秘匿コード本体251を得る。この例においては、秘匿コード「concealed1」,「concealed3」は元コード「code1」,「code3」を暗号化したコードである。
 次に、リンク指令部140によるステップS104の処理について説明する。リンク指令部140は、コード処理装置100の外部のリンカ920に対して、リンク前秘匿コード250に対するリンク処理を指令し、その処理結果としてリンカ920からリンク後秘匿コード260を取得する。リンカ920がリンク前秘匿コード250に対するリンク処理を行う際には、必要であれば、図1に示した保護対象外リンク前コード930を結合する処理を行ってもよい。なお、リンク指令部140は、リンカ920を補助するためにリンク処理の一部を担ってもよい。
 コード処理装置100の外部のリンカ920を用いてリンク前秘匿コード250に対するリンク処理を行うためには、リンク前秘匿コード250を一旦ファイルとして書き出して、リンカ920を呼び出す処理を行う必要がある。そして、リンカ920の処理終了を待機し、リンカ920が出力する処理結果のファイルを読み込むことで、リンク後秘匿コード260を得ることができる。このとき、リンク前秘匿コード250がファイルとして書き出され、また、リンク後秘匿コード260がリンカ920からファイルとして出力されるため、利用者である開発者Bがリンク前秘匿コード250やリンク後秘匿コード260に対してアクセス可能となるが、これらリンク前秘匿コード250やリンク後秘匿コード260は秘匿処理が行われたコードであるため、開発者Bはコードの実体を知ることができない。
 なお、第1実施形態のコード処理装置100では、リンク指令部140や外部のリンカ920が、リンク前秘匿コード250に含まれるリンク前秘匿コード本体251に対して復元処理を行う必要がない。リンク処理では、リンク前秘匿コード本体251の再配置対象領域を書き換えることが必要であるため、もし再配置対象領域がそのままでは処理できないように秘匿されていた場合、リンク処理の際に再配置対象領域を一旦復元する必要が生じる。これに対して、第1実施形態のコード処理装置100によれば、リンク処理を行うリンカ920が参照する再配置情報222と、リンク前秘匿コード本体251における再配置領域は、秘匿対象範囲から除外されるので、リンク処理のためにリンク指令部140やリンカ920が秘匿コード本体251に対して復元処理を行う必要がない。
 次に、復元コード取得部170によるステップS105の処理について、図8、図9、図10および図13に示す具体例を例示しながら説明する。復元コード取得部170は、秘匿制御情報230に基づいて、秘匿部130が秘匿した秘匿対象範囲を復元するための復元コードを取得して、復元コード情報240を生成する処理を行う。
 例えば、復元コード取得部170は、図8(a)に示す秘匿制御情報230に基づいて、リンク前コード220に含まれるリンク前コード本体221の秘匿対象範囲を特定し、リンク前コード本体221の秘匿対象範囲のコード(元コード)を復元コードとして取得する。秘匿対象範囲の特定は、上述した秘匿部130の処理と同様に行われる。図9(a)に示すリンク前コード本体221の例では、シンボル「symbol1」のオフセット「0バイトから26バイト」の範囲に存在するコードは「code1」であり、シンボル「symbol1」のオフセット「30バイトから42バイト」の範囲に存在するコードは「code3」である。したがって、復元コード取得部170は、図9(a)に示すリンク前コード本体221の「code1」および「code3」を復元コードとして取得し、取得した復元コードを、復元対象範囲の先頭位置(「code1」の場合は「symbol1」のオフセット「0バイト」、「code3」の場合は「symbol1」のオフセット「30バイト」)と対応付けて、復元コード情報240を生成する。
 また、復元コード取得部170は、図8(b)に示す秘匿制御情報230に基づいて、以下のように復元コード情報240を生成してもよい。すなわち、復元コード取得部170は、図8(b)に示す秘匿制御情報230に基づいて、リンク後秘匿コード260に含まれるリンク後秘匿コード本体261の秘匿された範囲を特定し、リンク後秘匿コード本体261の秘匿された範囲のコードを取得する。図13(a)に示すリンク後秘匿コード本体261の例では、シンボル「symbol1」のオフセット「0バイト」からサイズ「26バイト」の範囲に存在するコードは「concealed1」であり、シンボル「symbol1」のオフセット「30バイト」からサイズ「12バイト」の範囲に範囲に存在するコードは「concealed3」である。したがって、復元コード取得部170は、図13(a)に示すリンク後秘匿コード本体261の「concealed1」および「concealed3」を取得する。「concealed1」は、秘匿部130が暗号鍵「73294332」を用いて「code1」を暗号化したコードであり、「concealed3」は、秘匿部130が暗号鍵「30318776」を用いて「code3」を暗号化したコードである。そこで、復元コード取得部170は、秘匿制御情報230に含まれるこれら暗号鍵を用いて「concealed1」および「concealed3」をそれぞれ復号することで、「code1」および「code3」を復元コードとして取得する。そして、復元コード取得部170は、これら復元コードを、復元対象範囲の先頭位置(「code1」の場合は「symbol1」のオフセット「0バイト」、「code3」の場合は「symbol1」のオフセット「30バイト」)と対応付けて、復元コード情報240を生成する。
 次に、復元部150によるステップS106の処理について、図10および図13に示す具体例を例示しながら説明する。復元部150は、復元コード情報240に基づいて、リンク後秘匿コード260のリンク後秘匿コード本体261に含まれる秘匿コードを復元コードにより上書きすることで復元を行い、リンク後コード270を生成する。
 復元部150による復元処理の例として、図10に示した復元コード情報240の1行目(シンボル「symbol1」、オフセット「0バイト」、復元コード「code1」)に基づく復元処理を説明する。復元部150は、まず、シンボル「symbol1」とオフセット「0バイト」から、リンク後秘匿コード本体261の中の復元対象範囲、つまりリンク後秘匿コード本体261の秘匿された範囲の先頭位置を特定する。図13(b)に示すリンク後秘匿コード本体261の例では、シンボル「symbol1」は200番地であるから、復元対象範囲の先頭位置は200番地である。リンク後秘匿コード本体261におけるシンボル「symbol1」の位置が200番地であることを知るためには、リンク後秘匿コード260が持つシンボル情報や、リンカ920が出力するマップファイルに保持されたシンボルと番地との対応関係を参照すればよい。マップファイルとは、あるシンボルに対応するコードがリンク処理後にどの番地に配置されたかを含む情報である。
 次に、復元部150は、図13(b)に示すリンク後秘匿コード本体261の200番地から復元コード「code1」を上書きする。図13(b)に示すリンク後秘匿コード本体261の200番地から226番地までは、秘匿コード「concealed1」が格納されているが、復元部150が復元コード「code1」を上書きすることで、元コード「code1」に復元される。また、復元部150は、図10に示した復元コード情報240の2行目(シンボル「symbol1」、オフセット「30バイト」、復元コード「code3」)に基づいて同様の処理を行うことで、最終的に図13(b)に示すリンク後コード本体271を得ることができる。
 復元部150の復元処理によって生成されるリンク後コード270は、リンク前コード220と同様に、コード処理装置100の利用者が容易にアクセスできないように保持される。図13(b)に示すリンク後コード本体271を含むリンク後コード270は、秘匿コード「concealed1」,「concealed3」がそれぞれ「code1」,「code3」に復元された結果、正常に機能するコードとなっている。
 なお、図9(a)に示したリンク前コード本体221に対して直接リンク処理を行っても、図13(b)に示したリンク後コード本体271を得ることは可能である。しかし、このリンク処理を汎用のリンカ920を用いて行う場合、リンク前コード220を開発者Bに開示する必要が生じる。なぜならば、汎用のリンカ920が処理する対象は、通常、開発者も参照することが可能だからである。したがって、リンク前コード220を開発者Bに開示することなくリンク処理するためには、例えば、リンク前保護コード210の一例として示した暗号化したコードを受け付ける特殊なリンカを用いるなどの対策が必要となる。しかし、特殊なリンカを用いてリンク処理を行うためには、汎用のリンカ920とは独立に特殊なリンカを実装したり、汎用のリンカ920を修正したりする作業が必要となり、多大な工数を要する。さらに、汎用のリンカ920をそのまま用いないため、汎用のリンカ920を使うことを前提とした開発では到底受け入れられない。第1実施形態のコード処理装置100を用いれば、上述したように、汎用のリンカ920を用いてリンク処理を行うことができるため、このような問題は生じない。
 最後に、セキュア出力部160によるステップS107の処理について説明する。セキュア出力部160は、リンク後コード270に対して保護処理を行い、リンク後保護コード280として出力する。セキュア出力部160がリンク後コード270に対して行う保護処理は、コンピュータ800のコード保護装置810がリンク前コード220に対して行う保護処理と同様であり、例えば、暗号化処理やアクセス制御を設定する処理などを用いることができる。
 以上、第1実施形態のコード処理装置100による処理の具体例を説明したが、以上説明した処理は概念的なものであり、例えば、複数の処理を一体として行うなど、様々な変更が可能である。例えば、秘匿部130がリンク前コード220を読み込んだ際に、復元コード取得部170の処理として復元コード情報240を生成してもよいし、復元部150が復元コード取得部170と一体となり、リンク後秘匿コード260を復号して復元コード情報240を得ると同時に、その復号結果を上書きすることで、リンク後コード270を生成してもよい。
 以上、具体的な例を挙げながら詳細に説明したように、第1実施形態によれば、開発者Aは、開発者B(コード処理装置100の利用者)にリンク前コード220の実体を開示することなく、かつリンク処理においてコードの復元処理などの特別な処理を行うことなく、開発者Bに、汎用のリンカ920を用いたリンク処理を行わせることができる。
(変形例1)
 復元コード情報240は、暗号化してリンク前秘匿コード250に含めるようにしてもよい。リンク前秘匿コード250に復元コード情報240を含める方法としては、例えば、復元コードを圧縮して暗号化し、リンク前秘匿コード本体251を格納したセクションとは別のセクションに付加する方法がある。
(変形例2)
 リンク前コード220や復元コード情報240は、コード処理装置100の利用者が容易に内容を知ることができないようにさらに暗号化してもよい。暗号化したリンク前コード200や復元コード情報240は、コード処理装置100の利用者がアクセス可能な場所、例えばハードディスクのファイルシステム上に保護せずに格納するようにしてもよい。
(変形例3)
 上述した第1実施形態では、シンボルを利用してリンク前コード本体221における秘匿対象範囲のコード「code1」,「code3」の位置とリンク後秘匿コード本体261における秘匿コード「concealed1」,「concealed3」の位置とを対応付け、復元処理を行っていた。このコード位置の対応付けには必ずしもシンボルを用いる必要はない。例えば、コード位置の対応付けにシンボルを用いる代わりに、固有のタグを用いるようにしてもよい。
 図15は、コード位置の対応付けにタグを用いる場合の秘匿制御情報230の具体例を示す図である。また、図16は、コード位置の対応付けにタグを用いる場合のリンク前コード本体221とリンク前秘匿コード本体251の具体例を示す図であり、(a)がリンク前コード本体221、(b)がリンク前秘匿コード本体251をそれぞれ示している。
 タグとは、識別を行うために用いられる情報であり、コードの一部として保持することができる小さい情報である。第3変形例では、決定部120が、図15に示すような秘匿制御情報230を生成する。図15に示す秘匿制御情報230には、シンボルは含まれず、秘匿対象範囲の先頭の番地およびサイズと、タグとが対応付けて保持されている。決定部120は、例えば乱数生成などにより、他のタグやコードと値がなるべく一致しないようにタグの値を決める。
 秘匿部130は、秘匿制御情報230に基づいて、リンク前コード本体221の秘匿対象範囲のコードをタグおよびダミーコードに置き換える処理を行う。図16に示す例では、リンク前コード本体221における秘匿対象範囲のコード「code1」が、タグ「39461278」およびダミーコード「dummy1」に置き換えられ、リンク前コード本体221における秘匿対象範囲のコード「code3」が、タグ「47291023」およびダミーコード「dummy3」に置き換えられて、リンク前秘匿コード本体251が生成されている。この例では、タグの大きさは4バイトであり、100番地から104番地の範囲がタグ「39461278」に置き換えられ、104番地から126番地の範囲がダミーコード「dummy1」に置き換えられている。また、130番地から134番地の範囲がタグ「47291023」に置き換えられ、134番地から142番地の範囲がダミーコード「dummy3」に置き換えられている。
 リンカ920は、再配置処理によりリンク前秘匿コード本体251におけるコード「code2」,「code4」を書き換える可能性があるが、タグおよびダミーコードの部分に対して書き換えを行うことはない。したがって、リンク後秘匿コード本体261においても、タグはそのまま残ることになる。復元部150は、秘匿制御情報230のタグ(例えば「39461278」)を参照し、リンク後秘匿コード本体261の中でそのタグに一致するコード位置を検索し、その位置から復元コードを上書きする処理を行うことで、リンク後秘匿コード本体261の秘匿された範囲を復元することができる。
(変形例4)
 上述した第1実施形態では、リンク前コード本体221の再配置対象領域を秘匿対象範囲外としていた。しかし、再配置対象領域であっても特定の方法で秘匿処理することにより、その秘匿対象範囲を復元することなくリンカ920が処理できる場合があり、この場合は、再配置対象領域を秘匿対象範囲に含めるようにしてもよい。
 まず、リンカ920が行う再配置処理について簡単に説明する。図17は、x86プロセッサをターゲットとするELFオブジェクトフォーマットにおける再配置情報222の具体例を示す図である。図17の例では、再配置情報222は、再配置対象場所223と、再配置型225と、再配置シンボル226とを対応づけた情報である。再配置型225は、リンカ920が再配置処理を行う際に、どのように計算すべきかの種類を指定する型である。再配置シンボル226は、再配置の計算に用いるためのシンボルである。リンカ920は、再配置対象場所223が示す値と、再配置シンボル226のアドレスを利用して、再配置型225に応じた計算式により計算を行い、再配置対象場所223に存在した元の値を、計算結果に書き換える再配置処理を行う。例えば、再配置型225が「R_386_32」の場合は、再配置対象場所223が示す値に対して再配置シンボル226のアドレスを加算するという計算式が用いられる。この例のように、リンカ920が再配置対象領域に対し値の加減算しか行わないことが判明した場合は、当該再配置対象領域は、加減算秘匿による秘匿を行うことができる。加減算秘匿とは、秘匿時にある値を加算し、復元時にその値を減算することにより秘匿と復元を行う方式である。以下では、加減算秘匿が再配置対象領域を加減算秘匿により秘匿、復元する場合の動作について説明する。
 リンク処理において、再配置前の値Aに対してシンボルのアドレスSを加算するという計算が行われる場合、リンク処理後(再配置後)の値はA+Sとなる。ここで、Aに秘匿のための値Rを加算して再配置前の値をA+Rとしておけば、リンク後(再配置後)の値は(A+R)+Sとなる。この値からRを減算することで、(A+R)+S-R=A+Sとなり、本来の再配置後の値A+Sを得ることができる。
 図18は、加減算秘匿を適用した場合の計算の具体例を説明する図である。秘匿部120は、秘匿処理において、リンク前コード本体221の再配置対象領域の値「100」に対して、秘匿のための値「49418638」を加算することにより、秘匿された再配置対象領域の値「49418738」を得る。リンカ920は、リンク処理において、秘匿された再配置対象領域の値「49418738」に対して、値「40000」を加算することにより、秘匿された再配置後の値「49458738」を得る。復元部150は、復元処理において、秘匿された再配置後の値「49458738」から秘匿のための値「49418638」を減算することにより、復元された再配置後の値「40100」を得る。これは、再配置対象領域の元の値「100」に対してリンク処理において値「40000」を加算した値と一致する。
 秘匿部120と復元部150がこのような加減算秘匿による秘匿、復元の処理を行うためには、決定部120が決定した秘匿対象範囲ごとに、その秘匿対象範囲の秘匿方式と秘匿鍵(秘匿方式が暗号化であれば暗号化に用いる暗号鍵、秘匿方式が加減算秘匿であれば秘匿に用いる値)とを対応付けた情報が必要となる。このような情報は、例えば、決定部120が生成する秘匿制御情報230に含めることができる。図19は、秘匿対象範囲ごとに秘匿方式と秘匿鍵とを対応付けた情報を含む秘匿制御情報230の具体例を示す図である。図19に示す秘匿制御情報230の例では、シンボル「symbol1」からオフセット「26バイト」、サイズ「4バイト」の秘匿対象範囲に対して、値「49418638」を用いた加減算秘匿により秘匿処理が行われることが示されている。
 決定部120は、図17に示した再配置情報222における再配置型225を参照し、リンカ920による処理が加減算秘匿を行っても正常に動作するか否かを判断し、再配置対象領域に対して加減算秘匿による秘匿処理を行うか否かを決定する。具体的には、決定部120は、例えば図20に示すような秘匿方式表290を参照して、再配置型に応じた秘匿方式を決定するなどの方法を用いればよい。例えば、決定部120は、図20に示す秘匿方式表290を参照して、再配置型「R_386_32」により処理される再配置対象領域に対しては加減算秘匿を用いるものと判断し、図19に示す例のように、例えば、シンボル「symbol1」からオフセット「26バイト」、サイズ「4バイト」の秘匿対象範囲に対して、値「49418638」を用いた加減算秘匿により秘匿処理を行うことを示す秘匿制御情報230を生成する。
 このように、リンカ920の処理に支障がないような方法であれば、再配置対象領域を秘匿対象範囲に含めて秘匿処理を行ったリンク前秘匿コード250であっても、リンカ920に適切にリンク処理を行わせることができる。
(第2実施形態)
 次に、第2実施形態について説明する。上述した第1実施形態では、リンカ920が処理できるリンク前秘匿コード250の生成と、リンカ920によるリンク処理と、リンク処理によって得られるリンク後秘匿コード260の復元とを、いずれも、開発者Bのコンピュータ900において同一のコード処理装置100を用いて行うようにしていた。これに対して、第2実施形態では、リンク前秘匿コード250の生成は、開発者Aのコンピュータ800において行い、リンク処理およびリンク後秘匿コード260の復元を、開発者Bのコンピュータ900において行う。以下では、第1実施形態と共通の構成要素については同一の符号を付して説明を適宜省略する。
 図21は、第2実施形態のプログラム開発システムの構成例を示すブロック図である。第2実施形態のプログラム開発システムは、図21に示すように、開発者Aが使用するコンピュータ850と、開発者Bが使用するコンピュータ950とを備える。開発者Aと開発者Bは、連携してコンピュータプログラムを開発する開発者である。開発者Aは、コンピュータ850を使用してプログラムコードの開発を行う。開発者Bは、コンピュータ950を使用して、開発者Aが開発したプログラムコードをもとに、実行可能なプログラムコードの開発を行う。
 開発者Aが使用するコンピュータ850は、コード秘匿装置860と、コード出力装置870と、を備える。
 コード秘匿装置860は、リンク前コード220に対して秘匿処理を行い、リンク前秘匿コード250および保護された復元コード情報310を生成する。コード秘匿装置860の詳細は後述する。
 コード出力装置870は、コード秘匿装置860により生成されたリンク前秘匿コード250および保護された復元コード情報310を出力する。ここで出力とは、第1実施形態と同様、リンク前秘匿コード250および保護された復元コード情報310をコンピュータ950で利用できるようにコンピュータ850から取り出す処理である。
 開発者Bが使用するコンピュータ950は、コード入力装置960と、リンカ920と、第2実施形態のコード処理装置300と、を備える。
 コード入力装置960は、コード出力装置870が出力したリンク前秘匿コード250および保護された復元コード情報310を入力する。ここで入力とは、第1実施形態と同様、コード出力装置870が出力したリンク前秘匿コード250および保護された復元コード情報310をコンピュータ950において利用可能にする処理である。
 コード処理装置300は、外部のリンカ920と連携して、コード入力装置960が入力したリンク前秘匿コード250および保護された復元コード情報310からリンク後保護コード280を生成する。コード処理装置300の詳細は後述する。
 保護された復元コード情報310は、第1実施形態で説明した復元コード情報240に対して保護処理を行った情報である。保護された復元コード情報310は、一体の情報である必要はなく、複数の保護された情報の集まりであってもよい。
 次に、第2実施形態のプログラム開発システムによる処理の流れを説明する。図22は、図21に示したプログラム開発システムによる処理の流れを示すフローチャートである。開発者Aのコンピュータ850は、開発者Aによる操作に応じてステップS21およびステップS22の処理を行う。続いて、開発者Bのコンピュータ950は、開発者Bの操作に応じてステップS23およびステップS24の処理を行う。
 ステップS21では、コンピュータ850のコード秘匿装置860が、リンク前コード220に対して秘匿処理を行い、リンク前秘匿コード250および保護された復元コード情報310を生成する。リンク前秘匿コード250は、コンピュータ950のリンカ920がリンク処理できる形式である。
 ステップS22では、コンピュータ850のコード出力装置870が、リンク前秘匿コード250および保護された復元コード情報310をコンピュータ950で利用できるように出力する。
 ステップS23では、コンピュータ950のコード入力装置960が、コンピュータ850から出力されたリンク前秘匿コード250および保護された復元コード情報310を入力する。
 ステップS24では、コンピュータ950のコード処理装置300が、リンカ920を利用して、リンク前秘匿コード250と保護された復元コード情報310からリンク後保護コード260を生成する。具体的には、コード処理装置300は、コード入力装置960が入力した保護された復元コード情報310に対して保護解除処理を行って復元コード情報240を生成するとともに、コード入力装置960が入力したリンク前秘匿コード250を指定して、リンカ920に対して、このリンク前秘匿コード250に対する処理を指令する。リンカ920は、リンク前秘匿コード250と、開発者Bが開発した保護対象外リンク前コード930をリンク処理し、リンク後秘匿コード260を生成する。なお、保護対象外リンク前コード930をリンク処理することは必須ではない。その後、コード処理装置300は、復元コード情報240を用いてリンク後秘匿コード260を復元してから保護処理を行い、リンク後保護コード280を出力する。
 次に、コード秘匿装置860の詳細について説明する。図23は、コード秘匿装置860の構成例を示すブロック図である。コード秘匿装置860は、図23に示すように、第1セキュア入力部111と、決定部120と、秘匿部130と、第1セキュア出力部161と、復元コード取得部170と、を備える。
 第1セキュア入力部111は、リンク前コード220を入力する。第1セキュア入力部111は、第1実施形態のコード処理装置100が備えるセキュア入力部110と同様に、リンク前保護コード220を入力して保護解除処理を行い、リンク前コード220を取得する構成であってもよい。
 決定部120、秘匿部130、および復元コード取得部170は、第1実施形態のコード処理装置100が備える決定部120、秘匿部130、および復元コード取得部170と同様である。
 第1セキュア出力部161は、復元コード取得部170が生成した復元コード情報240に対して保護処理を行うことにより保護された復元コード情報310を生成し、出力する。
 コード秘匿装置860による処理の概要を説明する。まず、第1セキュア入力部111が、リンク前コード220を入力する。次に、決定部120が、リンク前コード220に含まれる再配置情報222に基づいて、リンク前コード本体221の秘匿対象範囲を決定し、秘匿制御情報230を生成する。次に、秘匿部130が、秘匿制御情報230に基づいてリンク前コード本体221の秘匿対象範囲に対する秘匿処理を行ってリンク前秘匿コード250を生成する。また、復元コード取得部170が、秘匿制御情報に基づいて復元コードを取得し、復元コード情報240を生成する。最後に、第1セキュア出力部161が、復元コード情報240に対して保護処理を行って、保護された復元コード情報310を出力する。
 次に、第2実施形態のコード処理装置300の詳細について説明する。図24は、第2実施形態のコード処理装置300の構成例を示すブロック図である。第2実施形態のコード処理装置300は、図24に示すように、第2セキュア入力部112と、リンク指令部140と、復元部150と、第2セキュア出力部162と、を備える。
 第2セキュア入力部112は、保護された復元コード情報310を入力し、保護解除処理を行って、復元コード情報240を取得する。
 リンク指令部140および復元部150は、第1実施形態のコード処理装置100が備えるリンク指令部140および復元部150と同様である。
 第2セキュア出力部162は、第1実施形態のコード処理装置100が備えるセキュア出力部160と同様に、リンク後コード270に対して保護処理を行って、リンク後保護コード280を出力する。
 第2実施形態のコード処理装置300による処理の概要を説明する。まず、第2セキュア入力部112が、保護された復元情報310を入力して保護解除処理を行い、復元コード情報240を取得する。また、リンク指令部140が、外部のリンカ920に対して、リンク前秘匿コード250に対するリンク処理を指令し、リンク後秘匿コード260を生成させる。次に、復元部150が、復元コード情報240に基づいてリンク後秘匿コード260の秘匿された範囲を復元し、リンク後コード270を生成する。最後に、第2セキュア出力部162が、リンク後コード270に対して保護処理を行って、リンク後保護コード280を出力する。
 以上説明したように、第2実施形態では、開発者Bが使用するコンピュータ950が入力するのは、リンク前秘匿コード250および復元コード情報310であり、開発者Bが、リンク前コード220の実体を知ることができない。また、開発者Bは、開発者Aから提供されたリンク前秘匿コード250を、コード処理装置300およびリンカ920を用いてリンク処理することができる。したがって、第2実施形態によれば、第1実施形態と同様に、開発者Aは、開発者B(コード処理装置300の利用者)にリンク前コード220の実体を開示することなく、かつリンク処理においてコードの復元処理などの特別な処理を行うことなく、開発者Bに、汎用のリンカ920を用いたリンク処理を行わせることができる。
(第3実施形態)
 次に、第3実施形態について説明する。上述した第1実施形態では、コード処理装置100への入力は、通常のリンク前コード220を保護したもの(リンク前保護コード210)であり、コード処理装置100の出力は、リンク後コード270を保護したもの(リンク後保護コード280)であった。これに対して、第3実施形態では、コード処理装置がfatバイナリ形式のコードを入出力できるようにしている。第3実施形態のプログラム開発システムの概要は、図1に示した第1の実施形態のプログラム開発システムと同様である。ただし、第3実施形態のプログラム開発システムでは、開発者Bが使用するコンピュータ900が、第1実施形態のコード処理装置100に代えて、第3実施形態のコード処理装置600(図25参照)を備えている。以下では、第1実施形態と共通の構成要素については同一の符号を付して説明を適宜省略する。
 図25は、第3実施形態のコード処理装置600の構成例を示すブロック図である。第3実施形態のコード処理装置600は、図25に示すように、セキュア入力部610と、分割部620と、決定部120と、秘匿部130と、リンク指令部140と、復元コード取得部170と、復元部150と、結合部630と、セキュア出力部660と、を備える。
 セキュア入力部610は、リンク前fatコード660に対して保護処理を行うことで得られるリンク前保護fatコード650を入力し、保護解除処理を行って、リンク前fatコード660を取得する。
 分離部620は、リンク前fatコード660を複数のリンク前コード220に分離する。
 決定部120、秘匿部130、リンク指令部140、復元コード取得部170、および復元部150は、第1実施形態のコード処理装置100が備える決定部120、秘匿部130、リンク指令部140、復元コード取得部170、および復元部150と同様である。ただし、第3実施形態の決定部120は、分離部620により分離された複数のリンク前コード220のそれぞれについて、リンク前コード本体221の秘匿対象範囲を決定し、これら複数のリンク前コード本体221の秘匿対象範囲を示す秘匿制御情報235を生成する。また、第3実施形態の秘匿部130、リンク指令部140、復元コード取得部170、および復元部150は、分割部620により分割された複数のリンク前コード220のそれぞれについて、第1実施形態で説明した処理を行う。
 結合部630は、復元部150による復元処理により生成された複数のリンク後コード270を結合して、リンク後fatコード670を生成する。
 セキュア出力部640は、リンク後fatコード670に対して保護処理を行うことによりリンク後保護fatコード680を生成し、出力する。
 リンク前fatコード660は、リンク前コード220をfatバイナリ形式で格納したコードである。fatバイナリ形式とは、複数のコンピュータアーキテクチャ用のコードをひとつにまとめて格納するような形式であり、例えばMac OS X(Apple Inc.の登録商標)のユニバーサルバイナリなどが知られている。図26は、リンク前fatコード660の具体例を示す図である。図26に示すリンク前fatコード660は、複数のコンピュータアーキテクチャ用のリンク前コード220を、それぞれアーキテクチャ661と対応付けて保持している。
 リンク後fatコード670は、リンク後コード270をfatバイナリ形式で格納したコードである。図27は、リンク後fatコード670の具体例を示す図である。図27に示すリンク後fatコード670は、複数のコンピュータアーキテクチャ用のリンク後コード270を、それぞれアーキテクチャ661と対応付けて保持している。
 リンク前保護fatコード650は、リンク前fatコード660に対して保護処理を行うことで生成されるコードである。リンク後保護fatコード680は、保護処理がなされたリンク後fatコード670である。
 秘匿制御情報235は、分離部620により分離された複数のリンク前コード220のそれぞれに対して決定部120が決定した秘匿対象範囲を、各リンク前コード220のアーキテクチャ661と対応付けて示す情報である。図28は、秘匿制御情報235の具体例を示す図である。図28に示す秘匿制御情報235は、アーキテクチャ「x86」用のリンク前コード220については、リンク前コード本体221のシンボル「symbol1」の位置から起算して、オフセット「0バイトから26バイト」の範囲と、オフセット「30バイトから42バイト」の範囲とが秘匿対象範囲であり、アーキテクチャ「ARM」用のリンク前コード220については、リンク前コード本体221のシンボル「symbol1」の位置から起算して、オフセット「0バイトから20バイト」の範囲と、オフセット「28バイトから40バイト」の範囲とが秘匿対象範囲であることを示している。リンク前コード220は、アーキテクチャによって秘匿対象範囲が同一の場合もあれば、異なる場合もある。
 次に、第3実施形態のコード処理装置600による処理の流れを説明する。図29は、図25に示したコード処理装置600による処理の流れを示すフローチャートである。
 まず、セキュア入力部610が、リンク前保護fatコード650を入力し、リンク前保護fatコード650に対して保護解除処理を行うことにより、リンク前fatコード660を取得する(ステップS301)。
 次に、分離部620が、ステップS301で取得されたリンク前fatコード660をアーキテクチャ毎の複数のリンク前コード220に分離する。分離とは、結合された複数のコードのそれぞれを、単一のコードとして独立して処理可能な形態にする処理である。この分離処理は、図26に例示したリンク前fatコード660の構造を解析し、アーキテクチャ毎の各リンク前コード220を取り出すことで実現できる。なお、分離処理を行うツールとして、例えばMac OS X(登録商標)向け開発ツールのlipoコマンドなどが知られている。ただし、リンク前fatコード660およびリンク前コード220は、コード処理装置600の利用者(開発者B)に知られてはならないので、コード処理装置600の外部の装置により分離処理を行うことはできない。なお、分離処理は、必ずしもコードを情報として明確に分離することは必要としない。例えば、fatコードの中で、先頭位置と末尾位置を特定することにより、以降の処理でその範囲のコードのみを独立して扱えるようにすることは、分離処理とみなす。
 次に、ステップS302で分離されたアーキテクチャ毎の複数のリンク前コード220のそれぞれに対し、決定部120、秘匿部130、リンク指令部140、復元コード取得部170、および復元部150が、ステップS303~ステップS307の処理を繰り返し行う。ステップS303~ステップS307の処理は、第1実施形態で説明した図14のステップS102~ステップS106の処理と同様であるため、ここでは説明を省略する。ただし、ステップS303において、決定部120が現在処理しているコードに対応するアーキテクチャの情報を秘匿制御情報235に含めることにより、他のアーキテクチャのコードを誤って処理することがないようにしている点が、第1実施形態とは異なる。
 次に、結合部630が、以上の繰り返しの処理によりアーキテクチャ毎に生成された複数のリンク後コード270を結合し、リンク後fatコード670を生成する(ステップS308)。この結合処理は、図27に例示したリンク後fatコード670のデータ構造を作成し、そこにアーキテクチャ毎の各リンク後コード270を挿入することで実現できる。なお、結合処理を行うツールとしては、分離処理と同じく、例えばMac OS X(登録商標)向け開発ツールのlipoコマンドなどが知られている。
 そして最後に、セキュア出力部640が、ステップS308で生成されたリンク後fatコード670に対して保護処理を行って、リンク後保護fatコード680として出力し(ステップS309)、コード処理装置600による一連の処理が終了する。
 以上説明したように、第3実施形態のコード処理装置600は、装置内部で分離処理や結合処理を行うため、コードの秘匿しながら、fatバイナリ形式のコードを入出力することができる。
(変形例1)
 上述した第3実施形態では、リンカ920は、fatバイナリ形式ではないリンク前秘匿コード250に対して処理を行っているが、fatバイナリ形式のコードをリンカ920に処理させることも可能である。この場合、結合部630は、アーキテクチャ毎の複数のリンク前秘匿コード250を結合してリンク前秘匿fatコードを生成し、出力する。リンカ920は、リンク指令部140の指令に応じて、リンク前秘匿fatコードを処理してリンク後秘匿fatコードを生成する。復元部150は、リンク前秘匿fatコードを復元することでリンク後fatコード670を生成する。
(変形例2)
 上述した第3実施形態では、コード処理装置600が、リンク前保護fatコード650を入力し、リンク後保護fatコード680を出力しているが、入出力の一方をfatバイナリ形式でないコードとすることも可能である。すなわち、コード処理装置600は、fatバイナリ形式でないリンク前保護コード210を入力してリンク後保護fatコード680を出力したり、リンク前保護fatコード650を入力してリンク後保護コード280を出力したりすることも可能である。
(変形例3)
 上述した第3実施形態では、複数のアーキテクチャ用のコードをまとめたfatバイナリ形式のコードに対する処理を説明した。fatバイナリ形式のコードと類似の仕組みとして、複数のファイルに格納されたコードをライブラリコードとして1つのファイルに結合して提供することは一般によく行われる。第3実施形態のコード処理装置600は、このようなライブラリコードを入出力可能な形態として応用することができる。
 具体的には、セキュア入力部610が保護されたライブラリコードを読み込み、分割部620がライブラリコードからコードを取り出して、その後の処理を行う。ライブラリコードにおいては、図26に例示したリンク前fatコード660や図27に例示したリンク後fatコード670のアーキテクチャ661の代わりに、ファイル名を情報として持ち、それによってそれぞれのコードを識別する。
 この場合、リンカ920は、通常、ライブラリコードを入力して直接受け付けるので、結合部630が複数のリンク前秘匿コード250を結合してリンク前秘匿ライブラリコードとし、リンカ920に処理させることができる。
 上述した第1実施形態のコード処理装置100は、一例として、開発者Bが使用するコンピュータ900により実行されるプログラムとして提供することができる。すなわち、開発者Bが使用するコンピュータ900がこのプログラムを実行することにより、第1実施形態のコード処理装置100が備える各機能構成(セキュア入力部110、決定部120、秘匿部130、リンク指令部140、復元部150、セキュア出力部160、および復元コード取得部170)を実現することができる。
 同様に、上述した第2実施形態のコード処理装置300は、一例として、開発者Bが使用するコンピュータ950により実行されるプログラムとして提供することができる。すなわち、開発者Bが使用するコンピュータ950がこのプログラムを実行することにより、第2実施形態のコード処理装置300が備える各機能構成(第2セキュア入力部112、リンク指令部140、復元部150、および第2セキュア出力部162)を実現することができる。
 同様に、上述した第3実施形態のコード処理装置600は、一例として、開発者Bが使用するコンピュータ900により実行されるプログラムとして提供することができる。すなわち、開発者Bが使用するコンピュータ900がこのプログラムを実行することにより、第3実施形態のコード処理装置600が備える各機能構成(セキュア入力部610、分離部620、決定部120、秘匿部130、リンク指令部140、復元コード取得部170、復元部150、結合部630、およびセキュア出力部640)を実現することができる。
 上述したコード処理装置100,300,600の機能構成を実現するプログラムは、例えば、インストール可能な形式又は実行可能な形式のファイルでCD-ROM、フレキシブルディスク(FD)、CD-R、DVD(Digital Versatile Disk)などのコンピュータで読み取り可能な記録媒体に記録されて提供される。
 また、上述したコード処理装置100,300,600の機能構成を実現するプログラムを、インターネットなどのネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、上述したコード処理装置100,300,600の機能構成を実現するプログラムを、インターネットなどのネットワーク経由で提供または配布するように構成してもよい。さらに、上述したコード処理装置100,300,600の機能構成を実現するプログラムを、ROMなどに予め組み込んで提供するように構成してもよい。
 上述したコード処理装置100,300,600の機能構成を実現するプログラムは、各機能構成に対応するコンポーネントを含むモジュール構成となっており、実際のハードウェアとしては、コンピュータ900,950のCPU(プロセッサ)が上記記憶媒体からプログラムを読み出して実行することにより上記各コンポーネントが主記憶装置上にロードされ、コード処理装置100,300,600の各機能構成が主記憶装置上に生成されるようになっている。
 また、コード処理装置100,300,600の上述した各機能構成の全部または一部を、ASIC(Application Specific Integrated Circuit)やFPGA(Field-Programmable Gate Array)などの専用のハードウェアを用いて実現することも可能である。
 以上、具体的な例を挙げながら詳細に説明したように、実施形態のコード処理装置によれば、プログラムコードを秘匿しつつ汎用のリンカにリンク処理させることができる。
 なお、以上説明した実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。上記の新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。上記の実施形態やその変形は、発明の範囲や要旨に含まれるとともに、請求の範囲に記載された発明とその均等の範囲に含まれる。

Claims (14)

  1.  コード本体と、リンカによって再配置されるコード本体の範囲を示す再配置情報と、を含む第1コードデータの前記再配置情報に基づいて、再配置される範囲以外の少なくとも一部を含む第1の範囲を決定する決定部と、
     前記第1の範囲を秘匿する秘匿部と、
     前記リンカに対して、前記第1の範囲が秘匿された前記第1コードデータに対する処理を指令する指令部と、
     前記リンカが前記第1コードデータを処理することで生成される第2コードデータに含まれる前記秘匿された範囲を復元する復元部と、を備えるコード処理装置。
  2.  前記秘匿された範囲を復元するための復元コードを取得する取得部をさらに備え、
     前記復元部は、取得された前記復元コードを用いて、前記第2コードデータに含まれる前記秘匿された範囲を復元する、請求項1に記載のコード処理装置。
  3.  前記秘匿部は、前記第1の範囲に含まれる元コードをダミーコードに置き換えることで前記第1の範囲を秘匿し、
     前記取得部は、前記復元コードとして、前記元コードを前記第1コードデータから取得することを特徴とする請求項2に記載のコード処理装置。
  4.  前記秘匿部は、前記第1の範囲に含まれる元コードを暗号化することで前記第1の範囲を秘匿し、
     前記取得部は、前記第2コードデータに含まれる前記秘匿された範囲を復号することで前記復元コードを取得することを特徴とする請求項2に記載のコード処理装置。
  5.  前記決定部は、前記再配置情報に基づいて、さらに秘匿方式を決定し、
     前記秘匿部は、前記決定部が決定した秘匿方式に従って前記第1の範囲を秘匿することを特徴とする請求項1に記載のコード処理装置。
  6.  前記復元部は、前記リンカから出力されるシンボル情報とコード本体内の位置を示すシンボルとに基づいて前記第2コードデータに含まれる前記秘匿された範囲の位置を特定し、特定した前記秘匿された範囲を復元することを特徴とする請求項1に記載のコード処理装置。
  7.  前記秘匿部は、前記第1の範囲の一部に識別を行うための固有のタグを記録し、
     前記復元部は、前記タグに基づいて前記第2コードデータに含まれる前記秘匿された範囲の位置を特定し、特定した前記秘匿された範囲を復元することを特徴とする請求項1に記載のコード処理装置。
  8.  保護された前記第1コードデータを入力して前記保護を解除する入力部をさらに備え、
     前記決定部は、前記保護が解除された前記第1コードデータに含まれる前記再配置情報に基づいて、前記第1の範囲を決定することを特徴とする請求項1に記載のコード処理装置。
  9.  前記入力部は、1つに結合された複数の前記第1コードデータを入力し、
     複数の前記第1コードデータを分離する分離部をさらに備えることを特徴とする請求項8に記載のコード処理装置。
  10.  前記秘匿された範囲が復元された前記第2コードデータを保護して出力する出力部をさらに備えることを特徴とする請求項1に記載のコード処理装置。
  11.  前記秘匿された範囲が復元された複数の前記第2コードデータを1つに結合する結合部をさらに備え、
     前記出力部は、1つに結合された複数の前記第2コードデータを保護して出力することを特徴とする請求項10に記載のコード処理装置。
  12.  コード本体と、リンカによって再配置されるコード本体の範囲を示す再配置情報と、を含む第1コードデータであって、再配置される範囲以外の少なくとも一部を含む第1の範囲が秘匿された前記第1コードに対する処理を、前記リンカに対して指令する指令部と、
     前記リンカが前記第1コードデータを処理することで生成される第2コードデータに含まれる前記秘匿された範囲を復元する復元部と、を備えることを特徴とするコード処理装置。
  13.  コンピュータに、
     コード本体と、リンカによって再配置されるコード本体の範囲を示す再配置情報と、を含む第1コードデータの前記再配置情報に基づいて、再配置される範囲以外の少なくとも一部を含む第1の範囲を決定する機能と、
     前記第1の範囲を秘匿する機能と、
     前記リンカに対して、前記第1の範囲が秘匿された前記第1コードデータに対する処理を指令する機能と、
     前記リンカが前記第1コードデータを処理することで生成される第2コードデータに含まれる前記秘匿された範囲を復元する機能と、を実現させるためのプログラム。
  14.  コンピュータに、
     コード本体と、リンカによって再配置されるコード本体の範囲を示す再配置情報と、を含む第1コードデータであって、再配置される範囲以外の少なくとも一部を含む第1の範囲が秘匿された前記第1コードに対する処理を、前記リンカに対して指令する機能と、
     前記リンカが前記第1コードデータを処理することで生成される第2コードデータに含まれる前記秘匿された範囲を復元する機能と、を実現させるためのプログラム。
PCT/JP2013/057840 2013-03-19 2013-03-19 コード処理装置およびプログラム WO2014147748A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP2013/057840 WO2014147748A1 (ja) 2013-03-19 2013-03-19 コード処理装置およびプログラム
CN201380074351.0A CN105074712B (zh) 2013-03-19 2013-03-19 代码处理装置和程序
JP2015506446A JP5996777B2 (ja) 2013-03-19 2013-03-19 コード処理装置およびプログラム
US14/847,975 US10229277B2 (en) 2013-03-19 2015-09-08 Code processing apparatus and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/057840 WO2014147748A1 (ja) 2013-03-19 2013-03-19 コード処理装置およびプログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/847,975 Continuation US10229277B2 (en) 2013-03-19 2015-09-08 Code processing apparatus and computer program product

Publications (1)

Publication Number Publication Date
WO2014147748A1 true WO2014147748A1 (ja) 2014-09-25

Family

ID=51579482

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/057840 WO2014147748A1 (ja) 2013-03-19 2013-03-19 コード処理装置およびプログラム

Country Status (4)

Country Link
US (1) US10229277B2 (ja)
JP (1) JP5996777B2 (ja)
CN (1) CN105074712B (ja)
WO (1) WO2014147748A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446704A (zh) * 2015-08-10 2017-02-22 阿里巴巴集团控股有限公司 一种用于数据处理的方法和设备
JP2020181522A (ja) * 2019-04-26 2020-11-05 ルネサスエレクトロニクス株式会社 記録システム
JP2021067973A (ja) * 2019-10-17 2021-04-30 株式会社Dnpハイパーテック 情報処理装置、コンピュータプログラム及び情報処理方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9471286B2 (en) * 2013-06-04 2016-10-18 Microsoft Technology Licensing, Llc System and method for providing code completion features for code modules
CN104991521B (zh) * 2015-07-02 2018-03-09 大族激光科技产业集团股份有限公司 一种nc程序段防止泄密的方法
US9830469B1 (en) 2016-10-31 2017-11-28 International Business Machines Corporation Automated mechanism to secure customer data
US9928365B1 (en) 2016-10-31 2018-03-27 International Business Machines Corporation Automated mechanism to obtain detailed forensic analysis of file access
US10346625B2 (en) * 2016-10-31 2019-07-09 International Business Machines Corporation Automated mechanism to analyze elevated authority usage and capability
US10650156B2 (en) 2017-04-26 2020-05-12 International Business Machines Corporation Environmental security controls to prevent unauthorized access to files, programs, and objects
KR101885260B1 (ko) * 2017-10-30 2018-08-03 주식회사 안랩 심볼 난독화 장치 및 방법
US10956241B1 (en) 2017-12-20 2021-03-23 Xilinx, Inc. Unified container for hardware and software binaries
US20220335118A1 (en) * 2019-03-21 2022-10-20 Capzul Ltd Detection and prevention of reverse engineering of computer programs

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175466A (ja) * 1999-12-21 2001-06-29 Fuji Xerox Co Ltd 実行プログラムの生成方法及び実行プログラム生成装置、実行プログラムの実行方法、並びに、コンピュータ可読プログラム記憶媒体
JP2010231477A (ja) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd プログラム及びプログラム実行装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3033562B2 (ja) 1998-09-02 2000-04-17 富士ゼロックス株式会社 再配置可能な実行プログラムの生成方法及び実行プログラム生成装置
US6684389B1 (en) * 1999-08-05 2004-01-27 Canon Kabushiki Kaisha Compiler that decrypts encrypted source code
US20020138748A1 (en) * 2001-03-21 2002-09-26 Hung Andy C. Code checksums for relocatable code
JP4147472B2 (ja) 2003-02-28 2008-09-10 日本電気株式会社 コンピュータプログラムの編集システム及びその方法
JP4043422B2 (ja) * 2003-08-27 2008-02-06 シャープ株式会社 画像処理装置
JP4559794B2 (ja) 2004-06-24 2010-10-13 株式会社東芝 マイクロプロセッサ
JP4005076B2 (ja) 2004-11-18 2007-11-07 株式会社東芝 電源供給システム及び電源コンセント
WO2007063433A2 (en) * 2005-10-17 2007-06-07 Nxp B.V. Program executable image encryption
JP4770425B2 (ja) * 2005-11-24 2011-09-14 富士ゼロックス株式会社 保護済み実行プログラムの作成のためのプログラム、方法及び装置
JP5322620B2 (ja) 2008-12-18 2013-10-23 株式会社東芝 情報処理装置、プログラム開発システム、プログラム検証方法及びプログラム
CN101650664B (zh) * 2009-06-30 2012-06-27 飞天诚信科技股份有限公司 链接方法和链接器
JP5171907B2 (ja) 2010-09-13 2013-03-27 株式会社東芝 情報処理装置、情報処理プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175466A (ja) * 1999-12-21 2001-06-29 Fuji Xerox Co Ltd 実行プログラムの生成方法及び実行プログラム生成装置、実行プログラムの実行方法、並びに、コンピュータ可読プログラム記憶媒体
JP2010231477A (ja) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd プログラム及びプログラム実行装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446704A (zh) * 2015-08-10 2017-02-22 阿里巴巴集团控股有限公司 一种用于数据处理的方法和设备
JP2020181522A (ja) * 2019-04-26 2020-11-05 ルネサスエレクトロニクス株式会社 記録システム
JP7123001B2 (ja) 2019-04-26 2022-08-22 ルネサスエレクトロニクス株式会社 記録システム
JP2021067973A (ja) * 2019-10-17 2021-04-30 株式会社Dnpハイパーテック 情報処理装置、コンピュータプログラム及び情報処理方法

Also Published As

Publication number Publication date
CN105074712B (zh) 2018-05-08
CN105074712A (zh) 2015-11-18
US10229277B2 (en) 2019-03-12
US20150379290A1 (en) 2015-12-31
JP5996777B2 (ja) 2016-09-21
JPWO2014147748A1 (ja) 2017-02-16

Similar Documents

Publication Publication Date Title
JP5996777B2 (ja) コード処理装置およびプログラム
KR100841282B1 (ko) 보호된 실행 프로그램의 작성을 위한 기록 매체, 방법 및장치
CN105426708B (zh) 一种Android系统的应用程序的加固方法
RU2620712C2 (ru) Устройство виртуальной машины, имеющее управляемую ключом обфускацию, и способ
TWI711970B (zh) 用於安全程式執行之資訊確保系統和方法
US20160203087A1 (en) Method for providing security for common intermediate language-based program
KR102433011B1 (ko) Apk 파일 보호 방법, 이를 수행하는 apk 파일 보호 시스템, 및 이를 저장하는 기록매체
US9501646B2 (en) Program verification apparatus, program verification method, and computer readable medium
CN105930695B (zh) 一种软件开发工具包的保护方法及装置
US20090310776A1 (en) Information concealment method and information concealment device
US20110271350A1 (en) method for protecting software
JP2004511031A (ja) ディジタル・データ保護構成
WO2015035827A1 (en) Method and apparatus for providing string encryption and decryption in program files
US10867017B2 (en) Apparatus and method of providing security and apparatus and method of executing security for common intermediate language
CN108133147B (zh) 可执行代码的保护方法、设备及可读存储介质
CN106375080B (zh) 一种flash文件的加密及解密方法及其装置
TWI695287B (zh) 用於保護碼的方法、電腦程式產品和系統
CN107169370A (zh) 可执行文件的加密方法及加密装置
CN113221077B (zh) 基于spring容器的class文件加密方法及设备
CN109657480A (zh) 一种文件处理方法、设备及计算机可读存储介质
CN104866740A (zh) 一种防静态分析文件的方法及装置
US6931634B2 (en) Encrypted compiler
JP4125995B2 (ja) データ変換システム
JP6215468B2 (ja) プログラム保護装置
KR101704703B1 (ko) 더미 코드를 사용하는 애플리케이션 코드 은닉 장치 및 이를 이용한 애플리케이션 코드 은닉 방법

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380074351.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13878875

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015506446

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13878875

Country of ref document: EP

Kind code of ref document: A1