WO2020226054A1 - 情報処理方法、情報処理装置及び記憶媒体 - Google Patents

情報処理方法、情報処理装置及び記憶媒体 Download PDF

Info

Publication number
WO2020226054A1
WO2020226054A1 PCT/JP2020/017271 JP2020017271W WO2020226054A1 WO 2020226054 A1 WO2020226054 A1 WO 2020226054A1 JP 2020017271 W JP2020017271 W JP 2020017271W WO 2020226054 A1 WO2020226054 A1 WO 2020226054A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
information processing
application program
information
program
Prior art date
Application number
PCT/JP2020/017271
Other languages
English (en)
French (fr)
Inventor
渡辺 大
麻奈美 鈴木
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to JP2021518338A priority Critical patent/JP7168776B2/ja
Publication of WO2020226054A1 publication Critical patent/WO2020226054A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system

Definitions

  • the present invention relates to a technique for preventing eavesdropping of data processed by a program installed in a device.
  • an application When using such a service, the user installs a dedicated program (application program, hereinafter referred to as an application) and uses the service via that application.
  • an application program application program
  • malware has been reported that reads data stored in memory and retrieves credit card numbers, etc., and it is necessary to protect the data stored in memory while the application is running.
  • Patent Document 1 discloses a method of encrypting data written in a memory.
  • Non-Patent Document 1 discloses a method of randomizing access to the memory space and encrypting the memory arrangement at the time of program execution only by software in the same manner as in Patent Document 1.
  • Patent Document 1 provides a function of securing an area secure in terms of hardware and an access control function to a memory independently of the OS as a function of the CPU. On the other hand, this function limits the terminals that can be used, which may result in a loss of opportunity for the service provider.
  • the present invention has been made in view of the above problems, and an object thereof is to reduce the risk of leakage of confidential information processed by a program.
  • the present invention is an information processing apparatus having a processor and a memory, which is an information processing method for processing data and an application program via an OS stored in the memory, wherein the processor executes the OS and the OS is executed.
  • a paging step in which memory is divided into memory blocks of a predetermined size and managed, and a plurality of programs in which the processor executes the OS to discontinuously arrange continuous virtual address spaces on physical addresses.
  • An address conversion step that generates translation information in association with a memory block, and a virtual address space required for execution of the application program when the processor executes the OS and executes the application program.
  • a first memory allocation step to be assigned to the application program a main processing step in which the processor executes the application program, stores the data in the middle of processing in a plurality of variables, and the processor performs processing.
  • the step is a page map acquisition step that accesses the conversion information and calculates the arrangement of the memory block corresponding to the allocated virtual address space, and the variable processed by the application program is different from the memory. Includes a second memory allocation step to allocate to the block.
  • the memory management program of the application program allocates the storage area (utilization area) of the memory used by the application program to a plurality of pages discretely divided on the physical address. The risk of leakage of confidential information can be reduced.
  • Example 1 of this invention shows an example of the structure of a computer system. It is a figure which shows Example 1 of this invention and shows an example of the usage form of a network terminal. It is a block diagram which shows Example 1 of this invention and shows an example of the function of a network terminal. It is a figure which shows Example 1 of this invention and shows an example of the memory management program of an application. It is a flowchart which shows Example 1 of this invention, and shows an example of the process which the memory management program of an application associates a variable with an address of a memory space.
  • FIG. 1 is a diagram showing Example 1 of the present invention and showing an example of associating variables of a main processing program with addresses in a memory space.
  • FIG. 2 is a flowchart showing a second embodiment of the present invention, showing a process in which a memory management program of an application associates a variable with an address in a memory space.
  • FIG. 1 is a block diagram showing an example of a configuration of a computer system using the present invention.
  • the computer system is composed of a network terminal 102 operated by the user 10, an application (hereinafter referred to as an application) distribution server 103, and a network (not shown), and the application from the application distribution server 103 by the operation of the user 101. Is downloaded by the network terminal 102.
  • an application hereinafter referred to as an application
  • a network not shown
  • the application is used to use a specific service provided by the service providing site 104.
  • the user 101 installs the application downloaded from the application distribution server 103 on the network terminal 102, and then executes user registration on the authentication server 110.
  • the service When using the service on the network terminal 102, the service is used through the application server 111 after user authentication (or device authentication) is performed on the authentication server 110 of the service providing site 104.
  • FIG. 2 is a diagram showing a usage image in which the network terminal 102 in the present invention authenticates a user to an authentication server.
  • the network terminal 102 (hereinafter referred to as a terminal) includes a CPU 240, a memory 250, a storage 230, a sensor 220 for acquiring biometric information, an authentication server 110, and an application server 111, similarly to a computer terminal (information processing device).
  • a wireless communication device 210 for communicating with the user is provided.
  • the authentication application 231 is stored in the storage 230.
  • the sensor 220 acquires the biometric information 260 of the user 101, and the authentication application 231 receives the sensor data 221 including the biometric information 260 from the sensor 220, and performs a predetermined process (results of performing predetermined processing.
  • the communication data 211) is transmitted to the authentication server 110.
  • the sensor data 221 and the communication data 211 may be encrypted.
  • the authentication application 231 shares a key for performing encrypted communication with the sensor 220 and the authentication server 110.
  • FIG. 3 is a diagram showing an example of the function of the network terminal 102 in the present invention.
  • the terminal 102 has a network interface 310 for transmitting and receiving information to and from the network 201, a sensor 220 for acquiring physical information such as a camera and a microphone, a storage 230 for storing data and programs, a CPU 240 for performing arithmetic processing, and intermediate data being processed. It is composed of (intermediate state), a memory 250 for holding a program, and the like. These components are connected to each other by a data bus and send and receive data via the memory 250.
  • the CPU 240 includes a plurality of general-purpose registers 342, a cycle counter 341, and the like.
  • the binary data of the application 331 and the setting file stored in the storage 230 are stored in the storage 230.
  • the processing target data 373 is the sensor data 221 acquired from the sensor 220 and the communication data 211 acquired from the network IF 310. Further, the data to be processed 373 may be data stored on the storage 230.
  • a program called an OS (Operating System) 362 resides in the memory 250, and mediates between hardware and applications, and manages execution authority and resources of a plurality of applications.
  • the user application of this embodiment is executed under a limited authority called user authority.
  • resource management and the like executed by OS362 are executed under stronger authority (privilege).
  • the memory 250 is divided into a user space 370 used by the user application and a kernel space 360 used by the core processing (kernel processing) of the OS 362.
  • the application 331 stored on the storage 230 as a storage medium When executed, it is expanded on the memory 250, and the application 371 on the memory 250 executes the process using the usage area 372 allocated by the OS 362.
  • the application 331 is stored as a program in the storage medium (storage device) of the distribution server 103 or the storage medium (storage device) of the computer for application developers (not shown), and is stored in the terminal 102 via a network or a portable storage medium. It is stored in the storage 230 inside.
  • the processing target data 373 is stored in the usage area 372.
  • the usage area 372 used by the application 371 may be statically allocated at the time of execution, or may be dynamically allocated during execution (via the alloc function provided as a standard library in C language). Good.
  • the process management program of OS362 allocates hardware resources such as CPU 240 and memory 250 to the applications, and switches this allocation as appropriate.
  • the OS 362 periodically determines the presence or absence of interrupt registration based on the time information such as the cycle counter 341, and when an interrupt occurs, interrupts the currently executing application and sets the general-purpose register 340.
  • the state (content) is saved in the save area 361 of the application 371, and resources are allocated to other processes.
  • the OS 362 restores the state of the register saved in the save area 361 to the general-purpose register 342, and restarts the interrupted application.
  • malware 270 can access not only the user space 370 but also the kernel space 360. Become. In this embodiment, under such a situation, a method is provided for reducing the risk that the usage area 372 used by the application 371 and the evacuation area 361 are all scanned by malware.
  • FIG. 4 is a diagram showing the configuration of the memory management program 410 in which the application 371 divides the usage area 372 allocated at the time of execution and appropriately arranges a plurality of variables 421 actually used for processing in this embodiment.
  • the OS 362 manages the memory 250 with an address called a virtual address in addition to the physical address determined from the position on the hardware.
  • the physical address / virtual address conversion table 402 (hereinafter referred to as a conversion table) is a correspondence table between the physical address and the virtual address of the memory 250.
  • the conversion table 402 is managed by OS362.
  • the memory allocation program 1 (401) of the OS 362 secures the amount of memory 250 requested by the application 371 when executing the application 371 or when the application 371 requests the memory allocation, and assigns the virtual address to the application 371. Notify to.
  • the application 371 includes a memory management program 410 that manages the memory 250 used by the application 371 in addition to the main processing program 420 that performs the original processing.
  • the memory management program 410 refers to the memory acquisition program 411 that communicates with the memory allocation program 1 (401) of the OS 362 and acquires the memory required for executing the application 371, and the conversion table 402 to obtain the physical address of the usage area 372.
  • the page map acquisition program 412 to be acquired and the memory allocation program 2 (413) that allocates the variables v [1] to v [k] (421) existing in the code of the main processing program 420 to the usage area 372 according to a certain rule. Including.
  • the page of the memory 250 is a storage area of a predetermined size (for example, several kilobytes) managed by the OS 362.
  • the main processing program 420 stores the processing target data 373 in a plurality of variables 421 and executes a predetermined process.
  • the main processing program 420 performs processing while storing data (variable 421) in the process of processing in the usage area 372 of the memory 250.
  • Each function unit of the memory management program 410 and the main processing program 420 is loaded into the memory 250 and executed by the CPU 240.
  • the CPU 240 operates as a functional unit that provides a predetermined function by executing processing according to a program of each functional unit.
  • the CPU 240 functions as a memory management unit by executing processing according to the memory management program 410.
  • the CPU 240 also operates as a functional unit that provides each function of a plurality of processes executed by each program.
  • a computer and a computer system are devices and systems including these functional parts.
  • FIG. 5 is a flowchart showing an example of processing performed by the memory management program 410 in this embodiment.
  • the processing of the memory management program 410 will be described with reference to FIG. In the following, each program will be described as a processing subject, but the CPU 240 that executes the application 371 is the processing subject.
  • the application 371 acquires the preset security parameters and starts the process.
  • the security parameter is a value that determines the distance (difference or interval of addresses) of the addresses to which the plurality of variables 421 are assigned, the number of pages to be allocated to the used area 372, and the like, and is set in advance in this embodiment.
  • step 510 the memory allocation program 2 (413) determines whether or not the memory of the page necessary for safely executing the program of the application 371 (main processing program 420) can be secured. If it cannot be secured, the processes of steps 511 to 513 are repeated. If it can be secured, step 521 and subsequent steps are executed.
  • the memory allocation program 2 (413) performs the above determination on the condition that the capacity of the memory 250 required to execute the application 371 and the interval between the physical addresses of the pages allocated to the application 371 are equal to or greater than a predetermined value. To do.
  • step 511 the memory acquisition program 411 calls the memory allocation program 1 (401) of the OS 362 to acquire the page of the memory 250.
  • step 512 the page map acquisition program 412 accesses the conversion table 402 and acquires the physical address corresponding to the virtual address of the page acquired from OS362.
  • step 513 the page map acquisition program 412 calculates on which page each address of the virtual address is located.
  • step 510 when the number of pages of the capacity required by the application 371 is acquired in a distributed state on the physical address, the memory management program 410 shifts to the process of step 521.
  • the memory allocation program 2 (413) allocates different page addresses to the variables v [1] to v [k] (421) used by the main processing program 420.
  • the memory allocation program 2 (413) sets the physical address of the page assigned to each variable 421 to be the distance (difference of addresses) specified by the security parameter. For the variable 421 to which the initial value has already been assigned and the input data, the data is copied to the assigned address, and the data is deleted at the address where the initial value is stored.
  • step 522 the main processing program 420 executes a predetermined process using the assigned address.
  • the memory allocation program 2 (413) repeatedly checks until a predetermined condition is satisfied while acquiring the memory space on a small scale (page unit), but the present invention is not limited to this.
  • the memory allocation program 2 (413) may first allocate a large memory space and use only the necessary pages.
  • the loop process of steps 510 to 513 may include a process of allocating page 601 to variables v [1] to v [k]. Further, the application 371 may release the page 601 that is not actually used at an early stage to reduce the memory consumption.
  • the "page required for safe execution of the program" described in step 510 above may be a fixed value as a security parameter in advance.
  • the number of other processes which can be acquired by the ps command if it is a UNIX-based OS
  • the interrupt occurrence frequency during processing time information provided by the CPU cycle counter and OS362. It may be possible to acquire environmental information such as (can be calculated from), evaluate the possibility that the application 371 is observed from malware, and determine the number of pages to be acquired based on the evaluation result. By performing the processing in this way, the memory consumption can be appropriately suppressed according to the dynamic change in risk.
  • the application 371 may dynamically change the security parameter based on the evaluation result (environmental information) to dynamically change the distance (interval) of the physical address assigned to the variable 421.
  • the memory management program 410 is described as a program of the application 371, but it may be implemented as an external program such as a hypervisor or an interpreter, or integrated into the memory allocation program 1 (401) of the OS 362. You may.
  • FIG. 6 is a diagram showing an example of associating variables of the main processing program 420 with addresses in the memory space.
  • step 521 of FIG. 5 the page 601 on the physical address assigned to the application 371 in the memory space (the area represented by the diagonal line in the figure) 601 and the area 421 in the allocated page 601 are allocated. It is a figure which shows.
  • OS362 manages the storage area of the memory 250 by dividing it into fixed amounts.
  • the minimum unit of management is called page 601.
  • the OS 362 secures a storage area of the memory 250 in page units 601 and allocates the storage area to the application 371.
  • the page 601 allocated to the used area 372 is a continuous area for the virtual address, but is a discontinuous storage area for the physical address.
  • the memory allocation program 2 (413) allocates the variables v [1] to v [k] (421) of the main processing program 420 to different continuous areas (page 601) on the virtual address. However, the memory allocation program 2 (413) allocates the physical address of the utilization area 372 to which the variables v [1] to v [k] (421) are allocated to at least a sufficiently distant area (security parameter distance).
  • the area allocated to each variable 421 by the memory allocation program 2 (413) is an area that secures the distance on the physical address specified by the security parameter on different pages.
  • Malware 270 that scans the memory space usually scans consecutive physical addresses in one scan. In addition, an interrupt is generated for each scan, and the OS 362 executes another process. Therefore, when the processing is executed based on the configuration in which the discrete areas on the physical address are assigned to the variables v [1] to v [k] (421) as described above and the above flowchart, the malware 270 is the application 371 at a certain time. Only a small part of the utilization area 372 of the above can be scanned.
  • the application 371 since the application 371 is expected to be executed by the time when the malware 270 is executed next, it is highly possible that the value stored in the usage area 372 has been updated. Therefore, if the application 371 updates the value of the variable 421 with a sufficiently high frequency, the attacker using the malware 270 cannot know the whole picture of the variable 421 at a certain time. This makes it possible to reduce the risk of leaking information that the application 371 wants to protect.
  • the private key can be restored by collecting many intermediate states of processing.
  • the malware 270 partially acquires the intermediate state, for example, if only one word is leaked in the round process, the possibility that the private key can be restored becomes very small. Therefore, according to this embodiment, the white-box-implemented AES can be executed without leaking the private key to the malware 270 that scans the memory space.
  • variable 421 to be protected may be specified in advance in the application 371, and the memory allocation program 2 (413) may be applied only to the variable 421 to be protected.
  • the memory management program 410 of the application 371 divides the storage area (utilization area 372) of the memory 250 used by the application 371 discretely on the physical address into a plurality of pages. By assigning to 601 the risk of leakage of confidential information can be reduced.
  • the attack program needs to call the API (Application Program Interface) provided by OS362 multiple times, and it takes time to read.
  • API Application Program Interface
  • the malware 270 and the attack target program in order for the malware 270 to access the storage area (use area 372) used by the application 371, a predetermined API provided by the OS 362 is used. There is a need. Therefore, the malware 270 cannot access the usage area 372 more frequently than the application 371.
  • the difference in access to the usage area 372 of the malware 270 and the application 371 is used to reduce the risk of information leakage even in the state of being infected with the malware 270.
  • the memory allocation program 2 (413) divides the data with confidential information (variable 421) and the area for storing the intermediate state of the data (utilization area 372) into a plurality of pages 601. Since the application 371 can update the data and the intermediate state of the usage area 372 at high speed, it becomes difficult for the malware 270 to take a snapshot of the usage area 372 of the attack target program at a certain time, and the leakage of confidential information. You can reduce the risk.
  • FIG. 7 is a diagram showing an example of the function of the application 371.
  • the terminal 102 has a random number generation program 730 in addition to the configuration in the first embodiment described with reference to FIG. Further, the application 371 has a secret sharing program 720, and the secret sharing program 720 includes a share generation program 721 that generates a plurality of shares from the value of the variable 421 and a random number, and a decoding program 722 that decodes the distributed data. including.
  • the share is known by Shamir's secret sharing method, etc., and the variable 421 is divided into a plurality of shares. Then, the original variable 421 is restored by bringing in a certain number of shares.
  • the random number generation program 730 assumes a random number generation program provided by the hardware of the terminal 102 or OS362, but if these do not provide sufficient randomness, an entropy source providing program can be used as an alternative. Good.
  • the application 371 further includes a DRBG (Deterministic Random Bit Generator), inputs the output of the entropy source providing program to the DRBG, generates a bit string having high randomness, and performs secret sharing processing.
  • DRBG Dynamic Random Bit Generator
  • FIG. 8 is a flowchart showing an example of the processing performed by the memory management program 410 in the second embodiment.
  • the process of FIG. 8 replaces step 521 shown in FIG. 5 of the first embodiment with steps 810 to 813, and other configurations are the same as those of the first embodiment.
  • the interval between physical addresses is a predetermined value until the memory allocation program 2 (413) has the capacity of the memory 250 required to execute the application 371, as in FIG. 5 of the first embodiment.
  • the above page 601 is allocated as the utilization area 372.
  • step 510 when the memory allocation program 2 (413) determines that the used area 372 of page 601 necessary for the safe execution of the program is secured, the process proceeds to the process of step 810.
  • step 810 the memory allocation program 2 (413) determines whether or not the secret sharing and the allocation process to the memory 250 have been completed for all the variables 421. If it is not completed, steps 811 to 813 are repeated. If the process is complete, step 522 is executed.
  • step 811 the share generation program 721 calls the random number generation program 730 to acquire a predetermined number (p-1) of random numbers r [i] [1] to r [i] [p-1]. To do.
  • the predetermined number p indicates the number of shares.
  • step 812 the share generation program 721 receives p shares s [i] [1] to s [i] from the data d [i] stored in the variable v [i] and the random numbers acquired in step 811. [P] is generated as follows.
  • XOR represents the exclusive OR of variables.
  • step 813 the memory allocation program 2 (413) allocates the share s generated in step 812 to a different page with the usage area 372 acquired by the memory acquisition program 411.
  • the data is copied to the assigned address, and the address in which the initial value is stored deletes the data.
  • Step 522 is the same as in the first embodiment, and the main processing program 420 executes a predetermined process by using the assigned address.
  • the memory allocation program 2 (413) When the memory allocation program 2 (413) receives the decryption request of the variable v [i] from the main processing program 420, the memory allocation program 2 (413) accesses the usage area 372 and corresponds to the shares s [i] [1] to s [i] [p. ] Is read and passed to the decoding program 722.
  • the decoding program 722 decodes the data (variable 421) from the share as follows.
  • the memory allocation program 2 (413) calls the share generation program 712.
  • the share generation program 712 calls the random number generation program 730 to generate a new random number, and distributes the above values again.
  • the malware 270 restores the value of the original variable even if a certain page is read. Becomes impossible.
  • the risk of leakage of the information to be protected can be further reduced as compared with the first embodiment.
  • the allocation to the page 601 does not need to consider the context of each variable 421, and many variables can be allocated to the same page 601, so that the utilization efficiency of the memory 250 is improved. ..
  • the application cost for large-scale programs is expected to be relatively small.
  • the secret sharing and decryption methods are not limited to the above methods.
  • the secret sharing and decryption methods are not limited to the above methods.
  • the same secret sharing may be constructed by combining arithmetic addition and subtraction instead of the above exclusive OR.
  • the example in which the data is decoded on the CPU 240 and the main processing is executed is shown.
  • the data is not decoded on the CPU 240 as well. Can perform main processing.
  • An information processing device having a processor (CPU 240) and a memory (250), data (373) and an application program (app 371) via an OS (362) stored in the memory (250).
  • This is an information processing method for processing the above, in which the processor (240) executes the OS (362) and manages the memory (250) by dividing it into memory blocks (page 601) of a predetermined size.
  • a plurality of steps memory allocation program 1 (401)
  • the processor (240) execute the OS (362) to disperse a continuous virtual address space on a physical address.
  • An address conversion step for generating conversion information (conversion table 402) in association with a memory block (page 601), and the processor (240) executes the OS (362) to execute the application program (371).
  • the first memory allocation step (401) for allocating the virtual address space necessary for executing the application program (371) to the application program (371) and the processor (240) are performed by the application program.
  • the main processing step (main processing program 420) that executes (371) and stores the data (373) in the middle of the processing in a plurality of variables (421) to perform processing, and the processor (240) are described.
  • a second memory management step (memory allocation program) that executes the application program (371) and manages the virtual address space allocated to the application program (371) in the first memory allocation step (401).
  • the page map acquisition step (page map acquisition program 412) for calculating the arrangement of) and the second memory allocation step for allocating the variable (421) processed by the application program (371) to different memory blocks (601). (413) and.
  • the memory management program 410 of the application 371 allocates the storage area (utilized area 372) of the memory 250 used by the application 371 to a plurality of pages 601 discretely divided on the physical address. The risk of leakage of confidential information can be reduced.
  • the distance between the memory blocks (601) to which the variable (421) is assigned is preset. Determined according to security parameters.
  • the usage area 372 that stores the variable 421 is discretely arranged on the physical address, so that it is possible to prevent the malware 270 from acquiring data or an intermediate state with one access.
  • the environmental information of the information processing apparatus (102) is acquired, and the environment information is adjusted according to the acquired environmental information.
  • the security parameters are dynamically changed.
  • the memory management program 410 of the application 371 acquires the environmental information, evaluates the possibility that the application 371 is observed from the malware, and determines the number of pages and the number of secret distributions to be acquired based on the evaluation result. It can be changed dynamically.
  • the security parameter is set to the number of secret distributions (p), and the processor (240) executes the application program (371).
  • a random number generation step random number generation program 730
  • a share generation step shared generation program 721 that generates a share (s) that secretly distributes the value of the variable (421) based on the random number.
  • the risk of leakage of information to be protected can be further reduced by performing secret sharing processing on the value of variable 421 based on the security parameter.
  • the present invention is not limited to the above-mentioned examples, and includes various modifications.
  • the above-described embodiment is described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the configurations described.
  • any of the additions, deletions, or substitutions of other configurations can be applied alone or in combination.
  • each of the above configurations, functions, processing units, processing means, etc. may be realized by hardware by designing a part or all of them, for example, by an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
  • SSD Solid State Drive
  • control lines and information lines indicate what is considered necessary for explanation, and not all control lines and information lines are necessarily shown on the product. In practice, it can be considered that almost all configurations are interconnected.

