CN112437087A - Encryption and decryption method and system for gas meter with safety chip and gas meter system - Google Patents

Encryption and decryption method and system for gas meter with safety chip and gas meter system Download PDF

Info

Publication number
CN112437087A
CN112437087A CN202011330640.0A CN202011330640A CN112437087A CN 112437087 A CN112437087 A CN 112437087A CN 202011330640 A CN202011330640 A CN 202011330640A CN 112437087 A CN112437087 A CN 112437087A
Authority
CN
China
Prior art keywords
data
module
mcu
security chip
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.)
Pending
Application number
CN202011330640.0A
Other languages
Chinese (zh)
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.)
CHONGQING SHANCHENG GAS EQUIPMENT CO LTD
Original Assignee
CHONGQING SHANCHENG GAS EQUIPMENT 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 CHONGQING SHANCHENG GAS EQUIPMENT CO LTD filed Critical CHONGQING SHANCHENG GAS EQUIPMENT CO LTD
Priority to CN202011330640.0A priority Critical patent/CN112437087A/en
Publication of CN112437087A publication Critical patent/CN112437087A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • 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

Abstract

The invention discloses an encryption and decryption method and system for a gas meter with a security chip and a gas meter system, and the method mainly comprises the following steps: the MCU sends data to the security chip; the security chip operates the data to generate an additional message; the security chip encapsulates the encrypted information and the additional message to generate an uplink data domain; and the security chip sends the uplink data domain to the MCU. Data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.

Description

