Portable electronic device, IC card, and IC card processor

WO2025009441A1PCT designated stage expired Publication Date: 2025-01-09KK TOSHIBA

Patent Information

Application Number
PCT/JP2024/023011
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-05
Filing Date
2024-06-25
Publication Date
2025-01-09

Smart Images

  • Figure JP2024023011_09012025_PF_FP_ABST
    Figure JP2024023011_09012025_PF_FP_ABST
Patent Text Reader

Abstract

According to an embodiment, a portable electronic device comprises an interface, a memory, and a processor. The interface communicates with an external device. The memory stores standby-time setting information for setting the lower limit value of a standby time from when the external device transmits a command until when the external device receives a response to the command. The processor transmits, to the external device, standby-time information for specifying the lower limit value of the standby time based on the standby-time setting information stored in the memory, executes processing in accordance with a command received from the external device having transmitted the standby-time information, and transmits, to the external device, a response including the execution result of the processing in accordance with the command.
Need to check novelty before this filing date? Find Prior Art

Description

Portable electronic device, IC card, and IC card processing device

[0001] FIELD OF THE INVENTION The present invention relates to a portable electronic device, an IC card, and an IC card processing device.

[0002] In recent years, security attacks have become known in which an external attack is made on an IC card as a portable electronic device, causing the control circuit to perform unauthorized operations. Such an external attack may cause the IC card to perform unauthorized operations, such as skipping part of the regular processing, such as the determination processing necessary to maintain security.

[0003] However, conventional IC cards have a problem in that they may output a normal response even if an external attack causes them to skip part of the regular processing required by a command. For this reason, there is a demand for an IC card processing system consisting of an IC card and a card reader / writer that can detect fraud such as skipping part of the regular processing, such as the determination processing, within the IC card.

[0004] Japanese Patent Application Publication No. 2020-009305

[0005] In order to solve the above problems, the present invention provides a portable electronic device, an IC card, and an IC card processing device that can detect unauthorized operations.

[0006] According to an embodiment, a portable electronic device includes an interface, a memory, and a processor. The interface communicates with an external device. The memory stores wait-time setting information for setting a lower limit of a wait time from when the external device transmits a command until when the external device receives a response to the command. The processor transmits wait-time information to the external device for specifying the lower limit of the wait time based on the wait-time setting information stored in the memory, executes processing in response to a command received from the external device that transmitted the wait-time information, and transmits a response to the external device including a result of the execution of the processing in response to the command.

[0007] FIG. 1 is a block diagram showing an example of the configuration of an IC card as a portable electronic device according to an embodiment. FIG. 2 is a block diagram showing an example of the configuration of an IC card processing device that communicates with an IC card as a portable electronic device according to an embodiment. FIG. 3 is a diagram showing an example of setting information for processing time stored in a memory of an IC card as a portable electronic device according to an embodiment. FIG. 4 is a diagram showing an example of setting information for processing time stored in a memory of an IC card as a portable electronic device according to an embodiment. FIG. 5 is a diagram showing an example of an adjustment value for the setting information for processing time stored in a memory of an IC card as a portable electronic device according to an embodiment. FIG. 6 is a diagram showing an example of an adjustment value for the setting information for processing time stored in a memory of an IC card as a portable electronic device according to an embodiment. FIG. 7 is a sequence for explaining upper and lower limits of a waiting time set by an IC card processing device for an IC card as a portable electronic device according to an embodiment. FIG. 8 is a flowchart for explaining an example of an operation of an IC card as a portable electronic device according to an embodiment. FIG. 9 is a flowchart for explaining an example of an operation of an IC card processing device according to an embodiment. Embodiment

[0008] Hereinafter, embodiments will be described with reference to the drawings. Fig. 1 is a block diagram showing a schematic configuration example of an IC card 1 according to an embodiment. The IC card 1 as a portable electronic device according to the embodiment constitutes an IC card processing system together with an IC card processing device 2. The IC card 1 is a portable electronic device that is activated (made operable) by power supplied from the IC card processing device 2. The IC card 1 is also called a smart card.

[0009] The portable electronic device according to the embodiment is not limited to a card-like shape, and may be a booklet-like device (for example, a notebook such as a passport) having the same configuration and processing functions as the IC card 1 described later. The portable electronic device according to the embodiment may also be a portable electronic device (for example, a smartphone, a mobile phone, a tablet PC, a dongle, etc.) having the same configuration and processing functions as the IC card 1 described later.

[0010] IC cards 1 can be broadly classified into contact-type IC cards and contactless-type IC cards. For example, a contact-type IC card 1 is activated by receiving an operating power supply and an operating clock from an IC card processing device 2 via a contact portion serving as a communication interface. A contactless-type IC card 1 receives radio waves from the IC card processing device 2 via an antenna and a modulation / demodulation circuit serving as a communication interface, and generates an operating power supply and an operating clock from the radio waves to activate the card.

[0011] As shown in Fig. 1, the IC card 1 has a main body C. The main body C is formed into a card shape from plastic or the like. The IC card 1 has a module M inside the main body C. The module M is formed integrally with one or more IC chips Ca and an external interface for communication (interface) connected thereto, and is embedded inside the main body C.

[0012] In addition, the portable electronic device according to the embodiment may have a module M in a main body formed in the shape of a booklet, or may have a module M in a main body that forms a portable electronic device (portable terminal).

[0013] In the configuration example shown in FIG. 1, a module M of an IC card 1 includes a processor 11, a RAM 12, a ROM 13, a nonvolatile memory 14, a communication control unit 15, an interface 16, and the like.

[0014] The processor 11 includes circuits that execute various processes. The processor 11 is, for example, a CPU (Central Processing Unit). The processor 11 controls the entire IC card 1. The processor 11 executes programs stored in the ROM 13 or the non-volatile memory 14 to realize various processing functions. However, some or all of the various functions executed by the processor 11, which will be described later, may be realized by hardware circuits.

[0015] The RAM 12 is a volatile memory that functions as a working memory. The RAM 12 also functions as a buffer that temporarily stores data being processed by the processor 11. For example, the RAM 12 functions as a communication buffer that temporarily stores data to be transmitted and received between the IC card processing device 2 and the processor 11 via the communication control unit 15 and the interface 16.

[0016] The ROM 13 is a non-volatile memory that functions as a program memory. Control programs, control data, etc. are stored in the ROM 13 in advance. The ROM 13 is incorporated into the IC card 1 during the manufacturing stage with the control programs, control data, etc. stored therein. In other words, the control programs and control data stored in the ROM 13 are incorporated in advance according to the specifications of the IC card 1. For example, the ROM 13 stores a program that causes the processor 11 to execute processing in response to commands received from the IC card processing device 2.

[0017] The nonvolatile memory 14 is a nonvolatile memory to which data can be written and rewritten. The nonvolatile memory 14 is composed of, for example, an EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory) or a flash ROM. Some or all of the nonvolatile memory 14 is tamper-resistant, allowing data to be securely stored. Programs and various data according to the operational use of the IC card 1 are written to the nonvolatile memory 14. Data is stored in the nonvolatile memory 14 in a file structure defined by a predetermined standard. Program files, data files, etc. are defined in the nonvolatile memory 14, and control programs and various data are written to these files.

[0018] For example, in the non-volatile memory 14 of an IC card conforming to the international standard ISO / IEC 7816-4, a group of multiple files having a hierarchical structure consisting of MF (Master File), DF (Dedicated File), and EF (Elementary File) are defined. In the file structure defined by ISO / IEC 7816-4, the MF is at the top level, and one or more DFs exist at the level below the MF. One DF stores, for example, data for implementing one application. Furthermore, one or more EFs exist at the level below the DF. Each EF stores various data used for the application as the DF.

[0019] The communication control unit 15 is connected to the interface 16. The interface 16 is an interface for communication connection to an external device. The communication control unit 15 and the interface 16 constitute a communication unit. The communication control unit 15 and the interface 16 realize a communication function using a communication method corresponding to the interface of the IC card processing device 2. The communication control unit 15 and the interface 16 may also be configured to support multiple communication methods (for example, contact communication and contactless communication).

[0020] When the IC card 1 is realized as a contact-type IC card, the communication control unit 15 and the interface 16 constitute a communication unit that comes into contact with and communicates with the IC card processing device 2. In this case, the interface 16 is constituted by a contact unit that comes into physical and electrical contact with the contact unit of the IC card processing device 2, and the communication control unit 15 is constituted by a circuit or the like that controls the transmission and reception of signals via the contact unit.

[0021] Furthermore, when the IC card 1 is realized as a contactless IC card, the communication control unit 15 and the interface 16 constitute a communication unit that communicates contactlessly (wirelessly) with a card reader / writer of the IC card processing device 2. In this case, the interface 16 is constituted by an antenna that transmits and receives radio waves, and the communication control unit 15 is constituted by a modulation circuit for generating radio waves to be transmitted and a demodulation circuit for generating a signal from the received radio waves.

[0022] Next, the configuration of the IC card processing device 2 according to the embodiment will be described. Fig. 2 is a block diagram that schematically shows an example configuration of the IC card processing device 2 according to the embodiment. In the example configuration shown in Fig. 2, the IC card processing device 2 is a higher-level device that has the function of communicating with the IC card 1 via a card reader / writer 24. The IC card processing device 2 may be, for example, a device in which the card reader / writer 24 is connected to a control device such as a personal computer (PC).

