WO2017183357A1 - Decryption device, decryption-compiling method and decryption-compiling program - Google Patents

Decryption device, decryption-compiling method and decryption-compiling program Download PDF

Info

Publication number
WO2017183357A1
WO2017183357A1 PCT/JP2017/009880 JP2017009880W WO2017183357A1 WO 2017183357 A1 WO2017183357 A1 WO 2017183357A1 JP 2017009880 W JP2017009880 W JP 2017009880W WO 2017183357 A1 WO2017183357 A1 WO 2017183357A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
decryption
compilation
unit
compiled
Prior art date
Application number
PCT/JP2017/009880
Other languages
French (fr)
Japanese (ja)
Inventor
純 種子
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Publication of WO2017183357A1 publication Critical patent/WO2017183357A1/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/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/10Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols with particular housing, physical features or manual controls

Definitions

  • the present invention relates to a technique for decrypting an encrypted program.
  • Patent Document 1 There is a technique described in Patent Document 1 as a technique for protecting an application program running on a browser.
  • the confidentiality of a program is maintained by decrypting an encrypted script in a secure Virtual Mactine (hereinafter referred to as VM) environment.
  • VM Virtual Mactine
  • Patent Document 2 The method described in Patent Document 2 can be realized in a browser-only environment. However, since XMLHttpRequest is used, Push communication for establishing communication from the server device at regular intervals is periodically sent to the client device. There is a need to do.
  • the main object of the present invention is to solve such a problem, and it is a main object to prevent leakage of program source code due to debugging.
  • the decoding device provides: A multi-threaded decoding device, In the main thread, a decryption key receiving unit that receives a decryption key from the encryption device; After receiving the decryption key by the decryption key receiving unit, in the sub-thread, the encryption program obtained by encrypting the pre-compiled program by the encryption device is received from the encryption device and received.
  • a decryption compiling unit that decrypts an encrypted program using the decryption key to obtain the program before compilation, and compiles the obtained program before compilation.
  • the encrypted program is decrypted and the program obtained by the decryption is compiled.
  • the source code of the compiled program cannot be deciphered. For this reason, according to the present invention, it is possible to prevent leakage of the source code of the program due to debugging.
  • FIG. 3 is a diagram illustrating an example of a system configuration according to the first embodiment.
  • FIG. 3 is a diagram illustrating a hardware configuration example of a server device according to the first embodiment.
  • FIG. 3 is a diagram illustrating a hardware configuration example of a client device according to the first embodiment.
  • FIG. 3 is a diagram illustrating a thread configuration in the client device according to the first embodiment.
  • FIG. 6 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the first embodiment.
  • FIG. 3 is a diagram illustrating a functional configuration example of a server device and a client device according to the first embodiment.
  • FIG. 10 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the second embodiment.
  • FIG. 10 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the second embodiment.
  • FIG. 10 is a flowchart showing an operation example in a main thread and a worker thread in the client device according to the third embodiment.
  • FIG. 10 is a flowchart showing an operation example in a main thread and a worker thread in the client device according to the third embodiment.
  • Embodiment 1 FIG. ***Overview***
  • the network is not limited to a wired network but may be a wireless network such as Wi-Fi.
  • the server device 100 is an example of an encryption device.
  • the client device 200 is an example of a decryption device.
  • the operations performed by the client device 200 are examples of a decryption compilation method and a decryption compilation program.
  • the client device 200 receives an encryption program and a decryption key for decrypting the encryption program from the server device 100 using a browser.
  • the encryption program is an encrypted program before compilation.
  • the browser of the client device 200 includes a function called WebWorker that operates multithread. In WebWorker, parallel processing is possible in a main thread and a worker thread as a sub thread. The debugging function does not work for processing in worker threads.
  • the browser of the client device 200 has a function for displaying 3D graphics called WebGL.
  • the client device 200 can implement 3D graphics by executing a Shader program (hereinafter also simply referred to as “Shader”) and performing a shadowing process on a 3D object.
  • Shader Shader program
  • the client device 200 In order to perform 3D display using WebGL in the browser, it is necessary to compile the Shader program on the browser and to perform a setting called attach to the compiled Shader program on the browser. If the pre-compiled Shader program is decrypted by a third party, the source code of the Shader program will be leaked. On the other hand, the compiled Shader program is not likely to be deciphered by a third party. That is, leakage of the source code of the Shader program immediately before compilation becomes a problem. For this reason, the client device 200 according to the present embodiment decrypts the encrypted pre-compilation Shader program in a worker thread where the debugging function does not work, and obtains the pre-compilation Shader program.
  • the client device 200 according to the present embodiment compiles the pre-compilation Shader program obtained by decoding in the worker thread, and outputs the post-compilation Shader program to the main thread. With such a procedure, the client device 200 according to the present embodiment can execute the Shader program and perform 3D display without leaking the source code of the Shader program.
  • FIG. 2 shows a hardware configuration example of the server apparatus 100 according to the present embodiment.
  • FIG. 3 shows a hardware configuration example of the client apparatus 200 according to the present embodiment.
  • FIG. 4 shows a thread configuration in the browser 208 of the client device 200 according to the present embodiment.
  • FIG. 6 shows an example of the functional configuration of the server device 100 and the client device 200 according to the present embodiment.
  • the server device 100 is a computer including a processor 101, a memory 102, a display device 103, an input device 104, an auxiliary storage device 105, and a communication device 106.
  • the processor 101 is a CPU (Central Processing Unit).
  • the memory 102 is a RAM (Random Access Memory).
  • the display device 103 is a display.
  • the input device 104 is a keyboard and a mouse.
  • the auxiliary storage device 105 is a flash memory or an HDD (Hard Disk Drive).
  • the communication device 106 is a communication chip or a NIC (Network Interface Card).
  • the auxiliary storage device 105 stores programs that realize the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 shown in FIG. Then, these programs are loaded from the auxiliary storage device 105 to the memory 102, and the processor 101 executes these programs, thereby performing operations of a user authentication unit 401, a key generation unit 402, and an encryption unit 403, which will be described later.
  • FIG. 2 schematically illustrates a state in which the processor 101 is executing a program that implements the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403.
  • the client device 200 is a computer including a processor 201, a memory 202, a display device 203, an input device 204, an auxiliary storage device 205, a GPU (Graphics Processing Unit) 206, and a communication device 207.
  • the processor 201 is a CPU.
  • the memory 202 is a RAM.
  • the display device 103 is a display.
  • the input device 104 is a keyboard and a mouse.
  • the auxiliary storage device 105 is a flash memory or an HDD.
  • the communication device 207 is a communication chip or a NIC.
  • the auxiliary storage device 105 stores programs that realize the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 shown in FIG.
  • the browser 208 includes a WebApp 300
  • the WebApp 300 includes a control unit 303 and a decryption compilation unit 305. Details of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 will be described later.
  • these programs are loaded from the auxiliary storage device 205 to the memory 202, and the processor 201 executes these programs, thereby performing operations of a browser 208, a WebApp 300, a control unit 303, and a decryption compilation unit 305 described later.
  • FIG. 3 schematically shows a state in which the processor 201 is executing a program that implements the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305.
  • the client device 200 operates in multithread.
  • FIG. 4 shows a configuration example of a WebGL web application (hereinafter referred to as WebApp) 300 described in Java Script (registered trademark) of HTML (HyperText Markup Language) 5 running on the browser 208.
  • WebApp 300 includes a main thread 301 and a worker thread 302 that is a sub thread.
  • the main thread 301 and the worker thread 302 are threads generated using the multi-thread function (WebWorker) of HTML5.
  • the main thread 301 and the worker thread 302 can communicate with each other (inter-thread communication).
  • the user authentication unit 401 performs user authentication processing of the client device 200.
  • the key generation unit 402 generates an encryption key for encrypting the Shader program and a decryption key for decrypting the encrypted Shader program.
  • the encryption unit 403 encrypts the Shader program using the encryption key generated by the key generation unit 402. As described above, the Shader program to be encrypted is a pre-compiled Shader program.
  • the control unit 303 operates on the main thread 301. More specifically, the control unit 303 receives the decryption key from the server device 100 in the main thread 301. Further, after receiving the decryption key from the server device 100, the control unit 303 generates a worker thread in which the decryption compilation unit 305 operates. In addition, the control unit 303 executes a Shader program and performs drawing processing using WebGL.
  • the control unit 303 is an example of a decryption key receiving unit.
  • the operation performed by the control unit 303 is an example of a decryption key reception process.
  • the decryption compilation unit 305 operates on the worker thread 302. More specifically, after receiving the decryption key by the control unit 303, the decryption compilation unit 305 uses the worker thread 302 to encrypt the pre-compilation Shader program encrypted by the server device 100 from the server device 100. Receive the customization program. Furthermore, the decryption compiling unit 305 obtains a pre-compiled Shader program by decrypting the received encrypted program using the decryption key in the worker thread 302. Further, the decryption compilation unit 305 compiles the acquired pre-compilation Shader program in the worker thread 302. Then, the decryption compilation unit 305 outputs the compiled Shader program to the control unit 303 by inter-thread communication. The operation performed in the decryption compilation unit 305 is an example of decryption compilation processing.
  • FIG. 5 shows an operation example of the client device 200.
  • FIG. 5 shows the operation in the main thread 301 and the operation in the worker thread 302.
  • the control unit 303 operates in the main thread 301
  • the decryption compilation unit 305 operates in the worker thread 302.
  • the control unit 303 performs user authentication (step S 303), thread generation (step S 304), attachment processing to Shader (step S 309), and drawing processing using WebGL (step 310).
  • the decryption compiling unit 305 performs encryption program acquisition (step S305), decryption (step S306), Shader Compile (step S307), and object storage (step S308).
  • the main thread 301 When the WebApp 300 is operated by the browser 208, the main thread 301 is activated first. In the main thread 301, the control unit 303 performs user authentication in step S303. In the user authentication, the control unit 303 acquires user identification information for identifying the user of the client device 200 from the input device 204. The user identification information is, for example, an ID (Identifier) and a password. And the control part 303 transmits user identification information to the server apparatus 100 via a network.
  • ID Identity
  • the user authentication unit 401 of the server apparatus 100 performs user authentication using the user identification information, and when the user authentication is successful, the key generation unit 402 generates an encryption key and a decryption key.
  • the key generation unit 402 generates an encryption key and a decryption key using an algorithm such as PGP (Pretty Good Privacy) or RSA (registered trademark), for example.
  • the decryption key includes information necessary for decryption. Then, the key generation unit 402 transmits the decryption key to the client device 200.
  • the control unit 303 receives the decryption key transmitted from the server device 100, and generates a worker thread 302 in step S304.
  • the decryption compiling unit 305 is activated by the generation of the worker thread 302. Then, the control unit 303 passes the decryption key received from the server device 100 to the decryption compilation unit 305 on the worker thread 302.
  • step S305 the decryption compiling unit 305 requests the server apparatus 100 to transmit the encryption program via the network, and receives the encryption program from the server apparatus 100.
  • the encryption unit 403 encrypts the pre-compiled Shader program using the encryption key generated by the key generation unit 402.
  • the encryption program obtained by the encryption can be decrypted with the decryption key held by the decryption compilation unit 305. Then, the encryption unit 403 transmits the encryption program to the client device 200.
  • step S306 the decryption compiling unit 305 decrypts the encrypted program using the decryption key.
  • the decoding and compiling unit 305 obtains a pre-compiled Shader program. More specifically, the decryption compilation unit 305 obtains VertexShader and FragmentShader.
  • step S307 the decryption compilation unit 305 compiles VertexShader and FragmentShader.
  • step S308 the decryption compilation unit 305 stores the Shader program (two Shader objects) obtained by the compilation as an array in one object. Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value. When a return value is returned, the worker thread 302 is released and the decryption compilation unit 305 ends the process.
  • the control unit 303 performs attachment processing to the Shader program in step S309 based on the return value from the decryption compilation unit 305. Specifically, the control unit 303 attaches a return value VertexShader Shader object and a Fragment Shader Shader object. Note that attaching means inputting a Shader object to WebGL and setting parameters.
  • step S310 the control unit 303 executes the Shader object and performs drawing processing using WebGL.
  • FIG. 1 an example will be described in which the time from the encryption program acquisition (step S305) to the attachment process (step S309) shown in FIG. 5 is measured.
  • the system configuration according to the present embodiment is as shown in FIG.
  • the hardware configuration of the server apparatus 100 is as shown in FIG.
  • the hardware configuration of the client device 200 is as shown in FIG.
  • the functional configurations of the server apparatus 100 and the client apparatus 200 are as shown in FIG.
  • differences from the first embodiment will be mainly described. Further, matters not described below are the same as those in the first embodiment.
  • FIG 7 and 8 show an operation example of the client device 200 according to the present embodiment.
  • Steps S303 and S304 are the same as those shown in FIG. That is, the control unit 303 receives the decryption key from the server device 100 in the main thread 301 and generates the worker thread 302. In step S311, the control unit 303 starts time measurement.
  • step S3050 the decryption compiling unit 305 receives, from the server device 100, the dummy encryption program obtained by encrypting the pre-compiled dummy program by the server device 100 in the worker thread 302.
  • the dummy program is a dummy Shader program.
  • Step S3050 is the same as step S305 except that the reception target program is a dummy encryption program.
  • step S3060 the decryption compiling unit 305 uses the decryption key to decrypt the dummy encryption program in the worker thread 302 to obtain a pre-compilation dummy program.
  • Step S3060 is the same as step S306 except that the program to be decrypted is a dummy encryption program.
  • step S3070 the decryption compilation unit 305 compiles the obtained dummy program before compilation in the worker thread 302 to obtain a dummy program after compilation.
  • Step S3070 is the same as step S307 except that the program to be compiled is a dummy program.
  • step S3080 the decryption compilation unit 305 stores the dummy Shader program (two Shader objects) obtained by compiling in the worker thread 302 as an array in one object. Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value.
  • Step S3080 is the same as step S308 except that the two Shader objects are dummy Shader program objects.
  • step S3090 the control unit 303 performs an attachment process to the dummy Shader program in the main thread 301 based on the return value from the decryption compilation unit 305.
  • Step S3090 is the same as step S309, except that the program to be attached is a dummy Shader program.
  • step S312 the control unit 303 ends the time measurement.
  • the time measured between step S311 and step S312 is referred to as a first processing time.
  • step S313 the control unit 303 starts time measurement again.
  • Steps S305 to S309 are the same as S305 to S309 shown in FIG. That is, the decryption compilation unit 305 receives from the server device 100 an encrypted program obtained by encrypting the pre-compiled Shader program. Also, the decryption compiling unit 305 decrypts the encrypted program using the decryption key to obtain a pre-compiled Shader program. Then, the decryption compiling unit 305 compiles the Shader program, stores two Shader objects in one object, and returns a return value to the control unit 303. The control unit 303 performs an attach process to the Shader program based on the return value.
  • step S314 the control unit 303 ends the time measurement.
  • the time measured between steps S313 and S314 is referred to as a second processing time.
  • step S315 the control unit 303 performs an abnormality detection process using the first processing time and the second processing time.
  • the control unit 303 compares the first processing time and the second processing time, and when the difference between the first processing time and the second processing time is equal to or greater than a threshold value. It is determined that an abnormality has occurred. That is, the control unit 303 determines that an unauthorized process has been performed. Then, the control unit 303 notifies the server device 100 that unauthorized processing has been performed.
  • the server apparatus 100 prevents reverse engineering by freezing the user account of the user of the client apparatus 200.
  • the time (first processing time) from the reception of the dummy encryption program by the decryption compiling unit 305 to the regulation processing (attach processing) by the control unit 303, the decryption compiling unit Abnormality can be detected by comparing the time (second processing time) from the reception of the encryption program by 305 to the prescribed processing (attach processing) in the control unit 303.
  • Embodiment 3 the user event process (step S3110) and the user event result determination process (step S3111) are added to the process of the second embodiment shown in FIG.
  • An example of detecting a third party debugging operation during measurement of the processing time and the second processing time will be described.
  • the system configuration according to the present embodiment is as shown in FIG.
  • the hardware configuration of the server apparatus 100 is as shown in FIG.
  • the hardware configuration of the client device 200 is as shown in FIG.
  • the functional configurations of the server apparatus 100 and the client apparatus 200 are as shown in FIG.
  • the control unit 303 detects the debugging operation in parallel with the measurement of the first processing time, and detects the debugging operation in parallel with the measurement of the second processing time.
  • Items not described below are the same as those in the second embodiment.
  • Steps S303 and S304 are the same as those shown in FIG. That is, the control unit 303 receives the decryption key from the server device 100 in the main thread 301 and generates the worker thread 302. In step S311, the control unit 303 starts time measurement.
  • step S3110 the control unit 303 executes user event processing (automatic response prevention operation, intentional timeout error due to access to another web site, and the like), and stores the execution result.
  • user event processing automated response prevention operation, intentional timeout error due to access to another web site, and the like
  • the control unit 303 uses a setTimeout function that uses a time designation event API, a response request Timeout to an external server device, and the like, which are functions of HTML5.
  • the control unit 303 includes a process that cannot return a return value during a debug event, such as prompting the user to click on a designated area with a mouse within a time limit.
  • step S3050 the decryption compiling unit 305 receives, from the server device 100, the dummy encryption program obtained by encrypting the pre-compiled dummy program by the server device 100 in the worker thread 302.
  • the dummy program is a dummy Shader program.
  • Step S3050 is the same as step S305 except that the reception target program is a dummy encryption program.
  • step S3060 the decryption compiling unit 305 uses the decryption key to decrypt the dummy encryption program in the worker thread 302 to obtain a pre-compilation dummy program.
  • Step S3060 is the same as step S306 except that the program to be decrypted is a dummy encryption program.
  • step S3070 the decryption compilation unit 305 compiles the obtained dummy program before compilation in the worker thread 302 to obtain a dummy program after compilation.
  • Step S3070 is the same as step S307 except that the program to be compiled is a dummy program.
  • step S3080 the decryption compilation unit 305 stores the dummy Shader program (two Shader objects) obtained by compiling in the worker thread 302 as an array in one object. Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value.
  • Step S3080 is the same as step S308 except that the two Shader objects are dummy Shader program objects.
  • step S3090 the control unit 303 performs an attachment process to the dummy Shader program in the main thread 301 based on the return value from the decryption compilation unit 305.
  • Step S3090 is the same as step S309, except that the program to be attached is a dummy Shader program.
  • step S3111 the control unit 303 acquires the result stored in step S3110, and determines whether or not the user (third party) is intentionally performing a debugging operation.
  • step S312 the control unit 303 ends the time measurement.
  • the time measured between step S311 and step S312 is referred to as a first processing time.
  • the control unit 303 detects the debugging operation by the user event process in step S3110 and the user event result determination process in step S3111 in parallel with the measurement of the first processing time. .
  • step S313 the control unit 303 starts time measurement again. Note that the control unit 303 performs user event processing again in step S3110. The user event processing at this stage is the same as described above.
  • Steps S305 to S309 are the same as S305 to S309 shown in FIG. That is, the decryption compilation unit 305 receives from the server device 100 an encrypted program obtained by encrypting the pre-compiled Shader program. Also, the decryption compiling unit 305 decrypts the encrypted program using the decryption key to obtain a pre-compiled Shader program. Then, the decryption compiling unit 305 compiles the Shader program, stores two Shader objects in one object, and returns a return value to the control unit 303. The control unit 303 performs an attach process to the Shader program based on the return value. Further, the control unit 303 performs a user event result determination process in step S3111. The user event result determination process at this stage is the same as described above.
  • step S314 the control unit 303 ends the time measurement.
  • the time measured between steps S313 and S314 is referred to as a second processing time.
  • the control unit 303 detects the debugging operation by the user event process in step S3110 and the user event result determination process in step S3111 in parallel with the measurement of the second processing time. .
  • step S315 the control unit 303 performs an abnormality detection process using the first processing time and the second processing time.
  • the control unit 303 compares the first processing time and the second processing time, and when the difference between the first processing time and the second processing time is equal to or greater than a threshold value. It is determined that an abnormality has occurred. That is, the control unit 303 determines that an unauthorized process has been performed. Then, the control unit 303 notifies the server device 100 that unauthorized processing has been performed.
  • the server apparatus 100 prevents reverse engineering by freezing the user account of the user of the client apparatus 200.
  • the user event processing step (S3110) and the user event result determination processing step (S3111) detect fraud such as placing a debug point on the browser before and after starting the time measurement timer and crafting the measurement time. can do. For this reason, according to the present embodiment, it is possible to appropriately perform the abnormality detection process using the first processing time and the second processing time described in the second embodiment. As a result, according to the present embodiment, an abnormality can be detected.
  • the auxiliary storage device 105 stores an OS (Operating System). At least a part of the OS is executed by the processor 101.
  • the processor 101 executes a program that realizes the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 while executing at least a part of the OS.
  • the processor 101 executes the OS, task management, memory management, file management, communication control, and the like are performed.
  • the auxiliary storage device 205 stores an OS. Then, at least a part of the OS is executed by the processor 201.
  • the processor 201 executes a program that realizes the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 while executing at least a part of the OS.
  • the processor 201 executes the OS, task management, memory management, file management, communication control, and the like are performed.
  • information, data, signal values, and variable values indicating the processing results of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 are stored in the memory 102, the auxiliary storage device 105, or the processor 101. Stored in a register or cache memory.
  • a program for realizing the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 is stored in a portable storage medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, and a DVD. It may be stored.
  • information, data, signal values, and variable values indicating the processing results of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 are stored in the memory 102, the auxiliary storage device 105, or the processor 201. Stored in a register or cache memory. Further, programs for realizing the functions of the browser 208, the WebApp 300, the control unit 303, and the decryption compilation unit 305 are stored in a portable storage medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, or a DVD. May be.
  • the browser 208, WebApp 300, control unit 303, decryption compilation unit 305, user authentication unit 401, key generation unit 402, and encryption unit 403 are replaced with “circuit” or “process” or “procedure” or “processing”. Also good.
  • the server apparatus 100 and the client apparatus 200 may be implemented by electronic circuits such as logic IC (Integrated Circuit), GA (Gate Array), ASIC (Application Specific Integrated Circuit), and FPGA (Field-Programmable Gate Array), respectively. Good.
  • the processor and the electronic circuit are also collectively referred to as a processing circuit.
  • server device 101 processor, 102 memory, 103 display device, 104 input device, 105 auxiliary storage device, 106 communication device, 200 client device, 201 processor, 202 memory, 203 display device, 204 input device, 205 auxiliary storage device, 206 GPU, 207 communication device, 208 browser, 300 WebApp, 301 main thread, 302 worker thread, 303 control unit, 305 decryption compilation unit, 401 user authentication unit, 402 key generation unit, 403 encryption unit.