Landscapes

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

Abstract

プロセッサとメモリを有する情報処理装置で、データとアプリケーションプログラムを処理する情報処理方法であって、連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロックに対応付けた変換情報を取得するアドレス変換ステップと、処理途中のデータを複数の変数に格納して処理を行う主要処理ステップと、当該アプリケーションプログラムに割り当てられた前記仮想的なアドレス空間を管理するメモリ管理ステップと、を含み、メモリ管理ステップは、変換情報にアクセスして、割り当てられた仮想的なアドレス空間に対応する前記メモリブロックの配置を算出するページマップ取得ステップと、変数を異なるメモリブロックに割り当てるメモリ割り当てステップと、を含む。

Description

情報処理方法、情報処理装置及び記憶媒体 参照による取り込み
 本出願は、令和1年(2019年)5月7日に出願された日本出願である特願2019-087738の優先権を主張し、その内容を参照することにより、本出願に取り込む。
 本発明は、機器にインストールされたプログラムが処理するデータの盗聴を防止する技術に関する。
 モバイル端末の普及とWebサービスの高度化に伴い、サービスの種類も多様化している。特に近年では、モバイル決済のように、従来ATMや窓口、専用端末を経由していた支払や送金に関するサービスをモバイル端末上で実行するサービスが流行の兆しを見せている。
 このようなサービスを利用する際には、ユーザが専用のプログラム(アプリケーションプログラム、以下アプリとする)をインストールし、そのアプリを介してサービスを利用している。
 また、サービスの利用に際してユーザ認証(もしくは端末認証)を行う必要があるが、このとき、ユーザ(もしくはモバイル端末)のみが持つ秘密情報を用いる。このような認証処理は、SIM(Subscriber Identity Module)チップ上の領域内で行われることが望ましいが、上記のように、アプリ上で秘密情報を取り扱うケースがほとんどである。これは、サービス用アプリをインストールするためには、SIMチップの記憶容量や処理能力が低いことが理由である。
 一方で、モバイル端末のセキュリティという観点では、一定の割合でモバイル端末がマルウェアに感染しているという現実があり、金融サービスに特化したマルウェアの存在も確認されている。特に、メモリ上に格納されたデータを読み取って、クレジットカード番号などを取り出すマルウェアが報告されており、アプリの実行中にメモリに格納されているデータを保護する必要がある。
 上記のような課題に対する対策として、メモリ上のデータを暗号化する技術が知られている。例えば特許文献1には、メモリに書き込まれるデータを暗号化する方法が開示されている。
 また、非特許文献1には、メモリ空間へのアクセスをランダム化して、プログラムの実行時にメモリの配置をソフトウェアのみで特許文献1と同様に暗号化する方法が開示されている。
