CN114520727B - Security chip data protection method and system - Google Patents

Security chip data protection method and system Download PDF

Info

Publication number
CN114520727B
CN114520727B CN202210392485.8A CN202210392485A CN114520727B CN 114520727 B CN114520727 B CN 114520727B CN 202210392485 A CN202210392485 A CN 202210392485A CN 114520727 B CN114520727 B CN 114520727B
Authority
CN
China
Prior art keywords
random number
ciphertext information
data
stored
security chip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210392485.8A
Other languages
Chinese (zh)
Other versions
CN114520727A (en
Inventor
张奇惠
王立峰
刘家明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Wise Security Technology Co Ltd
Original Assignee
Guangzhou Wise Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Wise Security Technology Co Ltd filed Critical Guangzhou Wise Security Technology Co Ltd
Priority to CN202210392485.8A priority Critical patent/CN114520727B/en
Publication of CN114520727A publication Critical patent/CN114520727A/en
Application granted granted Critical
Publication of CN114520727B publication Critical patent/CN114520727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3234Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving additional secure or trusted devices, e.g. TPM, smartcard, USB or software token
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Abstract

The embodiment of the invention discloses a method and a system for protecting data of a security chip, wherein the method comprises the following steps: the terminal equipment generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information; after the security chip starts to work, the terminal equipment acquires a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information; the terminal equipment sends the first ciphertext information and the second ciphertext information to a server; the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden. According to the scheme, the protection of the safety chip can be efficiently carried out, and the safety of the chip is improved.

Description

Security chip data protection method and system
Technical Field
The embodiment of the application relates to the technical field of chips, in particular to a method and a system for protecting data of a security chip.
Background
With the development of internet and hardware technology, the role of information security in human life is more and more important, and thus the requirements on information security chip products are higher and higher. 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 data information. The safety chip supports a designated symmetric cryptographic algorithm, an asymmetric cryptographic algorithm and a hash algorithm, and simultaneously supports other international general cryptographic algorithms. The safety chip integrates a high-speed safety encryption algorithm and a communication interface, and adopts a unique data stream encryption and decryption processing mechanism to realize the synchronous encryption and decryption functions of the high-speed data stream.
The existing anti-attack methods mostly detect whether attacks are received or not by performing two operations from the perspective of an algorithm, comparing results of the two operations after the operations are finished, or inserting some detection circuits into a chip to detect voltage or current jitter and burrs. This method requires excessive self-calculation power for consuming the security chip, or requires an additional circuit design, and is not high in protection efficiency and security.
Disclosure of Invention
The embodiment of the invention provides a method and a system for protecting data of a security chip, which can efficiently protect the security chip and improve the security of the chip.
In a first aspect, an embodiment of the present invention provides a method for protecting data of a security chip, where the method includes:
the terminal equipment generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information;
after the security chip starts to work, the terminal equipment acquires a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information;
the terminal equipment sends the first ciphertext information and the second ciphertext information to a server;
the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden.
Optionally, before the terminal device generates the random number through the random number generation algorithm, the method further includes:
receiving a first public key and verification data sent by a server, wherein the verification data comprises a character string consisting of numbers and letters;
correspondingly, encrypting the random number through the stored first public key to obtain first ciphertext information, including:
forming data to be encrypted by the check data and the random number;
and encrypting the data to be encrypted through the first public key to obtain first ciphertext information.
Optionally, the decrypting, by the server, the first ciphertext information by using the stored first private key to obtain a first random number includes:
decrypting the first ciphertext information through a stored first private key to obtain a result to be compared;
and comparing the result to be compared with the stored check data to obtain a first random number.
Optionally, after the security chip is started to work, the receiving verification data sent by the server includes:
receiving random verification data generated by a server at intervals of a fixed time period, wherein the verification data comprises server timestamp data;
correspondingly, the encrypting the random number by the stored first public key to obtain first ciphertext information includes: and encrypting the random number and the terminal timestamp data through the stored first public key to obtain first ciphertext information.
Optionally, when the server decrypts the first ciphertext information by using the stored first private key to obtain the first random number, the method further includes:
the server decrypts the first ciphertext information through a stored first private key to obtain terminal timestamp data, compares the terminal timestamp data with the server timestamp data, and judges whether an abnormal condition is met according to a comparison result;
and in response to a judgment result that the abnormal condition is met, disabling the terminal equipment.
Optionally, when the random number is encrypted by the second public key stored in the security chip to obtain second ciphertext information, the method further includes:
encrypting the random numbers respectively through private keys corresponding to the encryption algorithms stored in the security chip to obtain a plurality of random number ciphertexts;
the terminal equipment numbers the plurality of random number ciphertexts and then sends the ciphertexts to a server;
the server determines a corresponding decryption key according to the number of the received random number ciphertext, decrypts the random number ciphertexts through the corresponding decryption key to obtain random number plaintext, compares the random number plaintext with the first random number, and determines tampering information of the security chip according to a comparison result.
Optionally, the disabling the terminal device includes:
determining a disabled function of the terminal device based on the tampering information;
the determined disabling function is disabled.
In a second aspect, an embodiment of the present invention further provides a security chip data protection system, including a terminal device and a server, where the terminal device includes a random number generation module, a first encryption module, a second encryption module, and a data transmission module; the server comprises a first decryption module, a second decryption module and a disabling module, wherein,
the random number generation module is configured to generate a random number by the terminal equipment through a random number generation algorithm;
the first encryption module is configured to encrypt the random number through a stored first public key to obtain first ciphertext information;
the second encryption module is configured to obtain a second public key stored by the security chip by the terminal device to encrypt the random number to obtain second ciphertext information after the security chip is started;
the data transmission module is configured to send the first ciphertext information and the second ciphertext information to a server by the terminal device;
the first decryption module is configured to decrypt the first ciphertext information through a stored first private key to obtain a first random number;
the second decryption module is configured to decrypt the second ciphertext information through a stored second private key to obtain a second random number;
the disabling module is configured to disable the terminal device if the first random number and the second random number are not consistent.
In a third aspect, an embodiment of the present invention further provides a security chip data protection device, where the security chip data protection device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for protecting data of the security chip according to the embodiment of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a storage medium containing computer executable instructions, where the computer executable instructions are used to execute the security chip data protection method according to the embodiment of the present invention when executed by a computer processor.
In a fifth aspect, the present application further provides a computer program product, where the computer program product includes a computer program, where the computer program is stored in a computer-readable storage medium, and at least one processor of the device reads from the computer-readable storage medium and executes the computer program, so that the device executes the security chip data protection method described in the present application.
In the embodiment of the invention, terminal equipment generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information; after the security chip starts to work, the terminal equipment acquires a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information; the terminal equipment sends the first ciphertext information and the second ciphertext information to a server; the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden. According to the scheme, the protection of the safety chip can be efficiently carried out, and the safety of the chip is improved.
Drawings
Fig. 1 is a flowchart of a method for protecting data of a security chip according to an embodiment of the present invention;
fig. 2 is a flowchart of another security chip data protection method according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for protecting data of a security chip according to an embodiment of the present invention;
fig. 4 is a block diagram of a security chip data protection system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
Fig. 1 is a flowchart of a method for protecting data of a security chip according to an embodiment of the present invention, where an embodiment of the present invention specifically includes the following steps:
step S101, the terminal device generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information.
The random number generation algorithm can be designed in a matching way according to different programming languages. Or generating random numbers by using a self-contained function algorithm of a programming language.
The first public key is a received public key transmitted by the server, and the server stores a corresponding private key. And encrypting the random number through the first public key to obtain first ciphertext information. The specific encryption algorithm may be RSA, DSA, ECC, DH, etc.
Step S102, after the security chip starts to work, the terminal device obtains a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information.
The security chip can be used for encrypting the sending data when the data is sent to the terminal equipment so as to ensure the security of the data. And after the security chip starts to work, encrypting the random number through a second public key stored in the security chip to obtain second ciphertext information. The specific encryption algorithm can be selected in the encryption algorithms supported by the security chip according to different security levels and application scenarios. Correspondingly, the server stores the private key corresponding to the second public key.
And step S103, the terminal equipment sends the first ciphertext information and the second ciphertext information to a server.
And after the first ciphertext information and the second ciphertext information are determined, the terminal equipment sends the first ciphertext information and the second ciphertext information to the server.
And step S104, the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden.
The server receives first ciphertext information and second ciphertext information sent by the terminal device, decrypts the first ciphertext information by using a first private key stored in a matched mode respectively to obtain a first random number, decrypts the second ciphertext information by using a second private key stored in the matched mode to obtain a second random number, compares the first random number with the second random number, and determines whether the security chip is attacked or not according to a comparison result.
Specifically, if the first random number and the second random number are inconsistent, it is determined that the terminal device is under a security attack, and the terminal device is disabled. Optionally, the disabling mode includes disabling the terminal device from sending and receiving data in the distributed network system, and disconnecting the corresponding network connection.
According to the method, the random number is generated through the random number generation algorithm through the terminal device, the random number is encrypted through the stored first public key to obtain the first ciphertext information, after the security chip is started to work, the terminal device obtains the second public key stored through the security chip to encrypt the random number to obtain the second ciphertext information, the terminal device sends the first ciphertext information and the second ciphertext information to the server, the server decrypts the first ciphertext information through the stored first private key to obtain the first random number, decrypts the second ciphertext information through the stored second private key to obtain the second random number, and if the first random number is inconsistent with the second random number, the terminal device is forbidden. In the anti-attack data protection method, the terminal device is used for generating the random number, the public key stored by the terminal device and the public key corresponding to the security chip are used for data encryption respectively, decryption comparison is carried out on the basis of the server, the random number obtained by decryption after the security chip is tampered and attacked is forbidden under the condition that the random number generated by the terminal device is different from the random number generated by the security chip, and data leakage and attack of other devices as data transfer are avoided.
Fig. 2 is a flowchart of another security chip data protection method according to an embodiment of the present invention. On the basis of the technical scheme, the encryption process based on public key storage and random number is further optimized and limited, and specifically the method comprises the following steps:
step S201, receiving a first public key and verification data sent by a server, wherein the verification data comprises a character string composed of numbers and letters.
In one embodiment, the terminal device first receives a first public key sent by the server for encrypting subsequently generated data. The server correspondingly stores a first private key for decrypting the data encrypted by the first public key. Meanwhile, receiving verification data sent by the server, wherein the verification data is a character string consisting of numbers and letters.
Step S202, the terminal device generates a random number through a random number generation algorithm, the check data and the random number form data to be encrypted, and the data to be encrypted is encrypted through the first public key to obtain first ciphertext information.
In one embodiment, after the terminal device generates the random number, the verification data and the random number are combined to obtain data to be encrypted, and the data to be encrypted is encrypted through the first public key to obtain first ciphertext information. Optionally, the specific composition manner includes adding the verification data to the random number, or after, or embedding and interspersing the two with each other. For example, if the random number is 1234 and the check data is ab56cd, the generated data to be encrypted may be: ab56cd1234, 123ab56cd, or 1ab2356cd 4.
Step S203, after the security chip starts working, the terminal device obtains a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information.
And step S204, the terminal equipment sends the first ciphertext information and the second ciphertext information to a server.
Step S205, decrypting the first ciphertext information by using the stored first private key to obtain a result to be compared, and comparing the result to be compared with the stored verification data to obtain a first random number.
In an embodiment, the server decrypts the first ciphertext information by using the stored first private key to obtain a to-be-compared result, for example, the verification data is ab56cd, assuming that the to-be-compared result obtained by decryption is 1ab2356cd4, wherein the to-be-compared result is compared with the stored verification data to obtain the first random number. Specifically, the check data and the result to be compared may be compared in a bit-sequential order, and the data with inconsistent comparison are combined in order to obtain the random number, for example, if 1ab2356cd4 starts comparison from the first data being 1, the first data bit of the check data is a, and the two are different, 1 is determined as the first bit in the sequential combination, and so on, the random number 1234 is obtained.
Step S206, the second ciphertext information is decrypted through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal device is forbidden.
According to the method, the check data and the random number form data to be encrypted in a check data introducing mode, the data to be encrypted is encrypted through the first public key to obtain first ciphertext information, the first ciphertext information is decrypted through the stored first private key to obtain a result to be compared, and the result to be compared is compared with the stored check data to obtain the first random number, so that the complexity of the encrypted data is improved, and the overall safety of the scheme is further improved.
On the basis of the technical scheme, after the safety chip starts to work, random verification data generated by the server every fixed time period is received, namely the verification data is generated randomly every fixed time period, and the specific duration of the fixed time period can be configured. When the server generates the check data, the check data includes server timestamp data, that is, timestamp information of the generated check data is recorded. Correspondingly, when the first public key is used for encrypting the random number, if the verification data is detected to include the time stamp information, the random number and the terminal time stamp data are encrypted to obtain the first ciphertext information when the first ciphertext information is generated, wherein the terminal time stamp data is the current system time stamp of the terminal equipment.
Correspondingly, in the process of data decryption by the server, the server decrypts the first ciphertext information through the stored first private key to obtain terminal timestamp data, compares the terminal timestamp data with the server timestamp data, judges whether an abnormal condition is met according to a comparison result, and disables the terminal equipment in response to a judgment result of meeting the abnormal condition. Specifically, the judgment condition may be that the time interval is determined to be greater than the preset time interval by comparing the timestamps, and it is judged that the abnormal condition is satisfied.
According to the method, when random ratio comparison is carried out, time consuming time is limited by introducing a timestamp mechanism, the problem that data receiving consumes too long time due to attack behaviors in a transmission link or a data operation process is discriminated, protection of a security chip is further improved, and chip security is improved.
Fig. 3 is a flowchart of another security chip data protection method provided in an embodiment of the present invention, which protects against an attack of private key data of a security chip, and specifically includes:
step S301, receiving a first public key and verification data sent by a server, wherein the verification data comprises a character string composed of numbers and letters.
Step S302, the terminal device generates a random number through a random number generation algorithm, the check data and the random number form data to be encrypted, and the data to be encrypted is encrypted through the first public key to obtain first ciphertext information.
Step S303, after the security chip starts to work, the terminal device obtains a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information.
And step S304, the terminal equipment sends the first ciphertext information and the second ciphertext information to a server.
Step S305, decrypting the first ciphertext information by using the stored first private key to obtain a result to be compared, and comparing the result to be compared with the stored verification data to obtain a first random number.
Step S306, decrypting the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, disabling the terminal device.
And step S307, encrypting the random numbers respectively through private keys corresponding to the encryption algorithms stored in the security chip to obtain a plurality of random number ciphertexts.
In one embodiment, the security chip supports a plurality of different encryption algorithms, including symmetric encryption algorithms such as DES, DESede, AES, IDEA, or PBE, and the like, and at this time, the random numbers are encrypted respectively by the private keys corresponding to the encryption algorithms stored in the security chip to obtain a plurality of random number ciphertexts.
And step S308, the terminal equipment numbers the plurality of random number ciphertexts and then sends the ciphertexts to a server.
And after the terminal equipment acquires the plurality of random number ciphertexts of the security chip, numbering correspondingly, wherein each number corresponds to the random number cipher texts generated by different encryption algorithms. And the terminal equipment numbers the plurality of random number ciphertexts and then sends the ciphertexts to the server.
Step S309, the server determines a corresponding decryption key according to the number of the received random number ciphertext, decrypts the plurality of random number ciphertexts respectively through the corresponding decryption key to obtain random number plaintext, compares the random number plaintext with the first random number, and determines tampering information of the security chip according to a comparison result.
In one embodiment, the server stores each decryption key of the encrypted data of the security chip, determines a corresponding decryption algorithm through a number, decrypts the plurality of random number ciphertexts by using the corresponding decryption key to obtain random number plaintext, compares the random number plaintext with the first random number, and determines tampering information of the security chip according to a comparison result. Specifically, when a certain random number ratio pair is inconsistent, the information indicating that the encryption algorithm corresponding to the secure chip is attacked may be tampered, and then step S310 is executed.
And step S310, determining the forbidden function of the terminal equipment based on the tampering information, and forbidding the determined forbidden function.
In one embodiment, the tampering information records a corresponding attacked algorithm, and the function is disabled according to the function executed by the corresponding algorithm in the security chip. If the terminal device uses the security chip, different encryption algorithms are used according to different programs, scenes and security levels, and after a certain algorithm is determined to be potentially attacked, the program function corresponding to the algorithm is disabled.
According to the method, the random numbers are generated by the terminal equipment to respectively detect the attack behaviors of the encryption algorithm and the private key of the security chip, and meanwhile, the independent forbidden function of the terminal equipment with pertinence can be determined through the comparison of the server, so that the security of the security chip is improved, and the maximized function utilization is guaranteed.
Fig. 4 is a block diagram of a security chip data protection system according to an embodiment of the present invention, where the system is configured to execute a security chip data protection method according to the foregoing data receiving end embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 4, the system specifically includes: the terminal device 101 comprises a random number generating module 1011, a first encryption module 1012, a second encryption module 1013 and a data transmission module 1014; the server 102 comprises a first decryption module 1021, a second decryption module 1022 and a disabling module 1023, wherein,
the random number generation module 1011 is configured to generate a random number by the terminal device through a random number generation algorithm;
the first encryption module 1012 is configured to encrypt the random number by using the stored first public key to obtain first ciphertext information;
the second encryption module 1013 is configured to, after the secure chip starts to operate, obtain, by the terminal device, a second public key stored by the secure chip to encrypt the random number to obtain second ciphertext information;
the data transmission module 1014 is configured to send the first ciphertext information and the second ciphertext information to a server by the terminal device;
the first decryption module 1021 is configured to decrypt the first ciphertext information through a stored first private key to obtain a first random number;
the second decryption module 1022 is configured to decrypt the second ciphertext information by using a stored second private key to obtain a second random number;
the disabling module 1023 is configured to disable the terminal device if the first random number and the second random number are not identical.
According to the scheme, the terminal equipment generates the random number through a random number generation algorithm, and encrypts the random number through the stored first public key to obtain first ciphertext information; after the security chip starts to work, the terminal equipment acquires a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information; the terminal equipment sends the first ciphertext information and the second ciphertext information to a server; the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden. According to the scheme, the protection of the safety chip can be efficiently carried out, and the safety of the chip is improved.
In one possible embodiment, the data transmission module is further configured to:
before the terminal equipment generates a random number through a random number generation algorithm, receiving a first public key and verification data sent by a server, wherein the verification data comprises a character string consisting of numbers and letters;
correspondingly, the first encryption module is specifically configured to:
forming data to be encrypted by the check data and the random number;
and encrypting the data to be encrypted through the first public key to obtain first ciphertext information.
In a possible embodiment, the first decryption module is specifically configured to:
decrypting the first ciphertext information through a stored first private key to obtain a result to be compared;
and comparing the result to be compared with the stored check data to obtain a first random number.
In a possible embodiment, after the secure chip is started to operate, the data transmission module is specifically configured to:
receiving random check data generated by a server at intervals of a fixed time period, wherein the check data comprises server timestamp data;
correspondingly, the first encryption module is specifically configured to: and encrypting the random number and the terminal time stamp data through the stored first public key to obtain first ciphertext information.
In a possible embodiment, the second decryption module is further configured to:
the server decrypts the first ciphertext information through a stored first private key to obtain terminal timestamp data;
the disabling module is further to: comparing the terminal timestamp data with the server timestamp data, and judging whether an abnormal condition is met according to a comparison result;
and in response to a judgment result that the abnormal condition is met, disabling the terminal equipment.
In one possible embodiment, the second decryption module is further configured to:
when the random number is encrypted through a second public key stored in the security chip to obtain second ciphertext information, the random number is encrypted through private keys corresponding to encryption algorithms stored in the security chip to obtain a plurality of random number ciphertexts;
the data transmission module is further configured to:
the random number ciphertexts are numbered and then sent to a server;
the second decryption module is further configured to: determining a corresponding decryption key according to the number of the received random number ciphertext, and decrypting the plurality of random number ciphertexts respectively through the corresponding decryption keys to obtain random number plaintext;
the disabling module is further to: and comparing the random number plaintext with the first random number, and determining the tampering information of the security chip according to the comparison result.
In a possible embodiment, the disabling module is specifically configured to:
determining a disabled function of the terminal device based on the tampering information;
the determined disabling function is disabled.
Fig. 5 is a schematic structural diagram of a security chip data protection apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of the processors 201 in the device may be one or more, and one processor 201 is taken as an example in fig. 5; the processor 201, the memory 202, the input device 203 and the output device 204 in the apparatus may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example. The memory 202 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the security chip data protection method in the embodiment of the present invention. The processor 201 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 202, that is, the above-mentioned security chip data protection method is implemented. The input device 203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the apparatus. The output device 204 may include a display device such as a display screen.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are configured to perform a method for secure chip data protection, the method including:
the terminal equipment generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information;
after the security chip starts to work, the terminal equipment acquires a second public key stored by the security chip to encrypt the random number to obtain second ciphertext information;
the terminal equipment sends the first ciphertext information and the second ciphertext information to a server;
the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden.
From the above description of the embodiments, it is obvious for those skilled in the art that the embodiments of the present invention can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better implementation in many cases. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to make a computer device (which may be a personal computer, a service, or a network device) perform the methods described in the embodiments of the present invention.
It should be noted that, in the embodiment of the security chip data protection system, each unit and each module included in the security chip data protection system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
In some possible embodiments, various aspects of the methods provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of the methods according to various exemplary embodiments of the present application described above in this specification when the program product runs on the computer device, for example, the computer device may perform the security chip data protection described in the embodiments of the present application. The program product may be implemented using any combination of one or more readable media.
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will appreciate that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims (10)

1. The data protection method of the security chip is characterized by comprising the following steps:
the terminal equipment generates a random number through a random number generation algorithm, and encrypts the random number through a stored first public key to obtain first ciphertext information;
after the security chip starts to work, a second public key stored by the security chip encrypts the random number to obtain second ciphertext information, and the second ciphertext information is transmitted to the terminal equipment;
the terminal equipment sends the first ciphertext information and the obtained second ciphertext information to a server;
the server decrypts the first ciphertext information through the stored first private key to obtain a first random number, decrypts the second ciphertext information through the stored second private key to obtain a second random number, and if the first random number is inconsistent with the second random number, the terminal equipment is forbidden.
2. The method for protecting data of a security chip according to claim 1, wherein before the terminal device generates the random number by the random number generation algorithm, the method further comprises:
receiving a first public key and verification data sent by a server, wherein the verification data comprises a character string consisting of numbers and letters;
correspondingly, encrypting the random number through the stored first public key to obtain first ciphertext information, including:
forming data to be encrypted by the check data and the random number;
and encrypting the data to be encrypted through the first public key to obtain first ciphertext information.
3. The method for protecting data of a security chip according to claim 2, wherein the server decrypts the first ciphertext information by using a stored first private key to obtain a first random number, and includes:
decrypting the first ciphertext information through a stored first private key to obtain a result to be compared;
and comparing the result to be compared with the stored check data to obtain a first random number.
4. The method for protecting data of a security chip according to claim 2, wherein after the security chip starts to work, the receiving the verification data sent by the server includes:
receiving random verification data generated by a server at intervals of a fixed time period, wherein the verification data comprises server timestamp data;
correspondingly, the encrypting the random number by the stored first public key to obtain first ciphertext information includes: and encrypting the random number and the terminal time stamp data through the stored first public key to obtain first ciphertext information.
5. The method for protecting data of a security chip according to claim 4, wherein when the server decrypts the first ciphertext information by using the stored first private key to obtain the first random number, the method further includes:
the server decrypts the first ciphertext information through a stored first private key to obtain terminal timestamp data, compares the terminal timestamp data with the server timestamp data, and judges whether an abnormal condition is met according to a comparison result;
and in response to a judgment result that the abnormal condition is met, disabling the terminal equipment.
6. The method for protecting data of a security chip according to any one of claims 1 to 5, wherein when the random number is encrypted by a second public key stored in the security chip to obtain second ciphertext information, the method further includes:
encrypting the random numbers respectively through private keys corresponding to the encryption algorithms stored in the security chip to obtain a plurality of random number ciphertexts;
the terminal equipment numbers the plurality of random number ciphertexts and then sends the ciphertexts to a server;
the server determines a corresponding decryption key according to the number of the received random number ciphertext, decrypts the random number ciphertexts through the corresponding decryption key to obtain random number plaintext, compares the random number plaintext with the first random number, and determines tampering information of the security chip according to a comparison result.
7. The security chip data protection method of claim 6, wherein the disabling the terminal device comprises:
determining a disabled function of the terminal device based on the tampering information;
the determined disabling function is disabled.
8. The safety chip data protection system comprises terminal equipment and a server, and is characterized in that the terminal equipment comprises a random number generation module, a first encryption module, a second encryption module and a data transmission module; the server comprises a first decryption module, a second decryption module and a disabling module, wherein,
the random number generation module is configured to generate a random number by the terminal equipment through a random number generation algorithm;
the first encryption module is configured to encrypt the random number through a stored first public key to obtain first ciphertext information;
the second encryption module is configured to encrypt the random number by a second public key stored in the security chip to obtain second ciphertext information after the security chip is started to work, and transmit the second ciphertext information to the terminal device;
the data transmission module is configured to send the first ciphertext information and the obtained second ciphertext information to a server by the terminal device;
the first decryption module is configured to decrypt the first ciphertext information through a stored first private key to obtain a first random number;
the second decryption module is configured to decrypt the second ciphertext information through a stored second private key to obtain a second random number;
the disabling module is configured to disable the terminal device if the first random number and the second random number are not consistent.
9. A secure chip data protection apparatus, the apparatus comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the secure chip data protection method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the secure chip data protection method of any one of claims 1-7 when executed by a computer processor.
CN202210392485.8A 2022-04-15 2022-04-15 Security chip data protection method and system Active CN114520727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210392485.8A CN114520727B (en) 2022-04-15 2022-04-15 Security chip data protection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210392485.8A CN114520727B (en) 2022-04-15 2022-04-15 Security chip data protection method and system

Publications (2)

Publication Number Publication Date
CN114520727A CN114520727A (en) 2022-05-20
CN114520727B true CN114520727B (en) 2022-06-21

Family

ID=81600474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210392485.8A Active CN114520727B (en) 2022-04-15 2022-04-15 Security chip data protection method and system

Country Status (1)

Country Link
CN (1) CN114520727B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102701B (en) * 2022-08-25 2022-12-20 广州万协通信息技术有限公司 Multi-chip data encryption and decryption processing method and device
CN115208705B (en) * 2022-09-16 2022-12-20 广州万协通信息技术有限公司 Encryption and decryption method and device based on link data self-adaptive adjustment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200562A (en) * 2012-01-10 2013-07-10 国民技术股份有限公司 Communication terminal locking method and communication terminal
CN105138870A (en) * 2015-10-08 2015-12-09 浪潮(北京)电子信息产业有限公司 Chip legality authentication method and device
CN108234132A (en) * 2017-12-07 2018-06-29 深圳市中易通安全芯科技有限公司 The safe communication system and method for a kind of main control chip and encryption chip
CN108345806A (en) * 2017-12-14 2018-07-31 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) A kind of hardware encryption card and encryption method
CN109120649A (en) * 2018-11-02 2019-01-01 美的集团股份有限公司 Cryptographic key negotiation method, Cloud Server, equipment, storage medium and system
CN110138772A (en) * 2019-05-13 2019-08-16 上海英恒电子有限公司 A kind of communication means, device, system, equipment and storage medium
CN110224811A (en) * 2019-05-13 2019-09-10 中国联合网络通信集团有限公司 Internet of Things cipher processing method, apparatus and system
CN111245870A (en) * 2020-04-26 2020-06-05 国网电子商务有限公司 Identity authentication method based on mobile terminal and related device
CN111815814A (en) * 2020-06-22 2020-10-23 北京智辉空间科技有限责任公司 Electronic lock security system and binding authentication method thereof
CN113407953A (en) * 2021-05-08 2021-09-17 苏州思立特尔半导体科技有限公司 Property right protection method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007132518A1 (en) * 2006-05-15 2007-11-22 Renesas Technology Corp. Master device and data processing system
WO2019144403A1 (en) * 2018-01-29 2019-08-01 深圳市汇顶科技股份有限公司 Chip access method, security control module, chip and debugging device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200562A (en) * 2012-01-10 2013-07-10 国民技术股份有限公司 Communication terminal locking method and communication terminal
CN105138870A (en) * 2015-10-08 2015-12-09 浪潮(北京)电子信息产业有限公司 Chip legality authentication method and device
CN108234132A (en) * 2017-12-07 2018-06-29 深圳市中易通安全芯科技有限公司 The safe communication system and method for a kind of main control chip and encryption chip
CN108345806A (en) * 2017-12-14 2018-07-31 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) A kind of hardware encryption card and encryption method
CN109120649A (en) * 2018-11-02 2019-01-01 美的集团股份有限公司 Cryptographic key negotiation method, Cloud Server, equipment, storage medium and system
CN110138772A (en) * 2019-05-13 2019-08-16 上海英恒电子有限公司 A kind of communication means, device, system, equipment and storage medium
CN110224811A (en) * 2019-05-13 2019-09-10 中国联合网络通信集团有限公司 Internet of Things cipher processing method, apparatus and system
CN111245870A (en) * 2020-04-26 2020-06-05 国网电子商务有限公司 Identity authentication method based on mobile terminal and related device
CN111815814A (en) * 2020-06-22 2020-10-23 北京智辉空间科技有限责任公司 Electronic lock security system and binding authentication method thereof
CN113407953A (en) * 2021-05-08 2021-09-17 苏州思立特尔半导体科技有限公司 Property right protection method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"A New Secure Stream Cipher for Scan Chain Encryption";Mathieu Da Silva;《IEEE》;20181018;全文 *
"抗物理攻击型轻量级密码算法芯片设计";徐天亮;《中国优秀硕士学位论文全文数据库信息科技辑》;20200215;全文 *