Abstract

In the present invention, a client device (200) operates on multiple threads. A control unit (303) receives a decryption key from a server device (100) in a main thread. After receiving the decryption key from the control unit (303), the decryption-compilation unit (305) receives, from the server device (100) and in a sub-thread, an encrypted program obtained by using a server device (100) to encrypt a pre-compilation program, decrypts the received encrypted program using a decryption key to obtain the pre-compilation program, and compiles the pre-compilation program thus obtained.

Description

復号装置、復号コンパイル方法及び復号コンパイルプログラムDecoding device, decoding compilation method, and decoding compilation program
 本発明は、暗号化されたプログラムを復号する技術に関する。 The present invention relates to a technique for decrypting an encrypted program.
 ブラウザ上で動作するアプリケーションプログラムを保護する技術として、特許文献1に記載の技術がある。特許文献1の技術では、暗号化されたスクリプトをセキュアなVirtualMactine(以下、VMという)環境内で復号することで、プログラムの秘匿性を保っている。また、VM環境を用いずにクライアント装置のブラウザ内で、暗号化されたスクリプトを復号し、復号されたスクリプトを実行する技術も存在する(例えば、特許文献2)。 There is a technique described in Patent Document 1 as a technique for protecting an application program running on a browser. In the technique of Patent Document 1, the confidentiality of a program is maintained by decrypting an encrypted script in a secure Virtual Mactine (hereinafter referred to as VM) environment. There is also a technique for decrypting an encrypted script and executing the decrypted script within the browser of the client device without using the VM environment (for example, Patent Document 2).