米国特許第9087200号明細書
S. Bhatkar, D. DuVarney, and R. Sekar. Address obfuscation、An effcient approach to combat a broad range of memory error exploits、Proceedings of the 12th USENIX Security Symposium、105-120ページ、2003年、https://www.usenix.org/legacy/events/sec03/tech/full_papers/bhatkar/bhatkar.pdf
 前記特許文献1は、CPUの機能として、ハードウェア的にセキュアな領域の確保及びOSとは独立してメモリへのアクセス制御機能を提供するものである。その一方で、この機能は利用端末を限定することになり、サービス提供者にとって機会損失となる可能性がある。
 また、前記非特許文献1は、データの配置をランダム化しているだけで、データを取得した後に解析することで秘密情報を導出するような攻撃を防ぐことはできない。そこで、ハードウェアのサポート無しで、メモリ上だけでなくCPU上のデータを保護する機能が要求される。
 そこで本発明は、上記問題点に鑑みてなされたもので、プログラムで処理する秘密情報の漏洩リスクを軽減することを目的とする。
 本発明は、プロセッサとメモリを有する情報処理装置で、前記メモリに格納されたOSを介してデータとアプリケーションプログラムを処理する情報処理方法であって、前記プロセッサが、前記OSを実行して、前記メモリを所定のサイズのメモリブロックに分割して管理するページングステップと、前記プロセッサが、前記OSを実行して、連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロックに対応付けて変換情報を生成するアドレス変換ステップと、前記プロセッサが、前記OSを実行して、前記アプリケーションプログラムを実行する際に、前記アプリケーションプログラムの実行に必要な仮想的なアドレス空間を前記アプリケーションプログラムに割り当てる第1のメモリ割り当てステップと、前記プロセッサが、前記アプリケーションプログラムを実行して、前記処理途中の前記データを複数の変数に格納して処理を行う主要処理ステップと、前記プロセッサが、前記アプリケーションプログラムを実行して、前記第1のメモリ割り当てステップで当該アプリケーションプログラムに割り当てられた前記仮想的なアドレス空間を管理する第2のメモリ管理ステップと、を含み、前記第2のメモリ管理ステップは、前記変換情報にアクセスして、前記割り当てられた仮想的なアドレス空間に対応する前記メモリブロックの配置を算出するページマップ取得ステップと、前記アプリケーションプログラムが処理する前記変数を、異なる前記メモリブロックに割り当てる第2のメモリ割り当てステップと、を含む。
 したがって、本発明によれば、アプリケーションプログラムのメモリ管理プログラムが、当該アプリケーションプログラムで使用するメモリの記憶領域(利用領域)を、物理アドレス上で離散的に分割された複数のページに割り当てることで、秘密情報の漏洩リスクを軽減できる。
 本明細書において開示される主題の、少なくとも一つの実施の詳細は、添付されている図面と以下の記述の中で述べられる。開示される主題のその他の特徴、態様、効果は、以下の開示、図面、請求項により明らかにされる。