Also Published As

Publication number Publication date
CN114520727A (en) 2022-05-20

Similar Documents

Publication Publication Date Title
US8948377B2 (en) Encryption device, encryption system, encryption method, and encryption program
CN114520727B (en) Security chip data protection method and system
EP0695056A2 (en) A method for sharing secret information, generating a digital signature, and performing certification in a communication system that has a plurality of information processing apparatuses and a communication system that employs such a method
CN110335043B (en) Transaction privacy protection method, device and system based on blockchain system
CN112702318A (en) Communication encryption method, decryption method, client and server
JPH09270785A (en) Information processor
CN109981285B (en) Password protection method, password verification method and system
KR101608815B1 (en) Method and system for providing service encryption in closed type network
US11063743B2 (en) Method of RSA signature of decryption protected using assymetric multiplicative splitting
CN115065472B (en) Security chip encryption and decryption method and device based on multi-key encryption and decryption
US7783045B2 (en) Secure approach to send data from one system to another
CN113346997B (en) Method and device for communication of Internet of things equipment, Internet of things equipment and server
CN114531239B (en) Data transmission method and system for multiple encryption keys
KR100546375B1 (en) Interdependent parallel processing hardware cryptographic engine providing for enhanced self fault-detecting and hardware encryption processing method thereof
CN112564906A (en) Block chain-based data security interaction method and system
CN113128999A (en) Block chain privacy protection method and device
CN115208697A (en) Adaptive data encryption method and device based on attack behavior
CN114491611A (en) Security chip anti-attack method and device based on backup data
CN114915504A (en) Security chip initial authentication method and system
CN113992427A (en) Data encryption sending method and device based on adjacent nodes
CN116455572B (en) Data encryption method, device and equipment
CN115001865B (en) Communication processing method and system, client, communication server and supervision server
CN113595982B (en) Data transmission method and device, electronic equipment and storage medium
CN115567200A (en) http interface anti-brush method, system and related device
CN112149166A (en) Unconventional password protection method and intelligent bank machine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant