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

The IC card and IC card processing device enforce waiting time limits to detect and prevent unauthorized operations, enhancing security by ensuring responses adhere to predefined processing times.

JP2025008457AActive Publication Date: 2025-01-20KK TOSHIBA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023110644
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-20
Estimated Expiration
2043-07-05

AI Technical Summary

Technical Problem

Conventional IC cards fail to detect unauthorized operations caused by external attacks that skip part of the normal processing required for security, leading to fraudulent responses.

Method used

The IC card and IC card processing device implement a system where the IC card sets and communicates waiting time limits for processing, allowing the IC card processing device to detect unauthorized operations by checking if responses are received within these time limits.

Benefits of technology

This system effectively detects and prevents unauthorized operations by ensuring responses are within specified waiting time limits, thereby preventing fraudulent activities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025008457000001_ABST
    Figure 2025008457000001_ABST
Patent Text Reader

Abstract

To provide a portable electronic device, an IC card, and an IC card processing device capable of detecting unauthorized operations.SOLUTION: 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, to the external device, wait-time information for specifying the lower limit of the wait time based on the wait-time setting information stored in the memory, executes a process according to the command received from the external device to which the wait-time information is transmitted, and transmits a response including an execution result of the process according to the command to the external device.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

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

[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 regular processing, such as a judgment process necessary to maintain security.

[0003] However, conventional IC cards have a problem in that they may output a normal response even if they skip part of the regular processing required by the command due to an external attack. 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 in which part of the regular processing, such as the judgment processing in the IC card, is skipped. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2020-009305 A Summary of the Invention [Problem to be solved by the invention]

[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 capable of detecting unauthorized operations. [Means for solving the problem]

[0006] According to an embodiment, a portable electronic device has 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 a lower limit of the wait time based on the wait-time setting information stored in the memory, executes a process according to the command received from the external device that transmitted the wait-time information, and transmits a response including a result of the process according to the command to the external device. [Brief description of the drawings]

[0007] [Figure 1] 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. [Diagram 2] 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 the embodiment. [Diagram 3] FIG. 3 is a diagram showing an example of setting information of processing time stored in the memory of an IC card as the portable electronic device according to the embodiment. [Figure 4] FIG. 4 is a diagram showing an example of setting information of processing time stored in the memory of an IC card as the portable electronic device according to the embodiment. [Diagram 5] FIG. 5 is a diagram showing an example of an adjustment value for setting information of a processing time stored in a memory of an IC card as a portable electronic device according to the embodiment. [Figure 6] FIG. 6 is a diagram showing an example of an adjustment value for setting information of a processing time stored in a memory of an IC card as a portable electronic device according to the embodiment. [Figure 7] FIG. 7 is a sequence diagram for explaining the upper and lower limits of the waiting time set by the IC card processing device for an IC card as a portable electronic device according to the embodiment. [Figure 8]FIG. 8 is a flowchart for explaining an example of the operation of the IC card as the portable electronic device according to the embodiment. [Figure 9] FIG. 9 is a flowchart for explaining an example of the operation of the IC card processing device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] Hereinafter, embodiments will be described with reference to the drawings. FIG. 1 is a block diagram illustrating an example of the configuration of an IC card 1 according to an embodiment. An 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 one (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 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 non-contact-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 section serving as a communication interface. A non-contact-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 is activated by generating an operating power supply and an operating clock from the radio waves.

[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 in the main body C. The module M is formed integrally with one or more IC chips Ca and an external interface for communication in a connected state, and is embedded in the main body C.

[0012] In addition, the portable electronic device according to the embodiment may be one having a module M in a main body formed in a booklet shape, or one having a module M within a main body forming 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 non-volatile 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 a hardware circuit.

[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 to and received from the IC card processing device 2 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. The ROM 13 stores control programs and control data in advance. The ROM 13 is built into the IC card 1 in a state in which the control programs and control data are stored during the manufacturing stage. In other words, the control programs and control data stored in the ROM 13 are built in advance according to the specifications of the IC card 1. For example, the ROM 13 stores a program for the processor 11 to execute processing in response to a command 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. A part or all of the area of ​​the nonvolatile memory 14 is tamper-resistant, and data can be securely stored. Programs and various data according to the operational use of the IC card 1 are written in the nonvolatile memory 14. Data is stored in the nonvolatile memory 14 in a file structure defined by a predetermined standard. Program files or data files are defined in the nonvolatile memory 14, and control programs and various data are written in 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 files having a hierarchical structure consisting of a Master File (MF), a Dedicated File (DF), and an Elementary File (EF) are defined. In the file structure defined in ISO / IEC 7816-4, the MF is at the top level, and one or more DFs exist at the next level below the MF. One DF stores data for implementing one application, for example. In addition, one or more EFs exist at the next level below the DF. Each EF stores various data used for the application serving as a 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 by a communication method corresponding to the interface of the IC card processing device 2. In addition, the communication control unit 15 and the interface 16 may 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 contacts and communicates with the IC card processing device 2. In this case, the interface 16 is constituted by a contact unit that makes physical and electrical contact with a contact unit of the IC card processing device 2, and the communication control unit 15 is constituted by a circuit 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 illustrating an example of the configuration of the IC card processing device 2 according to the embodiment. 2, the IC card processing device 2 is a higher-level device having a 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] As shown in FIG. 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, and the like. 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 executing programs stored in the ROM 27 or the non-volatile memory 28. The RAM 26 functions as a working memory that temporarily holds data. The ROM 27 is a non-volatile memory that stores programs, control data, and the like. The non-volatile memory 28 is a rewritable non-volatile memory. The communication unit 29 is an interface for communicating with an external device. The timer 30 measures the elapsed time. The start and stop of the measurement of the elapsed time of the timer 30 is controlled by the processor 25.

[0025] The control unit 21 has a function of transmitting commands to the IC card 1 via the card reader / writer 24, a function of performing various processes based on data received from the IC card 1, and the like. For example, the control unit 21 controls writing of data to a non-volatile memory in the IC card 1 by transmitting 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 transmitting a read command to the IC card 1. The control unit 21 also controls an application selected in the IC card 1 by transmitting 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 of the user of the IC card 1 or authentication information such as a password.

[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 non-contact type IC card, the card reader / writer 24 is configured with an antenna for wireless communication with the IC card 1 and communication control. The card reader / writer 24 supplies power, supplies a clock, performs reset control, and transmits and receives data to the IC card 1. The card reader / writer 24 activates (starts up) the IC card 1, transmits various commands, and receives responses to the transmitted commands, based on the control by the control unit 21.

[0028] Next, a communication process between the IC card 1 as the portable electronic device according to the embodiment and the IC card processing device 2 will be described. 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, when the range of normal processing times 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 transmits a command until when 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 a range of normal processing time required for processing according to a command. The lower limit and the upper limit for the processing time are set in advance according to the specifications of the IC card 1, and are stored as internal data when the IC card is manufactured or issued. For example, the lower limit and the 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] FIG. 3 is a diagram showing an example of a configuration in which the IC card 1 serving as the portable electronic device according to the embodiment stores setting information of a standby time for each application. FIG. 3 shows an example of the configuration of a table that stores waiting time setting information including a lower limit for normal processing time, based on the format specified in 12.2.4.2 of ISO / IEC 7816-4:2020. In the example shown in FIG. 3, the waiting time setting information includes an upper limit value (Tb_max) of the processing time, a lower limit value (Tb_min) of the processing time, a unit time (Tu), and an option set for each application.

[0031] "Tb_max" is the upper reference time for the processing time (e.g., Tb_max [ms]). "Tb_min" is the lower reference time for the processing time (e.g., Tb_min [ms]). "Tu" is the transmission time of unit data (e.g., Tu [ms / B]). Here, if the length of the communication data is Ld (e.g., 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 transmits a command to the IC card 1 to when 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×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×Ld).

[0033] In addition, in the setting information of the waiting time shown in Fig. 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 not 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 FIG. 3, no upper limit value is set for the processing time for "Application2", but a lower limit value is set. In this case, since the IC card 1 does not specify an upper limit for the processing time, the IC card processing device 2 does not check the upper limit for the waiting time, but checks the lower limit for the waiting time. Also, in the example shown in FIG. 3, both an upper limit value and a lower limit value for the processing time are set for "Application3". In this case, since the IC card specifies the upper and lower limits for the processing time, the IC card processing device 2 checks both the upper and lower limits for the waiting time.

[0035] In addition, "options" can be set for each application in the standby time setting information shown in Fig. 3. As the "options" setting in the standby time setting information, for example, logical channel, secure session, priority order, etc. can be specified. A logical channel is a communication channel that is logically set as specified in, for example, ISO / IEC 7816-4. As an option for the waiting time setting information, a logical channel for which the waiting time range setting is enabled and a logical channel for which the waiting time range setting is disabled may be specified (set). In this case, the IC card 1 switches between enabling and disabling the waiting time range setting for each logical channel according to the option setting.

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

[0037] In addition, a priority order can be set as an option for the setting information of the waiting time. The priority order in the option is setting information for determining which setting information is to be prioritized when there is setting information of the waiting time set under different conditions as described later. In other words, when there is a plurality of setting information of the waiting time set under different conditions, the IC card 1 can specify 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 a configuration in which the IC card 1 serving as the portable electronic device according to the embodiment stores setting information of a standby time for each command. Fig. 4 shows an example of the configuration of a table that stores waiting time setting information including a lower limit for normal processing time based on the format specified in ISO / IEC 7816-4. In the waiting time setting information shown in Fig. 4, an upper limit (Tb_max) of processing time, a lower limit (Tb_min) of processing time, a unit time (Tu), and an option are set for each command. As in the example shown in Fig. 3, the upper limit (Tb_max) of processing time is the upper reference time for normal processing time, and the lower limit (Tb_min) of processing time is the lower reference value for normal processing time.

[0039] According to the setting information of the waiting time shown in Fig. 4, the upper limit value (Tmax) of the waiting time is calculated by 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 value (Tmin) of the waiting time is calculated by Tmin = Tb_min + (Tu x Ld) if the length of the communication data is Ld.

[0040] In the setting information of the waiting time shown in Fig. 4, either an upper limit or a lower limit can be set for each command, or both the upper limit and the lower limit can be set or not set. As a specific example, in the example shown in Fig. 4, for "read binary", an upper limit (Tb_Max) for the normal processing time in the IC card is set, but a lower limit (Tb_min) is not 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, the upper limit (Tb_Max) and the lower limit (Tb_min) for the normal processing time in the IC card are not set in "Update binary" but are set. In this case, since the IC card does not specify the upper limit of the waiting time, the IC card processing device 2 does not check the upper limit of the waiting time. In the example shown in FIG. 4, both the upper limit (Tb_Max) and the 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 of the waiting time, the IC card processing device 2 checks both the upper and lower limits of the waiting time. In the example shown in FIG. 4, both the upper limit (Tb_Max) and the 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, the logical channel, secure session, priority, etc. can be set, similarly to the example shown in FIG.

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

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

[0045] Next, adjustment of the upper and lower limits of the processing time in the setting information of the waiting time in the IC card 1 according to the embodiment will be described. 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 of adjusting the upper and lower limit values ​​of the processing time in the setting information of the waiting time depending on the state of the IC card. For example, the IC card 1 can adjust the upper and lower limit values ​​of the processing time depending on the communication state, the memory state, etc.

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

[0047] Furthermore, when the IC card 1 is communicatively connected to the IC card processing device 2 via a contactless interface, the processing time of the IC card 1 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. For this reason, 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 in a memory such as the ROM 13 or the non-volatile memory 14 as adjustment parameters according to the communication state. In the example shown in Fig. 5, the adjustment value is set according to the level of the communication state (applied voltage or magnetic field strength). The adjustment value according to the communication state is set as a coefficient or offset value for the upper and lower limits of the processing time.

[0049] For example, when 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] FIG. 6 is a diagram showing an example of setting an adjustment value according to the state of a memory (eg, non-volatile memory 14) for writing data in the IC card 1. In FIG. The non-volatile memory 14 in the IC card 1 has a data storage area where data is written in response to a command requesting data writing. The performance of the memory elements that make up the data storage area may deteriorate. For example, if data is frequently written to the non-volatile memory 14 (data storage area), there is a possibility that data cannot be completely erased and written in a process that takes a normal processing time (a normal single process).

[0053] When the IC card 1 is unable to erase and write data in a single normal process, it becomes necessary to take measures such as erasing and writing data multiple times, or lengthening the time required for each data erasure and write. In other words, when the IC card 1 repeatedly writes data to the storage area of ​​the non-volatile memory 14, the data writing 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 non-volatile memory 14 in association with the state of the memory.

[0055] In the delay adjustment parameters shown in FIG. 6, an adjustment value is set according to a level indicating the state of the memory. The level indicating the state of the memory is specified by the frequency of use of the storage area or the delay in the processing time actually detected. For example, as an index value indicating the frequency of use, the number of times data is written to each storage area in the non-volatile memory 14 is stored. In this case, the level indicating the state of the memory (memory level) is determined based on whether the frequency of use is equal to or greater than a threshold value set for each level. In addition, as an index value indicating the delay in the processing time actually detected, the number of times WTX is transmitted from the IC card processing device 2 from receiving a command until transmitting a response is stored. In this case, the level indicating the state of the memory is determined according to the delay in the 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 an actually detected delay in processing time, etc. When the IC card 1 identifies a level indicating the memory state, it calculates upper and lower limit values ​​for the processing time adjusted using an 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.

[0057] Next, an operation of checking the upper and lower limits of the waiting time by the IC card processing device 2 that communicates with the IC card 1 as the portable electronic device according to the embodiment will be described. FIG. 7 is a sequence diagram for explaining an 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 lower and upper limits of the processing time based on the setting information as described above. The IC card processing device 2 saves the waiting time information presented by the IC card 1, and then transmits a command to cause the IC card 1 to execute the desired processing. When transmitting the command, the IC card processing device 2 starts 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 of the waiting time calculated from the waiting time information presented by the IC card 1. As shown in Fig. 7, when 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 of the waiting time, the IC card processing device 2 stops processing 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 the lower limit of the waiting time but also the 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 does not execute the process for 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 the 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 the 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 settings 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, when setting information of the waiting time is saved for each application, processor 11 identifies setting information such as the upper limit and lower limit of the processing time from the setting information corresponding to the selected application. When setting information of the waiting time is saved for each command, processor 11 identifies setting information such as the upper limit and lower limit of the processing time for each command. When setting information of the waiting time is saved for each file, processor 11 identifies setting information such as the upper limit and lower limit of the 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 non-volatile memory 14 (step ST12). For example, the processor 11 refers to the automatic adjustment parameters as shown in Fig. 5 and determines a level (communication level) according to the communication state with the IC card processing device 2 that is 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 according to the level of the communication state from the automatic adjustment parameters. When the processor 11 identifies the adjustment value according to the communication state, it adjusts the upper and lower limit values ​​of the processing time by using the adjustment value according 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 the 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 a 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 according to the memory level from the delay adjustment parameter. When the processor 11 identifies the adjustment value according 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 according to the memory level as a coefficient or offset, as described above. Note that when the delay adjustment parameter is not set, the processor 11 omits the delay adjustment according to the memory state.

[0066] When the processor 11 finishes adjusting the upper and lower limits of the processing time in the setting information of the waiting time, the processor 11 transmits the 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. 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 having a card reader / writer that communicates with the IC card 1 as the 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 standby time information from the IC card 1, and receives the communication setting information including 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 non-volatile 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 measuring the elapsed time with the timer 30 (step ST34). The processor 25 waits for a response from the IC card 1 while measuring the elapsed time with the timer 30 (step ST35). If there is no response from the IC card 1 (step ST35, NO), the processor 25 continues measuring the elapsed time with the timer 30.

[0073] When a response is received from the IC card 1 (step ST35, YES), the processor 25 stops the timer 30 (step ST36) and determines the time (standby time) from when the command is transmitted until when the response is received. When the wait time is determined, the processor 25 determines whether the determined wait time is outside the wait time range specified by the wait 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), the processor 25 returns to step ST33 and repeats the above-mentioned processing.

[0075] When 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 ends (stops) the processing for the IC card 1, and notifies the IC card 1 of the end of the transaction (step ST39). That is, the processor 25 stops the processing for the IC card 1 when 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 confirmed waiting time is shorter than the lower limit of the waiting time, the processor 25 halts 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 contents of the response from the IC card 1 are 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 because there is a possibility of fraud due to skipping of processing.

[0077] In the above-mentioned operation example, it is described that the determination is made as to whether or not the waiting time until the response is received is outside the waiting time range, but the transaction may be terminated when the time elapsed since the command was transmitted exceeds the upper limit of the waiting time. That is, the processor 25 checks whether or not the elapsed time measured by the timer 30 while waiting to receive the response has exceeded 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 of the embodiment provides waiting time information indicating a lower limit for 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] In this way, 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 the portable electronic device according to the embodiment can detect a response that is faster than the lower limit of the waiting time due to a security attack that causes a specified processing to be skipped, and can stop the processing including the unauthorized operation in the IC card.

[0080] In addition, the IC card as the portable electronic device according to the embodiment can set the setting information of the standby time for each application, each command, or each file, and can set the lower limit and the upper limit of the standby time in the setting information of the standby time. As a result, the IC card as the portable electronic device according to the embodiment can perform detailed setting according to the operation, such as setting only the lower limit of the standby time, setting only the upper limit, or setting both the lower limit and the upper limit, for each specific application, command, or file.

[0081] Furthermore, the IC card as the portable electronic device according to the embodiment can adjust the lower and upper limits of the processing time set in the setting information of the standby time according to the communication state. Furthermore, the IC card as the portable electronic device according to the embodiment can also adjust the lower and upper limits of the processing time set in the setting information of the standby time 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 these card states, the IC card as the portable electronic device according to the embodiment and the IC card processing device can detect unauthorized 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 that describes each function into a computer. Also, each function may be realized by selecting either software or hardware as appropriate.

[0083] Although some 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 implemented 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 in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]

[0084] 1...IC card (portable electronic device), C...main body, Ca...IC chip, M...module, 2...IC card processing device (external device), 11...processor, 12...RAM, 13...ROM (memory), 14...non-volatile memory (memory), 15...communication control unit, 16...interface, 21...control unit, 22...display unit, 23...operation unit, 24...card reader / writer (communication unit), 25...processor, 26...RAM, 27...ROM, 28...non-volatile memory, 30...timer.

Claims

1. an interface for communicating with an external device; a memory for storing setting information for a waiting time 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; a processor that transmits to the external device wait time information for specifying a lower limit of the wait time based on setting information of the wait time stored in the memory, executes processing in response to a command received from the external device that transmitted the wait time information, and transmits to the external device a response including a result of the execution of the processing in response to the command; A portable electronic device having:

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

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

4. The memory stores setting information of the waiting time for each application.

2. The portable electronic device of claim 1.

5. The memory stores setting information of the waiting time for each command.

2. The portable electronic device of claim 1.

6. the memory stores data to be stored in a file managed in a predetermined file structure, and stores setting information of the waiting time for each file; 2. The portable electronic device of claim 1.

7. a module having an interface for communicating with an external device, a memory for storing setting information for a waiting time 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 a process according 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 process according to the command; a main body having the module; An IC card having the above configuration.

8. A communication unit that communicates with the IC card; a memory for storing waiting time information obtained from the IC card; a processor that, when receiving a response to a command before an elapsed time from transmitting a command to the IC card reaches a lower limit value of a waiting time specified from the waiting time information stored in the memory, stops processing by the IC card; An IC card processing device having the above structure.

Citation Information

Patent Citations

  • IC chip, IC card and program

    JP2020009305A