Disclosure of Invention
The present invention provides a multi-chip integrated card to solve the problems set forth above.
The multi-chip integrated card is characterized by comprising an encrypted storage card and a smart card, wherein the encrypted storage card and the smart card are embedded in a substrate; wherein,
the encrypted memory card comprises an SD protocol controller, a flash memory chip and a security chip, wherein the flash memory chip and the security chip are respectively connected with the SD protocol controller, and the SD protocol controller is also connected with an SD card interface;
the intelligent card is connected with an SIM card interface;
the SD card interface and the SIM card interface are used for externally connecting external equipment;
the SD card interface supplies power to the encrypted memory card through external equipment;
the SIM card interface supplies power to the smart card through external equipment;
when the SD card interface is connected with external equipment, the SD protocol controller is powered on, receives a task instruction issued by the external equipment, and controls the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction;
and when the SIM card interface is connected with external equipment, the intelligent card is electrified, receives a telecommunication instruction sent by the external equipment and responds to the telecommunication instruction.
As an embodiment of the present invention:
the SD protocol controller is physically connected with the SD card interface through the SD card interface; the SD protocol controller is used for judging that the task instruction issued by the external equipment is a storage instruction or a safety instruction;
the SD protocol controller is physically connected with the security chip through an SPI interface; wherein,
the SPI interface can be a four-wire QSPI interface, a single-wire Standard SPI interface or a double-wire Dual SPI interface;
the safety chip can also be physically connected with the SD protocol controller through a 7816 interface, a UART interface or an I2C interface;
the safety chip is used for processing the safety instruction and storing safety data corresponding to the safety instruction;
the SD protocol controller is physically connected with the flash memory chip through a flash memory interface;
the flash memory chip is used for processing the storage instruction and storing storage data corresponding to the storage instruction.
As an embodiment of the present invention:
the intelligent card is physically connected with the SIM card interface through the SIM card interface, and is used for processing the telecommunication instruction and storing telecommunication data corresponding to the telecommunication instruction.
As an embodiment of the present invention:
the multi-chip integrated card also comprises an SD contact and an SIM contact; wherein,
the SD contact is arranged right above the substrate;
the SIM contacts are symmetrically distributed on the left side and the right side of the substrate.
As an embodiment of the present invention:
the SD contact is in accordance with SD specification definition, the SD contacts are rectangular and 8 and are arranged in an array mode, and the SD contacts are connected with corresponding pins of the SD protocol controller.
As an embodiment of the present invention:
the SIM contacts conform to the SIM specification definition, the SIM contacts are rectangular and are arranged in an array form, and the SIM contacts are connected with pins corresponding to the smart card;
wherein,
the size and location of the SIM card contacts conform to the 4FF Nano-SIM standard.
As an embodiment of the present invention:
the controlling the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction comprises the following steps:
step 1: the SD protocol controller receives a task instruction of external equipment through an SD interface;
step 2: the SD protocol controller judges whether the task instruction is a safety instruction,
and step 3: when the task instruction is a safety instruction, the SD protocol controller sends the safety instruction to a safety chip to perform corresponding safety instruction processing until the safety instruction processing is finished; wherein,
after the processing is finished, the SD protocol controller feeds back the processing data of the safety instruction to external equipment;
and 4, step 4: when the task instruction is a non-safety instruction, the SD protocol controller sends the non-safety instruction to a safety chip to perform corresponding non-safety instruction processing, and sends the processed non-safety instruction to the flash memory chip to perform processing until the non-safety instruction is processed by the flash memory chip; wherein,
and after the processing is finished, the SD protocol controller feeds back the processing data of the non-safety instruction to external equipment.
As an embodiment of the present invention:
the controlling the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction comprises the following steps:
step 1: the SD protocol controller receives a task instruction of external equipment through an SD interface;
step 2: the SD protocol controller judges whether the task instruction is a storage instruction,
and step 3: when the task instruction is a storage instruction, the SD protocol controller sends the storage instruction to a flash memory chip to execute storage operation;
and 4, step 4: when the task instruction is a non-storage instruction, the SD protocol controller sends the non-storage instruction to a security chip to perform corresponding non-storage instruction processing until the non-storage instruction is processed by the security chip; wherein,
and after the processing is finished, the SD protocol controller feeds back the processing data of the non-storage instruction to external equipment.
As an embodiment of the present invention:
the receiving the telecommunication instruction issued by the external device and responding to the telecommunication instruction includes:
step 1: the intelligent card receives a telecommunication instruction of the external equipment through an SIM card interface;
step 2: according to the telecommunication instruction, the intelligent card carries out telecommunication processing and outputs an execution result;
and step 3: and returning the execution result to the external equipment through the intelligent card.
The invention has the beneficial effects that: the SD card comprises an SD protocol control chip, a flash memory chip, a safety chip and a smart card, wherein the SD protocol control chip receives instruction information through 8 contacts, judges whether the instruction information is a safety instruction or not, if the instruction information is the safety instruction, the instruction information is sent to the safety chip through a four-wire QSPI connection, and if the instruction is a storage instruction, storage operation is carried out. The intelligent card chip receives telecommunication instruction information through 6 contacts of the equipment and processes telecommunication data according to the instruction. Therefore, the embodiment of the invention can meet the storage and encryption requirements and the SIM card requirements.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
As shown in fig. 1, the present invention is a multi-chip integrated card, which includes an encrypted storage card and a smart card, wherein the encrypted storage card and the smart card are embedded in a substrate; wherein,
the encrypted memory card comprises an SD protocol controller, a flash memory chip and a security chip, wherein the flash memory chip and the security chip are respectively connected with the SD protocol controller, and the SD protocol controller is also connected with an SD card interface;
in the invention, the SD protocol controller is used as a device with a judging function and can judge whether an instruction sent by external equipment is a safety instruction, if so, the instruction is forwarded to the safety chip for processing, and if so, the instruction is processed by the flash memory chip. The safety chip is used for processing the safety instruction and storing the safety data; the smart card chip is used for processing telecommunication instructions and storing telecommunication data. The flash memory chip and the safety chip are connected with the SD protocol control chip, so that the terminal can send a safety command or a storage command through the SD contact interface to realize storage or safety function.
The intelligent card is connected with an SIM card interface; the intelligent card is internally provided with a telecommunication communication chip.
The SD card interface and the SIM card interface are used for externally connecting external equipment; the external equipment is used for issuing a safety command, a storage command or a telecommunication command.
The SD card interface supplies power to the encrypted memory card through external equipment;
the SIM card interface supplies power to the smart card through external equipment;
when the SD card interface is connected with external equipment, the SD protocol controller is powered on, receives a task instruction issued by the external equipment, and controls the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction; the external equipment of the invention is equipment which can carry out information interaction, such as terminal equipment, communication equipment and the like, for example, electronic equipment such as a mobile phone, a card reader, a computer and the like.
And when the SIM card interface is connected with external equipment, the intelligent card is electrified, receives a telecommunication instruction sent by the external equipment and responds to the telecommunication instruction.
The principle of the technical scheme is as follows: the invention relates to a multi-chip integrated card, which comprises an SD protocol control chip, a flash memory chip, a security chip and an intelligent card; the SD protocol control chip is connected with the flash memory chip and the safety chip and used for receiving and processing a storage command or analyzing and distributing a safety command through the SD interface so as to realize the functions of storage and data encryption and decryption.
The beneficial effects of the above technical scheme are that: the SD protocol controller comprises an SD protocol control chip, a flash memory chip, a safety chip and a smart card, wherein the SD protocol controller is provided with an SD protocol controller chip which receives instruction information through 8 contacts and judges whether the instruction information is a safety instruction, if the instruction information is the safety instruction, the instruction information is sent to the safety chip through a four-wire QSPI connection, and if the instruction is a storage instruction, storage operation is carried out. The intelligent card chip receives telecommunication instruction information through 6 contacts of the equipment and processes telecommunication data according to the instruction. Therefore, the embodiment of the invention can meet the storage and encryption requirements and the SIM card requirements.
As an embodiment of the present invention:
the SD protocol controller is physically connected with the SD card interface through the SD card interface; the SD protocol controller is used for judging that the task instruction issued by the external equipment is a storage instruction or a safety instruction;
the SD protocol controller is physically connected with the security chip through an SPI interface; wherein,
the SPI interface can be a four-wire QSPI interface, a single-wire Standard SPI interface or a double-wire Dual SPI interface;
the safety chip is also physically connected with the SD protocol controller through a 7816 interface, a UART interface or an I2C interface;
in the present invention: the SPI is a serial peripheral interface, and is a synchronous serial peripheral interface, which enables the MCU to communicate with various peripheral devices in a serial manner to exchange information. The SPI bus can be directly connected with various standard peripheral devices produced by various manufacturers, including FLASHRAM, network controller, LCD display driver, A/D converter and MCU. The interface generally uses 4 lines, a Serial Clock Line (SCLK), a master input/slave output data line MISO, a master output/slave input data line MOSI, and an active low slave select line NSS.
QSPI is the abbreviation of queue SPI, is the extension of SPI interface, and is more widely applied than SPI. On the basis of the SPI protocol, a queue transmission mechanism is added, and a queue serial peripheral interface protocol (namely the QSPI protocol) is promoted. Using this interface, a user can transmit a transmission queue containing up to 16 8-bit or 16-bit data at a time. Once transmission is started, CPU intervention is not needed until transmission is finished, and transmission efficiency is greatly improved. The protocol is widely applied to the ColdFire series MCU. Compared with the SPI, the biggest structural feature of the QSPI is to replace the transmit and receive data registers of the SPI with an 80-byte RAM.
The Standard SPI interface represents a Standard SPI interface; the standard SPI, commonly referred to as SPI, is a serial peripheral interface specification with 4 pin signals: clk, cs, mosi, miso.
The Dual SPI is for SPI Flash, not for all SPI peripherals. For SPI Flash, full duplex is not common, thus extending the use of mosi and miso to work on half duplex to double data transmission. That is, for Dual SPI Flash, a command byte can be sent into Dual mode, such that mosi becomes SIO0(serial io 0) and mosi becomes SIO1(serial io 1), such that 2 bits of data can be transmitted in one clock cycle, doubling the data transmission
7816, smart card interface;
UART is a general serial data bus used for asynchronous communication. The bus is in bidirectional communication, and full duplex transmission and reception can be realized. In the embedded design, the UART is used for the communication between the host and the auxiliary device, such as the car audio and the external AP, and the communication with the PC includes the communication with the monitoring debugger and other devices, such as the EEPROM.
I2C is a simple, bidirectional two-wire synchronous serial bus. It requires only two wires to transfer information between devices connected to the bus.
The safety chip is used for processing the safety instruction and storing safety data corresponding to the safety instruction;
the SD protocol controller is physically connected with the flash memory chip through a flash memory interface;
the flash memory chip is used for processing the storage instruction and storing storage data corresponding to the storage instruction.
The principle and the beneficial effects of the technical scheme are as follows: the safety chip is a device which can independently generate a secret key, encrypt and decrypt, is internally provided with an independent processor and a storage unit, can store the secret key and the characteristic data, and provides encryption and safety authentication services for the terminal. The encryption is carried out by using a security chip, the secret key is stored in hardware, and stolen data cannot be decrypted, so that the business privacy and the data security are protected; the smart card is used for processing telecommunication instructions.
In an alternative embodiment: the SD protocol controller and the security chip are physically connected through a four-wire QSPI to implement one aspect of the secure communication function, but the embodiment of the present invention is not limited to this, and other similar connection manners are also applicable to the embodiment of the present invention. For example, the SD protocol controller is physically connected to the secure chip through a single-wire Standard SPI or a Dual SPI, and communicates with the secure chip through physical connections such as 7816, UART, I2C, and the like. Similarly, the embodiment of the present invention can also be applied to a secure chip product having an SD interface for communication, and a typical implementation manner of the secure chip product is to integrate an SD module, a secure module, and a storage module into one SOC chip.
As an embodiment of the present invention:
the intelligent card is physically connected with the SIM card interface through the SIM card interface, and is used for processing the telecommunication instruction and storing telecommunication data corresponding to the telecommunication instruction.
The principle and the beneficial effects of the technical scheme are as follows: the intelligent card chip is directly connected with the SIM card interface, and the terminal can directly send the telecommunication related instruction to the intelligent card through the SIM card interface so as to realize the telecommunication related function.
As an embodiment of the present invention:
the multi-chip integrated card also comprises an SD contact and an SIM contact; wherein,
the SD contact is arranged right above the substrate;
the SIM contacts are symmetrically distributed on the left side and the right side of the substrate.
The principle and the beneficial effects of the technical scheme are as follows: the SD contact and the SIM contact are arranged at different positions of the substrate, so that the physical isolation between the encryption storage card and the intelligent card is realized, the functions of the encryption storage card and the intelligent card are not mutually interfered, and the SD card and the SIM card have three functions of data flash memory, data encryption and communication.
As shown in fig. 2 and 3, as an embodiment of the present invention:
the SD contact is in accordance with SD specification definition, the SD contacts are rectangular and 8 and are arranged in an array mode, and the SD contacts are connected with corresponding pins of the SD protocol controller.
As an embodiment of the present invention:
the SIM contacts conform to the SIM specification definition, the SIM contacts are rectangular and are arranged in an array form, and the SIM contacts are connected with pins corresponding to the smart card;
wherein,
the size and location of the SIM card contacts conform to the 4FF Nano-SIM standard.
The principle and the beneficial effect of the two technical schemes are as follows: the SD contacts and SIM contacts of the present invention can be designed within the SD specification definition and SIM specification definition according to actual design requirements. The following examples show:
the contact surface of the product in the embodiment of the present invention may be as shown in fig. 2, and includes 2 sets of contacts, one set of which is D1 to D8, and may be defined according to the SD specification, and is connected to a corresponding port of the SD protocol controller. Wherein D4 can be defined as power contact VCC, D5 can be defined as clock contact CLK, D6 can be defined as ground contact VSS, D3 can be defined as command contact CMD, and D1, D2, D7 and D8 can be defined as data line contacts DAT 0-DAT 3. The other group is C1-C6, wherein C1-C3 and C4-C6 can be defined according to the SIM card specification and are connected with corresponding ports of the smart card. Where C1 may be defined as the power contact VCC, C2 may be defined as the reset contact RST, C3 may be defined as the clock contact CLK, C4 may be defined as the ground contact GND, C5 may be defined as the power contact VPP, and C6 may be defined as the input-output contact IO. The smart card communicates with the terminal connection through 6 contacts.
Another contact surface included in the embodiment of the present invention may be as shown in fig. 3, and includes 2 sets of contacts, one set of which is D1 to D8, and may be connected to a corresponding port of the SD protocol controller according to the definition of the SD specification. Wherein D4 can be defined as power contact VCC, D5 can be defined as clock contact CLK, D6 can be defined as ground contact VSS, D3 can be defined as command contact CMD, and D1, D2, D7 and D8 can be defined as data line contacts DAT 0-DAT 3.
The other group is C1-C8, wherein C1-C4 and C5-C8 can be defined according to the SIM card specification and are connected with corresponding ports of the smart card. Where C1 may be defined as the power contact VCC, C2 may be defined as the reset contact RST, C3 may be defined as the clock contact CLK, C4 and C8 may be defined as the USB data contacts D + and D-, C5 may be defined as the ground contact GND, C6 may be defined as the power contact VPP, and C7 may be defined as the input-output contact IO. The smart card communicates with the terminal connection through 8 contacts.
Of course, these are only two specific contact interfaces in the embodiment of the present invention, and other definitions may be performed on each contact in the contact interface as long as the definitions conform to the specifications of the SD card and the SIM card.
In the embodiment of the invention, the data of the SD protocol controller and the data of the intelligent card are processed and analyzed through two groups of different physical interfaces, so that the possibility of conflict among the data is fundamentally avoided, the relevant specifications of telecommunication are met to the maximum extent, and the use habits of users are met.
As an embodiment of the invention, as shown in the attached figure 4:
the controlling the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction comprises the following steps:
step 1: the SD protocol controller receives a task instruction of external equipment through an SD interface; the task instruction may be a security-related instruction, a storage-related instruction, or other unrecognizable instruction. The task instruction can be identified through the method, and the instruction is judged to be one of a safety related instruction, a storage related instruction or other instructions;
step 2: the SD protocol controller judges whether the task instruction is a safety instruction;
the SD protocol controller in the embodiment of the invention can receive the issued security command from the card reader or the terminal equipment through the contact interfaces D1-D8 physical contacts.
When the received instruction is organized according to the secure instruction format, the SD protocol controller may determine that the instruction is a secure instruction, otherwise, the SD protocol controller considers that the instruction is a non-secure instruction, which may be a storage-related instruction. In this step, the mode of the SD protocol controller receiving the security instruction includes that the card reader or the terminal device reads and writes a specific file or a fixed address.
And step 3: when the task instruction is a safety instruction, the SD protocol controller sends the safety instruction to a safety chip to perform corresponding safety instruction processing until the safety instruction processing is finished; wherein,
after the processing is finished, the SD protocol controller feeds back the processing data of the safety instruction to external equipment;
in this step: the SD protocol controller sends the received safety command to the safety chip through the four-wire QSPI interface, and after the safety chip finishes processing, the SD protocol controller returns data after receiving the safety chip data processing, and reports the received data to a card reader or a terminal device communicated with the SD protocol controller through a contact interface.
And 4, step 4: when the task instruction is a non-safety instruction, the SD protocol controller sends the non-safety instruction to a safety chip to perform corresponding non-safety instruction processing, and sends the processed non-safety instruction to the flash memory chip to perform processing until the non-safety instruction is processed by the flash memory chip; wherein,
and after the processing is finished, the SD protocol controller feeds back the processing data of the non-safety instruction to external equipment.
In the present invention, the non-secure instruction may be a store instruction, and may also be other instructions.
In this step: the SD protocol controller analyzes and executes the received non-secure command according to the SD protocol to realize the storage related function, returns the execution result, and reports the execution result to a card reader or terminal equipment which communicates with the SD protocol controller through a contact interface.
As an embodiment of the invention, as shown in the attached FIG. 5:
the controlling the flash memory chip or the safety chip to respond to the corresponding task instruction according to the task instruction comprises the following steps:
step 1: the SD protocol controller receives a task instruction of external equipment through an SD interface;
step 2: the SD protocol controller judges whether the task instruction is a storage instruction or not;
the SD protocol controller in the embodiment of the invention can receive the issued storage related instruction from the card reader or the terminal equipment through the contact interfaces D1-D8 physical contacts. When the received instruction is in the SD protocol format, the SD protocol controller may determine that the instruction is a storage-related instruction, and the SD protocol controller considers that the instruction is a non-storage-related instruction. In this step, the SD protocol controller supports SD protocol 3.0, is downward compatible with SD2.0 and SD1.1 specifications, and supports subsequent high-version SD protocols.
And step 3: when the task instruction is a storage instruction, the SD protocol controller sends the storage instruction to a flash memory chip to execute storage operation; the storage related instruction received by the SD protocol controller needs to satisfy the SD protocol format requirement. And finishing relevant operations according to the protocol requirements after receiving the instruction.
And 4, step 4: when the task instruction is a non-storage instruction, the SD protocol controller sends the non-storage instruction to a security chip to perform corresponding non-storage instruction processing until the non-storage instruction is processed by the security chip; wherein,
and after the processing is finished, the SD protocol controller feeds back the processing data of the non-storage instruction to external equipment.
In the present invention, the non-store instruction may be a secure instruction, and may also be other instructions.
In this step: the SD protocol controller sends the received safety instruction to the safety chip through the 4-wire QSPI interface, and after the safety chip finishes processing, the SD protocol controller returns data after receiving the safety chip data processing, and reports the received data to a card reader or a terminal device communicated with the SD protocol controller through a contact interface.
As an embodiment of the invention, as shown in the attached figures 6 and 3:
the receiving the telecommunication instruction issued by the external device and responding to the telecommunication instruction includes:
step 1: the intelligent card receives a telecommunication instruction of the external equipment through an SIM card interface;
in this step: here, the smart card is connected to the terminal through a contact interface of C1 to C6 or C1 to C8, and 6 contacts or 8 contacts conform to SIM card-related definitions.
Step 2: according to the telecommunication instruction, the intelligent card carries out telecommunication processing and outputs an execution result;
in this step: the intelligent card is powered by the terminal through the SIM card interface, is independent of the storage and security functions, is completely controlled by the terminal, and realizes related telecommunication functions.
And step 3: and returning the execution result to the external equipment through the intelligent card.
In this step: the embodiment of the invention can meet the storage, safety module and telecommunication functions, and the telecommunication functions are independent modules and the physical separation of the storage and safety modules, which do not influence each other.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.