[0023] 2, the IC card processing device 2 includes a control unit 21, a display unit 22, an operation unit 23, a card reader / writer 24, etc. The control unit 21 controls the overall operation of the IC card processing device 2. The control unit 21 includes a processor (CPU) 25, a RAM 26, a ROM 27, a non-volatile memory 28, a communication unit 29, and a timer 30. For example, the control unit 21 is configured by a personal computer.

[0024] The processor 25 executes various processes by running programs stored in the ROM 27 or the non-volatile memory 28. The RAM 26 functions as a working memory that temporarily stores data. The ROM 27 is a non-volatile memory that stores programs, control data, etc. The non-volatile memory 28 is a rewritable non-volatile memory. The communication unit 29 is an interface for communicating with external devices. The timer 30 measures elapsed time. The timer 30 is controlled by the processor 25 to start and stop measuring elapsed time.

[0025] The control unit 21 has a function of sending commands to the IC card 1 via the card reader / writer 24, and a function of performing various processes based on data received from the IC card 1. For example, the control unit 21 controls writing of data to the non-volatile memory in the IC card 1 by sending a data write command to the IC card 1 via the card reader / writer 24. The control unit 21 also controls reading of data from the IC card 1 by sending a read command to the IC card 1. The control unit 21 also controls an application selected in the IC card 1 by sending an application selection command to the IC card 1.

[0026] The display unit 22 is a display device that displays various information under the control of the control unit 21. The operation unit 23 is composed of a keyboard, a numeric keypad, a pointing device, etc. The operation unit 23 is used by an operator of the IC card processing device 2 to input various operation instructions, data, etc. The operation unit 23 also functions as an input unit for inputting identification information or authentication information such as a password of the user of the IC card 1.

[0027] The card reader / writer 24 is a communication unit for communicating with the IC card 1. The card reader / writer 24 is configured with an interface according to the communication method of the IC card 1. For example, if the IC card 1 is a contact-type IC card, the card reader / writer 24 is configured with a contact unit for physically and electrically connecting to a contact unit of the IC card 1. If the IC card 1 is a contactless IC card, the card reader / writer 24 is configured with an antenna and communication control for wireless communication with the IC card 1. The card reader / writer 24 supplies power, clocks, performs reset control, and transmits and receives data to the IC card 1. Based on the control of the control unit 21, the card reader / writer 24 activates (starts up) the IC card 1, transmits various commands, and receives responses to the transmitted commands.

[0028] Next, a description will be given of communication processing between an IC card 1 as a portable electronic device according to an embodiment and an IC card processing device 2. The IC card 1 executes processing in response to a command from the IC card processing device 2, which includes a card reader, and transmits (responds to) a response including the execution result of the processing in response to the command to the IC card processing device 2. The processing time required for the IC card 1 to execute processing in response to a command from the IC card processing device 2 is a time that can be estimated in advance if the processing is executed normally. In other words, once the range of normal processing time for a command in the IC card 1 is set, the range (upper and lower limits) of the waiting time from when the IC card processing device 2 sends the command until it receives a response can be set.

[0029] The IC card 1 according to the embodiment can set a lower limit and an upper limit as the range of normal processing time required for processing in response to a command. The lower limit and upper limit for the processing time are set in advance according to the specifications of the IC card 1 and stored as internal data when the IC card is manufactured or issued. For example, the lower limit and upper limit for the processing time are stored in a memory such as the ROM 13 or the non-volatile memory 14 as setting information for a waiting time. The setting information for the waiting time may be stored for each application, for each command, or for each file (DF or EF).

[0030] 3 is a diagram showing an example of the configuration of an IC card 1 serving as a portable electronic device according to an embodiment, in which standby time setting information is stored for each application. Fig. 3 shows an example of the configuration of a table that stores standby time setting information, including a lower limit for the normal processing time, based on the format defined in 12.2.4.2 of ISO / IEC 7816-4:2020. In the example shown in Fig. 3, the standby time setting information includes an upper limit (Tb_max) of the processing time, a lower limit (Tb_min) of the processing time, a unit time (Tu), and options, set for each application.

[0031] "Tb_max" is the upper limit reference time for the processing time (for example, Tb_max [ms]). "Tb_min" is the lower limit reference time for the processing time (for example, Tb_min [ms]). "Tu" is the transmission time of unit data (for example, Tu [ms / B]). Here, if the length of the communication data is Ld (for example, Ld [B]), the communication time is calculated as "Tu x Ld" ([ms]).

[0032] The time (standby time) from when the IC card processing device 2 sends a command to the IC card 1 until it receives a response includes the processing time for the command and the communication time in the IC card 1. Therefore, if the length of the communication data is Ld, the upper limit value (Tmax) of the standby time is calculated as Tmax = Tb_max + (Tu x Ld). Also, if the length of the communication data is Ld, the lower limit value (Tmin) of the standby time is calculated as Tmin = Tb_min + (Tu x Ld).