特開2010-140470号公報JP 2010-140470 A 特開2009-294929号公報JP 2009-294929 A
 特許文献1に記載の方法では、必ずVMを用いねばならず、VMが動作する環境でないと復号ができないという課題がある。 In the method described in Patent Document 1, a VM must be used, and there is a problem that decoding cannot be performed unless the VM is operating.
 特許文献2に記載の方法では、ブラウザのみの環境で実現することができるが、XMLHttpRequestを使うため、サーバ装置から一定時間ごとに、通信を確立をするためのPush通信をクライアント装置へ定期的に行う必要がある。 The method described in Patent Document 2 can be realized in a browser-only environment. However, since XMLHttpRequest is used, Push communication for establishing communication from the server device at regular intervals is periodically sent to the client device. There is a need to do.
 現行のブラウザはJavaScript(登録商標)等のソースコードから命令を解釈し、記述に応じて処理を逐次実行する機能を備えている(例えばFirefox(登録商標))。
 ブラウザはFirebug等を用いてJavaScript(登録商標)のデバッグを実行することができ、更に、デバッグにより、変数参照や処理内容(処理データ)を参照することができる。このため、デバッグによりプログラムのソースコードが漏洩してしまうという課題がある。
Current browsers have a function of interpreting instructions from source code such as JavaScript (registered trademark) and sequentially executing processing according to the description (for example, Firefox (registered trademark)).
The browser can execute JavaScript (registered trademark) debugging using Firebug or the like, and can also refer to variable references or processing contents (processing data) by debugging. For this reason, there is a problem that the source code of the program is leaked by debugging.
 本発明は、このような課題を解決することを主な目的としており、デバッグによるプログラムのソースコードの漏洩を防止することを主な目的とする。 The main object of the present invention is to solve such a problem, and it is a main object to prevent leakage of program source code due to debugging.
 本発明に係る復号装置は、
 マルチスレッドで動作する復号装置であって、
 メインスレッドにおいて、暗号化装置から復号鍵を受信する復号鍵受信部と、
 前記復号鍵受信部による前記復号鍵の受信後に、サブスレッドにおいて、前記暗号化装置から、コンパイル前のプログラムが前記暗号化装置で暗号化されて得られた暗号化プログラムを受信し、受信した前記暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記プログラムを取得し、取得したコンパイル前の前記プログラムをコンパイルする復号コンパイル部とを有する。
The decoding device according to the present invention provides:
A multi-threaded decoding device,
In the main thread, a decryption key receiving unit that receives a decryption key from the encryption device;
After receiving the decryption key by the decryption key receiving unit, in the sub-thread, the encryption program obtained by encrypting the pre-compiled program by the encryption device is received from the encryption device and received. A decryption compiling unit that decrypts an encrypted program using the decryption key to obtain the program before compilation, and compiles the obtained program before compilation.
 本発明では、デバッグができないサブスレッドにおいて、暗号化プログラムを復号し、復号により得られたプログラムをコンパイルする。コンパイル後のプログラムのソースコードは解読することができない。このため、本発明によれば、デバッグによるプログラムのソースコードの漏洩を防止することができる。 In the present invention, in the sub-thread that cannot be debugged, the encrypted program is decrypted and the program obtained by the decryption is compiled. The source code of the compiled program cannot be deciphered. For this reason, according to the present invention, it is possible to prevent leakage of the source code of the program due to debugging.
実施の形態1に係るシステム構成例を示す図。FIG. 3 is a diagram illustrating an example of a system configuration according to the first embodiment. 実施の形態1に係るサーバ装置のハードウェア構成例を示す図。FIG. 3 is a diagram illustrating a hardware configuration example of a server device according to the first embodiment. 実施の形態1に係るクライアント装置のハードウェア構成例を示す図。FIG. 3 is a diagram illustrating a hardware configuration example of a client device according to the first embodiment. 実施の形態1に係るクライアント装置におけるスレッド構成を示す図。FIG. 3 is a diagram illustrating a thread configuration in the client device according to the first embodiment. 実施の形態1に係るクライアント装置におけるメインスレッドとワーカースレッドにおける動作例を示すフローチャート図。FIG. 6 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the first embodiment. 実施の形態1に係るサーバ装置とクライアント装置の機能構成例を示す図。FIG. 3 is a diagram illustrating a functional configuration example of a server device and a client device according to the first embodiment. 実施の形態2に係るクライアント装置におけるメインスレッドとワーカースレッドにおける動作例を示すフローチャート図。FIG. 10 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the second embodiment. 実施の形態2に係るクライアント装置におけるメインスレッドとワーカースレッドにおける動作例を示すフローチャート図。FIG. 10 is a flowchart showing an operation example of a main thread and a worker thread in the client device according to the second embodiment. 実施の形態3に係るクライアント装置におけるメインスレッドとワーカースレッドにおける動作例を示すフローチャート図。FIG. 10 is a flowchart showing an operation example in a main thread and a worker thread in the client device according to the third embodiment. 実施の形態3に係るクライアント装置におけるメインスレッドとワーカースレッドにおける動作例を示すフローチャート図。FIG. 10 is a flowchart showing an operation example in a main thread and a worker thread in the client device according to the third embodiment.
実施の形態1.
***概要***
 本実施の形態では、図1に示すように、複数のクライアント装置200がネットワークを介して、サーバ装置100に接続している構成を前提とする。なお、ネットワークは有線ネットワークに限らず、Wi-Fi等の無線ネットワークでもよい。
 サーバ装置100は、暗号化装置の例である。
 クライアント装置200は、復号装置の例である。また、クライアント装置200で行われる動作は、復号コンパイル方法及び復号コンパイルプログラムの例である。
Embodiment 1 FIG.
***Overview***
In the present embodiment, as shown in FIG. 1, it is assumed that a plurality of client devices 200 are connected to the server device 100 via a network. The network is not limited to a wired network but may be a wireless network such as Wi-Fi.
The server device 100 is an example of an encryption device.
The client device 200 is an example of a decryption device. The operations performed by the client device 200 are examples of a decryption compilation method and a decryption compilation program.
 本実施の形態では、クライアント装置200はブラウザを用いてサーバ装置100から暗号化プログラムと暗号化プログラムを復号するための復号鍵を受信する。暗号化プログラムは、暗号化された、コンパイル前のプログラムである。
 クライアント装置200のブラウザにはマルチスレッドを動作させるWebWorkerという機能が含まれる。WebWorkerでは、メインスレッドと、サブスレッドであるワーカースレッドとにおいて並列処理が可能である。ワーカースレッドでの処理にはデバッグ機能は働かない。
 クライアント装置200のブラウザにはWebGLと呼ばれる3Dグラフィックスを表示する機能が実装されている。クライアント装置200は、Shaderプログラム(以下、単にShaderともいう)を実行して、3Dオブジェクトへの影付け処理等を行うことで、3Dグラフィックスを実現することができる。ブラウザでWebGLを用いて3D表示を行うためには、Shaderプログラムをブラウザ上でコンパイルし、更に、コンパイル後のShaderプログラムにアタッチと呼ばれる設定をブラウザ上で行う必要がある。コンパイル前のShaderプログラムが第三者に解読されると、Shaderプログラムのソースコードが漏洩することになる。
 一方、コンパイル後のShaderプログラムは第三者に解読されるおそれがない。つまり、コンパイル直前のShaderプログラムのソースコードの漏洩が問題となる。
 このため、本実施の形態に係るクライアント装置200は、デバッグ機能が働かないワーカースレッドにおいて、暗号化されたコンパイル前のShaderプログラムを復号して、コンパイル前のShaderプログラムを得る。更に、本実施の形態に係るクライアント装置200は、ワーカースレッドにおいて、復号により得られたコンパイル前のShaderプログラムのコンパイルを行い、コンパイル後のShaderプログラムをメインスレッドに出力する。このような手順により、本実施の形態に係るクライアント装置200では、Shaderプログラムのソースコードを漏洩させることなく、Shaderプログラムを実行して、3D表示を行うことができる。
In the present embodiment, the client device 200 receives an encryption program and a decryption key for decrypting the encryption program from the server device 100 using a browser. The encryption program is an encrypted program before compilation.
The browser of the client device 200 includes a function called WebWorker that operates multithread. In WebWorker, parallel processing is possible in a main thread and a worker thread as a sub thread. The debugging function does not work for processing in worker threads.
The browser of the client device 200 has a function for displaying 3D graphics called WebGL. The client device 200 can implement 3D graphics by executing a Shader program (hereinafter also simply referred to as “Shader”) and performing a shadowing process on a 3D object. In order to perform 3D display using WebGL in the browser, it is necessary to compile the Shader program on the browser and to perform a setting called attach to the compiled Shader program on the browser. If the pre-compiled Shader program is decrypted by a third party, the source code of the Shader program will be leaked.
On the other hand, the compiled Shader program is not likely to be deciphered by a third party. That is, leakage of the source code of the Shader program immediately before compilation becomes a problem.
For this reason, the client device 200 according to the present embodiment decrypts the encrypted pre-compilation Shader program in a worker thread where the debugging function does not work, and obtains the pre-compilation Shader program. Furthermore, the client device 200 according to the present embodiment compiles the pre-compilation Shader program obtained by decoding in the worker thread, and outputs the post-compilation Shader program to the main thread. With such a procedure, the client device 200 according to the present embodiment can execute the Shader program and perform 3D display without leaking the source code of the Shader program.
***構成の説明***
 前述したように、本実施の形態では、図1に示すシステム構成を前提とする。
 図2は、本実施の形態に係るサーバ装置100のハードウェア構成例を示す。
 図3は、本実施の形態に係るクライアント装置200のハードウェア構成例を示す。
 また、図4は、本実施の形態に係るクライアント装置200のブラウザ208におけるスレッド構成を示す。
 また、図6は、本実施の形態に係るサーバ装置100及びクライアント装置200の機能構成例を示す。
