CN116232716A - PUF-based OTA upgrading method and storage medium - Google Patents

PUF-based OTA upgrading method and storage medium Download PDF

Info

Publication number
CN116232716A
CN116232716A CN202310164714.5A CN202310164714A CN116232716A CN 116232716 A CN116232716 A CN 116232716A CN 202310164714 A CN202310164714 A CN 202310164714A CN 116232716 A CN116232716 A CN 116232716A
Authority
CN
China
Prior art keywords
equipment
server
puf
random number
upgrade
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
CN202310164714.5A
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.)
CETHIK Group Ltd
Original Assignee
CETHIK Group 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 CETHIK Group Ltd filed Critical CETHIK Group Ltd
Priority to CN202310164714.5A priority Critical patent/CN116232716A/en
Publication of CN116232716A publication Critical patent/CN116232716A/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
    • 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
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y30/00IoT infrastructure
    • G16Y30/10Security thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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
    • 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/3271Cryptographic 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 using challenge-response
    • H04L9/3278Cryptographic 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 using challenge-response using physically unclonable functions [PUF]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses an OTA (over the air) upgrading method and a storage medium based on a PUF (physical unclonable function), wherein the method comprises registering equipment information, taking the PUF with chips of equipment as a unique identification basis of the equipment, and registering only once in the life cycle of the equipment; the equipment authentication, wherein the equipment end sends information such as random numbers, verification codes and the like to the OTA server for authentication, the server end performs information verification through an algorithm, and sensitive information such as random numbers and the like is encrypted by using a public key of the server end; and the data security transmission channel simultaneously generates a session key at the server side during equipment authentication, the user performs subsequent data encryption transmission, the server side generates a random number, and the equipment side generates a corresponding key by using the puf and the random number. The method and the device improve data privacy and program integrity protection in the OTA upgrading process of the Internet of things equipment.

Description