Encryption and decryption method and system for gas meter with safety chip and gas meter system
Technical Field
The invention relates to the technical field of gas meter safety, in particular to an encryption and decryption method and system for a gas meter with a safety chip and a gas meter system.
Background
As more and more gas companies adopt intelligent gas meters to build a gas selling management system, related functions such as prepayment management, remote monitoring, internet connection and the like are realized. The intelligent gas meter and the remote gas selling management system are required to exchange data, if the intelligent gas meter and the remote gas selling management system do not have the information safety management function, the effective identity of the data cannot be authenticated when the intelligent gas meter and the remote gas selling management system are transmitted in different transmission media, the encryption and decryption functions of the data are incomplete, the password is lost, the safety of data exchange cannot be guaranteed, and the risk that the intelligent gas meter and the remote gas selling management system are out of control can be caused. At present, the traditional communication data encryption and decryption of the gas meter all need the participation of an MCU, a secret key is stored through the MCU, the encryption information is decrypted and calculated, and the safety is poor.
Disclosure of Invention
Objects of the invention
In order to overcome at least one defect in the prior art, the data is transmitted to the security chip through the MCU, and the security chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the security of the data is improved.
(II) technical scheme
As a first aspect of the invention, the invention discloses an encryption method of a gas meter with a security chip, which comprises the following steps:
the MCU sends data to the security chip;
the security chip operates the data to generate an additional message;
the security chip encapsulates the encrypted information and the additional message to generate an uplink data domain;
and the security chip sends the uplink data domain to the MCU.
In a possible implementation, the data specifically includes: operation rule, communication function code and uplink data.
In a possible embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In a possible implementation manner, the operation of the data by the security chip specifically includes:
and the safety chip calculates the uplink data according to the operation rule and the communication function code to obtain an additional message.
In one possible embodiment, the encryption information is used to provide decryption information.
As a second aspect of the present invention, the present invention also discloses an encryption system of a gas meter with a security chip, including: the gas table, the gas table includes MCU and security chip, MCU includes MCU sending module, the security chip includes: the device comprises an encryption and decryption module, a processing module and a chip sending module;
the MCU sending module is used for sending data to the security chip;
the encryption and decryption module is used for operating the data to generate an additional message;
the processing module is used for packaging the encrypted information and the additional message to generate an uplink data domain;
and the chip sending module is used for sending the uplink data domain to the MCU.
In one possible embodiment, the data includes an operation rule, a communication function code, and uplink data.
In a possible embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In a possible implementation manner, the processing module performs an operation on the uplink data according to the operation rule and the communication function code to obtain an additional packet.
In a possible implementation, the secure chip further includes a key generation module, and the key generation module is configured to provide decryption information.
As a third aspect of the present invention, the present invention further discloses a decryption method for a gas meter with a security chip, which includes the following steps: the MCU receives a distributed data domain sent by the system;
the MCU sends the issued data domain to a security chip;
and the security chip unpacks and decrypts the issued data to obtain the issued data.
In a possible implementation manner, the unpacking and decrypting, by the security chip, the issued data field specifically includes:
and the security chip unpacks the issued data domain to obtain encrypted information and an additional message.
In a possible implementation manner, the unpacking and decrypting, by the security chip, the issued data field specifically further includes:
analyzing the encrypted information to obtain an operation rule and a communication function code;
and decrypting the additional message according to the operation rule and the communication function code to obtain downlink data.
In one possible embodiment, the downlink data includes instruction data and response data.
In one possible implementation, the instruction data includes a normal instruction and an operation secure chip instruction.
In one possible embodiment, the response data includes a successful flag bit response and a current time response.
In a possible implementation manner, the unpacking and decrypting, by the security chip, the issued data domain to obtain the issued data further includes:
when the issued data is the common operation instruction, the security chip sends the issued data to the MCU;
and when the issued data is the instruction for operating the safety chip, the safety chip automatically executes the instruction and sends an execution result to the MCU.
In a possible implementation manner, the secure chip will automatically execute the instruction and send the execution result to the MCU, and then further includes:
and the MCU sends an execution result to the system.
As a fourth aspect of the present invention, the present invention further discloses a decryption system for a gas meter with a security chip, including: gas table, MCU and security chip, MCU includes MCU receiving module and MCU sending module, the security chip includes: an encryption and decryption module;
the MCU receiving module is used for receiving a distributed data domain sent by the system;
the MCU sending module is used for sending the issued data domain to a security chip;
and the encryption and decryption module is used for unpacking and decrypting the issued data domain to obtain the issued data.
In a possible implementation manner, the security chip further includes a processing module, and the processing module is configured to unpack the issued data field to obtain the encrypted information and the additional packet.
In a possible implementation manner, the processing module analyzes the encrypted information to obtain an operation rule and a communication function code, and the encryption and decryption module decrypts the additional packet according to the operation rule and the communication function code to obtain downlink data.
In one possible embodiment, the downlink data includes instruction data and response data.
In one possible implementation, the instruction data includes a normal instruction and an operation secure chip instruction.
In one possible embodiment, the response data includes a successful flag bit response and a current time response.
In a possible implementation manner, the security chip further includes a determining module, where the determining module is configured to determine a type of the issued data;
when the issued data is the common operation instruction, the security chip sends the issued data to the MCU;
and when the issued data is the instruction for operating the safety chip, the safety chip automatically executes the instruction and sends an execution result to the MCU.
In a possible implementation manner, the MCU transmission module transmits the execution result to the system.
As a fifth aspect of the present invention, the present invention further discloses a decryption method for a gas meter system with a security chip, which includes the following steps:
receiving an uplink data domain sent by the MCU;
unpacking the uplink data domain to obtain encrypted information and an additional message;
analyzing the encrypted information to obtain an operation rule and a communication function code;
and sending the operation rule, the communication function code and the additional message to an encryption machine for decryption to obtain uplink data.
In a possible embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In a possible implementation manner, the obtaining uplink data then further includes:
and responding the uplink data according to the communication function code.
As a sixth aspect of the present invention, the present invention further discloses a decryption system with a security chip gas meter system, including: the system comprises a system receiving module, a system unpacking module, a system analyzing module, a system sending module and an encryption machine;
the system receiving module is used for receiving an uplink data domain sent by the MCU;
the system unpacking module is used for unpacking the uplink data domain to obtain encrypted information and an additional message;
the system analysis module is used for analyzing the encrypted information to obtain an operation rule and a communication function code;
and the system sending module is used for sending the operation rule, the communication function code and the additional message to the encryption machine for decryption to obtain uplink data.
In a possible embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In a possible implementation manner, the system further includes a response module, and the response module is configured to respond to the uplink data according to the communication function code.
As a seventh aspect of the present invention, the present invention further discloses an encryption method for a gas meter system with a secure chip, including the following steps:
preparing downlink data;
sending the downlink data, the operation rule and the communication function code to an encryption machine to obtain a distributed data domain;
and sending the downlink data domain to a table terminal.
In one possible embodiment, the downlink data includes instruction data and response data.
In one possible implementation, the instruction data includes a normal instruction and an operation secure chip instruction.
In one possible embodiment, the response data includes a successful flag bit response and a current time response.
As an eighth aspect of the present invention, the present invention further discloses an encryption system with a secure chip gas meter system, including: the system comprises a data module, a system sending module and an encryption machine;
the data module is used for preparing downlink data;
the system sending module sends the downlink data, the operation rule and the communication function code to an encryption machine to obtain a distributed data domain;
and the system sending module sends the downlink data domain to a table terminal.
In one possible embodiment, the downlink data includes instruction data and response data.
In one possible implementation, the instruction data includes a normal instruction and an operation secure chip instruction.
In one possible embodiment, the response data includes a successful flag bit response and a current time response.
(III) advantageous effects
The invention discloses an encryption and decryption method and system for a gas meter with a security chip and a gas meter system, which have the following beneficial effects:
in this application, data are sent to the security chip through the MCU, and the operation rule, the data length and the communication function code selected for use are informed, and the security chip encrypts and packages or unpacks and decrypts the data according to the required operation rule and different communication function codes, so that the security of the data is improved.
Drawings
The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining and illustrating the present invention and should not be construed as limiting the scope of the present invention.
FIG. 1 is a flow chart of an encryption method for a gas meter with a security chip disclosed by the invention;
FIG. 2 is a schematic diagram of an encryption method for a gas meter with a security chip disclosed in the present invention;
FIG. 3 is a flow chart of a decryption method for a gas meter with a security chip according to the present invention;
FIG. 4 is another flow chart of a decryption method for a gas meter with a security chip according to the present disclosure;
fig. 5 is a schematic diagram of a decryption system of a gas meter with a security chip disclosed by the invention.
FIG. 6 is a flow chart of a decryption method of a gas meter system with a security chip disclosed by the invention;
fig. 7 is a schematic diagram of a decryption system of a gas meter system with a security chip disclosed by the invention.
FIG. 8 is a flow chart of an encryption method for a gas meter system with a security chip disclosed in the present invention;
fig. 9 is a schematic diagram of an encryption system of a gas meter system with a secure chip disclosed by the invention.
Reference numerals: 001. MCU; 011. the MCU sending module; 012. an MCU receiving module; 002. a security chip; 021. an encryption and decryption module; 022. a processing module; 023. a chip sending module; 031. a system receiving module; 032. a system unpacking module; 033. a system analysis module; 034. a system sending module; 035. an encryption machine; 036. and (5) a data module.
Detailed Description
In order to make the implementation objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in more detail below with reference to the accompanying drawings in the embodiments of the present invention.
It should be noted that: in the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described are some embodiments of the present invention, not all embodiments, and features in embodiments and embodiments in the present application may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience in describing the present invention and for simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore, should not be taken as limiting the scope of the present invention.
A first embodiment of an encryption method for a gas meter with a security chip disclosed in the present invention is described in detail below with reference to fig. 1. The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 1, the present embodiment mainly includes the following steps:
s100, the MCU sends data to the security chip;
in step S100, the data includes an operation rule, a communication function code, and uplink data.
Further, the operation rule is as follows: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
Further, the communication function code includes a registration message, a normal uplink message, a registration downlink, a normal downlink, a read security chip, a write security chip, and the like.
Further, the uplink data includes: the meter comprises a meter number, a meter end clock, a manufacturer code, an operation state, accumulated air quantity, battery voltage, daily air quantity detail, module firmware version, communication signals, IMEI, ICCID and the like.
S200, the security chip operates the data to generate an additional message;
in step 200, the security chip performs an operation on the data to generate an additional packet, which specifically includes: and the safety chip calculates the uplink data according to the operation rule and the communication function code to obtain an additional message.
S300, the security chip encapsulates the encrypted information and the additional message to generate an uplink data domain;
in step 300, the encryption information includes information such as an operation rule, a communication function, a data length, a message counter, a message random number, a security chip life cycle, a key main factor, an encryption key index, an MAC key index, and a server public key index.
And S400, the security chip sends the uplink data domain to the MCU.
Specifically, the MCU prepares uplink data, and sends the operation rule, the communication function code and the uplink data to the security chip, the security chip operates the uplink data according to the operation rule and the communication function code, the obtained file becomes an additional message, and the security chip packages and packages the encrypted information and the additional message and sends the additional message to the MCU. The MCU is only used for transmitting data, and the security chip encrypts and packages the data, so that the security of the data is improved.
Referring to fig. 2, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of an encryption system with a secure chip gas meter. Because the principle of the problem solved by the system is similar to the encryption method of the gas meter with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 2, this embodiment mainly includes the gas table, and the gas table includes MCU001 and security chip 002, and MCU001 includes MCU sending module 011, and security chip 002 includes: an encryption and decryption module 021, a processing module 022 and a chip sending module 023;
the MCU sending module 011 is used for sending data to the security chip 002;
the encryption and decryption module 021 is used for operating data to generate an additional message;
the processing module 022 is configured to encapsulate the encrypted information and the additional packet, and generate an uplink data domain;
the chip transmitting module 023 is configured to transmit the uplink data field to the MCU 001.
In one embodiment, the data includes an operation rule, a communication function code, and upstream data.
In one embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In one embodiment, the communication function code includes a registration message, a normal uplink message, a registration downlink, a normal downlink, a read security chip 002, a write security chip 002, and the like.
In one embodiment, the uplink data includes meter number, meter end clock, manufacturer code, operating status, accumulated gas volume, battery voltage, daily gas volume details, module firmware version, communication signal, IMEI, ICCID, and the like.
In one embodiment, the encryption information includes information such as operation rule, communication function, data length, message counter, message random number, security chip 002 life cycle, key main factor, encryption key index, MAC key index, server public key index, and the like.
In one embodiment, the processing module 022 performs an operation on the uplink data according to the operation rule and the communication function code to obtain an additional packet.
In one embodiment, the secure chip 002 further includes a key generation module for providing decryption information.
Specifically, the MCU001 of the gas meter prepares uplink data, the MCU sending module 011 sends the operation rule, the communication function code, and the uplink data to the security chip 002, the encryption/decryption module 021 of the security chip 002 operates the uplink data according to the operation rule and the communication function code, and then the obtained file becomes an additional packet, and the processing module 022 packages and sends the encrypted information and the additional packet to the MCU 001. Wherein, MCU001 is only used for transmitting data, and security chip 002 encrypts the data and packs, has improved the security of data.
The following describes in detail with reference to fig. 3 to 4, and based on the same inventive concept, the embodiment of the present invention further provides a first embodiment of a decryption method for a gas meter with a secure chip. Because the principle of the problem solved by the system is similar to the encryption method of the gas meter with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 3, the present embodiment mainly includes the following steps:
s500, receiving an issued data domain sent by a system by an MCU;
in step S500, the security chip unpacks the issued data field to obtain the encrypted information and the additional message.
Further, the encrypted information is analyzed to obtain an operation rule and a communication function code;
and decrypting the additional message according to the operation rule and the communication function code to obtain the downlink data.
Further, the downlink data comprises instruction data and response data, wherein the instruction data comprises a common instruction and an instruction for operating the security chip, and the response data comprises a success flag bit response and a current time response.
Further, the instruction data includes switching valves, parameter setting and reading, key setting and reading, life cycle setting and reading, and the like.
S600, the MCU sends the issued data domain to a security chip;
as shown in fig. 4, S700, the security chip unpacks and decrypts the delivered data to obtain the delivered data.
In step S700, the security chip unpacks and decrypts the delivered data to obtain the delivered data, and then further includes:
when the issued data is a common operation instruction, the security chip sends the issued data to the MCU;
when the issued data is an instruction for operating the security chip, the security chip encrypts the issued data and sends the encrypted data to the MCU.
Further, the security chip encrypts the issued data and sends the encrypted issued data to the MCU, and the MCU sends the encrypted issued data to the system.
Specifically, the MCU receives a downlink data field sent by the system and sends the downlink data field to the security chip, the security chip unpacks and analyzes the downlink data field to obtain an operation rule, a communication function code and an additional message, the security chip decrypts the additional message according to the operation rule and the communication function code to obtain downlink data and judge the type of the downlink data, and if the downlink data is a common instruction, the security chip sends issued data to the MCU; if the issued data is an instruction for operating the security chip, the security chip encrypts the issued data and sends the encrypted data to the MCU, and the MCU sends the encrypted downlink data to the system.
Referring to fig. 5, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of a decryption system with a secure chip gas meter. Because the principle of the problem solved by the system is similar to the decryption method of the gas meter with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 5, this embodiment mainly includes the gas table, and the gas table includes MCU001 and security chip 002, and MCU001 includes MCU module 012 and MCU module 011, and security chip 002 includes: an encryption and decryption module 021;
the MCU module 012 is configured to receive an issued data field sent by the system;
the MCU module 011 is used for sending the issued data domain to the security chip 002;
the encryption and decryption module 021 is used for unpacking and decrypting the issued data domain to obtain the issued data.
In an embodiment, the security chip 002 further includes a processing module, and the processing module is configured to unpack the issued data field to obtain the encrypted information and the additional packet.
In one embodiment, the processing module parses the encrypted information to obtain an operation rule and a communication function code, and the encryption/decryption module 021 decrypts the additional packet according to the operation rule and the communication function code to obtain downlink data.
In one embodiment, the downstream data includes instruction data and response data.
In one embodiment, the instruction data includes a normal instruction and an operation security chip 002 instruction.
In one embodiment, the response data includes a successful flag bit response and a current time response.
In one embodiment, the security chip 002 further includes a determining module, and the determining module is configured to determine a type of the issued data;
when the issued data is a common operation instruction, the security chip 002 sends the issued data to the MCU 001;
when the issued data is an instruction for operating the security chip 002, the security chip 002 encrypts the issued data and transmits the encrypted issued data to the MCU 001.
In one embodiment, the MCU module 011 transmits the encrypted transmission data to the system.
The method specifically comprises the following steps: the MCU module 012 receives a downlink data domain sent by a system and sends the downlink data domain to the security chip 002 through the MCU module 011, the processing module unpacks and analyzes the downlink data domain to obtain an operation rule, a communication function code and an additional message, the encryption and decryption module 021 decrypts the additional message according to the operation rule and the communication function code to obtain downlink data, the judgment module judges the type of the downlink data, and if the downlink data is a common instruction, the security chip 002 sends issued data to the MCU 001; if the issued data is an instruction for operating the security chip 002, the security chip 002 encrypts the issued data and transmits the encrypted data to the MCU001, and the MCU001 transmits the encrypted downlink data to the system.
Referring to fig. 6, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of a decryption method for a gas meter system with a secure chip. Because the principle of the problem solved by the system is similar to the decryption method of the gas meter with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 6, the present embodiment mainly includes the following steps:
s11, receiving an uplink data domain sent by the MCU;
in step S11, the uplink data includes a meter number, a meter end clock, a manufacturer code, an operating state, an accumulated gas amount, a battery voltage, a daily gas amount specification, a module firmware version, a communication signal, an IMEI, an ICCID, and the like.
S22, unpacking the uplink data domain to obtain encrypted information and an additional message;
in step S22, the encryption information includes information such as operation rule, communication function, data length, message counter, message random number, security chip life cycle, key master factor, encryption key index, MAC key index, and server public key index.
S33, analyzing the encrypted information to obtain an operation rule and a communication function code;
in step S33, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
The communication function code comprises a registration message, a common uplink message, a registration downlink, a common downlink, a read security chip, a write security chip and the like.
And S44, sending the operation rule, the communication function code and the additional message to an encryption machine for decryption to obtain uplink data.
In step S44, the method sends the operation rule, the communication function code, and the additional message to the encryption device for decryption to obtain uplink data, and then further includes:
the system responds to the uplink data according to the communication function code.
Specifically, after the system receives an uplink data field sent by the MCU, the system unpacks the uplink data field to obtain encrypted information and an additional message, then the system analyzes the encrypted information to obtain an operation rule and a communication function code, the system sends the operation rule, the communication function code and the additional message to the encryption machine, the encryption machine decrypts the additional message to obtain uplink data, and the system responds to the uplink data according to the communication function code.
Referring to fig. 7, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of a decryption system with a secure chip gas meter system. Because the principle of the problem solved by the system is similar to the decryption method of the gas meter system with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 7, the present embodiment mainly includes: a system receiving module 031, a system unpacking module 032, a system analyzing module 033, a system sending module 034 and an encryptor 035;
the system receiving module 031 is configured to receive an uplink data field sent by the MCU;
the system unpacking module 032 is used for unpacking the uplink data domain to obtain the encrypted information and the additional message;
the system analysis module 033 is configured to analyze the encrypted information to obtain an operation rule and a communication function code;
the system sending module 034 is configured to send the operation rule, the communication function code, and the additional packet to the encryptor 035 for decryption, so as to obtain uplink data.
In one embodiment, the operation rule is: plaintext, plaintext and/or MAC, ciphertext and/or MAC.
In one embodiment, the system further includes a response module, and the response module is configured to respond to the uplink data according to the communication function code.
In one embodiment, the encryption information includes information such as operation rule, communication function, data length, message counter, message random number, security chip life cycle, key main factor, encryption key index, MAC key index, server public key index, and the like.
In one embodiment, the communication function code includes a registration message, a normal uplink message, a registration downlink, a normal downlink, a read security chip, a write security chip, and the like.
Specifically, after the system receiving module 031 receives the uplink data field sent by the MCU, the system unpacking module 032 unpacks the uplink data field to obtain encrypted information and an additional message, then the system analyzing module 033 analyzes the encrypted information to obtain an operation rule and a communication function code, the system sending module 034 sends the operation rule, the communication function code and the additional message to the encryptor 035, and the confidential engine decrypts the additional message to obtain uplink data, and the system responds to the uplink data according to the communication function code.
Referring to fig. 8, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of an encryption method for a gas meter system with a secure chip. Because the principle of the problem solved by the system is similar to the decryption method of the gas meter system with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 8, the present embodiment mainly includes the following steps:
s55, preparing downlink data;
in step S55, the downlink data includes downlink data including instruction data and response data, the instruction data includes a normal instruction and an operation security chip instruction, and the response data includes a success flag response and a current time response.
S66, sending the downlink data, the operation rule and the communication function code to an encryption machine to obtain a distributed data domain;
and S77, sending the downlink data field to the table end.
Specifically, the system prepares downlink data, sends the downlink data, the operation rule and the communication function code to the encryption machine to obtain an issued data field, and sends the issued data field to the table terminal.
Referring to fig. 9, the following describes in detail, and based on the same inventive concept, an embodiment of the present invention further provides a first embodiment of an encryption system with a secure chip gas meter system. Because the principle of the problem solved by the system is similar to the encryption method of the gas meter system with the security chip, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
The embodiment is mainly applied to the safety of the gas meter, data are transmitted to the safety chip through the MCU, and the safety chip encrypts and packages or unpacks and decrypts the data according to the operation rule and the communication function code, so that the safety of the data is improved.
As shown in fig. 9, the present embodiment mainly includes a data module 036, a system sending module 034, and an encryption device 035;
the data module 036 is used for preparing downlink data;
the system sending module 034 sends the downlink data, the operation rule and the communication function code to the encryptor 035 to obtain an issued data domain;
the system sending module 034 sends the downlink data field to the table terminal.
In one embodiment, the downstream data includes instruction data and response data.
In one embodiment, the instruction data includes a normal instruction and an operate secure chip instruction.
In one embodiment, the response data includes a successful flag bit response and a current time response.
Specifically, the system data module 036 prepares downlink data, and the system sending module 034 sends the downlink data, the operation rule, and the communication function code to the encryptor 035 to obtain an issued data field, and the system sending module 034 sends the issued data field to the meter end.
The downlink data, the operation rule, the communication function code and the uplink data in the embodiments of the present application are all the same meaning and the same function.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. An encryption method of a gas meter with a security chip is characterized by comprising the following steps:
the MCU sends data to the security chip;
the security chip operates the data to generate an additional message;
the security chip encapsulates the encrypted information and the additional message to generate an uplink data domain;
and the security chip sends the uplink data domain to the MCU.
2. The encryption method for a gas meter with a security chip according to claim 1, wherein the data specifically includes: operation rules, communication function codes and uplink data;
the operation rule is as follows: plaintext, plaintext and/or MAC, ciphertext and/or MAC;
the operation of the data by the security chip specifically includes:
the safety chip calculates the uplink data according to the operation rule and the communication function code to obtain an additional message;
the encryption information is used to provide decryption information.
3. An encryption system with a security chip gas meter is characterized by comprising: the gas table, the gas table includes MCU and security chip, MCU includes MCU sending module, the security chip includes: the device comprises an encryption and decryption module, a processing module and a chip sending module;
the MCU sending module is used for sending data to the security chip;
the encryption and decryption module is used for operating the data to generate an additional message;
the processing module is used for packaging the encrypted information and the additional message to generate an uplink data domain;
and the chip sending module is used for sending the uplink data domain to the MCU.
4. The encryption system with a secure chip gas meter according to claim 3, wherein the data includes an operation rule, a communication function code, and upstream data;
the operation rule is as follows: plaintext, plaintext and/or MAC, ciphertext and/or MAC;
the processing module calculates the uplink data according to the operation rule and the communication function code to obtain an additional message;
the security chip also comprises a key generation module which is used for providing decryption information.
5. A decryption method of a gas meter with a security chip is characterized by comprising the following steps:
the MCU receives a distributed data domain sent by the system;
the MCU sends the issued data domain to a security chip;
the security chip unpacks and decrypts the issued data to obtain the issued data;
the unpacking and decrypting of the issued data domain by the security chip specifically comprises the following steps:
the security chip unpacks the issued data domain to obtain encrypted information and an additional message;
the said safety chip unpacks and deciphers the said issued data field, also include specifically:
analyzing the encrypted information to obtain an operation rule and a communication function code;
decrypting the additional message according to the operation rule and the communication function code to obtain downlink data;
the downlink data comprises instruction data and response data;
the instruction data comprises a common instruction and an operation safety chip instruction;
the response data comprises a success flag bit response and a current time response;
the security chip unpacks and decrypts the issued data domain to obtain the issued data, and the method further comprises the following steps:
when the issued data is the common operation instruction, the security chip sends the issued data to the MCU;
when the issued data is the operation safety chip instruction, the safety chip automatically executes corresponding operation and sends an execution result to the MCU;
the safety chip will automatically execute the instruction, and send the execution result to the MCU, and then, further include:
and the MCU sends an execution result to the system.
6. A decryption system with a security chip gas meter is characterized by comprising: the gas table, the gas table includes MCU and security chip, MCU includes MCU receiving module and MCU sending module, the security chip includes: an encryption and decryption module;
the MCU receiving module is used for receiving a distributed data domain sent by the system;
the MCU sending module is used for sending the issued data domain to a security chip;
the encryption and decryption module is used for unpacking and decrypting the issued data domain to obtain issued data;
the security chip also comprises a processing module, wherein the processing module is used for unpacking the issued data domain to obtain encrypted information and an additional message;
the processing module analyzes the encrypted information to obtain an operation rule and a communication function code, and the encryption and decryption module decrypts the additional message according to the operation rule and the communication function code to obtain downlink data;
the downlink data comprises instruction data and response data;
the instruction data comprises a common instruction and an operation safety chip instruction;
the response data comprises a success flag bit response and a current time response;
the safety chip also comprises a judging module, and the judging module is used for judging the type of the issued data;
when the issued data is the common operation instruction, the security chip sends the issued data to the MCU;
when the issued data is the command of operating the safety chip, the safety chip automatically executes the command and sends an execution result to the MCU;
and the MCU sending module sends the execution result to the system.
7. A decryption method of a gas meter system with a security chip is characterized by comprising the following steps:
receiving an uplink data domain sent by the MCU;
unpacking the uplink data domain to obtain encrypted information and an additional message;
analyzing the encrypted information to obtain an operation rule and a communication function code;
sending the operation rule, the communication function code and the additional message to an encryption machine for decryption to obtain uplink data;
the operation rule is as follows: plaintext, plaintext and/or MAC, ciphertext and/or MAC;
the obtaining of the uplink data further includes:
and responding the uplink data according to the communication function code.
8. A decryption system with a secure chip gas meter system, comprising: the system comprises a system receiving module, a system unpacking module, a system analyzing module, a system sending module and an encryption machine;
the system receiving module is used for receiving an uplink data domain sent by the MCU;
the system unpacking module is used for unpacking the uplink data domain to obtain encrypted information and an additional message;
the system analysis module is used for analyzing the encrypted information to obtain an operation rule and a communication function code;
the system sending module is used for sending the operation rule, the communication function code and the additional message to the encryption machine for decryption to obtain uplink data;
the operation rule is as follows: plaintext, plaintext and/or MAC, ciphertext and/or MAC;
the system also comprises a response module, and the response module is used for responding the uplink data according to the communication function code.
9. An encryption method of a gas meter system with a security chip is characterized by comprising the following steps:
preparing downlink data;
sending the downlink data, the operation rule and the communication function code to an encryption machine to obtain a distributed data domain;
sending the downlink data domain to a table terminal;
the downlink data comprises instruction data and response data;
the instruction data comprises a common instruction and an operation safety chip instruction;
the response data includes a successful flag bit response and a current time response.
10. An encryption system with a secure chip gas meter system, comprising: the system comprises a data module, a system sending module and an encryption machine;
the data module is used for preparing downlink data;
the system sending module sends the downlink data, the operation rule and the communication function code to an encryption machine to obtain a distributed data domain;
the system sending module sends the downlink data domain to a table terminal;
the downlink data comprises instruction data and response data;
the instruction data comprises a common instruction and an operation safety chip instruction;
the response data includes a successful flag bit response and a current time response.
CN202011330640.0A 2020-11-24 2020-11-24 Encryption and decryption method and system for gas meter with safety chip and gas meter system Pending CN112437087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011330640.0A CN112437087A (en) 2020-11-24 2020-11-24 Encryption and decryption method and system for gas meter with safety chip and gas meter system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011330640.0A CN112437087A (en) 2020-11-24 2020-11-24 Encryption and decryption method and system for gas meter with safety chip and gas meter system