*** Explanation of configuration ***
As described above, the present embodiment assumes the system configuration shown in FIG.
FIG. 2 shows a hardware configuration example of the server apparatus 100 according to the present embodiment.
FIG. 3 shows a hardware configuration example of the client apparatus 200 according to the present embodiment.
FIG. 4 shows a thread configuration in the browser 208 of the client device 200 according to the present embodiment.
FIG. 6 shows an example of the functional configuration of the server device 100 and the client device 200 according to the present embodiment.
 先ず、図2を参照して、サーバ装置100のハードウェア構成例を説明する。
 図2に示すように、サーバ装置100は、プロセッサ101、メモリ102、表示機103、入力装置104、補助記憶装置105、通信装置106を備えるコンピュータである。
 プロセッサ101は、CPU(Central Processing Unit)である。メモリ102は、RAM(Random Access Memory)である。表示機103は、ディスプレイである。入力装置104は、キーボード及びマウスである。補助記憶装置105は、フラッシュメモリ又はHDD(Hard Disk Drive)である。通信装置106は、通信チップ又はNIC(Network Interface Card)である。
 補助記憶装置105には、図6に示すユーザー認証部401、鍵生成部402、暗号化部403の機能を実現するプログラムが記憶されている。
 そして、これらプログラムが補助記憶装置105からメモリ102にロードされ、プロセッサ101がこれらプログラムを実行することにより、後述するユーザー認証部401、鍵生成部402、暗号化部403の動作を行う。
 図2では、プロセッサ101がユーザー認証部401、鍵生成部402、暗号化部403の機能を実現するプログラムを実行している状態を模式的に表している。
First, a hardware configuration example of the server apparatus 100 will be described with reference to FIG.
As illustrated in FIG. 2, the server device 100 is a computer including a processor 101, a memory 102, a display device 103, an input device 104, an auxiliary storage device 105, and a communication device 106.
The processor 101 is a CPU (Central Processing Unit). The memory 102 is a RAM (Random Access Memory). The display device 103 is a display. The input device 104 is a keyboard and a mouse. The auxiliary storage device 105 is a flash memory or an HDD (Hard Disk Drive). The communication device 106 is a communication chip or a NIC (Network Interface Card).
The auxiliary storage device 105 stores programs that realize the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 shown in FIG.
Then, these programs are loaded from the auxiliary storage device 105 to the memory 102, and the processor 101 executes these programs, thereby performing operations of a user authentication unit 401, a key generation unit 402, and an encryption unit 403, which will be described later.
FIG. 2 schematically illustrates a state in which the processor 101 is executing a program that implements the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403.
 次に、図3を参照して、クライアント装置200のハードウェア構成例を説明する。
 図3に示すように、クライアント装置200は、プロセッサ201、メモリ202、表示機203、入力装置204、補助記憶装置205、GPU(Graphics Processing Unit)206、通信装置207を備えるコンピュータである。
 プロセッサ201は、CPUである。メモリ202は、RAMである。表示機103は、ディスプレイである。入力装置104は、キーボード及びマウスである。補助記憶装置105は、フラッシュメモリ又はHDDである。通信装置207は、通信チップ又はNICである。
 補助記憶装置105には、図6に示すブラウザ208、WebApp300、制御部303、復号コンパイル部305の機能を実現するプログラムが記憶されている。図6に示すように、ブラウザ208にはWebApp300が含まれ、WebApp300には制御部303と復号コンパイル部305が含まれる。ブラウザ208、WebApp300、制御部303、復号コンパイル部305の詳細は後述する。
 そして、これらプログラムが補助記憶装置205からメモリ202にロードされ、プロセッサ201がこれらプログラムを実行することにより、後述するブラウザ208、WebApp300、制御部303、復号コンパイル部305の動作を行う。
 図3では、プロセッサ201がブラウザ208、WebApp300、制御部303、復号コンパイル部305の機能を実現するプログラムを実行している状態を模式的に表している。
 クライアント装置200は、前述したように、マルチスレッドで動作する。
Next, a hardware configuration example of the client device 200 will be described with reference to FIG.
As illustrated in FIG. 3, the client device 200 is a computer including a processor 201, a memory 202, a display device 203, an input device 204, an auxiliary storage device 205, a GPU (Graphics Processing Unit) 206, and a communication device 207.
The processor 201 is a CPU. The memory 202 is a RAM. The display device 103 is a display. The input device 104 is a keyboard and a mouse. The auxiliary storage device 105 is a flash memory or an HDD. The communication device 207 is a communication chip or a NIC.
The auxiliary storage device 105 stores programs that realize the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 shown in FIG. As shown in FIG. 6, the browser 208 includes a WebApp 300, and the WebApp 300 includes a control unit 303 and a decryption compilation unit 305. Details of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 will be described later.
Then, these programs are loaded from the auxiliary storage device 205 to the memory 202, and the processor 201 executes these programs, thereby performing operations of a browser 208, a WebApp 300, a control unit 303, and a decryption compilation unit 305 described later.
FIG. 3 schematically shows a state in which the processor 201 is executing a program that implements the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305.
As described above, the client device 200 operates in multithread.
 次に、図4を参照して、クライアント装置200におけるスレッド構成を説明する。
 より具体的には、図4は、ブラウザ208上で動作するHTML(HyperText Markup Language)5のJavaScript(登録商標)等で記述されたWebGLのウェブアプリケーション(以下、WebAppという)300の構成例を示す。
 WebApp300はメインスレッド301と、サブスレッドであるワーカースレッド302で構成されている。メインスレッド301とワーカースレッド302は、それぞれ、HTML5のマルチスレッド機能(WebWorker)を用いて生成されたスレッドである。メインスレッド301とワーカースレッド302は、互いに通信(スレッド間通信)を行うことができる。
Next, a thread configuration in the client apparatus 200 will be described with reference to FIG.
More specifically, FIG. 4 shows a configuration example of a WebGL web application (hereinafter referred to as WebApp) 300 described in Java Script (registered trademark) of HTML (HyperText Markup Language) 5 running on the browser 208. .
The WebApp 300 includes a main thread 301 and a worker thread 302 that is a sub thread. The main thread 301 and the worker thread 302 are threads generated using the multi-thread function (WebWorker) of HTML5. The main thread 301 and the worker thread 302 can communicate with each other (inter-thread communication).
 次に、図6を参照して、サーバ装置100の機能構成例及びクライアント装置200の機能構成例を説明する。 Next, a functional configuration example of the server apparatus 100 and a functional configuration example of the client apparatus 200 will be described with reference to FIG.
 サーバ装置100において、ユーザー認証部401は、クライアント装置200のユーザーの認証処理を行う。
 鍵生成部402は、Shaderプログラムを暗号化するための暗号鍵と、暗号化されたShaderプログラムを復号するための復号鍵を生成する。
 暗号化部403は、鍵生成部402により生成された暗号鍵を用いて、Shaderプログラムを暗号化する。前述したように、暗号化の対象のShaderプログラムはコンパイル前のShaderプログラムである。
In the server device 100, the user authentication unit 401 performs user authentication processing of the client device 200.
The key generation unit 402 generates an encryption key for encrypting the Shader program and a decryption key for decrypting the encrypted Shader program.
The encryption unit 403 encrypts the Shader program using the encryption key generated by the key generation unit 402. As described above, the Shader program to be encrypted is a pre-compiled Shader program.
 クライアント装置200において、制御部303は、メインスレッド301で動作する。より具体的には、制御部303は、メインスレッド301において、サーバ装置100から復号鍵を受信する。また、制御部303は、サーバ装置100から復号鍵を受信した後に、復号コンパイル部305が動作するワーカースレッドを生成する。また、制御部303は、Shaderプログラムを実行してWebGLによる描画処理を行う。
 なお、制御部303は、復号鍵受信部の例である。また、制御部303で行われる動作は、復号鍵受信処理の例である。
In the client device 200, the control unit 303 operates on the main thread 301. More specifically, the control unit 303 receives the decryption key from the server device 100 in the main thread 301. Further, after receiving the decryption key from the server device 100, the control unit 303 generates a worker thread in which the decryption compilation unit 305 operates. In addition, the control unit 303 executes a Shader program and performs drawing processing using WebGL.
The control unit 303 is an example of a decryption key receiving unit. The operation performed by the control unit 303 is an example of a decryption key reception process.
 復号コンパイル部305は、ワーカースレッド302で動作する。より具体的には、制御部303による復号鍵の受信後に、復号コンパイル部305は、ワーカースレッド302において、サーバ装置100から、コンパイル前のShaderプログラムがサーバ装置100で暗号化されて得られた暗号化プログラムを受信する。更に、復号コンパイル部305は、ワーカースレッド302において、受信した暗号化プログラムを復号鍵を用いて復号してコンパイル前のShaderプログラムを取得する。更に、復号コンパイル部305は、ワーカースレッド302において、取得したコンパイル前のShaderプログラムをコンパイルする。そして、復号コンパイル部305は、スレッド間通信により、コンパイル後のShaderプログラムを制御部303に出力する。
 復号コンパイル部305で行われる動作は、復号コンパイル処理の例である。
The decryption compilation unit 305 operates on the worker thread 302. More specifically, after receiving the decryption key by the control unit 303, the decryption compilation unit 305 uses the worker thread 302 to encrypt the pre-compilation Shader program encrypted by the server device 100 from the server device 100. Receive the customization program. Furthermore, the decryption compiling unit 305 obtains a pre-compiled Shader program by decrypting the received encrypted program using the decryption key in the worker thread 302. Further, the decryption compilation unit 305 compiles the acquired pre-compilation Shader program in the worker thread 302. Then, the decryption compilation unit 305 outputs the compiled Shader program to the control unit 303 by inter-thread communication.
The operation performed in the decryption compilation unit 305 is an example of decryption compilation processing.
***動作の説明***
 図5は、クライアント装置200の動作例を示す。
 図5では、メインスレッド301での動作とワーカースレッド302での動作が示される。前述したように、メインスレッド301では制御部303が動作し、ワーカースレッド302では復号コンパイル部305が動作する。