PUF-based OTA upgrading method and storage medium
Technical Field
The invention belongs to the technical field of OTA (over the air) of the Internet of things, and particularly relates to an OTA upgrading method of the Internet of things based on a PUF (physical unclonable function) and a storage medium.
Background
The internet of things is a local area network in which objects are connected through a network. In recent years, the market size of the internet of things is rapidly increasing, and the number of networking devices is continuously increasing. A huge number of devices access the internet, so that OTA (remote upgrade) technology is commonly used. The 'everything interconnection' brings convenience and simultaneously brings more attack choices for attackers.
The OTA upgrade of the equipment of the Internet of things firstly ensures that the equipment identity can be authenticated correctly, otherwise, the equipment identity is impersonated, which brings great risk to the system. Common equipment identity authentication modes of the internet of things include equipment ID, CA certificate, MAC address, static password and the like. The device ID and the MAC address are used as the identity authentication of the Internet of things device, so that the Internet of things device is easy to falsify and falsify, and the security level is low; when the common static password system is used for identity authentication, a user can log in by using the same password for many times for a long time, and the mode can bring a plurality of potential safety hazards. The user uses the same password for a long time, and the risks of leakage and cracking are increased; the CA certificate mode authentication security level is relatively high, but unique certificates are generated for massive Internet of things equipment, so that the maintenance cost is high, most of the physical network equipment is limited in calculation, and on the other hand, the equipment private key is stored on hardware and is easy to copy and steal.
Secondly, in the OTA upgrading process of the Internet of things equipment, data transmission needs to be encrypted, the integrity of an upgrading program needs to be guaranteed, modification by a third party, implantation of malicious programs is prevented, and damage to the equipment is caused. The integrity of the current upgrade program is mainly ensured by a cyclic redundancy check code (CRC) technology, the CRC is a data transmission error detection function, polynomial calculation is carried out on data, the obtained result is attached to the back of a frame, and the receiving equipment also executes a similar algorithm so as to ensure the correctness and the integrity of data transmission. The malicious third party can intercept the transmission data, replace the transmission data with the binary stream of the Trojan horse program, and add the corresponding check code according to the CRC verification rule so as to achieve the intrusion purpose; in addition, the same program is requested for a plurality of times, CRC is the same, a malicious third party adopts methods such as an artificial neural network, and the like, so that the corresponding generation rule can be easier to break, and potential threat is brought to equipment.
While current Physical Unclonable Functions (PUFs) are a hardware security technique that exploits inherent device variations to produce unclonable unique device responses to a given input, they are inherent and unique identifiers for each piece of silicon. Each IC produced is physically different due to imperfections in silicon processing technology. These process variations manifest themselves as different path delays, transistor threshold voltages, voltage gains, and innumerable other ways between different integrated circuits, thereby forming the PUF of each IC that can be guaranteed as a device with reliability, unpredictability, and uniqueness.
Disclosure of Invention
The invention aims to provide an OTA upgrading method based on a PUF, wherein each equipment end is provided with a unique equipment chip PUF, so that data privacy and program integrity protection in the OTA upgrading process of the equipment of the Internet of things are improved.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
the OTA upgrading method of the Internet of things based on the PUF is oriented to a service end and a device end and is used for upgrading OTA of the Internet of things device, and the OTA upgrading method of the Internet of things based on the PUF is implemented at the device end side and comprises the following steps:
the equipment end registers, generates a reference auxiliary code according to the puf value of the equipment chip, and sends the reference auxiliary code and the public identity information of the equipment to the server end for registration;
the equipment end authenticates, sends the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number to the server end for authentication, receives the second random number returned by the server end after the authentication is successful, and obtains the communication session key according to the second random number;
and the equipment end upgrades, receives an upgrade notification sent by the server end and encrypted by the communication session key, downloads a program upgrade package according to the upgrade notification after decryption, upgrades the program upgrade package after verification is passed, and reports an upgrade result to the server end.
Preferably, the generating the reference auxiliary code according to the puf value of the device chip, and sending the reference auxiliary code and the public identity information of the device to the server for registration includes:
the PUF circuit of the equipment obtains a random value as the PUF value of the equipment chip, randomly selects error correction codes with the same length to carry out exclusive OR operation with the PUF value to form a reference auxiliary code M p
Reference auxiliary code M by server public key pair p Asymmetric encryption is carried out to obtain ciphertext M p Public identity information and ciphertext M of equipment p And sending the message to a server for registration.
Preferably, the sending device performs authentication on public identity information, a timestamp, an encrypted first random number and a verification code generated by the first random number to a server, and the method includes:
initializing a first random number R by a device PUF circuit init
First random number R by server public key init Encryption is carried out to obtain an encrypted first random number R p
From the error correction algorithm based on the reference auxiliary code M p And a first random number R init Calculating to obtain the puf value of the equipment chip, and comparing the puf value with the first random number R init Hash the sum of the time stamps to obtain a verification code V p
First random number R to be public identity information, timestamp, encryption p Verification code V p And sending the authentication result to a server for authentication.
Preferably, the receiving the upgrade notification sent by the server and encrypted by the communication session key, downloading a program upgrade package according to the upgrade notification after decryption, upgrading the program upgrade package after verification is passed, and reporting an upgrade result to the server, including:
receiving an upgrade notification sent by a server and encrypted by a communication session key, wherein the upgrade notification comprises program upgrade package information info, version number version, download address url and time stamp t i Digital signature;
decrypting by using the communication session key to obtain an upgrade notification;
according to version number version and time stamp t in upgrade notification i Judging whether the upgrading of the equipment end is needed or not, if not, reporting an upgrading result to the server end, wherein the upgrading result comprises refusing upgrading; if the program is needed to be carried out, downloading a program upgrade package from a downloading address url to a server;
after the program upgrading package is downloaded, calculating the MD5 value m of the program upgrading package f Simultaneously decrypting the digital signature sign using the server public key to obtain a value sign_hash, calculating a hash value valid_hash=md5 (m f +info+version+url+t i ) Comparing the sign_hash with the hash value valid_hash, if the sign_hash and the hash value valid_hash are the same, verifying that the sign_hash and the hash value valid_hash pass, upgrading the equipment according to a program upgrading packet, and reporting an upgrading result to a server, wherein the upgrading result comprises success or failure of upgrading; otherwise, if the verification fails, the equipment end does not update, and an updating result is reported to the server end, wherein the updating result comprises refusing updating.
Preferably, the method further comprises equipment-side data storage, wherein according to the attribute hierarchy of the program data, a puf value is used as a root key, storage keys corresponding to the hierarchical program data are sequentially generated, and the program data are symmetrically encrypted and stored.
The invention also provides an OTA upgrading method of the Internet of things based on the PUF, which is oriented to a service end and a device end and is used for upgrading OTA of the Internet of things device, and the OTA upgrading method of the Internet of things based on the PUF is implemented on the service end side and comprises the following steps:
receiving a reference auxiliary code and public identity information of the equipment, which are sent by the equipment, and after the reference auxiliary code and the public identity information are checked, returning a registration result to the equipment, wherein the registration result comprises registration success or registration failure;
receiving public identity information, a time stamp, an encrypted first random number and a verification code generated by the first random number of equipment sent by the equipment end, authenticating, generating a second random number after authentication is successful, obtaining a communication session key of the time by the second random number, and sending the second random number to the equipment end along with an authentication result;
and sending an upgrade notification encrypted by the communication session key to the appointed equipment end, and receiving an upgrade result returned by the equipment end.
Preferably, the method includes the steps of receiving the reference auxiliary code and the public identity information of the device sent by the device side, checking the reference auxiliary code and the public identity information, and returning a registration result to the device side, wherein the registration result includes registration success or registration failure, and the method includes the steps of:
public identity information and ciphertext M sent by receiving equipment end p
Ciphertext M using server private key pair v p Decryption to obtain reference auxiliary code M p Check reference auxiliary code M p If the rule is not met, returning a registration result of registration failure to the equipment end, ending, and if the rule is met, continuing to execute;
searching in a server database according to the public identity information of the equipment, and if no repetition exists, storing the public identity information of the equipment and the reference auxiliary code M p And returning a registration result of successful registration to the equipment end, and if the registration is repeated, returning a registration result of failed registration to the equipment end.
Preferably, the authentication of the public identity information of the device sent by the receiving device side, the timestamp, the encrypted first random number and the verification code generated by the first random number includes:
checking the interval between the time stamp and the current time of the server, if the time interval exceeds a limited time range, failing the equipment authentication, and ending; otherwise, continuing to execute;
decrypting the encrypted first random number using the server private key to obtain a first random number R init
Obtaining a reference auxiliary code M according to public identity information inquiry of equipment p According to the reference auxiliary code M by error correction algorithm p And a first random number R init Calculating to obtain the puf value of the equipment chip, and comparing the puf value with the first random number R init Hash the sum of the time stamps to obtain a verification code V p
Verification code V calculated by server p And verification code V sent by equipment end p And comparing, if the two are equal, authenticating successfully, otherwise, authenticating failure.
Preferably, the upgrade notification includes program upgrade package information info, version number version, download address url, and time stamp t i The digital signature sign is generated by the following steps:
performing MD5 hash processing on the program upgrading packet to obtain an MD5 value m of the program upgrading packet f The hash value sign_hash=md5 (m f +info+version+url+t i ) And finally, signing the hash value sign_hash by using a server private key to obtain a digital signature sign.
According to the IOT OTA upgrading method based on the PUF, the integrity protection of an upgrading program is realized, the upgrading program and related parameters thereof are subjected to hash processing on the combination of the upgrading program and the server side to obtain an overall hash value, and the hash value is signed and encrypted by a private key, so that the correct upgrading program of the equipment side is ensured, and illegal invasion is avoided; when the device stores data, according to the data attribute hierarchy, the puf value is used as a root key, corresponding storage keys are sequentially generated, symmetric encryption storage is carried out on the data, and when the data is read, corresponding decryption processing is needed, so that the device storage data can not be used even if the device storage data is leaked, and the device chip is separated. The data privacy and the program integrity protection in the OTA upgrading process of the equipment of the Internet of things can be improved, and the data stored in the equipment can be effectively protected.
The second objective of the present invention is to provide a computer readable storage medium, where after a computer program in the storage medium is executed, the purpose of improving data privacy and program integrity in an OTA upgrading process of an internet of things device is achieved.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the PUF-based OTA upgrade method of the internet of things.
Drawings
Fig. 1 is a schematic overall flow chart of an internet of things OTA upgrading method based on PUF of the invention;
fig. 2 is a schematic diagram of a device registration flow of an over-the-air (OTA) upgrading method based on PUF in the invention;
fig. 3 is a schematic diagram of a device authentication flow of an over-the-air (OTA) upgrading method based on PUF in the invention;
fig. 4 is a schematic diagram of an equipment upgrade flow of an over-the-air (OTA) upgrade method of the internet of things based on PUF in the invention;
fig. 5 is a schematic diagram of device-side storage key generation management of an internet of things OTA upgrading method based on PUF in the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
As shown in fig. 1, in order to overcome the defects existing in the upgrading of the OTA of the internet of things in the prior art, the application provides an upgrading method of the OTA of the internet of things based on PUF, which is oriented to a service end (or a server end) and a device end and mainly comprises: registering the equipment information, taking the equipment self-carrying chip PUF as the unique identification basis of the equipment, and registering the equipment information only once in the life cycle of the equipment; the equipment authentication, wherein the equipment end sends information such as random numbers, verification codes and the like to the OTA server for authentication, the server end performs information verification through an algorithm, and sensitive information such as random numbers and the like is encrypted by using a public key of the server end; and the data security transmission channel simultaneously generates a session key at the server side during equipment authentication, the user performs subsequent data encryption transmission, the server side generates a random number, and the equipment side generates a corresponding key by using the puf and the random number. The PUF-based method for upgrading the OTA of the Internet of things is described in detail below by way of example with reference to fig. 2-4.
Example 1
The OTA upgrading method based on the PUF is implemented at the equipment end side and comprises the following steps:
(1) And the equipment end registers, generates a reference auxiliary code according to the puf value of the equipment chip, and sends the reference auxiliary code and the public identity information of the equipment to the server end for registration.
Firstly, initializing a device chip PUF to obtain the PUF value of the device, and executing once in the life cycle. The initialization method is to obtain a random value PUF from a device PUF circuit 0 As the puf value of the device chip. The obtained puf value is then subjected to machine selection of error correction codes Er with corresponding lengths, and exclusive OR operation is carried out on the error correction codes Er and the generated puf value to form a reference auxiliary code M p And stored in the device.
The device side stores the server public key. First generating OTA memory key M ota Store key M ota The generation method of (1) comprises the following steps: according to the puf value of the device chip and the OTA server address URL ota Storage key M of OTA server corresponding to equipment end ota =Hmac(puf,URL ota ) Where Hmac denotes a hashing algorithm, including but not limited to Hmac_Md5, hmac_sha1, hmac_sha256, etc., using the storage key M ota And symmetrically encrypting the public key of the server and storing the public key into the device.
At the same time, the server public key pair is utilized to refer to the auxiliary code M p Asymmetric encryption is carried out to obtain ciphertext M p General purpose medicineThe over-registration interface opens the identity information P and the ciphertext M of the equipment p And sending the data to a server for storage. After receiving, the server uses the server private key to encrypt the ciphertext M p Decryption is performed to obtain a reference auxiliary code M p And stores the public identity information P and the reference auxiliary code M p Registration is performed.
(2) And authenticating the equipment end, transmitting the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number to the server end for authentication, receiving the second random number returned by the server end after the authentication is successful, and obtaining the communication session key according to the second random number.
The equipment end adopts the same PUF initialization method, and a first random number R is generated by initializing equipment PUF circuits init (physical random number).
Reading the encrypted OTA server public key stored in the device end by using the storage key M ota And symmetrically decrypting to obtain a server public key. For the first random number R using the server public key pubkey init Asymmetric encryption is carried out to obtain an encrypted first random number R p ,R p =Encrypt(pubkey,R init ) Encrypt is an asymmetric encryption algorithm.
From the error correction algorithm based on the reference auxiliary code M p And a first random number R init Calculating to obtain the puf value of the equipment chip, and comparing the puf value with the first random number R init Hash the sum of the time stamps to obtain a verification code V p ,V p =Hmac(puf,R init +t), hmac represents a hashing algorithm including, but not limited to, hmac_md5, hmac_sha1, hmac_sha256 algorithms.
The error correction algorithm is as follows: first random number R init And reference auxiliary code M p Exclusive OR operation is carried out to obtain R p ,R p Calculating the error correction code closest to the error correction distance according to the error correction distance to obtain an original error correction code Er, and then combining the original error correction code Er with a reference auxiliary code M p And performing exclusive OR operation to obtain an original puf value. Wherein the original error correction code Er is not stored. In an ideal state, the calculated puf value of the error correction algorithmThat is, the PUF value of the device chip generated by the device PUF circuit in the device-side registration, but the difference between the two is not excluded in the abnormal state.
First random number R to be encrypted, timestamp, public identity information P p Verification code V p And sending the authentication result to a server for authentication. And receiving an authentication result sent by the server. If the authentication is successful, a second random number R is obtained from the authentication result, and then a communication session key (ck) is obtained according to the puf value of the equipment, wherein the ck=Hmac (puf, R), all received data in the subsequent communication session are obtained through corresponding symmetric decryption by the ck, and an encryption channel confirmation notification is sent to the server.
(3) And the equipment end upgrades, receives an upgrade notification sent by the server end and encrypted by the communication session key, downloads a program upgrade package according to the upgrade notification after decryption, upgrades the program upgrade package after verification is passed, and reports an upgrade result to the server end.
The equipment side receives an upgrade notification sent by the server side and encrypted by a communication session key, wherein the upgrade notification comprises program upgrade package information info, version number version, download address url and time stamp t i And the digital signature is decrypted by using the communication session key crack and then is notified of the upgrade.
According to version number version and time stamp t in upgrade notification i Judging whether the upgrading of the equipment end is needed or not, if not, reporting an upgrading result to the server end, wherein the upgrading result comprises refusing upgrading; if the program is needed to be carried out, the program upgrade package is downloaded to the server according to the download address url. If the version number of the current program of the equipment end is the same as the version number version in the upgrade notification, the upgrade is not needed, and if the time stamp t in the upgrade notification is the same as the version number version in the upgrade notification i If the interval between the device and the current time of the device exceeds the allowable time range, the device does not need to be updated, and the device needs to be updated under the other conditions.
After the program upgrading package is downloaded, calculating the MD5 value m of the program upgrading package f Simultaneously decrypting the digital signature sign by using the server public key to obtain a value sign_hash, and calculating a hash value valid_hash=MD5(m f +info+version+url+t i ) Comparing the sign_hash with the hash value valid_hash, if the sign_hash and the hash value valid_hash are the same, verifying that the program is complete, upgrading the device according to the program upgrading packet, and reporting an upgrading result to the server, wherein the upgrading result comprises upgrading success or upgrading failure; otherwise, if the verification fails, the equipment end does not update, and an updating result is reported to the server end, wherein the updating result comprises refusing updating.
In addition, in order to improve the security of data storage, when the device side of the embodiment stores program parameter data, according to the attribute hierarchy of the program data, the device side sequentially generates storage keys corresponding to the hierarchical program data by using the puf value as a root key, and symmetrically encrypts and stores the program data. For ease of understanding, as shown in fig. 5, this embodiment is exemplified as follows:
the equipment end stores a plurality of modules or subroutines, and the modules or subroutines are divided into different layers according to corresponding attributes. Such as first-tier program correspondence attribute (p 1 ) Which is subordinate to the second-level program corresponding attribute (p 1 ,p 2 ) Sequentially corresponding to the i-th level program attribute (p 1 ,p 2 ,...p i )。
For an attribute of (p 1 ) Is provided with a storage key m at the device side 1 Is generated by a root key, namely the puf value of a device chip, and the specific method is m 1 =Hmac(puf,p 1 )。
For an attribute of (p 1 ,p 2 ) Is provided with a second level program for storing a key m at the device side 2 By its parent module key m 1 And corresponding attribute generation, wherein the specific method is m 2 =Hmac(m 1 ,p 2 )。
For an attribute of (p 1 ,p 2 ,...p i ) Is provided with a storage key m at the device side i By its parent module key m i-1 And corresponding attribute generation, wherein the specific method is m i =Hmac(m i-1 ,p i ),i≥2。
Thus, a parent module may generate and manage the storage keys of its child modules. The data of each hierarchical module or program is symmetrically encrypted and stored by the corresponding storage key. And when the data is read, decrypting the stored data by using the corresponding storage key to obtain the original data.
Example 2
The OTA upgrading method based on the PUF is implemented on a server side and comprises the following steps:
(1) And receiving the reference auxiliary code and the public identity information of the equipment sent by the equipment end, and returning a registration result to the equipment end after checking the reference auxiliary code and the public identity information, wherein the registration result comprises registration success or registration failure.
The server firstly stores a private key of the server, and provides a public key of the server for the equipment, which is used for carrying out asymmetric encryption during data processing of the private key and the public key of the server.
Public identity information P and ciphertext M transmitted during registration of receiving equipment end p Ciphertext M using server private key p Decryption to obtain reference auxiliary code M p . Check reference auxiliary code M p And if the rule is not met, returning a registration result of registration failure to the equipment end, ending, and if the rule is met, continuing to execute.
Searching in a server database according to the public identity information P of the equipment, and if no repetition exists, storing the public identity information P of the equipment and the reference auxiliary code M p And returning a registration result of successful registration to the equipment end, and if the registration is repeated, returning a registration result of failed registration to the equipment end.
(2) And receiving the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number of the equipment transmitted by the equipment terminal, generating a second random number after the authentication is successful, obtaining a communication session key of this time by the second random number, and transmitting the second random number to the equipment terminal along with the authentication result.
Receiving authentication information sent by a device side, wherein the authentication information comprises public identity information P of the device, a time stamp and an encrypted first random number R p And verification code V p
Checking the interval between the time stamp and the current time of the server, if the time interval exceeds a limited time range, failing the equipment authentication, and ending; otherwise, execution continues.
Decrypting the encrypted first random number R using the server private key p Obtaining a first random number R init
Inquiring the server to obtain a reference auxiliary code M according to the public identity information P of the equipment p According to the reference auxiliary code M by error correction algorithm p And a first random number R init The calculated puf value of the device chip is calculated (for distinguishing, the calculated puf value of the server is expressed as puf s ,puf s Used only in intermediate calculations, not saved, not exposed to external programs), and for the puf value and the first random number R init Hash the sum of the time stamps to obtain a verification code V p ,V p =Hmac(puf s ,R init +t)。
The error correction algorithm is as follows: first random number R init And reference auxiliary code M p Exclusive OR operation is carried out to obtain R p ,R p p Calculating the error correction code closest to the error correction distance according to the error correction distance to obtain an original error correction code Er, and then combining the original error correction code Er with a reference auxiliary code M p And performing exclusive OR operation to obtain an original puf value. Wherein the original error correction code Er is not stored. In an ideal state, the PUF value calculated by the error correction algorithm is the PUF value of the device chip generated by the device PUF circuit in the device end registration, but the situation that the two have differences in an abnormal state is not excluded.
Verification code V calculated by server p And verification code V sent by equipment end p And comparing, if the two are equal, authenticating successfully, otherwise, authenticating failure.
If the authentication of the server is successful, the server generates a second random number R, and then the second random number R is generated by the puf s A communication session key (ck) is obtained for subsequent session with the device side, wherein ck=hmac (puf s R), at this time, the communication session key calculated by the server side is the same as the communication session key calculated by the device side. Communication session key (crack), and communication session key (crack) at server sideThe device side is effective in the effective period of the session, and is stored in the memory of the server side. The subsequent communication content msg is symmetrically encrypted by the communication session key crack to form a ciphertext msg s Symmetric encryption algorithms include, but are not limited to, AES, SM4, etc. algorithms.
The server side sends an authentication result to the equipment side, and if the authentication is successful, the authentication result is provided with a second random number R and is used for the equipment side to calculate a communication session key.
(3) And sending an upgrade notification encrypted by the communication session key to the appointed equipment end, and receiving an upgrade result returned by the equipment end.
And uploading the program upgrading package to the server by the user through the browser, and managing the upgrading program of the information such as the program package version and the like. Setting an upgrade strategy of a program upgrade package, such as immediate upgrade, timing upgrade, total upgrade, appointed version upgrade, whole package upgrade and the like.
The upgrade notification sent by the server to the appointed device includes, but is not limited to, program upgrade package information info, version number version, download address url, and time stamp t i Digital signature. The upgrade notification is sent after being symmetrically encrypted by the communication session key crack. By version number version and time stamp t i And realizing upgrade download management.
The generation process of the digital signature is as follows: performing MD5 hash processing on the program upgrading packet to obtain an MD5 value m of the program upgrading packet f The hash value sign_hash=md5 (m f +info+version+url+t i ) And finally, signing the hash value sign_hash by using a server private key to obtain a digital signature sign.
And when an upgrading result reported by the equipment end is received, recording the data into a database.
Example 3
The OTA upgrading method of the Internet of things based on the PUF is oriented to a service end and a device end and is used for upgrading OTA of the Internet of things device and comprises the following steps:
and (3) equipment end registration:
the device side generates a reference auxiliary code according to the puf value of the device chip, and sends the reference auxiliary code and the public identity information of the device to the server side for registration.
The server receives the reference auxiliary code and the public identity information of the equipment, and after the reference auxiliary code and the public identity information are collated, a registration result is returned to the equipment, wherein the registration result comprises registration success or registration failure.
And (5) equipment-end authentication:
the equipment end sends the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number to the server end for authentication;
the server receives the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number of the equipment sent by the equipment, generates a second random number after successful authentication, obtains the communication session key of this time by the second random number, and sends the second random number to the equipment along with the authentication result.
The equipment end receives a second random number returned by the server end after the authentication is successful, and obtains the communication session key according to the second random number.
Upgrading equipment:
the server side transmits an upgrade notification encrypted by the communication session key to the specified device side.
The equipment end receives the upgrade notification sent by the server end and encrypted by the communication session key, downloads the program upgrade package according to the upgrade notification after decryption, upgrades the program upgrade package after verification is passed, and reports an upgrade result to the server end.
And the server receives and stores the upgrading result returned by the equipment end.
It should be noted that, the detailed description of each step in embodiment 3 can be referred to the limitation in embodiment 1 or embodiment 2, and the description of this embodiment is omitted.
Example 4
The IOT OTA upgrading system based on the PUF comprises a server side and one or more equipment sides corresponding to the server side, wherein the server side and the appointed equipment sides realize the steps of the IOT OTA upgrading method based on the PUF in the embodiment 3 through network interaction.
For a specific limitation of the PUF-based OTA upgrading system for the internet of things, refer to the limitation of the PUF-based OTA upgrading method in embodiment 3, and the description thereof will not be repeated here.
Example 5
A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the PUF-based OTA upgrade method of the internet of things described in embodiment 1 or embodiment 2.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Example 6
A computer device comprising a processor and a memory storing a number of computer instructions which, when executed by the processor, implement the steps of the PUF-based OTA upgrading method of the internet of things as described in embodiment 1 or embodiment 2.
The memory and the processor are electrically connected directly or indirectly to each other for data transmission or interaction. For example, the components may be electrically connected to each other by one or more communication buses or signal lines. The memory stores a computer program executable on a processor that implements the method of the embodiments of the present invention by running the computer program stored in the memory.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory is used for storing a program, and the processor executes the program after receiving an execution instruction.
The processor may be an integrated circuit chip having data processing capabilities. The processor may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), and the like. The methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In the present disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or as implicitly indicating the number, order of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of the invention should be assessed as that of the appended claims.