Publications (1)

Publication Number Publication Date
CN112437087A true CN112437087A (en) 2021-03-02

Family

ID=74694549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011330640.0A Pending CN112437087A (en) 2020-11-24 2020-11-24 Encryption and decryption method and system for gas meter with safety chip and gas meter system

Country Status (1)

Country Link
CN (1) CN112437087A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117118756A (en) * 2023-10-23 2023-11-24 中关村芯海择优科技有限公司 Data interaction method, device, computer equipment and computer readable storage medium
CN117172924A (en) * 2023-11-03 2023-12-05 中关村芯海择优科技有限公司 Gas transaction method, device, computer equipment, chip and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160110706A1 (en) * 2013-02-06 2016-04-21 Xiamen Elite Electric Co., Ltd. Mobile phone subscriber identity card based on multichannel digital authentication of mobile payment
CN108200094A (en) * 2018-02-09 2018-06-22 大庆英辰创新科技有限公司 A kind of secure communication device, method and system of gas meter, flow meter
CN207782851U (en) * 2018-02-09 2018-08-28 大庆英辰创新科技有限公司 A kind of secure communication device and system of gas meter, flow meter
CN109041052A (en) * 2018-07-02 2018-12-18 北京市燃气集团有限责任公司 A kind of safety communicating method and system based on marking algorithm
CN109389757A (en) * 2017-08-09 2019-02-26 辽宁思凯科技股份有限公司 A kind of intelligent gas meter die for special purpose group based on NB-IOT modem
CN110401530A (en) * 2019-07-25 2019-11-01 金卡智能集团股份有限公司 A kind of safety communicating method of gas meter, flow meter, system, equipment and storage medium
CN111488633A (en) * 2020-04-21 2020-08-04 浙江睿朗信息科技有限公司 Novel thing networking gas table information security structure

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160110706A1 (en) * 2013-02-06 2016-04-21 Xiamen Elite Electric Co., Ltd. Mobile phone subscriber identity card based on multichannel digital authentication of mobile payment
CN109389757A (en) * 2017-08-09 2019-02-26 辽宁思凯科技股份有限公司 A kind of intelligent gas meter die for special purpose group based on NB-IOT modem
CN108200094A (en) * 2018-02-09 2018-06-22 大庆英辰创新科技有限公司 A kind of secure communication device, method and system of gas meter, flow meter
CN207782851U (en) * 2018-02-09 2018-08-28 大庆英辰创新科技有限公司 A kind of secure communication device and system of gas meter, flow meter
CN109041052A (en) * 2018-07-02 2018-12-18 北京市燃气集团有限责任公司 A kind of safety communicating method and system based on marking algorithm
CN110401530A (en) * 2019-07-25 2019-11-01 金卡智能集团股份有限公司 A kind of safety communicating method of gas meter, flow meter, system, equipment and storage medium
CN111488633A (en) * 2020-04-21 2020-08-04 浙江睿朗信息科技有限公司 Novel thing networking gas table information security structure

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117118756A (en) * 2023-10-23 2023-11-24 中关村芯海择优科技有限公司 Data interaction method, device, computer equipment and computer readable storage medium
CN117118756B (en) * 2023-10-23 2024-01-16 中关村芯海择优科技有限公司 Data interaction method, device, computer equipment and computer readable storage medium
CN117172924A (en) * 2023-11-03 2023-12-05 中关村芯海择优科技有限公司 Gas transaction method, device, computer equipment, chip and storage medium
CN117172924B (en) * 2023-11-03 2024-01-16 中关村芯海择优科技有限公司 Gas transaction method, device, computer equipment, chip and storage medium