*** Explanation of operation ***
FIG. 5 shows an operation example of the client device 200.
FIG. 5 shows the operation in the main thread 301 and the operation in the worker thread 302. As described above, the control unit 303 operates in the main thread 301, and the decryption compilation unit 305 operates in the worker thread 302.
 メインスレッド301では、制御部303が、ユーザー認証(ステップS303)、スレッド生成(ステップS304)、Shaderへのアタッチ処理(ステップS309)、WebGLによる描画処理(ステップ310を行う。
 一方、ワーカースレッド302では、復号コンパイル部305が、暗号化プログラム取得(ステップS305)、復号(ステップS306)、Shader Compile(ステップS307)、Object格納(ステップS308)を行う。
In the main thread 301, the control unit 303 performs user authentication (step S 303), thread generation (step S 304), attachment processing to Shader (step S 309), and drawing processing using WebGL (step 310).
On the other hand, in the worker thread 302, the decryption compiling unit 305 performs encryption program acquisition (step S305), decryption (step S306), Shader Compile (step S307), and object storage (step S308).
 次に、図6に示す各ステップの詳細を説明する。 Next, details of each step shown in FIG. 6 will be described.
 ブラウザ208でWebApp300を動作させるとメインスレッド301が最初に起動する。メインスレッド301では、制御部303が、ステップS303において、ユーザー認証を行う。ユーザー認証では、制御部303は、クライアント装置200のユーザーを識別するためのユーザー識別情報を入力装置204から取得する。ユーザー識別情報は、例えば、ID(Identifier)及びパスワードである。そして、制御部303は、ネットワークを介してサーバ装置100にユーザ識別情報を送信する。 When the WebApp 300 is operated by the browser 208, the main thread 301 is activated first. In the main thread 301, the control unit 303 performs user authentication in step S303. In the user authentication, the control unit 303 acquires user identification information for identifying the user of the client device 200 from the input device 204. The user identification information is, for example, an ID (Identifier) and a password. And the control part 303 transmits user identification information to the server apparatus 100 via a network.
 サーバ装置100のユーザー認証部401においてユーザ識別情報を用いたユーザー認証を行い、ユーザー認証に成功すると、鍵生成部402が、暗号鍵と復号鍵を生成する。鍵生成部402は、例えば、PGP(Pretty Good Privacy)やRSA(登録商標)等のアルゴリズムにより暗号鍵と復号鍵を生成する。復号鍵には復号に必要な情報が含まれている。そして、鍵生成部402は、復号鍵をクライアント装置200に送信する。 The user authentication unit 401 of the server apparatus 100 performs user authentication using the user identification information, and when the user authentication is successful, the key generation unit 402 generates an encryption key and a decryption key. The key generation unit 402 generates an encryption key and a decryption key using an algorithm such as PGP (Pretty Good Privacy) or RSA (registered trademark), for example. The decryption key includes information necessary for decryption. Then, the key generation unit 402 transmits the decryption key to the client device 200.
 クライアント装置200では、制御部303が、サーバ装置100から送信された復号鍵を受信し、ステップS304において、ワーカースレッド302を生成する。ワーカースレッド302の生成により復号コンパイル部305が起動する。そして、制御部303は、サーバ装置100から受信した復号鍵をワーカースレッド302上の復号コンパイル部305に渡す。 In the client device 200, the control unit 303 receives the decryption key transmitted from the server device 100, and generates a worker thread 302 in step S304. The decryption compiling unit 305 is activated by the generation of the worker thread 302. Then, the control unit 303 passes the decryption key received from the server device 100 to the decryption compilation unit 305 on the worker thread 302.
 ワーカースレッド302では、復号コンパイル部305が、ステップS305において、ネットワークを介してサーバ装置100に暗号化プログラムの送信を要求し、サーバ装置100から暗号化プログラムを受信する。サーバ装置100では、暗号化部403が、コンパイル前のShaderプログラムを、鍵生成部402が生成した暗号鍵を用いて暗号化する。暗号化により得られた暗号化プログラムは、復号コンパイル部305が保持する復号鍵で復号可能である。そして、暗号化部403は、暗号化プログラムをクライアント装置200に送信する。 In the worker thread 302, in step S305, the decryption compiling unit 305 requests the server apparatus 100 to transmit the encryption program via the network, and receives the encryption program from the server apparatus 100. In the server device 100, the encryption unit 403 encrypts the pre-compiled Shader program using the encryption key generated by the key generation unit 402. The encryption program obtained by the encryption can be decrypted with the decryption key held by the decryption compilation unit 305. Then, the encryption unit 403 transmits the encryption program to the client device 200.
 次に、復号コンパイル部305が、ステップS306において、暗号化プログラムを復号鍵を用いて復号する。復号により、復号コンパイル部305は、コンパイル前のShaderプログラムを得る。より具体的には、復号コンパイル部305は、VertexShaderとFragmentShaderを得る。 Next, in step S306, the decryption compiling unit 305 decrypts the encrypted program using the decryption key. By decoding, the decoding and compiling unit 305 obtains a pre-compiled Shader program. More specifically, the decryption compilation unit 305 obtains VertexShader and FragmentShader.
 次に、復号コンパイル部305は、ステップS307において、VertexShaderとFragmentShaderのコンパイルを行う。 Next, in step S307, the decryption compilation unit 305 compiles VertexShader and FragmentShader.
 次に、復号コンパイル部305は、ステップS308において、コンパイルにより得られたShaderプログラム(2つのShaderオブジェクト)を、1つのオブジェクトに配列として格納する。
 そして、復号コンパイル部305は、2つのShaderオブジェクトが格納されたオブジェクトを、戻り値としてメインスレッド301の制御部303に返す。
 なお、戻り値を返すと、ワーカースレッド302は解放され、復号コンパイル部305は処理を終了する。
Next, in step S308, the decryption compilation unit 305 stores the Shader program (two Shader objects) obtained by the compilation as an array in one object.
Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value.
When a return value is returned, the worker thread 302 is released and the decryption compilation unit 305 ends the process.
 メインスレッド301では、制御部303が、復号コンパイル部305からの戻り値を元に、ステップS309において、Shaderプログラムへのアタッチ処理を行う。具体的には、制御部303は、戻り値のVertexShaderのShaderオブジェクトとFragmentShaderのShaderオブジェクトのアタッチを行う。なお、アタッチとは、WebGLへのShaderオブジェクトの入力と、パラメータの設定を行うことである。 In the main thread 301, the control unit 303 performs attachment processing to the Shader program in step S309 based on the return value from the decryption compilation unit 305. Specifically, the control unit 303 attaches a return value VertexShader Shader object and a Fragment Shader Shader object. Note that attaching means inputting a Shader object to WebGL and setting parameters.
 最後に、制御部303が、ステップS310において、Shaderオブジェクトを実行して、WebGLによる描画処理を行う。 Finally, in step S310, the control unit 303 executes the Shader object and performs drawing processing using WebGL.
***実施の形態の効果の説明***
 前述したように、メインスレッドでの処理に対してはデバッグすることが可能だが、ワーカースレッドの処理に対してはデバッグすることができない。また、コンパイル済みのShaderオブジェクトからは、ソースコードを解読することができない。本実施の形態では、ワーカースレッドにおいて、復号処理とコンパイルとを行うので、デバッグによるShaderプログラムのソースコードの漏洩を防止することができる。
*** Explanation of the effect of the embodiment ***
As described above, it is possible to debug the processing in the main thread, but it is not possible to debug the processing in the worker thread. Further, the source code cannot be deciphered from the compiled Shader object. In this embodiment, since the decryption process and the compilation are performed in the worker thread, it is possible to prevent leakage of the source code of the Shader program due to debugging.
実施の形態2.
 本実施の形態では、図5に示す暗号化プログラム取得(ステップS305)からShaderへのアタッチ処理(ステップS309)までの時間を測定する例を説明する。
 本実施の形態に係るシステム構成は図1に示す通りである。サーバ装置100のハードウェア構成は図2に示す通りである。クライアント装置200のハードウェア構成は図3に示す通りである。また、サーバ装置100とクライアント装置200の機能構成は、図6に示す通りである。
 以下では、主に実施の形態1との差異を説明する。また、以下で説明していない事項は、実施の形態1と同じである。
Embodiment 2. FIG.
In the present embodiment, an example will be described in which the time from the encryption program acquisition (step S305) to the attachment process (step S309) shown in FIG. 5 is measured.
The system configuration according to the present embodiment is as shown in FIG. The hardware configuration of the server apparatus 100 is as shown in FIG. The hardware configuration of the client device 200 is as shown in FIG. The functional configurations of the server apparatus 100 and the client apparatus 200 are as shown in FIG.
Hereinafter, differences from the first embodiment will be mainly described. Further, matters not described below are the same as those in the first embodiment.
 図7及び図8は、本実施の形態に係るクライアント装置200の動作例を示す。 7 and 8 show an operation example of the client device 200 according to the present embodiment.
 ステップS303とステップS304は図5に示すものと同様である。すなわち、制御部303は、メインスレッド301において、サーバ装置100から復号鍵を受信し、ワーカースレッド302を生成する。
 ステップS311では、制御部303は、時間計測を開始する。
Steps S303 and S304 are the same as those shown in FIG. That is, the control unit 303 receives the decryption key from the server device 100 in the main thread 301 and generates the worker thread 302.
In step S311, the control unit 303 starts time measurement.
 ステップS3050では、復号コンパイル部305は、ワーカースレッド302において、サーバ装置100から、コンパイル前のダミープログラムがサーバ装置100で暗号化されて得られたダミー暗号化プログラムを受信する。ダミープログラムは、ダミーのShaderプログラムである。なお、ステップS3050は、受信対象のプログラムがダミー暗号化プログラムになっている点を除けばステップS305と同じである。 In step S3050, the decryption compiling unit 305 receives, from the server device 100, the dummy encryption program obtained by encrypting the pre-compiled dummy program by the server device 100 in the worker thread 302. The dummy program is a dummy Shader program. Step S3050 is the same as step S305 except that the reception target program is a dummy encryption program.
 ステップS3060では、復号コンパイル部305は、ワーカースレッド302において、ダミー暗号化プログラムを復号鍵を用いて復号してコンパイル前のダミープログラムを取得する。なお、ステップS3060は、復号の対象となるプログラムがダミー暗号化プログラムになっている点を除けばステップS306と同じである。 In step S3060, the decryption compiling unit 305 uses the decryption key to decrypt the dummy encryption program in the worker thread 302 to obtain a pre-compilation dummy program. Step S3060 is the same as step S306 except that the program to be decrypted is a dummy encryption program.
 ステップS3070では、復号コンパイル部305は、ワーカースレッド302において、取得したコンパイル前のダミープログラムをコンパイルし、コンパイル後のダミープログラムを得る。なお、ステップS3070は、コンパイル対象のプログラムがダミープログラムになっている点を除けばステップS307と同じである。 In step S3070, the decryption compilation unit 305 compiles the obtained dummy program before compilation in the worker thread 302 to obtain a dummy program after compilation. Step S3070 is the same as step S307 except that the program to be compiled is a dummy program.
 ステップS3080では、復号コンパイル部305は、ワーカースレッド302において、コンパイルにより得られたダミーのShaderプログラム(2つのShaderオブジェクト)を、1つのオブジェクトに配列として格納する。そして、復号コンパイル部305は、2つのShaderオブジェクトが格納されたオブジェクトを、戻り値としてメインスレッド301の制御部303に返す。なお、ステップS3080は、2つShaderオブジェクトがダミーのShaderプログラムのオブジェクトになっている点を除けばステップS308と同じである。 In step S3080, the decryption compilation unit 305 stores the dummy Shader program (two Shader objects) obtained by compiling in the worker thread 302 as an array in one object. Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value. Step S3080 is the same as step S308 except that the two Shader objects are dummy Shader program objects.
 ステップS3090では、制御部303が、メインスレッド301において、復号コンパイル部305からの戻り値を元に、ダミーのShaderプログラムへのアタッチ処理を行う。なお、ステップS3090は、アタッチの対象のプログラムがダミーのShaderプログラムになっている点を除けばステップS309と同じである。 In step S3090, the control unit 303 performs an attachment process to the dummy Shader program in the main thread 301 based on the return value from the decryption compilation unit 305. Step S3090 is the same as step S309, except that the program to be attached is a dummy Shader program.
 ステップS312では、制御部303は、時間計測を終了する。ステップS311からステップS312の間に計測された時間を第1の処理時間という。 In step S312, the control unit 303 ends the time measurement. The time measured between step S311 and step S312 is referred to as a first processing time.
 次に、ステップS313では、制御部303は、再度、時間計測を開始する。 Next, in step S313, the control unit 303 starts time measurement again.
 ステップS305~S309は、図5に示したS305~S309と同じである。つまり、復号コンパイル部305は、サーバ装置100からコンパイル前のShaderプログラムが暗号化された暗号化プログラムを受信する。また、復号コンパイル部305は、復号鍵を用いて暗号化プログラムを復号して、コンパイル前のShaderプログラムを得る。そして、復号コンパイル部305は、Shaderプログラムのコンパイルを行い、2つのShaderオブジェクトを1つのオブジェクトに格納し、戻り値を制御部303に返す。
 制御部303は、戻り値に基づき、Shaderプログラムへのアタッチ処理を行う。
Steps S305 to S309 are the same as S305 to S309 shown in FIG. That is, the decryption compilation unit 305 receives from the server device 100 an encrypted program obtained by encrypting the pre-compiled Shader program. Also, the decryption compiling unit 305 decrypts the encrypted program using the decryption key to obtain a pre-compiled Shader program. Then, the decryption compiling unit 305 compiles the Shader program, stores two Shader objects in one object, and returns a return value to the control unit 303.
The control unit 303 performs an attach process to the Shader program based on the return value.
 次に、ステップS314で、制御部303は、時間計測を終了する。ステップS313からS314までの間に計測された時間を第2の処理時間という。 Next, in step S314, the control unit 303 ends the time measurement. The time measured between steps S313 and S314 is referred to as a second processing time.
 ステップS315では、制御部303は、第1の処理時間と第2の処理時間とを用いた異常検出処理を行う。
 ステップS315の異常検出処理では、制御部303は、第1の処理時間と第2の処理時間とを比較し、第1の処理時間と第2の処理時間との差異が閾値以上である場合に、異常が発生していると判定する。つまり、制御部303は、不正な処理が行われたと判定する。そして、制御部303は、サーバ装置100に不正な処理が行われたことを通知する。サーバ装置100は、クライアント装置200のユーザーのユーザーアカウントを凍結することで、リバースエンジニアリングを防止する。
In step S315, the control unit 303 performs an abnormality detection process using the first processing time and the second processing time.
In the abnormality detection processing in step S315, the control unit 303 compares the first processing time and the second processing time, and when the difference between the first processing time and the second processing time is equal to or greater than a threshold value. It is determined that an abnormality has occurred. That is, the control unit 303 determines that an unauthorized process has been performed. Then, the control unit 303 notifies the server device 100 that unauthorized processing has been performed. The server apparatus 100 prevents reverse engineering by freezing the user account of the user of the client apparatus 200.
 このように、本実施の形態によれば、復号コンパイル部305によるダミー暗号化プログラムの受信から制御部303での規定処理(アタッチ処理)までの時間(第1の処理時間)と、復号コンパイル部305による暗号化プログラムの受信から制御部303での規定処理(アタッチ処理)までの時間(第2の処理時間)とを比較することにより、異常を検出することができる。 As described above, according to the present embodiment, the time (first processing time) from the reception of the dummy encryption program by the decryption compiling unit 305 to the regulation processing (attach processing) by the control unit 303, the decryption compiling unit Abnormality can be detected by comparing the time (second processing time) from the reception of the encryption program by 305 to the prescribed processing (attach processing) in the control unit 303.
実施の形態3.
 本実施の形態では、図9に示す実施の形態2の処理にユーザイベント処理(ステップS3110)及びユーザイベント結果判定処理(ステップS3111)を追加することで、実施の形態2で説明した第1の処理時間及び第2の処理時間の計測中の第三者のデバッグ動作を検出する例を説明する。
 本実施の形態に係るシステム構成は図1に示す通りである。サーバ装置100のハードウェア構成は図2に示す通りである。クライアント装置200のハードウェア構成は図3に示す通りである。また、サーバ装置100とクライアント装置200の機能構成は図6に示す通りである。
 本実施の形態では、制御部303は、第1の処理時間の計測と並行してデバッグ動作の検出を行い、また、第2の処理時間の計測と並行してデバッグ動作の検出を行う。
 以下では、実施の形態2との差異を説明する。また、以下で説明していない項目は実施の形態2と同じである。
Embodiment 3 FIG.
In the present embodiment, the user event process (step S3110) and the user event result determination process (step S3111) are added to the process of the second embodiment shown in FIG. An example of detecting a third party debugging operation during measurement of the processing time and the second processing time will be described.
The system configuration according to the present embodiment is as shown in FIG. The hardware configuration of the server apparatus 100 is as shown in FIG. The hardware configuration of the client device 200 is as shown in FIG. The functional configurations of the server apparatus 100 and the client apparatus 200 are as shown in FIG.
In the present embodiment, the control unit 303 detects the debugging operation in parallel with the measurement of the first processing time, and detects the debugging operation in parallel with the measurement of the second processing time.
Hereinafter, differences from the second embodiment will be described. Items not described below are the same as those in the second embodiment.
 図9と図10は、本実施の形態に係わるクライアント装置200の動作例を示す。
 ステップS303とステップS304は図5に示すものと同様である。すなわち、制御部303は、メインスレッド301において、サーバ装置100から復号鍵を受信し、ワーカースレッド302を生成する。
 ステップS311では、制御部303は、時間計測を開始する。
9 and 10 show an operation example of the client device 200 according to the present embodiment.
Steps S303 and S304 are the same as those shown in FIG. That is, the control unit 303 receives the decryption key from the server device 100 in the main thread 301 and generates the worker thread 302.
In step S311, the control unit 303 starts time measurement.
 ステップS3110では、制御部303は、ユーザイベント処理(自動応答防止用操作、他webサイトへのアクセスによる意図的なタイムアウトエラー等)を実行し、実行結果を保存する。例えば、制御部303は、HTML5の関数である、時間指定イベントAPIを利用するsetTimeout関数、外部のサーバ装置への応答要求Timeout等を利用する。具体的には、制御部303は、制限時間内にマウスで指定領域をユーザーにクリックを促すといった、デバッグイベント中では戻り値を返すことのできない処理を含める。 In step S3110, the control unit 303 executes user event processing (automatic response prevention operation, intentional timeout error due to access to another web site, and the like), and stores the execution result. For example, the control unit 303 uses a setTimeout function that uses a time designation event API, a response request Timeout to an external server device, and the like, which are functions of HTML5. Specifically, the control unit 303 includes a process that cannot return a return value during a debug event, such as prompting the user to click on a designated area with a mouse within a time limit.
 ステップS3050では、復号コンパイル部305は、ワーカースレッド302において、サーバ装置100から、コンパイル前のダミープログラムがサーバ装置100で暗号化されて得られたダミー暗号化プログラムを受信する。ダミープログラムは、ダミーのShaderプログラムである。なお、ステップS3050は、受信対象のプログラムがダミー暗号化プログラムになっている点を除けばステップS305と同じである。 In step S3050, the decryption compiling unit 305 receives, from the server device 100, the dummy encryption program obtained by encrypting the pre-compiled dummy program by the server device 100 in the worker thread 302. The dummy program is a dummy Shader program. Step S3050 is the same as step S305 except that the reception target program is a dummy encryption program.
 ステップS3060では、復号コンパイル部305は、ワーカースレッド302において、ダミー暗号化プログラムを復号鍵を用いて復号してコンパイル前のダミープログラムを取得する。なお、ステップS3060は、復号の対象となるプログラムがダミー暗号化プログラムになっている点を除けばステップS306と同じである。 In step S3060, the decryption compiling unit 305 uses the decryption key to decrypt the dummy encryption program in the worker thread 302 to obtain a pre-compilation dummy program. Step S3060 is the same as step S306 except that the program to be decrypted is a dummy encryption program.
 ステップS3070では、復号コンパイル部305は、ワーカースレッド302において、取得したコンパイル前のダミープログラムをコンパイルし、コンパイル後のダミープログラムを得る。なお、ステップS3070は、コンパイル対象のプログラムがダミープログラムになっている点を除けばステップS307と同じである。 In step S3070, the decryption compilation unit 305 compiles the obtained dummy program before compilation in the worker thread 302 to obtain a dummy program after compilation. Step S3070 is the same as step S307 except that the program to be compiled is a dummy program.
 ステップS3080では、復号コンパイル部305は、ワーカースレッド302において、コンパイルにより得られたダミーのShaderプログラム(2つのShaderオブジェクト)を、1つのオブジェクトに配列として格納する。そして、復号コンパイル部305は、2つのShaderオブジェクトが格納されたオブジェクトを、戻り値としてメインスレッド301の制御部303に返す。なお、ステップS3080は、2つShaderオブジェクトがダミーのShaderプログラムのオブジェクトになっている点を除けばステップS308と同じである。 In step S3080, the decryption compilation unit 305 stores the dummy Shader program (two Shader objects) obtained by compiling in the worker thread 302 as an array in one object. Then, the decryption compilation unit 305 returns an object in which two Shader objects are stored to the control unit 303 of the main thread 301 as a return value. Step S3080 is the same as step S308 except that the two Shader objects are dummy Shader program objects.
 ステップS3090では、制御部303が、メインスレッド301において、復号コンパイル部305からの戻り値を元に、ダミーのShaderプログラムへのアタッチ処理を行う。なお、ステップS3090は、アタッチの対象のプログラムがダミーのShaderプログラムになっている点を除けばステップS309と同じである。 In step S3090, the control unit 303 performs an attachment process to the dummy Shader program in the main thread 301 based on the return value from the decryption compilation unit 305. Step S3090 is the same as step S309, except that the program to be attached is a dummy Shader program.
 ステップS3111では、制御部303は、ステップS3110で保存した結果を取得し、ユーザ(第三者)が意図的にデバッグ動作をしていないかどうかを判定する。 In step S3111, the control unit 303 acquires the result stored in step S3110, and determines whether or not the user (third party) is intentionally performing a debugging operation.
 ステップS312では、制御部303は、時間計測を終了する。ステップS311からステップS312の間に計測された時間を第1の処理時間という。
 本実施の形態では、このように、制御部303は、第1の処理時間の計測と並行してステップS3110のユーザイベント処理とステップS3111のユーザイベント結果判定処理とにより、デバッグ動作の検出を行う。
In step S312, the control unit 303 ends the time measurement. The time measured between step S311 and step S312 is referred to as a first processing time.
In the present embodiment, in this way, the control unit 303 detects the debugging operation by the user event process in step S3110 and the user event result determination process in step S3111 in parallel with the measurement of the first processing time. .
 次に、ステップS313では、制御部303は、再度、時間計測を開始する。なお、制御部303は、再度、ステップS3110において、ユーザイベント処理を行う。なお、この段階でのユーザイベント処理も前述したものと同様である。 Next, in step S313, the control unit 303 starts time measurement again. Note that the control unit 303 performs user event processing again in step S3110. The user event processing at this stage is the same as described above.
 ステップS305~S309は、図5に示したS305~S309と同じである。つまり、復号コンパイル部305は、サーバ装置100からコンパイル前のShaderプログラムが暗号化された暗号化プログラムを受信する。また、復号コンパイル部305は、復号鍵を用いて暗号化プログラムを復号して、コンパイル前のShaderプログラムを得る。そして、復号コンパイル部305は、Shaderプログラムのコンパイルを行い、2つのShaderオブジェクトを1つのオブジェクトに格納し、戻り値を制御部303に返す。
 制御部303は、戻り値に基づき、Shaderプログラムへのアタッチ処理を行う。
 更に、制御部303は、ステップS3111にて、ユーザイベント結果判定処理を行う。この段階でのユーザイベント結果判定処理も前述したものと同じである。
Steps S305 to S309 are the same as S305 to S309 shown in FIG. That is, the decryption compilation unit 305 receives from the server device 100 an encrypted program obtained by encrypting the pre-compiled Shader program. Also, the decryption compiling unit 305 decrypts the encrypted program using the decryption key to obtain a pre-compiled Shader program. Then, the decryption compiling unit 305 compiles the Shader program, stores two Shader objects in one object, and returns a return value to the control unit 303.
The control unit 303 performs an attach process to the Shader program based on the return value.
Further, the control unit 303 performs a user event result determination process in step S3111. The user event result determination process at this stage is the same as described above.
 次に、ステップS314で、制御部303は、時間計測を終了する。ステップS313からS314までの間に計測された時間を第2の処理時間という。
 本実施の形態では、このように、制御部303は、第2の処理時間の計測と並行してステップS3110のユーザイベント処理とステップS3111のユーザイベント結果判定処理とにより、デバッグ動作の検出を行う。
Next, in step S314, the control unit 303 ends the time measurement. The time measured between steps S313 and S314 is referred to as a second processing time.
In the present embodiment, in this way, the control unit 303 detects the debugging operation by the user event process in step S3110 and the user event result determination process in step S3111 in parallel with the measurement of the second processing time. .
 ステップS315では、制御部303は、第1の処理時間と第2の処理時間とを用いた異常検出処理を行う。
 ステップS315の異常検出処理では、制御部303は、第1の処理時間と第2の処理時間とを比較し、第1の処理時間と第2の処理時間との差異が閾値以上である場合に、異常が発生していると判定する。つまり、制御部303は、不正な処理が行われたと判定する。そして、制御部303は、サーバ装置100に不正な処理が行われたことを通知する。サーバ装置100は、クライアント装置200のユーザーのユーザーアカウントを凍結することで、リバースエンジニアリングを防止する。
In step S315, the control unit 303 performs an abnormality detection process using the first processing time and the second processing time.
In the abnormality detection processing in step S315, the control unit 303 compares the first processing time and the second processing time, and when the difference between the first processing time and the second processing time is equal to or greater than a threshold value. It is determined that an abnormality has occurred. That is, the control unit 303 determines that an unauthorized process has been performed. Then, the control unit 303 notifies the server device 100 that unauthorized processing has been performed. The server apparatus 100 prevents reverse engineering by freezing the user account of the user of the client apparatus 200.
 本実施の形態では、ユーザイベント処理ステップ(S3110)及びユーザイベント結果判定処理ステップ(S3111)により、時間測定タイマーの起動の前後にブラウザにデバッグポイントを置いて測定時間に細工をするといった不正を検出することができる。
 このため、本実施の形態によれば、実施の形態2で説明した第1の処理時間と第2の処理時間とを用いた異常検出処理を適正に行うことができる。この結果、本実施の形態によれば、異常を検出することができる。
In the present embodiment, the user event processing step (S3110) and the user event result determination processing step (S3111) detect fraud such as placing a debug point on the browser before and after starting the time measurement timer and crafting the measurement time. can do.
For this reason, according to the present embodiment, it is possible to appropriately perform the abnormality detection process using the first processing time and the second processing time described in the second embodiment. As a result, according to the present embodiment, an abnormality can be detected.
 以上、本発明の実施の形態について説明したが、これら3つの実施の形態を組み合わせて実施しても構わない。
 あるいは、これら3つの実施の形態のうち、1つを部分的に実施しても構わない。
 あるいは、これら3つの実施の形態を部分的に組み合わせて実施しても構わない。
 なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
Although the embodiments of the present invention have been described above, these three embodiments may be combined.
Alternatively, one of these three embodiments may be partially implemented.
Alternatively, these three embodiments may be partially combined.
In addition, this invention is not limited to these embodiment, A various change is possible as needed.
***ハードウェア構成の説明***
 最後に、ハードウェア構成の補足説明を行う。
 サーバ装置100において、補助記憶装置105には、OS(Operating System)が記憶されている。
 そして、OSの少なくとも一部がプロセッサ101により実行される。
 プロセッサ101はOSの少なくとも一部を実行しながら、ユーザー認証部401、鍵生成部402、暗号化部403の機能を実現するプログラムを実行する。
 プロセッサ101がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
 クライアント装置200においても、補助記憶装置205には、OSが記憶されている。
 そして、OSの少なくとも一部がプロセッサ201により実行される。
 プロセッサ201はOSの少なくとも一部を実行しながら、ブラウザ208、WebApp300、制御部303、復号コンパイル部305の機能を実現するプログラムを実行する。
 プロセッサ201がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
*** Explanation of hardware configuration ***
Finally, a supplementary explanation of the hardware configuration will be given.
In the server device 100, the auxiliary storage device 105 stores an OS (Operating System).
At least a part of the OS is executed by the processor 101.
The processor 101 executes a program that realizes the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 while executing at least a part of the OS.
When the processor 101 executes the OS, task management, memory management, file management, communication control, and the like are performed.
Also in the client device 200, the auxiliary storage device 205 stores an OS.
Then, at least a part of the OS is executed by the processor 201.
The processor 201 executes a program that realizes the functions of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 while executing at least a part of the OS.
When the processor 201 executes the OS, task management, memory management, file management, communication control, and the like are performed.
 また、サーバ装置100では、ユーザー認証部401、鍵生成部402、暗号化部403の処理の結果を示す情報やデータや信号値や変数値が、メモリ102、補助記憶装置105又は、プロセッサ101内のレジスタ又はキャッシュメモリに記憶される。
 また、ユーザー認証部401、鍵生成部402、暗号化部403の機能を実現するプログラムは、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
 また、クライアント装置200では、ブラウザ208、WebApp300、制御部303、復号コンパイル部305の処理の結果を示す情報やデータや信号値や変数値が、メモリ102、補助記憶装置105又は、プロセッサ201内のレジスタ又はキャッシュメモリに記憶される。
 また、ブラウザ208、WebApp300、制御部303、復号コンパイル部305の機能を実現するプログラムは、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
Further, in the server device 100, information, data, signal values, and variable values indicating the processing results of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 are stored in the memory 102, the auxiliary storage device 105, or the processor 101. Stored in a register or cache memory.
A program for realizing the functions of the user authentication unit 401, the key generation unit 402, and the encryption unit 403 is stored in a portable storage medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, and a DVD. It may be stored.
In the client device 200, information, data, signal values, and variable values indicating the processing results of the browser 208, WebApp 300, control unit 303, and decryption compilation unit 305 are stored in the memory 102, the auxiliary storage device 105, or the processor 201. Stored in a register or cache memory.
Further, programs for realizing the functions of the browser 208, the WebApp 300, the control unit 303, and the decryption compilation unit 305 are stored in a portable storage medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a Blu-ray (registered trademark) disk, or a DVD. May be.
 また、ブラウザ208、WebApp300、制御部303、復号コンパイル部305、ユーザー認証部401、鍵生成部402、暗号化部403を、「回路」又は「工程」又は「手順」又は「処理」に読み替えてもよい。
 また、サーバ装置100及びクライアント装置200は、それぞれ、ロジックIC(Integrated Circuit)、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)といった電子回路により実現されてもよい。
 なお、プロセッサ及び上記の電子回路を総称してプロセッシングサーキットリーともいう。
In addition, the browser 208, WebApp 300, control unit 303, decryption compilation unit 305, user authentication unit 401, key generation unit 402, and encryption unit 403 are replaced with “circuit” or “process” or “procedure” or “processing”. Also good.
In addition, the server apparatus 100 and the client apparatus 200 may be implemented by electronic circuits such as logic IC (Integrated Circuit), GA (Gate Array), ASIC (Application Specific Integrated Circuit), and FPGA (Field-Programmable Gate Array), respectively. Good.
The processor and the electronic circuit are also collectively referred to as a processing circuit.
 100 サーバ装置、101 プロセッサ、102 メモリ、103 表示機、104 入力装置、105 補助記憶装置、106 通信装置、200 クライアント装置、201 プロセッサ、202 メモリ、203 表示機、204 入力装置、205 補助記憶装置、206 GPU、207 通信装置、208 ブラウザ、300 WebApp、301 メインスレッド、302 ワーカースレッド、303 制御部、305 復号コンパイル部、401 ユーザー認証部、402 鍵生成部、403 暗号化部。 100 server device, 101 processor, 102 memory, 103 display device, 104 input device, 105 auxiliary storage device, 106 communication device, 200 client device, 201 processor, 202 memory, 203 display device, 204 input device, 205 auxiliary storage device, 206 GPU, 207 communication device, 208 browser, 300 WebApp, 301 main thread, 302 worker thread, 303 control unit, 305 decryption compilation unit, 401 user authentication unit, 402 key generation unit, 403 encryption unit.

Claims (11)

  1.  マルチスレッドで動作する復号装置であって、
     メインスレッドにおいて、暗号化装置から復号鍵を受信する復号鍵受信部と、
     前記復号鍵受信部による前記復号鍵の受信後に、サブスレッドにおいて、前記暗号化装置から、コンパイル前のプログラムが前記暗号化装置で暗号化されて得られた暗号化プログラムを受信し、受信した前記暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記プログラムを取得し、取得したコンパイル前の前記プログラムをコンパイルする復号コンパイル部とを有する復号装置。
    A multi-threaded decoding device,
    In the main thread, a decryption key receiving unit that receives a decryption key from the encryption device;
    After receiving the decryption key by the decryption key receiving unit, in the sub-thread, the encryption program obtained by encrypting the pre-compiled program by the encryption device is received from the encryption device and received. A decryption device comprising: a decryption compiling unit that decrypts an encrypted program using the decryption key to obtain the program before compilation, and compiles the obtained program before compilation.
  2.  前記復号コンパイル部は、
     コンパイル後の前記プログラムを前記復号鍵受信部に出力する請求項1に記載の復号装置。
    The decryption compilation unit
    The decryption apparatus according to claim 1, wherein the compiled program is output to the decryption key receiving unit.
  3.  前記復号鍵受信部は、
     前記暗号化装置から前記復号鍵を受信した後に、前記復号コンパイル部が動作するサブスレッドを生成する請求項1に記載の復号装置。
    The decryption key receiving unit
    The decryption device according to claim 1, wherein after receiving the decryption key from the encryption device, a subthread in which the decryption compilation unit operates is generated.
  4.  前記復号コンパイル部は、
     前記暗号化装置から、コンパイル前はソースコードが解読されるおそれがあるがコンパイル後は前記ソースコードが解読されるおそれがない前記プログラムが前記暗号化装置で暗号化されて得られた前記暗号化プログラムを受信する請求項1に記載の復号装置。
    The decryption compilation unit
    The encryption obtained from the encryption device obtained by encrypting the program by the encryption device, which may cause the source code to be decrypted before the compilation, but the source code may not be decrypted after the compilation. The decoding device according to claim 1, which receives a program.
  5.  前記復号コンパイル部は、
     前記暗号化装置から、コンパイル前のShaderプログラムが前記暗号化装置で暗号化されて得られた前記暗号化プログラムを受信し、受信した前記暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記Shaderプログラムを取得し、取得したコンパイル前の前記Shaderプログラムをコンパイルする請求項1に記載の復号装置。
    The decryption compilation unit
    The encryption program obtained by encrypting the Shader program before compilation from the encryption apparatus is received from the encryption apparatus, and the received encryption program is decrypted using the decryption key before being compiled. The decoding device according to claim 1, wherein the Shader program is acquired, and the acquired Shader program before compilation is compiled.
  6.  前記復号装置は、
     HTML(HyperText Markup Language)5のWebWorkerを利用したマルチスレッドで動作する請求項1に記載の復号装置。
    The decoding device
    The decoding device according to claim 1, wherein the decoding device operates in a multi-thread using a WebWorker of HTML (HyperText Markup Language) 5.
  7.  前記復号コンパイル部は、
     前記暗号化プログラムの受信に先立ち、前記復号鍵受信部による前記復号鍵の受信後に、前記サブスレッドにおいて、前記暗号化装置から、コンパイル前のダミープログラムが前記暗号化装置で暗号化されて得られたダミー暗号化プログラムを受信し、受信した前記ダミー暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記ダミープログラムを取得し、取得したコンパイル前の前記ダミープログラムをコンパイルし、コンパイル後の前記ダミープログラムを前記復号鍵受信部に出力し、
     前記復号鍵受信部は、
     前記復号コンパイル部からコンパイル後の前記ダミープログラムを取得し、取得したコンパイル後の前記ダミープログラムに規定処理を実行し、前記復号コンパイル部による前記ダミー暗号化プログラムの受信からコンパイル後の前記ダミープログラムへの前記規定処理のまでの時間を第1の処理時間として計測し、
     前記復号コンパイル部が前記暗号化装置から前記暗号化プログラムを受信した場合に、前記復号コンパイル部により得られたコンパイル後の前記プログラムを前記復号コンパイル部から取得し、取得したコンパイル後の前記プログラムに前記規定処理を実行し、前記復号コンパイル部による前記暗号化プログラムの受信からコンパイル後の前記プログラムへの前記規定処理の実行までの時間を第2の処理時間として計測し、
     前記第1の処理時間と前記第2の処理時間とを比較する請求項2に記載の復号装置。
    The decryption compilation unit
    Prior to receiving the encryption program, after receiving the decryption key by the decryption key receiving unit, the sub-thread is obtained by encrypting a pre-compiled dummy program from the encryption device by the encryption device. The dummy encrypted program received, the received dummy encrypted program is decrypted using the decryption key to obtain the pre-compiled dummy program, the obtained pre-compiled dummy program is compiled, and the compiled Output the dummy program to the decryption key receiving unit,
    The decryption key receiving unit
    The compiled dummy program is acquired from the decryption compiling unit, a specified process is performed on the acquired compiled dummy program, and the dummy compiling unit receives the dummy encrypted program from the decryption compiling unit to the compiled dummy program Measuring the time until the prescribed processing of the first processing time,
    When the decryption compilation unit receives the encrypted program from the encryption device, the compiled program obtained by the decryption compilation unit is acquired from the decryption compilation unit, and the obtained compiled program is Execute the prescribed process, measure the time from the reception of the encrypted program by the decryption compile unit to the execution of the prescribed process to the compiled program as a second processing time,
    The decoding device according to claim 2, wherein the first processing time is compared with the second processing time.
  8.  前記復号鍵受信部は、
     前記第1の処理時間と前記第2の処理時間とを比較した結果、前記第1の処理時間と前記第2の処理時間との差異が閾値以上である場合に、異常が発生していると判定する請求項7に記載の復号装置。
    The decryption key receiving unit
    As a result of comparing the first processing time and the second processing time, if the difference between the first processing time and the second processing time is equal to or greater than a threshold, an abnormality has occurred. The decoding device according to claim 7 for determination.
  9.  前記復号鍵受信部は、
     前記第1の処理時間の計測と並行してデバッグ動作の検出を行い、
     前記第2の処理時間の計測と並行して前記デバッグ動作の検出を行う請求項7に記載の復号装置。
    The decryption key receiving unit
    In parallel with the measurement of the first processing time, the debugging operation is detected,
    The decoding device according to claim 7, wherein the debugging operation is detected in parallel with the measurement of the second processing time.
  10.  マルチスレッドで動作するコンピュータが、
     メインスレッドにおいて、暗号化装置から復号鍵を受信し、
     前記復号鍵の受信後に、サブスレッドにおいて、コンパイル前のプログラムが前記暗号化装置で暗号化されて得られた暗号化プログラムを前記暗号化装置から受信し、受信した前記暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記プログラムを取得し、取得したコンパイル前の前記プログラムをコンパイルする復号コンパイル方法。
    A computer that runs on multiple threads
    In the main thread, receive the decryption key from the encryption device,
    After receiving the decryption key, the sub-thread receives an encrypted program obtained by encrypting a pre-compiled program by the encrypting device from the encrypting device, and the received encrypted program is sent to the decrypting key. A decryption compiling method for obtaining the pre-compiled program by decrypting the program, and compiling the acquired pre-compiled program.
  11.  マルチスレッドで動作するコンピュータに、
     メインスレッドにおいて、暗号化装置から復号鍵を受信する復号鍵受信処理と、
     前記復号鍵受信処理による前記復号鍵の受信後に、サブスレッドにおいて、コンパイル前のプログラムが前記暗号化装置で暗号化されて得られた暗号化プログラムを前記暗号化装置から受信し、受信した前記暗号化プログラムを前記復号鍵を用いて復号してコンパイル前の前記プログラムを取得し、取得したコンパイル前の前記プログラムをコンパイルする復号コンパイル処理とを実行させる復号コンパイルプログラム。
    To a computer that works with multi-thread,
    In the main thread, a decryption key reception process for receiving a decryption key from the encryption device;
    After receiving the decryption key by the decryption key receiving process, the sub-thread receives the encrypted program obtained by encrypting the pre-compiled program by the encrypting device from the encrypting device, and receives the received cipher A decryption compilation program for decrypting a computerized program using the decryption key to obtain the program before compilation, and executing a decryption compilation process for compiling the obtained program before compilation.