[0033] 3, either an upper limit or a lower limit can be set for each application, or both upper and lower limits can be set, or no limit can be set. As a specific example, in the example shown in FIG. 3, an upper limit and no lower limit are set for the processing time for "Application 1." In this case, since the IC card 1 does not specify a lower limit for the processing time, the IC card processing device 2 does not check the lower limit for the waiting time, but checks the upper limit for the waiting time.

[0034] Also, in the example shown in Figure 3, no upper limit value for processing time is set for "Application 2," but a lower limit value is set. In this case, since the IC card 1 does not specify an upper limit for processing time, the IC card processing device 2 does not check the upper limit for waiting time, but checks the lower limit for waiting time. Also, in the example shown in Figure 3, both upper and lower limit values ​​for processing time are set for "Application 3." In this case, since the IC card specifies the upper and lower limits for processing time, the IC card processing device 2 checks both the upper and lower limits for waiting time.

[0035] Furthermore, in the standby time setting information shown in FIG. 3, an "option" can be set for each application. The "option" setting in the standby time setting information can specify, for example, a logical channel, a secure session, or a priority. A logical channel is a logically set communication channel specified, for example, in ISO / IEC 7816-4. The option for the standby time setting information can specify (set) a logical channel for which the standby time range setting is enabled and a logical channel for which the standby time range setting is disabled. In this case, the IC card 1 switches between enabling and disabling the standby time range setting for each logical channel according to the option setting.

[0036] A secure session is a secure communication mode that includes encryption and decryption as specified in, for example, ISO / IEC 7816-4. The option for the standby time setting information may be set so that the standby time range setting is valid for a secure session and invalid for a non-secure session. In this case, the IC card 1 switches between validating and invalidating the standby time range setting depending on whether the session is secure or not, in accordance with the option setting.

[0037] Furthermore, a priority order can be set as an option for the setting information of the waiting time. The priority order in the options is setting information for determining which setting information is to be prioritized when there is setting information of waiting times set under different conditions, as will be described later. In other words, when there is setting information of multiple waiting times set under different conditions, the IC card 1 can identify the setting information of the waiting time to be applied based on the priority order set as an option.

[0038] FIG. 4 is a diagram showing an example of the configuration of an IC card 1 serving as a portable electronic device according to an embodiment, in which standby time setting information is stored for each command. FIG. 4 shows an example of the configuration of a table that stores standby time setting information, including a lower limit for normal processing time, based on the format defined in ISO / IEC 7816-4. In the standby time setting information shown in FIG. 4, an upper limit for processing time (Tb_max), a lower limit for processing time (Tb_min), a unit time (Tu), and an option are set for each command. As with the example shown in FIG. 3, the upper limit for processing time (Tb_max) is the upper reference time for normal processing time, and the lower limit for processing time (Tb_min) is the lower reference value for normal processing time.

[0039] According to the standby time setting information shown in Fig. 4, the upper limit (Tmax) of the standby time is calculated as Tmax = Tb_max + (Tu x Ld) if the length of the communication data is Ld, as in the example shown in Fig. 3. The lower limit (Tmin) of the standby time is calculated as Tmin = Tb_min + (Tu x Ld) if the length of the communication data is Ld.

[0040] In the setting information for the waiting time shown in Fig. 4, either an upper limit or a lower limit can be set for each command, or both upper and lower limits can be set, or no limit can be set. As a specific example, in the example shown in Fig. 4, an upper limit (Tb_Max) for the normal processing time in the IC card is set for "read binary," but no lower limit (Tb_min) is set. In this case, since the IC card 1 does not specify a lower limit for the waiting time, the IC card processing device 2 does not check the lower limit for the waiting time.

[0041] In the example shown in FIG. 4 , an upper limit (Tb_Max) for the normal processing time in the IC card is not set in "Update binary," but a lower limit (Tb_min) is set. In this case, since the IC card does not specify an upper limit for the waiting time, the IC card processing device 2 does not check the upper limit for the waiting time. In the example shown in FIG. 4 , both an upper limit (Tb_Max) and a lower limit (Tb_min) for the normal processing time in the IC card are set in "read record." In this case, since the IC card 1 specifies the upper and lower limits for the waiting time, the IC card processing device 2 checks both the upper and lower limits for the waiting time. In the example shown in FIG. 4 , both an upper limit (Tb_Max) and a lower limit (Tb_min) for the normal processing time in the IC card are set in "Update record." In this case, since the IC card 1 specifies the upper and lower limits of the waiting time, the IC card processing device 2 checks both the upper and lower limits of the waiting time.

[0042] As shown in FIG. 4, as "options" in the setting information of the waiting time for each command, logical channel, secure session, priority, etc. can be set, similar to the example shown in FIG.