Similar Documents

Publication Publication Date Title
CN109041052B (en) Safe communication method and system based on identification algorithm
US20190173857A1 (en) Utility meter for metering a utility consumption and optimizing upstream communications and method for managing these communications
US20070257813A1 (en) Secure network bootstrap of devices in an automatic meter reading network
US20060206433A1 (en) Secure and authenticated delivery of data from an automated meter reading system
US7284123B2 (en) Secure communication system and method for integrated mobile communication terminals comprising a short-distance communication module
US11218873B2 (en) Communication system and method
CN102111265A (en) Method for encrypting embedded secure access module (ESAM) of power system acquisition terminal
US9900296B2 (en) Securing communication within a network endpoint
CN103731266B (en) Method and system for authenticating electronic certificate
CN110324222A (en) A kind of vehicle CAN bus data interactive system and its exchange method
CN112217795B (en) Method and device for managing communication security of intelligent electric meter
CN112437087A (en) Encryption and decryption method and system for gas meter with safety chip and gas meter system
EP1527590A1 (en) Packet routing device and packet routing method
CN111164933A (en) Method for ensuring communication safety without state management
CN112672342A (en) Data transmission method, device, equipment, system and storage medium
CN108650096A (en) A kind of industrial field bus control system
CN103404076B (en) On the 3rd entity, authenticate the method for the first and second entities
CN112822216A (en) Authentication method for binding of Internet of things sub-equipment
CN103761660A (en) Method and device for verifying authenticity of product
CN103731827B (en) A kind of hand-held audio communication device and method for electronic certificate authentication
CN103731828A (en) Terminal equipment and method used for electronic certificate authentication
CN107040928B (en) Illegal WIFI detection method, terminal, aaa server and system
CN109194490B (en) Power distribution network communication security authentication system and method
CN203289647U (en) Handheld audio communication equipment for electronic certificate authentication
CN112560073A (en) Method, device and system for verifying data source reliability

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210302