Claims (10)

1. The OTA upgrading method of the Internet of things based on the PUF is oriented to a service end and a device end and is used for upgrading OTA of the Internet of things device, and is characterized in that the OTA upgrading method of the Internet of things based on the PUF is implemented on the device end side and comprises the following steps:
the equipment end registers, generates a reference auxiliary code according to the puf value of the equipment chip, and sends the reference auxiliary code and the public identity information of the equipment to the server end for registration;
the equipment end authenticates, sends the public identity information, the time stamp, the encrypted first random number and the verification code generated by the first random number to the server end for authentication, receives the second random number returned by the server end after the authentication is successful, and obtains the communication session key according to the second random number;
and the equipment end upgrades, receives an upgrade notification sent by the server end and encrypted by the communication session key, downloads a program upgrade package according to the upgrade notification after decryption, upgrades the program upgrade package after verification is passed, and reports an upgrade result to the server end.
2. The PUF-based OTA upgrading method of the internet of things of claim 1, wherein generating a reference auxiliary code with a PUF value of a device chip, and sending the reference auxiliary code and public identity information of a device to a server for registration, comprises:
the PUF circuit of the equipment obtains a random value as the PUF value of the equipment chip, randomly selects error correction codes with the same length to carry out exclusive OR operation with the PUF value to form a reference auxiliary code M p
Using server public keysReference auxiliary code M p Asymmetric encryption is carried out to obtain ciphertext M' p Public identity information and ciphertext M 'of equipment' p And sending the message to a server for registration.
3. The PUF-based OTA upgrade method of the internet of things of claim 1 wherein the transmitting the public identity information of the device, the timestamp, the encrypted first random number, and the verification code generated by the first random number to the server for authentication includes:
initializing a first random number R by a device PUF circuit init
First random number R by server public key init Encryption is carried out to obtain an encrypted first random number R p
From the error correction algorithm based on the reference auxiliary code M p And a first random number R init Calculating to obtain the puf value of the equipment chip, and comparing the puf value with the first random number R init Hash the sum of the time stamps to obtain a verification code V p
First random number R to be public identity information, timestamp, encryption p Verification code V p And sending the authentication result to a server for authentication.
4. The PUF-based OTA upgrade method of the internet of things of claim 1 wherein the receiving the upgrade notification sent by the server and encrypted by the communication session key, downloading the program upgrade package according to the upgrade notification after decryption, upgrading the program upgrade package after verification, and reporting the upgrade result to the server comprises:
receiving an upgrade notification sent by a server and encrypted by a communication session key, wherein the upgrade notification comprises program upgrade package information info, version number version, download address url and time stamp t i Digital signature;
decrypting by using the communication session key to obtain an upgrade notification;
according to version number version and time stamp t in upgrade notification i Judging whether the upgrading of the equipment end needs to be carried out or not, if soIf the upgrade is not needed, reporting an upgrade result to the server, wherein the upgrade result comprises refusal of upgrade; if the program is needed to be carried out, downloading a program upgrade package from a downloading address url to a server;
after the program upgrading package is downloaded, calculating the MD5 value m 'of the program upgrading package' f Simultaneously decrypting the digital signature sign using the server public key to obtain a value sign_hash, calculating a hash value valid_hash=md5 (m' f +info+version+url+t i ) Comparing the sign_hash with the hash value valid_hash, if the sign_hash and the hash value valid_hash are the same, verifying that the sign_hash and the hash value valid_hash pass, upgrading the equipment according to a program upgrading packet, and reporting an upgrading result to a server, wherein the upgrading result comprises success or failure of upgrading; otherwise, if the verification fails, the equipment end does not update, and an updating result is reported to the server end, wherein the updating result comprises refusing updating.
5. The PUF-based OTA upgrading method of the internet of things as claimed in claim 1, further comprising storing data at a device end, sequentially generating storage keys corresponding to hierarchical program data by taking a PUF value as a root key according to a program data attribute hierarchy, and symmetrically encrypting and storing the program data.
6. The OTA upgrading method of the Internet of things based on the PUF is oriented to a service end and a device end and is used for upgrading OTA of the Internet of things device, and is characterized in that the OTA upgrading method of the Internet of things based on the PUF is implemented on the service end side and comprises the following steps:
receiving a reference auxiliary code and public identity information of the equipment, which are sent by the equipment, and after the reference auxiliary code and the public identity information are checked, returning a registration result to the equipment, wherein the registration result comprises registration success or registration failure;
receiving public identity information, a time stamp, an encrypted first random number and a verification code generated by the first random number of equipment sent by the equipment end, authenticating, generating a second random number after authentication is successful, obtaining a communication session key of the time by the second random number, and sending the second random number to the equipment end along with an authentication result;
and sending an upgrade notification encrypted by the communication session key to the appointed equipment end, and receiving an upgrade result returned by the equipment end.
7. The PUF-based OTA upgrading method of the internet of things of claim 6 wherein the receiving device side sends a reference auxiliary code and public identity information of the device, and the device side is checked for the reference auxiliary code and the public identity information and then returns a registration result, which includes registration success or registration failure, comprising:
public identity information and ciphertext M 'sent by receiving equipment end' p
Ciphertext M 'using a server private key' p Decryption to obtain reference auxiliary code M p Check reference auxiliary code M p If the rule is not met, returning a registration result of registration failure to the equipment end, ending, and if the rule is met, continuing to execute;
searching in a server database according to the public identity information of the equipment, and if no repetition exists, storing the public identity information of the equipment and the reference auxiliary code M p And returning a registration result of successful registration to the equipment end, and if the registration is repeated, returning a registration result of failed registration to the equipment end.
8. The PUF-based OTA upgrade method of the internet of things of claim 6 wherein the authentication of public identity information of the device sent by the receiving device, the timestamp, the encrypted first random number, and the verification code generated by the first random number includes:
checking the interval between the time stamp and the current time of the server, if the time interval exceeds a limited time range, failing the equipment authentication, and ending; otherwise, continuing to execute;
decrypting the encrypted first random number using the server private key to obtain a first random number R init
Obtaining a reference auxiliary code M according to public identity information inquiry of equipment p According to the reference auxiliary code M by error correction algorithm p And a first random number R init Calculating to obtain the puf value of the equipment chipAnd for the puf value and the first random number R init Hash the sum of the time stamp to obtain verification code V' p
Verification code V 'calculated by server side' p And verification code V sent by equipment end p And comparing, if the two are equal, authenticating successfully, otherwise, authenticating failure.
9. The PUF-based OTA upgrade method of claim 6 wherein the upgrade notification includes program upgrade package information info, version number version, download address url, timestamp t i The digital signature sign is generated by the following steps:
performing MD5 hash processing on the program upgrading packet to obtain an MD5 value m of the program upgrading packet f The hash value sign_hash=md5 (m f +info+version+url+t i ) And finally, signing the hash value sign_hash by using a server private key to obtain a digital signature sign.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 9.
CN202310164714.5A 2023-02-10 2023-02-10 PUF-based OTA upgrading method and storage medium Pending CN116232716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310164714.5A CN116232716A (en) 2023-02-10 2023-02-10 PUF-based OTA upgrading method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310164714.5A CN116232716A (en) 2023-02-10 2023-02-10 PUF-based OTA upgrading method and storage medium

Publications (1)

Publication Number Publication Date
CN116232716A true CN116232716A (en) 2023-06-06

Family

ID=86576482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310164714.5A Pending CN116232716A (en) 2023-02-10 2023-02-10 PUF-based OTA upgrading method and storage medium

Country Status (1)

Country Link
CN (1) CN116232716A (en)

Similar Documents

Publication Publication Date Title
JP7297360B2 (en) Key management method, device, system, computer equipment and computer program
CN108140093B (en) Migrating secrets using a hardware root of trust for a device
CN108140085B (en) Apparatus and method for providing a trusted platform
EP2544400B1 (en) PUF based Cryptographic communication system and cryptographic communication method
CN107086981B (en) Controlled security code authentication
TWI773199B (en) Secure computing device, secure computing method, verifier and device attestation method
CN110401615B (en) Identity authentication method, device, equipment, system and readable storage medium
CN111614621B (en) Internet of things communication method and system
CN111147260B (en) Vehicle key generation and issuance method and device
CN113239363A (en) Firmware updating method, device, equipment, readable storage medium and memory system
KR102591826B1 (en) Apparatus and method for authenticating device based on certificate using physical unclonable function
CN113395406B (en) Encryption authentication method and system based on power equipment fingerprint
CN112583588B (en) Communication method and device and readable storage medium
CN111740995B (en) Authorization authentication method and related device
CN116032655B (en) Identity authentication method and system capable of resisting timing attack
CN115242471B (en) Information transmission method, information transmission device, electronic equipment and computer readable storage medium
CN113872986B (en) Power distribution terminal authentication method and device and computer equipment
CN113721965B (en) Upgrading method of charging pile based on safety firmware
CN114329522A (en) Private key protection method, device, system and storage medium
EP4324159A1 (en) Secure root-of-trust enrolment and identity management of embedded devices
CN116232716A (en) PUF-based OTA upgrading method and storage medium
CN110941861B (en) File protection method and device, computer equipment and medium
JP6014214B2 (en) Cryptographic communication system and cryptographic communication method
CN117640109B (en) API (application program interface) secure access method and device, electronic equipment and storage medium
US20240195641A1 (en) Interim root-of-trust enrolment and device-bound public key registration

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