[0043] Furthermore, the IC card 1 as the portable electronic device according to the embodiment may store in memory setting information for the standby time that indicates the upper and lower limits of the processing time range for each file.

[0044] For example, as described above, application data is stored in non-volatile memory 14 in files managed in a multi-level file structure consisting of MF, DF, and EF. In this case, the wait time setting information may be set for each file, such as DF or EF. The wait time setting information for each file is setting information that sets, for each file, setting information such as the upper limit of processing time, the lower limit of processing time, the unit time, and options, similar to the example shown in FIG. 3 or FIG. 4. Furthermore, the wait time setting information for each file can set either an upper limit or a lower limit, or both upper and lower limits, or no limit can be set.

[0045] Next, we will explain how to adjust the upper and lower limits of the processing time in the standby time setting information of the IC card 1 according to the embodiment. The normal processing time range of the IC card 1 according to the embodiment may vary depending on the state of the IC card. Therefore, the IC card 1 according to the embodiment has a function to adjust the upper and lower limits of the processing time in the standby time setting information depending on the state of the IC card. For example, the IC card 1 can adjust the upper and lower limits of the processing time depending on the communication state, memory state, etc.

[0046] 5 is a diagram showing an example of setting adjustment parameters for adjusting the upper and lower limits of the processing time of the IC card 1 depending on the communication state. Since the IC card 1 operates using power supplied from the IC card processing device 2, the processing time corresponding to a command can change depending on the communication state. For example, when the IC card 1 is connected to the IC card processing device (card reader / writer) 2 via a contact interface, the processing time of the IC card 1 changes depending on the applied voltage supplied from the IC card processing device 2.

[0047] Furthermore, when the IC card 1 is connected to the IC card processing device 2 via a contactless interface, the processing time varies depending on the contactless communication environment, such as the magnetic field strength from the IC card processing device (card reader / writer 24) 2. For example, the magnetic field strength varies depending on the distance between the interface 16 of the IC card 1 and the card reader / writer 24 of the IC card processing device 2. Therefore, the contactless communication environment of the IC card 1 that communicates via a contactless interface may frequently change.

[0048] The IC card 1 stores adjustment values ​​for the upper and lower limits of the processing time as adjustment parameters according to the communication state in a memory such as the ROM 13 or the nonvolatile memory 14. In the example shown in Fig. 5, the adjustment values ​​are set according to the level of the communication state (applied voltage or magnetic field strength). The adjustment values ​​according to the communication state are set as coefficients or offset values ​​for the upper and lower limits of the processing time.

[0049] For example, if the adjustment value is set as a coefficient for the upper and lower limit values ​​of the processing time, the upper and lower limit values ​​of the processing time are adjusted by multiplying the adjustment value. Specifically, if the communication state is level 1 and the adjustment value as a coefficient is "AA," "Tb_max" is adjusted as "Tb_max" x "AA," and "Tb_min" is adjusted as "Tb_min" x "AA."

[0050] Furthermore, when the adjustment value is set as an offset for the upper and lower limit values ​​of the processing time, the upper and lower limit values ​​of the processing time are adjusted by adding the adjustment value. Specifically, if the communication state is level 1 and the adjustment value as an offset is "AA", "Tb_max" is adjusted as "Tb_max" + "AA", and "Tb_min" is adjusted as "Tb_min" + "AA".

[0051] 5 are set according to the communication state, the IC card 1 identifies a level according to the communication state when communication with the IC card processing device 2 is started. After identifying the level of the communication state, the IC card 1 calculates upper and lower limit values ​​for the adjusted processing time using the adjustment value according to the identified level as a coefficient or offset value. The IC card 1 transmits the adjusted upper and lower limit values ​​for the processing time to the IC card processing device 2 at a predetermined timing specified by a standard or the like.

[0052] 6 is a diagram showing an example of setting an adjustment value according to the state of a memory (e.g., nonvolatile memory 14) for writing data in IC card 1. Nonvolatile memory 14 in IC card 1 has a data storage area into which data is written in response to a command requesting data writing. The performance of the memory elements constituting the data storage area may deteriorate. For example, if data is frequently written to nonvolatile memory 14 (data storage area), there is a possibility that data may not be completely erased or written in a process that takes a normal processing time (a normal single process).

[0053] If the IC card 1 is unable to erase and write data in a single normal process, it will be necessary to take measures such as erasing and writing data multiple times or extending the time required for each data erasure or write. In other words, if the IC card 1 repeatedly writes data to the storage area of ​​the nonvolatile memory 14, the data write process may become slow.

[0054] For this reason, the IC card 1 sets an adjustment parameter (delay adjustment parameter) according to the state of the memory as an adjustment value corresponding to the delay in the data write process. As the delay adjustment parameter, adjustment values ​​for the upper and lower limits of the processing time in the setting information of the waiting time are stored in a memory such as the ROM 13 or the nonvolatile memory 14 in association with the state of the memory.

[0055] The delay adjustment parameters shown in FIG. 6 are set with adjustment values ​​corresponding to levels indicating the memory state. The level indicating the memory state is determined by the frequency of use of the storage area or the delay in processing time actually detected. For example, the index value indicating the frequency of use is stored as the number of times data is written to each storage area in the nonvolatile memory 14. In this case, the level indicating the memory state (memory level) is determined based on whether the frequency of use is equal to or greater than a threshold set for each level. Furthermore, the index value indicating the delay in processing time actually detected is stored as the number of WTXs sent from the IC card processing device 2 between receiving a command and sending a response. In this case, the level indicating the memory state is determined based on the delay in processing time actually detected.

[0056] As described above, the IC card 1 identifies a level indicating the memory state (memory level) based on the frequency of use or the actually detected delay in processing time. After identifying the level indicating the memory state, the IC card 1 calculates upper and lower limit values ​​for the adjusted processing time using an adjustment value corresponding to the identified level as a coefficient or offset value. The IC card 1 transmits the adjusted upper and lower limit values ​​for the processing time to the IC card processing device 2 at a predetermined timing specified by a standard or the like.

[0057] Next, an operation of checking the upper and lower limits of the waiting time by the IC card processing device 2 communicating with the IC card 1 as a portable electronic device according to the embodiment will be described. Figure 7 is a sequence diagram for explaining the operation including checking the upper and lower limits of the waiting time by the IC card processing device 2 according to the embodiment. When the IC card 1 starts communication with the IC card processing device 2, it presents (transmits) to the IC card processing device 2 waiting time information indicating the upper and lower limits of the processing time based on the setting information as described above. The IC card processing device 2 stores the waiting time information presented by the IC card 1 and then transmits a command to the IC card 1 to cause the IC card 1 to execute the desired processing. When transmitting the command, the IC card processing device 2 begins measuring the elapsed time until it receives a response from the IC card.

[0058] The IC card processing device 2 sets a lower limit and an upper limit for the waiting time calculated from the waiting time information presented by the IC card 1. As shown in Fig. 7, if the IC card processing device 2 receives a response from the IC card 1 before the time elapsed since sending the command reaches the lower limit for the waiting time, the IC card processing device 2 halts processing for the IC card. This makes it possible to detect whether processing has been illegally skipped in the IC card based on the waiting time until the IC card processing device 2 receives the response.

[0059] Furthermore, the IC card processing device 2 can set not only a lower limit of the waiting time but also an upper limit of the waiting time from the waiting time information. That is, if the IC card processing device 2 cannot receive a response from the IC card within the appropriate waiting time range, it can determine that the IC card is operating normally and will not process the command. As a result, it is possible to detect unauthorized operation of the IC card as a portable electronic device and prevent unauthorized use due to external attacks, etc.

[0060] Next, the operation of the IC card 1 as a portable electronic device according to the embodiment will be described. Fig. 8 is a flowchart for explaining an example of the operation of the IC card 1 as a portable electronic device according to the embodiment. The processor 11 of the IC card 1 is started by power supplied from the IC card processing device 2, and performs initial communication including initial setting with the IC card processing device 2. When the initial communication is completed, the processor 11 checks the setting information of the standby time stored in the ROM 13 or the non-volatile memory 14 (step ST11).

[0061] For example, if setting information for wait times is stored for each application, processor 11 identifies setting information such as upper and lower limits on processing time from the setting information corresponding to the selected application. Furthermore, if setting information for wait times is stored for each command, processor 11 identifies setting information such as upper and lower limits on processing time for each command. Furthermore, if setting information for wait times is stored for each file, processor 11 identifies setting information such as upper and lower limits on processing time corresponding to the selected file.

[0062] The processor 11 also adjusts the upper and lower limits of the processing time based on the automatic adjustment parameters stored in the ROM 13 or the nonvolatile memory 14 (step ST12). For example, the processor 11 refers to the automatic adjustment parameters as shown in Fig. 5 and determines the level (communication level) according to the communication state with the IC card processing device 2 connected for communication via the interface 16.

[0063] When the processor 11 identifies the level of the communication state with the IC card processing device 2, it identifies an adjustment value corresponding to the level of the communication state from the automatic adjustment parameters. After identifying the adjustment value corresponding to the communication state, the processor 11 adjusts the upper and lower limit values ​​of the processing time by using the adjustment value corresponding to the communication state as a coefficient or offset, as described above. Note that if the automatic adjustment parameters are not set, the processor 11 omits adjustment based on the communication state.

[0064] Furthermore, the processor 11 adjusts the upper and lower limits of the processing time for the write process based on the write delay adjustment parameters stored in the ROM 13 or the nonvolatile memory 14 (step ST13). For example, the processor 11 refers to the delay adjustment parameters as shown in Fig. 6 and specifies the memory level according to the state of the nonvolatile memory 14 as a data storage area.

[0065] When the processor 11 identifies the memory level, it identifies an adjustment value corresponding to the memory level from the delay adjustment parameter. When the processor 11 identifies the adjustment value corresponding to the memory level, it adjusts the upper and lower limits of the processing time for the data write process by using the adjustment value corresponding to the memory level as a coefficient or offset, as described above. Note that if the delay adjustment parameter is not set, the processor 11 omits delay adjustment based on the memory state.

[0066] When the processor 11 has finished adjusting the upper and lower limits of the processing time in the waiting time setting information, it transmits waiting time information including the adjusted upper and lower limits of the processing time to the IC card processing device 2 (step ST14). After transmitting the waiting time information, the processor 11 accepts a command from the IC card processing device 2 (step ST15).

[0067] When the processor 11 receives a command from the IC card processing device 2 (step ST15, YES), it executes processing according to the received command (step ST16). When the processor 11 completes the processing according to the command, it transmits a response including the processing result of the command to the IC card processing device 2 (step ST17).

[0068] If the processor 11 does not receive a transaction end (cancellation) notification after transmitting the response (step ST18, NO), the processor 11 proceeds to step ST15 and waits for the next command. Also, if the processor 11 receives a transaction end notification from the IC card processing device 2 after transmitting the response (step ST18, YES), the processor 11 ends the series of communication processes with the IC card processing device 2.

[0069] Next, the operation of the IC card processing device 2 equipped with a card reader / writer that communicates with an IC card 1 as a portable electronic device according to the embodiment will be described. Fig. 9 is a flowchart for explaining an example of the operation of the IC card processing device 2 according to the embodiment. The control unit 21 of the IC card processing device 2 supplies power to the IC card 1 connected to the card reader / writer 24, and starts up the IC card 1. When the IC card 1 connected for communication via the processor 25 of the control unit 21 and the card reader / writer 24 starts up, initial communication including initial settings is performed with the IC card 1.

[0070] After the initial communication is completed, the processor 25 of the control unit 21 receives standby time information from the IC card 1 via the card reader / writer 24 (step ST31). For example, in the control unit 21, the processor 25 starts an application for processing the IC card 1. When the application for processing the IC card 1 is started, the processor 25 requests communication setting information including the standby time information from the IC card 1, and receives the communication setting information including the standby time information transmitted by the IC card 1 in response to the request.

[0071] When processor 25 of control unit 21 receives information including the waiting time information from IC card 1, it stores the waiting time information included in the information received from IC card 1 in a memory such as nonvolatile memory 28 or RAM 26 (step ST32). After storing the waiting time information, processor 25 of control unit 21 transmits a command from card reader / writer 24 to IC card 1 to execute the requested process (step ST33).

[0072] When the processor 25 transmits the command to the IC card 1, the processor 25 starts counting the elapsed time using the timer 30 (step ST34). The processor 25 waits for a response from the IC card 1 while counting the elapsed time using the timer 30 (step ST35). If there is no response from the IC card 1 (step ST35, NO), the processor 25 continues counting the elapsed time using the timer 30.

[0073] When a response is received from the IC card 1 (step ST35, YES), the processor 25 stops the timer 30 from timing (step ST36) and determines the time (standby time) from when the command is transmitted until when the response is received. After determining the standby time, the processor 25 determines whether the determined standby time is outside the standby time range specified by the standby time information (step ST37).

[0074] If the processor 25 determines that the confirmed waiting time is not outside the waiting time range specified by the waiting time information (is within the waiting time range) (step ST38, NO), it returns to step ST33 and repeats the above-mentioned processing.

[0075] If it is determined that the confirmed waiting time is outside the waiting time range specified by the waiting time information (step ST38, YES), the processor 25 terminates (stops) the processing for the IC card 1 and notifies the IC card 1 of the transaction completion (step ST39). In other words, the processor 25 stops the processing for the IC card 1 if the confirmed waiting time is shorter than the lower limit of the waiting time or longer than the upper limit of the waiting time.

[0076] For example, if the determined waiting time is shorter than the lower limit of the waiting time, the processor 25 will halt the processing of the IC card 1 because the waiting time is too short. As a result, if a specified processing step is omitted in the IC card 1 due to a security attack or the like, the IC card processing device 2 can detect this as fraud even if the content of the response from the IC card 1 is normal, and halt the processing in the IC card 1. In this case, the processor 25 of the IC card processing device 2 may display (notify) on the display unit 22 that the processing has been halted due to the possibility of fraud caused by skipping a process.

[0077] In the above-described operation example, it is described that the determination is made as to whether the waiting time until the response is received is outside the waiting time range. However, the transaction may be terminated if the time elapsed since the command was transmitted exceeds the upper limit of the waiting time. That is, the processor 25 checks whether the elapsed time measured by the timer 30 while waiting for the response to be received exceeds the upper limit of the waiting time. If the elapsed time measured by the timer 30 exceeds the upper limit of the waiting time, the processor 25 may determine that the waiting time is outside the waiting time range and proceed to step ST39.

[0078] As described above, the IC card as a portable electronic device according to the embodiment provides waiting time information indicating the lower limit of the waiting time from sending a command to receiving a response to the IC card processing device based on the waiting time setting information stored in the memory.

[0079] As a result, if the waiting time from sending a command to receiving a response is shorter than the lower limit of the waiting time specified by the IC card, the IC card processing device can stop the processing by the IC card regardless of the content of the response from the IC card. As a result, the IC card as a portable electronic device according to the embodiment can detect a response that is too quick than the lower limit of the waiting time due to a security attack that causes a specified processing to be skipped, and can stop processing including unauthorized operations in the IC card.

[0080] Furthermore, the IC card as a portable electronic device according to the embodiment can set standby time setting information for each application, command, or file, and can also set a lower limit and an upper limit for the standby time in the standby time setting information. This allows the IC card as a portable electronic device according to the embodiment to perform detailed settings according to operation, such as setting only the lower limit, only the upper limit, or both the lower and upper limits for the standby time for each specific application, command, or file.

[0081] Furthermore, the IC card as a portable electronic device according to the embodiment can adjust the lower and upper limits of the processing time set in the standby time setting information according to the communication state. Furthermore, the IC card as a portable electronic device according to the embodiment can also adjust the lower and upper limits of the processing time set in the standby time setting information according to the state of the memory to which data is written. By setting the lower and upper limits of the processing time according to the card state, the IC card as a portable electronic device and the IC card processing device according to the embodiment can detect fraudulent operations due to standby time with high accuracy.

[0082] The functions described in the above embodiments can be realized not only by hardware but also by software by loading a program describing each function into a computer. Also, each function may be realized by selecting either software or hardware as appropriate.

[0083] Although several embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be embodied in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included within the scope and spirit of the invention, and are also included in the scope of the invention and its equivalents as defined in the claims.

Claims

1. A portable electronic device having an interface for communicating with an external device; a memory for storing waiting time setting information for setting a lower limit of a waiting time from when the external device transmits a command until when the external device receives a response to the command; and a processor for transmitting waiting time information to the external device for specifying a lower limit of the waiting time based on the waiting time setting information stored in the memory, executing processing in response to a command received from the external device that transmitted the waiting time information, and transmitting a response to the external device including a result of executing the processing in response to the command.

2. The portable electronic device of claim 1, wherein the setting information for the waiting time includes a lower limit for the processing time required for processing in response to a command, the memory further stores information indicating an adjustment value according to a communication state, and the processor identifies the communication state with the external device via the interface and transmits to the external device waiting time information including a lower limit for the processing time adjusted by the adjustment value according to the communication state.

3. The portable electronic device of claim 1, wherein the waiting time setting information includes a lower limit value for the processing time required for the data write process to the data storage area in the memory, the memory further stores a delay adjustment value according to the state of the data storage area, and the processor identifies the state of the data storage area and transmits to the external device waiting time information including a lower limit value for the processing time adjusted by the delay adjustment value according to the state of the data storage area.

4. The portable electronic device according to claim 1, wherein the memory stores setting information of the standby time for each application.

5. The portable electronic device according to claim 1, wherein the memory stores setting information of the waiting time for each command.

6. The portable electronic device according to claim 1, wherein said memory stores data to be stored in files managed in a predetermined file structure, and stores setting information for said standby time for each file.

7. An IC card comprising: a module having an interface for communicating with an external device; a memory for storing setting information for setting a lower limit of a waiting time from when the external device transmits a command until when the external device receives a response to the command; and a processor for transmitting to the external device waiting time information for specifying a lower limit of the waiting time based on the setting information for the waiting time stored in the memory, executing processing in response to a command received from the external device that transmitted the waiting time information, and transmitting to the external device a response including a result of the execution of the processing in response to the command; and a main body having the module.

8. An IC card processing device having: a communication unit that communicates with an IC card; a memory that stores waiting time information obtained from the IC card; and a processor that stops processing by the IC card if a response to the command is received before the elapsed time since sending a command to the IC card reaches a lower limit of the waiting time determined from the waiting time information stored in the memory.

Citation Information

Patent Citations

  • IC chip, IC card and program

    JP2020009305A

  • IC card device

    JP1989233687A

  • IC card and IC card program

    JP2004164260A

  • Information processing system, information processing terminal device, information processor, information processing method, recording medium and program

    JP2006318453A

  • IC card and IC card processing system

    JP2018206300A

Cited By

  • Transport layer wait-time extension for NFC communications

    EP4779882A1