本発明の実施例1を示し、計算機システムの構成の一例を示すブロック図である。 本発明の実施例1を示し、ネットワーク端末の利用形態の一例を表す図である。 本発明の実施例1を示し、ネットワーク端末の機能の一例を示すブロック図である。 本発明の実施例1を示し、アプリケーションのメモリ管理プログラムの一例を表す図である。 本発明の実施例1を示し、アプリケーションのメモリ管理プログラムが、変数とメモリ空間のアドレスとを対応付ける処理の一例を示すフローチャートである。 本発明の実施例1を示し、主要処理プログラムの変数とメモリ空間のアドレスとの対応付けの一例を表す図である。 本発明の実施例2を示し、アプリケーションのメモリ管理プログラムの一例を表す図である。 本発明の実施例2を示し、アプリケーションのメモリ管理プログラムが、変数とメモリ空間のアドレスとを対応付ける処理を示すフローチャートである。
 以下、本発明の一実施形態について添付図面を用いて説明する。
 図1は、本発明を利用する計算機システムの構成の一例を示すブロック図である。計算機システムは、ユーザ10によって操作されるネットワーク端末102と、アプリケーション(以下、アプリとする)配信サーバ103と、ネットワーク(図示省略)で構成されており、ユーザ101の操作によってアプリ配信サーバ103からアプリをネットワーク端末102がダウンロードする。
 アプリはサービス提供サイト104が提供する特定のサービスを利用するために用いられる。ユーザ101は、アプリ配信サーバ103からダウンロードしたアプリをネットワーク端末102にインストールした後に認証サーバ110に対してユーザ登録を実行する。
 ネットワーク端末102でサービスを利用する際には、サービス提供サイト104の認証サーバ110に対してユーザ認証(もしくは機器認証)を行った後に、アプリケーションサーバ111を通じてサービスを利用する。
 図2は、本発明におけるネットワーク端末102が認証サーバに対してユーザ認証を行う利用イメージを表す図である。
 ネットワーク端末102(以下、端末)は、計算機端末(情報処理装置)と同様にCPU240と、メモリ250と、ストレージ230を具備し、さらに生体情報を取得するセンサ220と、認証サーバ110やアプリケーションサーバ111と通信を行うための無線通信装置210を具備する。
 ストレージ230内には認証アプリ231が格納されている。端末102で認証を実行する際には、センサ220はユーザ101の生体情報260を取得し、認証アプリ231はセンサ220から生体情報260を含むセンサデータ221を受け取り、所定の処理を施した結果(通信データ211)を認証サーバ110に送信する。
 マルウェア270の感染による端末102からの情報漏洩を防止するため、センサデータ221と通信データ211は暗号化してもよい。この場合、認証アプリ231はセンサ220及び認証サーバ110と暗号通信を行うための鍵を共有する。
 図3は、本発明におけるネットワーク端末102の機能の一例を示す図である。端末102はネットワーク201と情報の送受信を行うネットワークインターフェース310と、カメラやマイクなど物理情報を取得するセンサ220、データやプログラムを保存するストレージ230と、演算処理を行うCPU240と、処理中の中間データ(中間状態)やプログラムを保持するメモリ250などで構成される。これらの構成要素はデータバスで互いに接続されており、メモリ250を介してデータを送受信する。
 CPU240は複数の汎用レジスタ342と、サイクルカウンタ341などを含む。ストレージ230には保存されているアプリ331のバイナリデータや、設定ファイルが保存されている。
 処理対象データ373は、センサ220から取得したセンサデータ221やネットワークIF310から取得した通信データ211である。また、処理対象データ373はストレージ230上に保存されているデータでもよい。
 メモリ250には、OS(Operating System)362と呼ばれるプログラムが常駐しており、ハードウェアとアプリの仲介や、複数のアプリの実行権限とリソースの管理を行っている。
 本実施例のユーザアプリは、ユーザ権限と呼ばれる限られた権限の元で実行される。一方、OS362が実行するリソース管理などは、より強い権限(特権)の元で実行される。メモリ250はユーザアプリが利用するユーザ空間370と、OS362の中心的な処理(カーネル処理)が利用するカーネル空間360に分けられる。
 記憶媒体としてのストレージ230上に保管されているアプリ331は、実行されるとメモリ250上に展開され、メモリ250上のアプリ371は、OS362が割り当てた利用領域372を使って処理を実行する。
 アプリ331は、配信サーバ103の記憶媒体(ストレージ装置)や、不図示のアプリ開発者用計算機の記憶媒体(ストレージ装置)にプログラムとして格納され、ネットワークや、可搬型記憶媒体を介して、端末102内のストレージ230に格納される。
 例えば、処理対象データ373は利用領域372に格納される。アプリ371が利用する利用領域372は、実行時に静的に確保してもよいし、実行の途中で動的に(C言語の標準ライブラリとして提供されるalloc関数などを介して)確保してもよい。
 複数のアプリを同時に実行する場合、OS362のプロセス管理プログラムはCPU240やメモリ250などのハードウェアリソースをアプリに割り当て、適宜この割り当てを切り替える。
 具体的には、OS362はサイクルカウンタ341などの時刻情報を基準にして、定期的に割り込み登録の有無を判定し、割り込みが発生した場合には現在実行中のアプリを中断し、汎用レジスタ340の状態(内容)をアプリ371の退避領域361に退避させて、他の処理にリソースを割り当てる。OS362は、割り込み処理が終了すると、退避領域361へ退避させていたレジスタの状態を汎用レジスタ342へ復元し、中断したアプリを再開する。
 このような端末102がマルウェア270に感染し、マルウェア270がカーネルの脆弱性などを利用してカーネルモードで活動できるようになると、マルウェア270はユーザ空間370だけでなくカーネル空間360にアクセスできるようになる。本実施例では、このような状況下において、アプリ371が利用する利用領域372と、退避領域361のすべてをマルウェアに走査されるリスクを軽減する方法を提供する。
 図4は、本実施例において、アプリ371が実行時に割り当てられた利用領域372を分割し、実際に処理に用いる複数の変数421を適切に配置するメモリ管理プログラム410の構成を表す図である。
 OS362は、メモリ250のリソースを有効に活用するため、ハードウェア上の位置から定まる物理アドレスとは別に、仮想アドレスと呼ばれるアドレスでメモリ250を管理している。
 物理アドレス/仮想アドレス変換テーブル402(以下、変換テーブルとする)は、メモリ250の物理アドレスと仮想アドレスの対応表である。変換テーブル402は、OS362によって管理される。
 OS362のメモリ割り当てプログラム1(401)は、アプリ371を実行する際、もしくはアプリ371からメモリ割り当て要求があった場合に、アプリ371が要求する量のメモリ250を確保し、その仮想アドレスをアプリ371に通知する。
 アプリ371は、本来の処理を行う主要処理プログラム420に加えて、アプリ371が利用するメモリ250を管理するメモリ管理プログラム410を含んでいる。
 メモリ管理プログラム410は、OS362のメモリ割り当てプログラム1(401)と通信を行いアプリ371の実行に必要なメモリを取得するメモリ取得プログラム411と、変換テーブル402を参照して利用領域372の物理アドレスを取得するページマップ取得プログラム412と、主要処理プログラム420のコード内に存在する変数v[1]~v[k](421)を一定のルールに従って利用領域372に割り当てるメモリ割り当てプログラム2(413)を含む。
 なお、メモリ250のページは、OS362が管理する所定のサイズ(例えば、数キロバイト)の記憶領域である。
 主要処理プログラム420は、複数の変数421に処理対象データ373を格納して所定の処理を実行する。主要処理プログラム420は、メモリ250の利用領域372に処理途中のデータ(変数421)を保管しながら処理を行う。
 メモリ管理プログラム410と、主要処理プログラム420の各機能部はメモリ250にロードされて、CPU240によって実行される。
 CPU240は、各機能部のプログラムに従って処理を実行することによって、所定の機能を提供する機能部として稼働する。例えば、CPU240は、メモリ管理プログラム410に従って処理を実行することでメモリ管理部として機能する。他のプログラムについても同様である。さらに、CPU240は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。
 図5は、本実施例において、メモリ管理プログラム410で行われる処理の一例を示すフローチャートである。図5に従って、メモリ管理プログラム410の処理を説明する。以下では、各プログラムを処理の主体として説明するが、アプリ371を実行するCPU240が処理の主体である。
 アプリ371は、予め設定されたセキュリティパラメータを取得して処理を開始する。セキュリティパラメータは、複数の変数421を割り当てるアドレスの距離(アドレスの差分又は間隔)や利用領域372へ割り当てるページ数等を決定する値であり、本実施例では予め設定される例を示す。
 ステップ510で、メモリ割り当てプログラム2(413)は、アプリ371のプログラム(主要処理プログラム420)を安全に実行するために必要なページのメモリを確保できているか否かを判定する。確保できていない場合はステップ511~513の処理を繰り返す。確保できている場合はステップ521以降を実行する。
 メモリ割り当てプログラム2(413)は、アプリ371を実行するために必要なメモリ250の容量と、アプリ371に割り当てられたページの物理アドレスの間隔が所定値以上であることを条件として上記判定を実施する。
 ステップ511で、メモリ取得プログラム411は、OS362のメモリ割り当てプログラム1(401)を呼び出して、メモリ250のページを取得する。
 ステップ512で、ページマップ取得プログラム412は、変換テーブル402にアクセスし、OS362から取得したページの仮想アドレスに対応する物理アドレスを取得する。
 ステップ513で、ページマップ取得プログラム412は、仮想アドレスの各番地がどのページに配置されているかを算出する。
 ステップ510の判定で、アプリ371が必要とする容量のページ数が、物理アドレス上で分散された状態で取得された場合には、メモリ管理プログラム410はステップ521の処理へ移行する。
 ステップ521で、メモリ割り当てプログラム2(413)は、主要処理プログラム420が使用する変数v[1]~v[k](421)に、それぞれ異なるページのアドレスを割り当てる。メモリ割り当てプログラム2(413)は、各変数421へ割り当てるページの物理アドレスが、セキュリティパラメータで指定された距離(アドレスの差分)となるように設定する。既に初期値が割り当てられている変数421や、入力データについては、割り当てられたアドレスにデータをコピーし、初期値が格納されているアドレスはデータを消去する。
 ステップ522で、主要処理プログラム420は、割り当てられたアドレスを利用して所定の処理を実行する。
 図5では、メモリ割り当てプログラム2(413)が小規模(ページ単位)にメモリ空間を取得しながら所定の条件を満たすまでチェックすることを繰り返しているが、これに限定されるものではない。例えば、メモリ割り当てプログラム2(413)が、最初に大きなメモリ空間を確保し、必要なページのみを利用してもよい。
 また、上記ステップ510~513のループ処理の中に変数v[1]~v[k]へページ601を割り当てる処理を含めてもよい。また、アプリ371は、実際には利用しないページ601を早期に開放してメモリ消費を抑えてもよい。
 上記ステップ510で述べた「プログラムの安全な実行に必要なページ」は、予めセキュリティパラメータとして固定した値でもよい。また、アプリ371の実行時に、他に動作しているプロセスの数(UNIX系OSであればpsコマンドで取得可能)や、処理中の割り込み発生頻度(CPUのサイクルカウンタやOS362が提供する時刻情報などから算出可能)等の環境情報を取得し、アプリ371がマルウェアから観測されている可能性を評価し、その評価結果を基に取得するべきページ数を決めてもよい。このように処理を行うことで、動的なリスクの変化に合わせてメモリ消費を適切に抑えることができる。
 あるいは、アプリ371は、上記評価結果(環境情報)に基づいて上記セキュリティパラメータを動的に変化させて、変数421に割り当てる物理アドレスの距離(間隔)を動的に変更させてもよい。
 また、本実施例では、メモリ管理プログラム410をアプリ371のプログラムとして記述したが、ハイパーバイザやインタープリタのように外部プログラムとして実装してもよいし、OS362が有するメモリ割り当てプログラム1(401)に統合してもよい。
 図6は、主要処理プログラム420の変数とメモリ空間のアドレスとの対応付けの一例を表す図である。
 図5のステップ521において、メモリ空間においてアプリ371に割り当てられた物理アドレス上のページ(図中斜線で表されたの領域)601と、割り当てられたページ601中における変数421への領域の割り当てを表す図である。
 OS362は、メモリ250の記憶領域を一定量ごとに分割して管理する。管理の最低単位をページ601と呼ぶ。OS362はアプリ371の実行時に、ページ単位601でメモリ250の記憶領域を確保し、アプリ371に割り当てる。
 ただし、割り当てられたページ601のうち一部は実行コードを展開する領域に用いられる。また、利用領域372へ割り当てられたページ601は、仮想アドレスでは連続した領域だが、物理アドレスでは不連続の記憶領域となっている。
 メモリ割り当てプログラム2(413)は、主要処理プログラム420の変数v[1]~v[k](421)を、仮想アドレス上でそれぞれ異なる連続領域(ページ601)に割り当てる。ただし、メモリ割り当てプログラム2(413)は、変数v[1]~v[k](421)を割り当てた利用領域372の物理アドレスは、少なくとも十分に離れた領域(セキュリティパラメータの距離)に割り当てる。
 すなわち、メモリ割り当てプログラム2(413)が各変数421に割り当てる領域は、異なるページで、セキュリティパラメータで指定された物理アドレス上の距離を確保した領域となる。
 メモリ空間を走査するマルウェア270は、通常1回の走査で連続する物理アドレスを走査する。また、1回の走査ごとに割り込みが発生し、OS362は他のプロセスを実行する。したがって、上記のように物理アドレス上で離散的な領域を変数v[1]~v[k](421)に割り当てる構成と上記フローチャートに基づき処理を実行すると、マルウェア270はある時刻において、アプリ371の利用領域372の極一部しか走査することができない。
 また、次にマルウェア270が実行される時刻までにアプリ371が実行されることが期待されるので、利用領域372に格納された値は更新されている可能性が高い。したがって、アプリ371が十分に高い頻度で変数421の値を更新すれば、マルウェア270を利用する攻撃者は、ある時刻における変数421の全容を知ることができない。これにより、アプリ371で保護したい情報が漏洩するリスクを軽減することができる。
 アプリ371の一例として、white-box実装されたブロック暗号AES(Advanced Encryption Standard)を考える。white-box実装では、秘密鍵は乱数を加えたテーブルに隠蔽されており、直ちに秘密鍵の情報を知ることができない。
 しかし、処理の中間状態を多く集めることで、秘密鍵を復元できることが知られている。しかし、マルウェア270が中間状態を部分的に取得した場合、例えば、ラウンド処理において、1ワードだけが漏洩する場合、秘密鍵が復元できる可能性は非常に小さくなる。したがって、本実施例によれば、メモリ空間を走査するマルウェア270に秘密鍵を漏洩すること無しに、white-box実装されたAESを実行することができる。
 なお、図5のステップ521では、アプリ371の中で、予め保護するべき変数421を規定しておき、保護すべき変数421についてのみメモリ割り当てプログラム2(413)を適用してもよい。
 また、すべての変数421をすべて異なるページに分けなくてもよい。データを保護するために、どの変数とどの変数を別のページに割り当てるか、変数毎に予め評価した割り当て表を生成しておいてもよい。
 以上のように、本実施例では、アプリ371のメモリ管理プログラム410が、当該アプリ371で使用するメモリ250の記憶領域(利用領域372)を、物理アドレス上で離散的に分割された複数のページ601に割り当てることで、秘密情報の漏洩リスクを軽減できる。
 マルウェア270等の攻撃プログラムが、アプリ371(対象プログラム)の利用するメモリ領域から有意の情報を取り出すためには、レジスタの退避領域361を含めて、物理メモリの複数ページにアクセスする必要がある。
 したがって、攻撃プログラムはOS362が提供するAPI(Application Program Interface)を複数回呼び出す必要があり、読み取りに時間がかかる。また、APIの呼び出しごとに割り込みが発生し、この間に対象プログラムの処理が進められるので、攻撃プログラムがある時刻における処理の中間状態をすべて取得することが難しくなり、秘密情報の漏洩リスクを軽減できる。
 このように、マルウェア270と攻撃対象のプログラム(アプリ371)では、アプリ371が利用する記憶領域(利用領域372)にマルウェア270がアクセスを行うためには、OS362が提供する所定のAPIを利用する必要がある。このため、マルウェア270は、アプリ371よりも頻繁に利用領域372をアクセスすることができない。
 本実施例では、マルウェア270とアプリ371の利用領域372へのアクセスの差を利用して、マルウェア270に感染した状態でも情報の漏洩のリスクを低下させる。
 本実施例では、メモリ割り当てプログラム2(413)が、秘密情報を伴うデータ(変数421)とデータの中間状態を格納する領域(利用領域372)を複数のページ601に分けて割り当てる。アプリ371は、利用領域372のデータ及び中間状態を高速に更新可能なため、マルウェア270は、攻撃対象のプログラムの利用領域372のある時刻におけるスナップショットを取得することは難しくなり、秘密情報の漏洩リスクを低減できるのである。
 次に、本発明の実施例2について記述する。図7は、アプリ371の機能の一例を示す図である。
 実施例2において、アプリ371の実行時に割り当てられた利用領域372を分割し、実際に処理に用いる変数421を適切に配置するメモリ管理プログラム410の構成を表す図である。
 実施例2では、端末102は、図3で説明した実施例1における構成に加えて、乱数生成プログラム730を有する。また、アプリ371は、秘密分散プログラム720を有し、秘密分散プログラム720は、変数421の値と乱数から複数のシェアを生成するシェア生成プログラム721と、分散されたデータを復号する復号プログラム722とを含む。
 なお、シェアはShamirの秘密分散法等で知られており、変数421を複数のシェアに分割しておく。そして、一定数のシェアを持ち寄ることで元の変数421を復元する。
 図7の構成において、乱数生成プログラム730は、端末102のハードウェアやOS362が提供する乱数生成プログラムを想定しているが、これらが十分な乱数性を提供しない場合、代替としてエントロピー源提供プログラムでもよい。この場合には、アプリ371はさらにDRBG(Deterministic Random Bit Generator)を備え、エントロピー源提供プログラムの出力をDRBGに入力し、乱数性の高いビット列を生成して秘密分散処理を行う。
 図8は、実施例2において、メモリ管理プログラム410で行われる処理の一例を示すフローチャートである。図8の処理は前記実施例1の図5に示したステップ521をステップ810~813に置き換えたもので、その他の構成は前記実施例1と同様である。
 ステップ510~513では、メモリ割り当てプログラム2(413)が、前記実施例1の図5と同様に、アプリ371を実行するために必要なメモリ250の容量となるまで、物理アドレスの間隔が所定値以上のページ601を利用領域372として割り当てる。
 ステップ510では、メモリ割り当てプログラム2(413)が、プログラムの安全な実行に必要なページ601の利用領域372が確保されたと判定するとステップ810の処理に移行する。
 ステップ810では、メモリ割り当てプログラム2(413)が、すべての変数421について秘密分散及びメモリ250への割り当て処理が完了しているか否かを判定する。完了していない場合にはステップ811~813を繰り返す。処理が完了している場合にはステップ522を実行する。
 ステップ811では、シェア生成プログラム721が、乱数生成プログラム730を呼び出して、予め定められた数(p-1個)の乱数r[i][1]~r[i][p-1]を取得する。なお、所定の数pは、シェアの数を示す。
 ステップ812では、シェア生成プログラム721が、変数v[i]に格納されているデータd[i]と、ステップ811で取得した乱数からp個のシェアs[i][1]~s[i][p]を以下のようにして生成する。
s[i][1] = d[i] XOR r[i][1],
s[i][j] = s[i][j-1] XOR r[i][j], 1<j<p,
s[i][p] = r[i][1] XOR ... XOR r[i][p-1],
 ここで、XORは変数同士の排他的論理和を表す。
 ステップ813では、メモリ割り当てプログラム2(413)が、上記ステップ812で生成されたシェアsを、メモリ取得プログラム411が取得した利用領域372を異なるページに割り当てる。既に初期値が割り当てられている変数421や、入力データについては、割り当てられたアドレスにデータをコピーし、初期値が格納されているアドレスは当該データを消去する。
 ステップ522は、前記実施例1と同様であり、主要処理プログラム420が割り当てられたアドレスを利用して所定の処理を実行する。
 メモリ割り当てプログラム2(413)は、主要処理プログラム420から変数v[i]の復号要求を受け取ると、利用領域372にアクセスして該当するシェアs[i][1]~s[i][p]を読み出して、復号プログラム722に渡す。復号プログラム722は、以下のようにしてシェアからデータ(変数421)を復号する。
d[i] = s[i][1] XOR ... XOR s[i][p].
 また、復号プログラム722で復号された値が主要処理プログラム420で処理された結果を再び利用領域372に書き込むときには、メモリ割り当てプログラム2(413)がシェア生成プログラム712を呼び出す。シェア生成プログラム712は、乱数生成プログラム730を呼び出して新しい乱数を生成し、上記値を再度分散する。
 このように変数421の値に対して秘密分散処理を施した上で、それぞれのシェアを別々のページに割り当てることで、マルウェア270は、あるページを読み取っても元の変数の値を復元することが不可能になる。
 これにより、変数421の値に対して秘密分散処理を施すことで、前記実施例1に比べて保護したい情報が漏洩されるリスクをさらに軽減することができる。また、実施例2によれば、ページ601への割り当ては各変数421のコンテキストを考慮する必要が無く、同じページ601に多くの変数を割り当てることが可能となるため、メモリ250の利用効率が高まる。また、大規模なプログラムに対する適用コストが比較的小さいと期待される。
 なお、秘密分散と復号の方法は上記の方法に限定されるものではない。例えば、
s[i][j] = r[i][j], (0<j<p),
s[i][p] = d[i] XOR r[i][1] XOR ... XOR r[i][p-1].
のように分散させてもよい。
 この場合では、ほとんどのシェアが乱数生成プログラム730が生成した乱数のままであり、復号の際に秘密分散プログラム720がこれらのシェアを記憶しておけば、安全性は低下するが、乱数を再利用できる。
 また、上記の排他的論理和の変わりに算術加算や、減算を組み合わせて同様の秘密分散を構成してもよい。
 これらの秘密分散は、すべてのシェアを集めると復号できる方式だが、Shamirの秘密分散のように、部分的なシェアの集合から元のデータを復号できる方式(しきい値秘密分散)を用いてもよい。この場合、異なるシェアの集合について複数回復号処理を行うことで簡便な改ざん検知を行うことができる。
 また、上記実施例1及び実施例2では、CPU240上でデータを復号して主要処理を実行する例を示したが、本発明を秘密計算と組み合わせることで、CPU240上でもデータを復号せずに主要処理を実行できる。
 <結び>
 以上のように、上記実施例1、2の計算機システムは以下のような構成とすることができる。
 (1)プロセッサ(CPU240)とメモリ(250)を有する情報処理装置(端末102)で、前記メモリ(250)に格納されたOS(362)を介してデータ(373)とアプリケーションプログラム(アプリ371)を処理する情報処理方法であって、前記プロセッサ(240)が、前記OS(362)を実行して、前記メモリ(250)を所定のサイズのメモリブロック(ページ601)に分割して管理するページングステップ(メモリ割り当てプログラム1(401))と、前記プロセッサ(240)が、前記OS(362)を実行して、連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロック(ページ601)に対応付けて変換情報(変換テーブル402)を生成するアドレス変換ステップと、前記プロセッサ(240)が、前記OS(362)を実行して、前記アプリケーションプログラム(371)を実行する際に、前記アプリケーションプログラム(371)の実行に必要な仮想的なアドレス空間を前記アプリケーションプログラム(371)に割り当てる第1のメモリ割り当てステップ(401)と、前記プロセッサ(240)が、前記アプリケーションプログラム(371)を実行して、前記処理途中の前記データ(373)を複数の変数(421)に格納して処理を行う主要処理ステップ(主要処理プログラム420)と、前記プロセッサ(240)が、前記アプリケーションプログラム(371)を実行して、前記第1のメモリ割り当てステップ(401)で当該アプリケーションプログラム(371)に割り当てられた前記仮想的なアドレス空間を管理する第2のメモリ管理ステップ(メモリ割り当てプログラム2(413))と、を含み、前記第2のメモリ管理ステップ(413)は、前記変換情報(402)にアクセスして、前記割り当てられた仮想的なアドレス空間に対応する前記メモリブロック(601)の配置を算出するページマップ取得ステップ(ページマップ取得プログラム412)と、前記アプリケーションプログラム(371)が処理する前記変数(421)を、異なる前記メモリブロック(601)に割り当てる第2のメモリ割り当てステップ(413)と、を含む。
 上記構成により、アプリ371のメモリ管理プログラム410が、当該アプリ371で使用するメモリ250の記憶領域(利用領域372)を、物理アドレス上で離散的に分割された複数のページ601に割り当てることで、秘密情報の漏洩リスクを軽減できる。
 (2)上記(1)に記載の情報処理方法であって、前記第2のメモリ管理ステップ(410)では、前記変数(421)を割り当てるメモリブロック(601)同士の距離を、予め設定されたセキュリティパラメータに応じて決定する。
 上記構成により、変数421を格納する利用領域372は、物理アドレス上で離散的に配置されるため、マルウェア270が1回のアクセスでデータや中間状態を取得するのを防止できる。
 (3)上記(2)に記載の情報処理方法であって、前記第2のメモリ管理ステップ(410)では、前記情報処理装置(102)の環境情報を取得し、取得された環境情報に応じて前記セキュリティパラメータを動的に変更する。
 上記構成により、アプリ371のメモリ管理プログラム410が、環境情報を取得し、アプリ371がマルウェアから観測されている可能性を評価し、その評価結果を基に取得するべきページ数や秘密分散数を動的に変更することができる。
 (4)上記(1)に記載の情報処理方法であって、前記プロセッサ(240)が、前記アプリケーションプログラム(371)を実行して、乱数を生成する乱数生成ステップ(乱数生成プログラム730)と、前記乱数に基づいて前記変数(421)の値を秘密分散するシェア(s)を生成するシェア生成ステップ(シェア生成プログラム721)と、前記生成されたシェア(s)を収集して復号して元の値を復元する復号ステップ(復号プログラム722)と、をさらに含む。
 上記構成により、変数421の値に対して秘密分散処理を施すことで、保護したい情報が漏洩されるリスクをさらに軽減することができる。
 (5)上記(2)に記載の情報処理方法であって、前記セキュリティパラメータは、秘密分散の分散数(p)が設定され、前記プロセッサ(240)が、前記アプリケーションプログラム(371)を実行して、乱数を生成する乱数生成ステップ(乱数生成プログラム730)と、前記乱数に基づいて前記変数(421)の値を秘密分散するシェア(s)を生成するシェア生成ステップ(シェア生成プログラム721)と、前記生成されたシェア(s)を収集して復号して元の値を復元する復号ステップ(復号プログラム722)と、をさらに含む。
 上記構成により、セキュリティパラメータに基づいて変数421の値に対して秘密分散処理を施すことで、保護したい情報が漏洩されるリスクをさらに軽減することができる。
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。
 また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、又は、ICカード、SDカード、DVD等の記録媒体に置くことができる。
 また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。

Claims (11)

  1.  プロセッサとメモリを有する情報処理装置で、前記メモリに格納されたOSを介してデータとアプリケーションプログラムを処理する情報処理方法であって、
     前記プロセッサが、前記OSを実行して、前記メモリを所定のサイズのメモリブロックに分割して管理するページングステップと、
     前記プロセッサが、前記OSを実行して、連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロックに対応付けて変換情報を生成するアドレス変換ステップと、
     前記プロセッサが、前記OSを実行して、前記アプリケーションプログラムを実行する際に、前記アプリケーションプログラムの実行に必要な仮想的なアドレス空間を前記アプリケーションプログラムに割り当てる第1のメモリ割り当てステップと、
     前記プロセッサが、前記アプリケーションプログラムを実行して、処理途中の前記データを複数の変数に格納して処理を行う主要処理ステップと、
     前記プロセッサが、前記アプリケーションプログラムを実行して、前記第1のメモリ割り当てステップで当該アプリケーションプログラムに割り当てられた前記仮想的なアドレス空間を管理する第2のメモリ管理ステップと、を含み、
     前記第2のメモリ管理ステップは、
     前記変換情報にアクセスして、前記割り当てられた仮想的なアドレス空間に対応する前記メモリブロックの配置を算出するページマップ取得ステップと、
     前記アプリケーションプログラムが処理する前記変数を、異なる前記メモリブロックに割り当てる第2のメモリ割り当てステップと、
    を含むことを特徴とする情報処理方法。
  2.  請求項1に記載の情報処理方法であって、
     前記第2のメモリ管理ステップでは、
     前記変数を割り当てるメモリブロック同士の距離を、予め設定されたセキュリティパラメータに応じて決定することを特徴とする情報処理方法。
  3.  請求項2に記載の情報処理方法であって、
     前記第2のメモリ管理ステップでは、
     前記情報処理装置の環境情報を取得し、取得された環境情報に応じて前記セキュリティパラメータを動的に変更することを特徴とする情報処理方法。
  4.  請求項1に記載の情報処理方法であって、
     前記プロセッサが、前記アプリケーションプログラムを実行して、乱数を生成する乱数生成ステップと、
     前記乱数に基づいて前記変数の値を秘密分散するためのシェアを生成するシェア生成ステップと、
     前記生成されたシェアを収集して復号して元の値を復元する復号ステップと、
    をさらに含むことを特徴とする情報処理方法。
  5.  請求項2に記載の情報処理方法であって、
     前記セキュリティパラメータは、秘密分散の分散数が設定され、
     前記プロセッサが、前記アプリケーションプログラムを実行して、乱数を生成する乱数生成ステップと、
     前記乱数に基づいて前記変数の値を秘密分散するシェアを生成するシェア生成ステップと、
     前記生成されたシェアを収集して復号して元の値を復元する復号ステップと、
    をさらに含むことを特徴とする情報処理方法。
  6.  プロセッサとメモリを有し、前記メモリに格納されたOSを介してデータとアプリケーションプログラムを処理する情報処理装置であって、
     前記OSは、
     前記メモリを所定のサイズのメモリブロックに分割して管理するページング部と、
     前記連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロックに対応付けて変換情報を生成するアドレス変換部と、
     前記アプリケーションプログラムの実行に必要な仮想的なアドレス空間を前記アプリケーションプログラムに割り当てる第1のメモリ割り当て部と、を有し、
     前記アプリケーションプログラムは、
     処理途中のデータを複数の変数に格納して処理を行う主要処理部と、
     当該アプリケーションプログラムに割り当てられた前記仮想的なアドレス空間を管理する第2のメモリ管理部と、を有し、
     前記第2のメモリ管理部は、
     前記変換情報にアクセスして、前記割り当てられた仮想的なアドレス空間に対応する前記メモリブロックの配置を算出するページマップ取得部と、
     前記アプリケーションプログラムが処理する前記変数を、異なる前記メモリブロックに割り当てる第2のメモリ割り当て部と、
    を有することを特徴とする情報処理装置。
  7.  請求項6に記載の情報処理装置であって、
     前記第2のメモリ管理部では、
     前記変数を割り当てるメモリブロック同士の距離を、予め設定されたセキュリティパラメータに応じて決定することを特徴とする情報処理装置。
  8.  請求項7に記載の情報処理装置であって、
     前記第2のメモリ管理部では、
     前記情報処理装置の環境情報を取得し、取得された環境情報に応じて前記セキュリティパラメータを動的に変更することを特徴とする情報処理装置。
  9.  請求項6に記載の情報処理装置であって、
     前記アプリケーションプログラムは、乱数を生成する乱数生成部と、
     前記乱数に基づいて前記変数の値を秘密分散するシェアを生成するシェア生成部と、
     前記生成されたシェアを収集して復号し元の値を復元する復号部と、
    をさらに有することを特徴とする情報処理装置。
  10.  請求項7に記載の情報処理装置であって、
     前記セキュリティパラメータは、秘密分散の分散数が設定され、
     前記アプリケーションプログラムは、乱数を生成する乱数生成部と、
     前記乱数に基づいて前記変数の値を秘密分散するシェアを生成するシェア生成部と、
     前記生成されたシェアを収集して復号し元の値を復元する復号部と、
    をさらに有することを特徴とする情報処理装置。
  11.  プロセッサとメモリを有する情報処理装置で、前記メモリに格納されたデータを処理させるためのアプリケーションプログラムを格納した記憶媒体であって、
     連続した仮想的なアドレス空間を、物理アドレス上で非連続に配置された複数のメモリブロックに対応付けた変換情報を取得するアドレス変換ステップと、
     処理途中の前記データを複数の変数に格納して処理を行う主要処理ステップと、
     当該アプリケーションプログラムに割り当てられた前記仮想的なアドレス空間を管理するメモリ管理ステップと、を含み、
     前記メモリ管理ステップは、
     前記変換情報にアクセスして、前記割り当てられた仮想的なアドレス空間に対応する前記メモリブロックの配置を算出するページマップ取得ステップと、
     前記変数を異なる前記メモリブロックに割り当てるメモリ割り当てステップと、
    を前記情報処理装置に実行させるためのアプリケーションプログラムを格納した記憶媒体。
PCT/JP2020/017271 2019-05-07 2020-04-21 情報処理方法、情報処理装置及び記憶媒体 WO2020226054A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021518338A JP7168776B2 (ja) 2019-05-07 2020-04-21 情報処理方法、情報処理装置及び記憶媒体

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019-087738 2019-05-07
JP2019087738 2019-05-07

Publications (1)

Publication Number Publication Date
WO2020226054A1 true WO2020226054A1 (ja) 2020-11-12

Family

ID=73051052

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/017271 WO2020226054A1 (ja) 2019-05-07 2020-04-21 情報処理方法、情報処理装置及び記憶媒体

Country Status (2)

Country Link
JP (1) JP7168776B2 (ja)
WO (1) WO2020226054A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6184756A (ja) * 1984-08-17 1986-04-30 ナームローゼ フエンノートチヤツプ フイリツプス グロエイラムペンフアブリーケン メモリアクセス制御装置
US20030163718A1 (en) * 2000-04-12 2003-08-28 Johnson Harold J. Tamper resistant software-mass data encoding
JP2010514039A (ja) * 2006-12-22 2010-04-30 トラスティド・ロジック セキュリティ保護された電子システム、セキュリティ保護方法およびそのシステムの使用

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6184756A (ja) * 1984-08-17 1986-04-30 ナームローゼ フエンノートチヤツプ フイリツプス グロエイラムペンフアブリーケン メモリアクセス制御装置
US20030163718A1 (en) * 2000-04-12 2003-08-28 Johnson Harold J. Tamper resistant software-mass data encoding
JP2010514039A (ja) * 2006-12-22 2010-04-30 トラスティド・ロジック セキュリティ保護された電子システム、セキュリティ保護方法およびそのシステムの使用

Also Published As

Publication number Publication date
JP7168776B2 (ja) 2022-11-09
JPWO2020226054A1 (ja) 2020-11-12

Similar Documents

Publication Publication Date Title
US10853270B2 (en) Cryptographic pointer address encoding
Jang et al. Heterogeneous isolated execution for commodity gpus
US20200349265A1 (en) Technologies for trusted i/o with a channel identifier filter and processor-based cryptographic engine
CN110637301B (zh) 减少虚拟机中敏感数据的泄密
JP4498735B2 (ja) オペレーティングシステムおよびカスタマイズされた制御プログラムとインタフェースする安全なマシンプラットフォーム
Strackx et al. Efficient isolation of trusted subsystems in embedded systems
US20130268777A1 (en) Securing Inputs from Malware
WO2019245789A1 (en) Secure sharing of license data in computing systems
Mittal et al. A survey of techniques for improving security of gpus
US10303885B2 (en) Methods and systems for securely executing untrusted software
Garay et al. Software integrity protection using timed executable agents
Mayrhofer An architecture for secure mobile devices
Ben Yehuda et al. Protection against reverse engineering in ARM
Chen et al. A cross-layer plausibly deniable encryption system for mobile devices
WO2020226054A1 (ja) 情報処理方法、情報処理装置及び記憶媒体
JP6899308B2 (ja) 情報処理装置および情報処理装置のデータ処理方法
Fu et al. RegKey: a register-based implementation of ECC signature algorithms against one-shot memory disclosure
JP2004272816A (ja) マルチタスク実行システム及びマルチタスク実行方法
CN111475844A (zh) 一种数据共享方法、装置、设备及计算机可读存储介质
WO2021117638A1 (ja) 情報処理システム、プログラム間鍵共有方法、及びプログラム間鍵共有プログラム
JP7295761B2 (ja) 情報処理装置
WO2021117524A1 (ja) 実行ファイル生成装置、方法、およびプログラムが記録された非一時的記憶媒体
CN116860666A (zh) 一种gpu内存保护方法、装置、芯片及电子设备
Karger et al. Designing a Secure Smart Card Operating System

Legal Events

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

Ref document number: 20802747

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021518338

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20802747

Country of ref document: EP

Kind code of ref document: A1