PCT/JP2017/009880 2016-04-18 2017-03-13 Decryption device, decryption-compiling method and decryption-compiling program WO2017183357A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JPPCT/JP2016/062292 2016-04-18
PCT/JP2016/062292 WO2017183087A1 (en) 2016-04-18 2016-04-18 Decryption device, decryption-compilation method and decryption-compilation program

Publications (1)

Publication Number Publication Date
WO2017183357A1 true WO2017183357A1 (en) 2017-10-26

Family

ID=60116071

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/JP2016/062292 WO2017183087A1 (en) 2016-04-18 2016-04-18 Decryption device, decryption-compilation method and decryption-compilation program
PCT/JP2017/009880 WO2017183357A1 (en) 2016-04-18 2017-03-13 Decryption device, decryption-compiling method and decryption-compiling program

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/062292 WO2017183087A1 (en) 2016-04-18 2016-04-18 Decryption device, decryption-compilation method and decryption-compilation program

Country Status (1)

Country Link
WO (2) WO2017183087A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11184690A (en) * 1997-12-24 1999-07-09 Fujitsu Ltd Translation device restoring deciphered code and method therefor
JP2001134337A (en) * 1999-08-05 2001-05-18 Canon Inc Deciphering compiler
JP2006129063A (en) * 2004-10-28 2006-05-18 Fujitsu Ltd Contents reproducing method, reproduction program and reproducing device
JP2007094728A (en) * 2005-09-28 2007-04-12 Digital Electronics Corp Information processor, information processing system, program and recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11184690A (en) * 1997-12-24 1999-07-09 Fujitsu Ltd Translation device restoring deciphered code and method therefor
JP2001134337A (en) * 1999-08-05 2001-05-18 Canon Inc Deciphering compiler
JP2006129063A (en) * 2004-10-28 2006-05-18 Fujitsu Ltd Contents reproducing method, reproduction program and reproducing device
JP2007094728A (en) * 2005-09-28 2007-04-12 Digital Electronics Corp Information processor, information processing system, program and recording medium

Also Published As

Publication number Publication date
WO2017183087A1 (en) 2017-10-26

Similar Documents

Publication Publication Date Title
Gröbert et al. Automated identification of cryptographic primitives in binary programs
Zhao et al. Providing root of trust for ARM TrustZone using on-chip SRAM
US20120079282A1 (en) Seamless end-to-end data obfuscation and encryption
KR101350390B1 (en) A apparatus for code obfuscation and method thereof
Chatzikonstantinou et al. Evaluation of cryptography usage in android applications
CN102737202B (en) The instruction encryption/decryption device utilizing iterative cryptographic/decruption key to upgrade and method
KR101216995B1 (en) A code encryption and decryption device against reverse engineering based on indexed table and the method thereof
Ceccato et al. A large study on the effect of code obfuscation on the quality of java code
CN103988467A (en) Cryptographic system and methodology for securing software cryptography
CN109284585B (en) Script encryption method, script decryption operation method and related device
US10282312B2 (en) Integrated circuit, method for protecting an integrated circuit and computer program product
Afrose et al. CryptoAPI-Bench: A comprehensive benchmark on Java cryptographic API misuses
CN105637516A (en) Method for verifying integrity of dynamic code using hash
Protsenko et al. Dynamic self-protection and tamperproofing for android apps using native code
US9256756B2 (en) Method of encryption and decryption for shared library in open operating system
Afrose et al. Evaluation of static vulnerability detection tools with Java cryptographic API benchmarks
CN103116715A (en) API (application programming interface) delay import protection method for executable files of Windows platform
Wang et al. On statistical distance based testing of pseudo random sequences and experiments with PHP and Debian OpenSSL
Holder et al. Evaluating optimal phase ordering in obfuscation executives
Feichtner A comparative study of misapplied crypto in Android and iOS applications
Xiong et al. Software protection using dynamic PUFs
WO2017183357A1 (en) Decryption device, decryption-compiling method and decryption-compiling program
CN115828228A (en) Method and device for verifying detection capability of memory horse and electronic equipment
US11216561B2 (en) Executing processes in sequence
JP5549810B2 (en) Program obfuscation device, program control device, program obfuscation method, and program

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17785699

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17785699

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP