WO2023103316A1 - 应用管理方法及相关产品 - Google Patents

应用管理方法及相关产品 Download PDF

Info

Publication number
WO2023103316A1
WO2023103316A1 PCT/CN2022/098415 CN2022098415W WO2023103316A1 WO 2023103316 A1 WO2023103316 A1 WO 2023103316A1 CN 2022098415 W CN2022098415 W CN 2022098415W WO 2023103316 A1 WO2023103316 A1 WO 2023103316A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
information
mentioned
verification
signature
Prior art date
Application number
PCT/CN2022/098415
Other languages
English (en)
French (fr)
Inventor
崔成涛
Original Assignee
西安广和通无线通信有限公司
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 西安广和通无线通信有限公司 filed Critical 西安广和通无线通信有限公司
Publication of WO2023103316A1 publication Critical patent/WO2023103316A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • 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/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

Definitions

  • the present application relates to the technical field of application security, in particular to an application management method and related products.
  • IoT devices are commonly used in different fields such as consumer, commercial, industrial and infrastructure.
  • the owner of the device in addition to implementing the set functions of IoT devices, the owner of the device usually needs to expand the functions to meet new functional requirements.
  • IoT devices expand their functions by installing applications. When verifying and installing applications, they need to use the tools provided by the system provider. After passing the verification, they can be installed on the system.
  • Embodiments of the present application provide an application management method and related products, which can solve the problems of low independence and low security of application management on IoT devices.
  • the embodiment of the present application provides an application management method, the above method is applied to the first application installed on the Internet of Things device, and the above method includes:
  • the server receiving first information sent by the server, where the first information includes a first identifier, a first plaintext, and a first signature, and the first plaintext includes second application data;
  • the above-mentioned second application data is written into the memory.
  • the method before using the first public key to verify the first signature and obtain the result of the verification, the method further includes:
  • the result of the signature verification is not passed.
  • the first information further includes: the first ciphertext and the third verification information, and according to the correspondence between the identifier and the public key, determine the After the first public key, the above method also includes:
  • the step of verifying the first signature using the first public key is executed.
  • the above-mentioned writing the above-mentioned second application data into the memory includes:
  • the above method before receiving the first information sent by the server, the above method further includes:
  • the state information of the above-mentioned second application is obtained, and the above-mentioned state information includes non-existence or existence;
  • the above status information is that the above does not exist, determine the network connection status, and the above network connection status includes connected or not connected;
  • the network connection state is the above-mentioned connection, sending request information to the above-mentioned server, the above-mentioned request information is used to request to download the above-mentioned second application data;
  • the above method further includes:
  • the detection of the update status of the second application includes:
  • the update status of the second application is determined according to the first version information and the second version information.
  • the embodiment of the present application provides an application management device, the above-mentioned device is applied to the first application of the Internet of Things device, and the above-mentioned device includes:
  • the receiving unit is configured to receive the first information sent by the server, the first information includes the first identification, the first plaintext and the first signature, and the first plaintext includes the second application data;
  • An obtaining unit configured to determine the first public key corresponding to the first identification according to the correspondence between the identification and the public key;
  • a computing unit configured to verify the first signature by using the first public key
  • the above obtaining unit is also used to obtain the signature verification result
  • the writing unit is configured to write the second application data into the memory when the result of the signature verification is passed.
  • the above-mentioned obtaining unit is specifically configured to obtain the first verification information, the second verification information, and the signature verification result;
  • the above-mentioned calculation unit is specifically used to calculate the above-mentioned first plaintext by using the first function
  • the above calculation unit is specifically configured to use the above first public key to decrypt the above first signature
  • the calculation unit is specifically configured to compare the first verification information with the second verification information
  • the result of the signature verification is not passed.
  • the above-mentioned first information further includes: the first ciphertext and the third check information, and the above-mentioned obtaining unit is further used to obtain the second plaintext, the fourth check information verification information and verification results;
  • the above computing unit is further configured to use the above first public key to decrypt the above first ciphertext
  • the above calculation unit is further configured to use the second function to calculate the above second plaintext
  • the calculation unit is further configured to compare the third verification information with the fourth verification information
  • the calculation unit is further configured to execute the step of verifying the first signature using the first public key when the result of the verification is passed.
  • the above-mentioned obtaining unit is specifically configured to obtain a preset storage start address of the second application in the above-mentioned memory;
  • the above-mentioned writing unit is specifically configured to write the above-mentioned second application data into the above-mentioned memory from the above-mentioned starting address.
  • the obtaining unit is further configured to obtain status information of the second application when the first application is started, where the status information includes non-existence or existence;
  • the calculation unit is further configured to determine the network connection status when the status information is the above non-existence, and the network connection status includes connected or unconnected;
  • the above-mentioned device also includes:
  • a sending unit configured to send request information to the server when the network connection status is the connection, where the request information is used to request downloading of the second application data;
  • the calculation unit is further configured to determine that the download of the second application data is successful when the first information sent by the server is received.
  • the calculation unit is further configured to detect the update status of the second application, where the update status includes to-be-updated or latest;
  • the sending unit is further configured to send update request information to the server when the update status is the pending update, where the update request information is used to request download of update data of the second application;
  • the receiving unit is further configured to receive the update data sent by the server.
  • the above-mentioned obtaining unit is specifically configured to obtain the first version information of the above-mentioned second application
  • the above-mentioned sending unit is specifically configured to send version request information to the above-mentioned server, and the above-mentioned version request information is used for the version information of the above-mentioned second application;
  • the above-mentioned receiving unit is specifically configured to receive the second version information sent by the above-mentioned server
  • the calculation unit is specifically configured to determine the update status of the second application according to the first version information and the second version information.
  • an embodiment of the present application provides an electronic device, the above-mentioned electronic device includes: a memory for storing programs; a processor for executing the above-mentioned programs stored in the above-mentioned memory, and when the above-mentioned programs are executed, the above-mentioned processor is used to Execute the method according to the above first aspect and any optional implementation manner.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the above-mentioned computer storage medium stores a computer program, and the above-mentioned computer program includes program instructions.
  • the above-mentioned program instructions When executed by a processor, the above-mentioned program instructions cause the above-mentioned processor to execute A method in one aspect and any optional implementation manner.
  • the embodiment of the present application provides a computer program product, the above-mentioned computer program product includes: instructions or computer programs; when the above-mentioned instructions or the above-mentioned computer programs are executed, the The method in is implemented.
  • the first application receives the information with the second application data sent by the server, and obtains the corresponding first public key, and verifies the first plaintext and the first signature.
  • the authority to download, install and run third-party applications such as the above-mentioned second application on the IoT device is given to the above-mentioned first application.
  • the first application verifies that the above-mentioned third-party application is passed, it can Data is written to the memory of the aforementioned IoT device.
  • FIG. 1 is a schematic diagram of application management on an Internet of Things device provided by an embodiment of the present application
  • FIG. 2 is a flow chart of an application management method provided in an embodiment of the present application
  • FIG. 3 is a schematic diagram of another application management on an Internet of Things device provided by an embodiment of the present application.
  • FIG. 4 is a flow chart of another application management method provided by the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an application management device provided in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • an embodiment means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application.
  • the occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
  • At least one (item) means one or more
  • “multiple” means two or more
  • “at least two (items)” means two or three and three
  • “and/or” is used to describe the association relationship of associated objects, which means that there can be three kinds of relationships, for example, "A and/or B” can mean: only A exists, only B exists, and A and B exist at the same time A case where A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an "or” relationship.
  • “At least one of the following” or similar expressions refer to any combination of these items. For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ".
  • the embodiment of the present invention provides an application management method, device, device, and storage medium.
  • the following first introduces some aspects involved in the application management method, device, device, and storage medium provided by the embodiment of the present application. Knowledge.
  • Internet of Things refers to the real-time collection of any information that needs to be monitored, connected, For interactive objects or processes, collect various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, location, etc., and realize the ubiquity of objects and objects, objects and people through various possible network access Connect to realize intelligent perception, identification and management of items and processes.
  • the Internet of Things is an information carrier based on the Internet, traditional telecommunication networks, etc. It allows all ordinary physical objects that can be independently addressed to form an interconnected network.
  • Firmware refers to the program written in the erasable programmable read-only memory or electrically erasable programmable read-only memory.
  • the device "driver" stored inside the device can be called firmware. Through firmware, the operating system can follow the standard The device driver realizes the running action of a specific machine, such as optical drive, recorder and other devices have internal firmware.
  • Firmware usually acts as the software for the most basic and bottom-level work of a system. In hardware devices, firmware is the soul of hardware devices, because some hardware devices have no other software components except firmware, so firmware also determines the function and performance of hardware devices.
  • a key is a parameter that is entered in an algorithm that converts plaintext to ciphertext or ciphertext to plaintext.
  • the key system can be divided into symmetric key system and asymmetric key system.
  • the sender and receiver of information use the same key to encrypt and decrypt data. Its biggest advantage is that the encryptor has a fast decryption speed and is suitable for encrypting large amounts of data, but key management is difficult.
  • asymmetric key encryption For asymmetric key encryption, it needs to use different keys to complete the encryption and decryption operations respectively, one is publicly released, that is, the public key, and the other is kept secretly by the user, that is, the private key.
  • the information sender uses the public key to encrypt, while the information receiver uses the private key to decrypt.
  • the public key mechanism is flexible, but encryption and decryption are much slower than symmetric key encryption.
  • Encryption algorithm The basic process of data encryption is to process the original plaintext file or data according to a certain algorithm to make it unreadable. A piece of code is called "ciphertext", so that it can only be displayed after entering the corresponding key. Originally, the purpose of protecting data from being stolen and read by illegal persons is achieved through this approach, and a certain algorithm here is also called an encryption algorithm. The inverse of this process is decryption, the process of converting the encoded information into its original data. Encryption algorithms can generally be divided into symmetric encryption algorithms and asymmetric encryption algorithms.
  • a digital digest is to turn a message of any length into a short message of fixed length, which is similar to a function whose argument is a message, that is, a hash function.
  • the digital digest is to use a one-way hash function to convert the plaintext "summary" that needs to be encrypted into a string of fixed-length (128-bit) ciphertext.
  • This string of ciphertext is also called a digital fingerprint. It has a fixed length and different plaintext digests. Into ciphertext, the result is always different, but the abstract of the same plaintext must be the same.
  • a digital signature is a digital string generated by the information sender that cannot be forged by others. This digital string is also an effective proof of the authenticity of the information sent by the information sender. It is a method for authenticating digital information similar to an ordinary physical signature written on paper, but implemented using techniques from the field of public key cryptography.
  • a set of digital signatures usually defines two complementary operations, one for signing and the other for verification.
  • Digital signature is the combination of asymmetric key encryption technology and digital digest technology. For the sent message, the hash function is used to perform operations to obtain a digital summary, and then a key encryption algorithm is used for the digital summary to produce a digital signature.
  • IoT devices are commonly used in different fields such as consumer, commercial, industrial and infrastructure.
  • the owner of the device in addition to implementing the set functions of IoT devices, the owner of the device usually needs to expand the functions to meet new functional requirements.
  • IoT devices expand their functions by installing applications. When verifying and installing applications, they need to use the tools provided by the system provider. After passing the verification, they can be installed on the system.
  • Figure 1 includes 101 system provider and 102 devices affiliated party, 103 third-party application developer, 104 IoT device.
  • the above-mentioned 101 system supplier has its own key system and encryption and decryption methods, can produce public-private key pairs, provide basic system modules for the above-mentioned 104 IoT devices and be responsible for firmware development, and provide the corresponding private key to the above-mentioned 102 device owner
  • the owner of the above 102 device provides the main application for the above 104 IoT device, guarantees the basic required functions of the above 104 IoT device, divides the storage area of the above 104 IoT device into the main application Reserve storage space with third-party applications.
  • the above-mentioned 104 IoT devices belong to the party that owns the above-mentioned 102 devices and provide services for the above-mentioned 102 devices.
  • the above-mentioned 103 third-party application developers provide third-party applications for the above-mentioned 104 IoT devices, which can expand The functions of the above-mentioned 104 IoT devices meet new demands.
  • the above-mentioned 102 device owner and the above-mentioned 103 third-party application developer need to sign the application data, and the system module of the above-mentioned 104 Internet of Things device uses the corresponding public key provided by the above-mentioned 101 system provider Perform signature verification, and if the verification is successful, use the tool provided by the 101 system provider to write the above application data into the memory of the above IoT device.
  • the owner of the above-mentioned 102 device relies on the above-mentioned 101 system provider for the application management on the above-mentioned 104 IoT device, and needs to use the key system and tools provided by the above-mentioned 101 system provider to install third-party applications. Applications on networked devices are managed and controlled, and the independence and security of application management are low.
  • the above-mentioned main application may be the first application in the embodiment of the present application, and the above-mentioned third-party application may be the second application in the embodiment of the present application.
  • the embodiment of the present application provides an application management method, which is applied to the first application installed on the Internet of Things device, as shown in Figure 2, the method may include the following steps:
  • 201 Receive first information sent by a server, where the first information includes a first identifier, a first plaintext, and a first signature, and the first plaintext includes second application data.
  • the above-mentioned first application is the main application program on the IoT device, which is provided by the owner of the IoT device, and the above-mentioned second application is a third-party application developed by a third-party application developer;
  • the above-mentioned IoT device may be Point of sales (Point of sales, POS) machine
  • the above-mentioned first application can be the bank cash register system installed on the POS machine
  • the above-mentioned second application can be a third-party application that can expand the functions of the POS machine.
  • some other functions will also be used. In this case, other applications need to be installed to expand the functions of the POS machine.
  • the above-mentioned first application receives the above-mentioned first information sent by the server, and the message transmission between the above-mentioned first application and the above-mentioned server may be based on the Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) mode, and may also be based on the File Transfer Protocol (File Transfer Protocol). Transfer Protocol (FTP), the embodiment of the present application does not limit the transmission method of the message.
  • HTTP Hyper Text Transfer Protocol
  • FTP File Transfer Protocol
  • the embodiment of the present application does not limit the transmission method of the message.
  • the above-mentioned first application can send a request for obtaining application data to the above-mentioned server through a webpage, and after the server responds to the request, it will send a third-party Application data for the application.
  • the above-mentioned first application can obtain a plurality of field information included in the information, from which the above-mentioned first identification, the above-mentioned first plaintext and the above-mentioned first signature can be obtained.
  • the above-mentioned first identifier may be a key index, which is used for the above-mentioned first application to obtain the corresponding public key.
  • the above-mentioned first signature is a digital signature obtained by the provider of the above-mentioned second application through digital signature technology encryption, and is used to verify the application data. Origin and Integrity.
  • the aforementioned Internet of Things device there is a built-in file for storing the corresponding relationship between the aforementioned identifier and the public key, and the aforementioned first application can find the corresponding public key in the file according to the aforementioned first identifier.
  • the first identifier is the unique identifier of the private key used to sign the second application data, and the first application can identify the corresponding public key according to the first identifier of the key.
  • asymmetric encryption technology there are two kinds of keys, which are divided into private key and public key. The private key is used to encrypt data, the public key is used to decrypt encrypted data, or the public key is used to encrypt data. The private key is used to decrypt encrypted data.
  • the above-mentioned first information also includes: the first ciphertext and the third verification information, and after step 202 is performed, the method further includes:
  • the step of verifying the first signature using the first public key is executed.
  • the third verification information and the fourth verification information are used to verify the correctness of the first ciphertext.
  • the verification information may be a digital digest in a digital signature algorithm
  • the above-mentioned first application uses the above-mentioned first public key to decrypt the above-mentioned first ciphertext
  • the encryption and decryption algorithm adopted may be a data encryption standard algorithm (Data Encryption Standard, DES), triple data encryption standard algorithm (Triple Data Encryption Algorithm, TDES) and digital signature algorithm (Digital Signature Algorithm, DSA), etc.
  • the above-mentioned second function is used to calculate the verification information of the above-mentioned second plaintext
  • the above-mentioned second function may be a double key length algorithm, or other mathematical algorithms commonly used to calculate verification information, which is not limited in this embodiment of the present application.
  • the above-mentioned first application uses the above-mentioned second plaintext as the key, and half of the length of the second plaintext is 0 as the original text.
  • the second plaintext is a 16-digit number
  • the original text has an 8-digit number
  • the number on each bit is 0,
  • the original text is encrypted with a double-key algorithm, and the result obtained is obtained by taking the preceding value of the result
  • the four digits are used as the fourth verification information.
  • the above-mentioned second plaintext may be other information of the above-mentioned second application; for example, the above-mentioned second plaintext may be the application number of the above-mentioned second application, and when the above-mentioned first application needs to install multiple third-party applications, through the above The application number is convenient for identifying the ownership of the downloaded application data, and better manages the application data of multiple third-party applications; the above-mentioned second plaintext can also be the data identification of the above-mentioned second application, and the data identification is used to record the above-mentioned second For the reception of application data, if the above-mentioned second application data is not received completely, re-send the request for obtaining application data to the above-mentioned server, which can avoid the above-mentioned second application data missing and ensure the transmission of the above-mentioned second application data. integrity.
  • the method before performing step 203, the method further includes:
  • the above-mentioned execution step 203 includes:
  • the result of the signature verification is not passed.
  • the above-mentioned first function may be a commonly used algorithm for calculating digital digests, such as an information digest algorithm, a secure hash algorithm, and a hexadecimal encoding algorithm.
  • the above-mentioned first application uses the above-mentioned first public key to decrypt the above-mentioned first signature,
  • the encryption and decryption algorithm adopted can be Data Encryption Standard Algorithm (Data Encryption Standard, DES), Triple Data Encryption Standard Algorithm (Triple Data Encryption Algorithm, TDES) and Digital Signature Algorithm (Digital Signature Algorithm, DSA), etc., the embodiment of this application
  • the above-mentioned first function and the above-mentioned encryption and decryption algorithm are not limited.
  • the signature verification is passed, which can ensure the integrity of the second application data transmission and determine the identity of the sender of the first information.
  • step 204 includes: obtaining a preset storage start address of the second application in the memory;
  • the above-mentioned first application presets the storage space for the above-mentioned second application in the above-mentioned Internet of Things device according to the preset regulations of the party to which the device belongs. If the above-mentioned signature verification result is passed, the above-mentioned first application will Application data is written to memory. Further, in the case that there are multiple third-party applications to be installed, storage spaces are respectively preset for the multiple third-party applications.
  • the above-mentioned start address is preset according to the size of the above-mentioned second application, and the above-mentioned second application data is written from the above-mentioned start address, which can improve the utilization rate of the above-mentioned memory space, and rationally plan the limited storage of the above-mentioned IoT device. space.
  • step 201 before performing step 201, it also includes:
  • the state information of the above-mentioned second application is obtained, and the above-mentioned state information includes non-existence or existence;
  • the above status information is that the above does not exist, determine the network connection status, and the above network connection status includes connected or not connected;
  • the network connection state is the above-mentioned connection, sending request information to the above-mentioned server, the above-mentioned request information is used to request to download the above-mentioned second application data;
  • the first information sent by the server is not received, it means that the download of the second application data has failed, and the first application will output a prompt message, indicating that the download of the second application data has failed; If the state information of the second application is present, it means that the second application has been installed, and the first application can directly start the second application; if the state information of the second application does not exist, it means that the second application If the second application is not installed in the above-mentioned IoT device, the above-mentioned first application will send the above-mentioned request information to the above-mentioned server, which can ensure that the download authority of the above-mentioned second application is controlled by the above-mentioned first application, and improve the independence of the above-mentioned first application.
  • the first application Before the above-mentioned first application sends the request information of the above-mentioned second application to the above-mentioned server, it will judge the state of the connection with the network, and when the normal connection with the network is ensured, it will send the above-mentioned request information to the above-mentioned server, which can ensure that the above-mentioned first application is downloaded.
  • Application stability
  • the above method also includes:
  • the server sends the update information to the first application, where the update information is used to notify the second application that an update can be performed.
  • the first application chooses to update, it will send the update request information to the server and receive the update data, which can improve the timeliness of the first application's management of third-party applications and ensure the update of the second application data.
  • the above-mentioned detection of the update status of the above-mentioned second application includes:
  • the update status of the second application is determined according to the first version information and the second version information.
  • the above-mentioned version information may be the version number of the above-mentioned second application
  • the above-mentioned first version information is the local version information of the above-mentioned second application on the above-mentioned IoT device
  • the above-mentioned second version information is the version information of the above-mentioned second application on the above-mentioned server
  • the above-mentioned first application obtains the first version information as 100 and the second version information as 101, and comparing the two version information, it can be seen that the second version information is greater than the first version information, so it is judged
  • the above-mentioned update status of the above-mentioned second application is the above-mentioned to-be-updated, and it is convenient to judge the update status of the application in a timely manner by obtaining and comparing the version information of the local application and the server.
  • the method shown in FIG. 2 can be executed by an IoT device.
  • the first application receives the information with the second application data sent by the server, and obtains the corresponding first public key, and verifies the first plaintext and the first signature.
  • the authority to download, install and run third-party applications such as the above-mentioned second application on the IoT device is given to the above-mentioned first application.
  • the first application verifies that the above-mentioned third-party application is passed, it can The data is written into the memory of the Internet of Things device, since the first application is provided by the owner of the device, the independence and security of application management on the Internet of Things device can be improved.
  • Fig. 3 includes 301 system provider, 302 device owner, 303 third-party application developer, 304 IoT device and 305 server.
  • the above-mentioned 301 system supplier provides system modules for the above-mentioned 304 Internet of Things devices and is responsible for firmware development.
  • the owner of the above-mentioned 302 devices also has its own key system and encryption and decryption methods.
  • the above-mentioned 304 IoT devices To provide services for the owner of the above-mentioned 302 device, the above-mentioned 303 third-party application developer provides a third-party application for the above-mentioned 304 Internet of Things device, and uploads the application data to the above-mentioned 305 server, and the above-mentioned 305 server can send the application data to the above-mentioned 304 IoT device. Internet-connected devices.
  • the 304 Internet of Things device needs the above-mentioned main application to verify when installing and downloading third-party applications, and adopts the pre-agreed verification method to verify, install and manage the above-mentioned third-party applications.
  • Encrypt its own application data with the key upload it to the above-mentioned 305 server after encryption, and the 305 server sends the application data to the above-mentioned 304 Internet of Things device, and the above-mentioned main application decrypts and verifies the received application data, and the verification passes Afterwards, it can be installed on the Internet of Things device.
  • the above-mentioned main application may be the first application in the embodiment of the present application
  • the above-mentioned third-party application may be the second application in the embodiment of the present application.
  • the method is applied to the first application installed on the Internet of Things device, and includes the following steps:
  • the first application starts.
  • the above-mentioned first application is the main application program on the Internet of Things device, which may be the main application in the above-mentioned Figures 1 and 3, provided directly by the owner of the Internet of Things device, and has a built-in signature system of the owner of the device.
  • the above-mentioned IoT device may be a POS machine, and the first application may be a cash register system.
  • the POS machine belongs to the bank, and the bank is the party to which the above-mentioned device belongs.
  • the IoT device can expand the functions of the POS machine by downloading a third-party application. Meet changing user needs.
  • the above-mentioned first application obtains the state information of the second application, and the state information includes non-existence or existence, which is used for the first application to judge whether the second application has been installed in the above-mentioned IoT device.
  • the embodiment of the present application uses this state Information as an example does not exist.
  • the second application may be a third-party application that needs to be used in the above-mentioned POS machine, so as to meet the expansion of functions.
  • the first application outputs information indicating that the second application does not exist.
  • the above-mentioned first application is connected to the data network, and when the network connection status is connected, sends data request information to the server corresponding to the second application, and receives the information returned by the server, and the above-mentioned information is transmitted based on the HTTP message.
  • the developer of the above-mentioned second application that is, the third-party application developer, before the first application downloads the above-mentioned second application, the third-party application developer shares the application data of the above-mentioned second application with the owner of the above-mentioned IoT device
  • the agreed algorithm is encrypted and uploaded to the above server.
  • the agreed algorithm can be DES, TDES or DSA, etc.
  • the first application judges whether the first information returned by the server is received, and if so, the second application is downloaded successfully, and step 405 is executed; otherwise, the second application download fails, and step 414 is executed, and a download error message is output.
  • the information sent by the server to the first application there is a special field, which indicates the use of the information, and the first application can determine the specific use of the information according to the special field.
  • the first application parses each field of the received data packet, and obtains information including key index, ciphertext, first check value, second application data, longitudinal redundancy check value, and the like.
  • the above-mentioned first application performs a vertical redundancy check on the fields of the above-mentioned data packet except the vertical redundancy check value to obtain another vertical redundancy check value, and compares whether the two vertical redundancy check values are equal, equal It means passed, and if they are not equal, step 414 is executed to output a download error prompt message.
  • the vertical redundancy check can check the accuracy and integrity of the above-mentioned ciphertext transmission.
  • the above-mentioned ciphertext may be the number of the above-mentioned second application after encryption.
  • the above-mentioned first application obtains the corresponding public key from the file built in the above-mentioned Internet of Things device according to the relationship between the index and the public key according to the above-mentioned key index, Use the public key and the TDES algorithm to decrypt the above ciphertext to obtain the application number of the second application above, and then use the application number as the key to perform a double-length key with the value 0 of half the length of the application number
  • Algorithm that is, the Electronic Code Book (ECB) algorithm, takes the first four digits of the result as the check value, and compares whether the check value is equal to the above-mentioned first check value obtained by analysis, and if they are equal, it means that the above-mentioned second application If the verification of the application number is passed, otherwise, it means that it is not passed, and step 414 is executed to output an error message.
  • the application number can distinguish the data of different third-party applications when the above-mentioned first application downloads multiple third-party applications;
  • the above-mentioned ciphertext may also be the encrypted data identifier of the above-mentioned second application, and the data identifier can be used to record the receiving situation of the above-mentioned second application data. Sending the request for obtaining the application data to the above server can avoid the situation that the above second application data is missing, and ensure the integrity of the above second application data transmission.
  • the signature is verified on the above-mentioned second application data obtained through analysis, and the second application data includes an image file of the application data and a corresponding digital signature.
  • the above-mentioned first application uses the above-mentioned public key and the algorithm agreed with the developer of the above-mentioned second application to decrypt the digital signature.
  • the agreed algorithm can be DES, TDES or DSA, etc. to obtain a verification information, and then the image
  • the file is calculated using a hash algorithm to obtain another verification information, and compare whether the aforementioned two verification information are equal. If they are equal, the signature verification is passed. Otherwise, the above-mentioned first application executes step 414 and outputs an error message.
  • the above-mentioned first application obtains the preset storage start address of the above-mentioned second application in the memory, and the preset storage start address is preset by the owner of the above-mentioned device, from which Start address to start writing to memory.
  • the above-mentioned second application has been installed in the above-mentioned Internet of Things device and is in an operational state.
  • the above-mentioned first application outputs corresponding error information according to the location of the error step.
  • the signature verification in step 409 fails, the above-mentioned second application data signature verification failure prompt information is output.
  • the method shown in FIG. 4 can be executed by an IoT device.
  • the first application on the IoT device judges the status of the second application in the system by obtaining the status information of the second application, and after establishing a network connection with the server, sends appropriate request information to the server. After receiving the message containing the second application data sent by the server, verifying the information security and transmission accuracy of the data packet in the message can ensure the update of the above-mentioned second application in the system and improve the Internet of Things equipment. Independence and security of online application management.
  • FIG. 5 is a schematic structural diagram of an application management device provided by an embodiment of the present application. As shown in Figure 5, the device for application management is applied to the first application installed on the IoT device, including:
  • the receiving unit 501 is configured to receive first information sent by the server, the first information includes a first identification, a first plaintext, and a first signature, and the first plaintext includes second application data;
  • Obtaining unit 502 configured to determine the first public key corresponding to the first identification according to the correspondence between the identification and the public key;
  • a calculation unit 503, configured to verify the first signature by using the first public key
  • the above obtaining unit 502 is also used to obtain the signature verification result
  • the above obtaining unit 502 is specifically configured to obtain the first verification information, the second verification information and the signature verification result;
  • the calculation unit 503 is specifically configured to use the first function to calculate the first plaintext
  • the calculation unit 503 is specifically configured to use the first public key to decrypt the first signature
  • the calculation unit 503 is specifically configured to compare the first verification information with the second verification information
  • the result of the signature verification is not passed.
  • the calculation unit 503 is further configured to execute the step of verifying the first signature using the first public key when the result of the verification is passed.
  • the above-mentioned obtaining unit 502 is specifically configured to obtain the preset storage start address of the second application in the above-mentioned memory;
  • the writing unit 504 is specifically configured to write the second application data into the memory from the starting address.
  • the obtaining unit 502 is further configured to obtain status information of the second application when the first application is started, where the status information includes non-existence or existence;
  • the calculation unit 503 is further configured to determine the network connection status when the status information is the above non-existence, and the network connection status includes connected or unconnected;
  • the above-mentioned device also includes:
  • a sending unit 505, configured to send request information to the server when the network connection status is the connection, where the request information is used to request to download the second application data;
  • the calculation unit 503 is further configured to determine that the download of the second application data is successful when the first information sent by the server is received.
  • the sending unit 505 is further configured to send update request information to the server when the update status is the pending update, where the update request information is used to request to download the update data of the second application;
  • the receiving unit 501 is further configured to receive the update data sent by the server.
  • the above-mentioned obtaining unit 502 is specifically configured to obtain the first version information of the above-mentioned second application;
  • the above-mentioned sending unit 505 is specifically configured to send version request information to the above-mentioned server, and the above-mentioned version request information is used for the version information of the above-mentioned second application;
  • each step of the above-mentioned method or each of the above-mentioned units can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the processing element can be a general-purpose processor, such as a central processing unit (English: central processing unit, referred to as: CPU), and can also be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits circuit (English: application-specific integrated circuit, referred to as: ASIC), or, one or more microprocessors (English: digital signal processor, referred to as: DSP), or, one or more field programmable gate arrays (English: field-programmable gate array, referred to as: FPGA), etc.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 600 includes a processor 601, a memory 602, and a communication interface 603; the processor 601, the memory 602, and the communication interface 603 are connected to each other through a bus.
  • the processor 601 in the electronic device 600 is configured to read the program code stored in the memory 602, and execute the application management method in the foregoing embodiments.
  • a computer-readable storage medium stores a computer program.
  • the above-mentioned computer program When the above-mentioned computer program is executed by a processor, it realizes: receiving the first information sent by the server, the first information includes The first identification, the first plaintext and the first signature, the first plaintext includes the second application data; according to the corresponding relationship between the identification and the public key, determine the first public key corresponding to the first identification; use the first public key key, and verify the first signature to obtain a result of the verification; if the result of the verification is passed, write the second application data into the memory.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Technology Law (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Bioethics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请实施例提供了一种应用管理方法及相关产品,该方法通过接收服务器发送的第一信息,该第一信息包括第一标识、第一明文和第一签名,该第一明文包括第二应用数据,根据标识与公钥的对应关系,确定与所述第一标识对应的第一公钥,利用第一公钥,对第一签名进行验签,获得验签结果,在验签结果为通过的情况下,将第二应用数据写入存储器。

Description

应用管理方法及相关产品
本申请要求于2021年12月07日提交中国专利局、申请号为2021114860003、发明名称为"应用管理方法及相关产品"的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及应用安全技术领域,尤其涉及一种应用管理方法及相关产品。
背景技术
随着科学技术的发展,物联网技术在人们生活的应用已十分广泛。各种物联网设备常用于消费者、商业、工业和基础设施等不同领域。在实际使用中,物联网设备除了实现设定的功能,设备所属方通常还需要对功能进行拓展,以满足新的功能需求。
目前,物联网设备通过安装应用以拓展功能,在验证和安装应用时,需要利用系统供应方提供的工具,验证通过后,可在系统上安装。
但是,采用这种方法,由于验证与安装都需要利用系统供应方的工具,依赖于系统供应方,设备所属方对于应用能否在系统上运行缺乏管控,无法自己验证应用,对于应用管理的独立性和安全性低。
发明内容
本申请实施例提供了一种应用管理方法及相关产品,可以解决物联网设备上应用管理的独立性和安全性低的问题。
第一方面,本申请实施例提供了一种应用管理方法,上述方法应用于物联网设备安装的第一应用,上述方法包括:
接收服务器发送的第一信息,上述第一信息包括第一标识、第一明文和第一签名,上述第一明文包括第二应用数据;
根据标识与公钥的对应关系,确定与上述第一标识对应的第一公钥;
利用上述第一公钥,对上述第一签名进行验签,获得验签结果;
在上述验签结果为通过的情况下,将上述第二应用数据写入存储器。
在第一方面的一种可能的实施方式中,在上述利用上述第一公钥,对上述第一签名进行验签,获得验签结果之前,上述方法还包括:
采用第一函数对上述第一明文进行计算,获得第一校验信息;
上述利用上述第一公钥,对上述第一签名进行验签,获得验签结果包括:
利用上述第一公钥对上述第一签名进行解密,获得第二校验信息;
比较上述第一校验信息和上述第二校验信息,获得验签结果;
在上述第一校验信息等于上述第二校验信息的情况下,上述验签结果为通过;
在上述第一校验信息不等于上述第二校验信息的情况下,上述验签结果为不通过。
在第一方面的一种可能的实施方式中,上述第一信息还包括:第一密文与第三校验信息,在上述根据标识与公钥的对应关系,确定与上述第一标识对应的第一公钥之后,上述方法还包括:
利用上述第一公钥对上述第一密文进行解密,获得第二明文;
利用第二函数对上述第二明文进行计算,获得第四校验信息;
比较上述第三校验信息和上述第四校验信息,获得校验结果;
在上述第三校验信息和上述第四校验信息相等的情况下,上述校验结果为通过;
在上述第三校验信息和上述第四校验信息不相等的情况下,上述校验结果为不通过;
在上述校验结果为通过的情况下,执行上述利用上述第一公钥,对上述第一签名进行验签步骤。
在第一方面的一种可能的实施方式中,上述将上述第二应用数据写入存储器包括:
获得第二应用在上述存储器中预设存储的起始地址;
将上述第二应用数据从上述起始地址写入上述存储器。
在第一方面的一种可能的实施方式中,在上述接收服务器发送的第一信息之前,上述方法还包括:
在启动上述第一应用的情况下,获得上述第二应用的状态信息,上述状态信息包括不存在或者存在;
在上述状态信息为上述不存在的情况下,判断网络连接状态,上述网络连接状态包括连接或者未连接;
在上述网络连接状态为上述连接的情况下,向上述服务器发送请求信息,上述请求信息用于请求下载上述第二应用数据;
在接收到上述服务器发送的上述第一信息的情况下,确定上述第二应用数据下载成功。
在第一方面的一种可能的实施方式中,上述方法还包括:
检测上述第二应用的更新状态,上述更新状态包括待更新或者最新;
在上述更新状态为上述待更新的情况下,向上述服务器发送更新请求信息,上述更新请求信息用于请求下载上述第二应用的更新数据;
接收上述服务器发送的上述更新数据。
在第一方面的一种可能的实施方式中,上述检测上述第二应用的更新状态包括:
获得上述第二应用的第一版本信息;
向上述服务器发送版本请求信息,上述版本请求信息用于上述第二应用的版本信息;
接收上述服务器发送的第二版本信息;
根据上述第一版本信息和上述第二版本信息,判断上述第二应用的上述更新状态。
第二方面,本申请实施例提供了一种应用管理装置,上述装置应用于物联网设备的第一应用,上述装置包括:
接收单元,用于接收服务器发送的第一信息,上述第一信息包括第一标识、第一明文和第一签名,上述第一明文包括第二应用数据;
获得单元,用于根据标识与公钥的对应关系,确定与上述第一标识对应的第一公钥;
计算单元,用于利用上述第一公钥,对上述第一签名进行验签;
上述获得单元,还用于获得验签结果;
写入单元,用于在上述验签结果为通过的情况下,将上述第二应用数据写入存储器。
在第二方面的一种可能的实施方式中,上述获得单元,具体用于获得第一校验信息、第二校验信息和验签结果;
上述计算单元,具体用于采用第一函数对上述第一明文进行计算;
上述计算单元,具体用于利用上述第一公钥对上述第一签名进行解密;
上述计算单元,具体用于比较上述第一校验信息和上述第二校验信息;
在上述第一校验信息等于上述第二校验信息的情况下,上述验签结果为通过;
在上述第一校验信息不等于上述第二校验信息的情况下,上述验签结果为不通过。
在第二方面的一种可能的实施方式中,上述第一信息还包括:第一密文与第三校验信息,上述获得单元,上述获得单元,还用于获得第二明文、第四校验信息和校验结果;
上述计算单元,还用于利用上述第一公钥对上述第一密文进行解密;
上述计算单元,还用于利用第二函数对上述第二明文进行计算;
上述计算单元,还用于比较上述第三校验信息和上述第四校验信息;
在上述第三校验信息和上述第四校验信息相等的情况下,上述校验结果为通过;
在上述第三校验信息和上述第四校验信息不相等的情况下,上述校验结果为不通过;
上述计算单元,还用于在上述校验结果为通过的情况下,执行上述利用上述第一公钥,对上述第一签名进行验签步骤。
在第二方面的一种可能的实施方式中,上述获得单元,具体用于获得第二应用在上述存储器中预设存储的起始地址;
上述写入单元,具体用于将上述第二应用数据从上述起始地址写入上述存储器。
在第二方面的一种可能的实施方式中,
上述获得单元,还用于在启动上述第一应用的情况下,获得上述第二应用的状态信息,上述状态信息包括不存在或者存在;
上述计算单元,还用于在上述状态信息为上述不存在的情况下,判断网络连接状态,上述网络连接状态包括连接或者未连接;
上述装置还包括:
发送单元,用于在上述网络连接状态为上述连接的情况下,向上述服务器发送请求信息,上述请求信息用于请求下载上述第二应用数据;
上述计算单元,还用于在接收到上述服务器发送的上述第一信息的情况下,确定上述第二应用数据下载成功。
在第二方面的一种可能的实施方式中,
上述计算单元,还用于检测上述第二应用的更新状态,上述更新状态包括待更新或者最新;
上述发送单元,还用于在上述更新状态为上述待更新的情况下,向上述服务器发送更新请求信息,上述更新请求信息用于请求下载上述第二应用的更新数据;
上述接收单元,还用于接收上述服务器发送的上述更新数据。
在第二方面的一种可能的实施方式中,
上述获得单元,具体用于获得上述第二应用的第一版本信息;
上述发送单元,具体用于向上述服务器发送版本请求信息,上述版本请求信息用于上述第二应用的版本信息;
上述接收单元,具体用于接收上述服务器发送的第二版本信息;
上述计算单元,具体用于根据上述第一版本信息和上述第二版本信息,判断上述第二应用的上述更新状态。
第三方面,本申请实施例提供一种电子设备,上述电子设备包括:存储器,用于存储程序;处理器,用于执行上述存储器存储的上述程序,当上述程序被执行时,上述处理器用于执行如上述第一方面及任意一种可选的实施方式的方法。
第四方面,本申请实施例提供一种计算机可读存储介质,上述计算机存储介质存储有计算机程序,上述计算机程序包括程序指令,上述程序指令当被处理器执行时使上述处理器执行如上述第一方面及任意一种可选的实施方式的方法。
第五方面,本申请实施例提供了一种计算机程序产品,上述计算机程序产品包括:指令或计算机程序;上述指令或上述计算机程序被执行时,使如第一方面中任意一种可能的实施方式中的方法实现。
本申请实施例中,上述第一应用接收服务器发送的带有上述第二应用数据的信息,并获得对应的上述第一公钥,对上述第一明文和上述第一签名进行验签。对于诸如上述第二应用的第三方应用在物联网设备上能否下载、安装以及运行的权限交于上述第一应用,该第一应用验证上述第三方应用通过后,可将该第三方应用的数据写入上述物联网设备的存储器。本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、 目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图作简单的介绍。
图1为本申请实施例提供的一种物联网设备上应用管理的示意图;
图2为本申请实施例提供的一种应用管理方法的流程图;
图3为本申请实施例提供的又一种物联网设备上应用管理的示意图;
图4为本申请实施例提供的又一种应用管理方法的流程图;
图5为本申请实施例提供的一种应用管理的装置的结构示意图;
图6为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地描述。
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等仅用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。
在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”。
本发明实施例提供了应用管理方法、装置、设备以及存储介质,为更清楚地描述本发明的方案,下面先介绍一些本申请实施例提供的应用管理方法、装置、设备以及存储介质所涉及的知识。
物联网:物联网(Internet of Things,IoT)是指通过各种信息传感器、射频识别技术、全球定位系统、红外感应器、激光扫描器等各种装置与技术,实时采集任何需要监控、连接、互动的物体或过程,采集其声、光、热、电、力学、化学、生物、位置等各种需要的信息,通过各类可能的网络接入,实现物与物、物与人的泛在连接,实现对物品和过程的智能化感知、识别和管理。物联网是一个基于互联网、传统电信网等的信息承载体,它让所有能够被独立寻址的普通物理对象形成互联互通的网络。
固件:固件指是写入可擦写可编程只读存储器或电可擦可编程只读存储器中的程序,设备内部保存的设备“驱动程序”可以叫作固件,通过固件,操作系统才能按照标准的设备驱动实现特定机器的运行动作,比如光驱、刻录机等设备都有内部固件。固件通常担任着一个系统最基础最底层工作的软件。而在硬件设备中,固件就是硬件设备的灵魂,因为 一些硬件设备除了固件以外没有其它软件组成,因此固件也就决定着硬件设备的功能及性能。
密钥:密钥是一种参数,它是在明文转换为密文或将密文转换为明文的算法中输入的参数。根据密码算法所使用的加密密钥和解密密钥是否相同、能否由加密过程推导出解密过程或者由解密过程推导出加密过程,可将密钥体制分为对称密钥体制和非对称密钥体制。对于密钥体系,信息的发送方和接收方使用同一个密钥去加密和解密数据。它的最大优势是加密者解密速度快,适合于对大数据量进行加密,但密钥管理困难。对于非对称密钥加密,它需要使用不同的密钥来分别完成加密和解密操作,一个公开发布,即公开密钥,另一个由用户自己秘密保存,即私用密钥。信息发送者用公开密钥去加密,而信息接收者则用私用密钥去解密。公钥机制灵活,但加密和解密速度却比对称密钥加密慢得多。
加密算法:数据加密的基本过程就是对原来为明文的文件或数据按某种算法进行处理,使其成为不可读的一段代码为“密文”,使其在输入相应的密钥之后才能显示出原容,通过这样的途径来达到保护数据不被非法人窃取、阅读的目的,这里的某种算法又被称作加密算法。该过程的逆过程为解密,即将该编码信息转化为其原来数据的过程。加密算法通常可分为对称式加密算法和非对称式加密算法。
数字摘要:数字摘要是将任意长度的消息变成固定长度的短消息,它类似于一个自变量是消息的函数,也就是哈希函数。数字摘要就是采用单向哈希函数将需要加密的明文“摘要”成一串固定长度(128位)的密文这一串密文又称为数字指纹,它有固定的长度,而且不同的明文摘要成密文,其结果总是不同的,而同样的明文其摘要必定一致。
数字签名:数字签名是信息发送者产生的别人无法伪造的一段数字串,这段数字串同时也是对信息发送者发送信息真实性的一个有效证明。它是一种类似写在纸上的普通的物理签名,但是使用公钥加密领域的技术来实现的,用于鉴别数字信息的方法。一套数字签名通常定义两种互补的运算,一个用于签名,另一个用于验证。数字签名是非对称密钥加密技术与数字摘要技术结合的应用。对于发送的消息,先采用哈希函数进行运算,得到数字摘要,再对数字摘要采用密钥加密算法,生产数字签名。
随着科学技术的发展,物联网技术在人们生活的应用已十分广泛。各种物联网设备常用于消费者、商业、工业和基础设施等不同领域。在实际使用中,物联网设备除了实现设定的功能,设备所属方通常还需要对功能进行拓展,以满足新的功能需求。
目前,物联网设备通过安装应用以拓展功能,在验证和安装应用时,需要利用系统供应方提供的工具,验证通过后,可在系统上安装。
但是,采用这种方法,由于验证与安装都需要利用系统供应方的工具,依赖于系统供应方,设备所属方对于应用能否在系统上运行缺乏管控,无法自己验证应用,对于应用管理的独立性和安全性低。
为了对物联网设备上管理应用的方法进行更加详细的说明,本申请实施例提供了一种物联网设备上应用管理的示意图,如图1所示:图1中包括101系统供应方、102设备所属方、103第三方应用开发方、104物联网设备。上述101系统供应方有自己的密钥系统和加解密方式,可以生产公私钥对,为上述104物联网设备提供基本系统模块以及负责固件开发,并将对应的私钥提供给上述102设备所属方和上述103第三方应用开发方,上述102设备所属方为上述104物联网设备提供主应用,保证上述104物联网设备的基本需求功能,将上述104物联网设备的存储区域进行划分,为主应用和第三方应用预留存储空间,上述104物联网设备所属于上述102设备所属方,为上述102设备所属方服务,上述103第三方应用开发方为上述104物联网设备提供第三方应用,可以拓展上述104物联网设备的功能,满足新的需求。在上述104物联网设备上安装应用之前,上述102设备所属方和上述103第三方应用开发方需要对应用数据进行签名,上述104物联网设备的系统模块利用上 述101系统供应方提供的对应公钥进行验签,验签通过的情况下,利用上述101系统供应方提供的工具将上述应用数据写入上述物联网设备的存储器中。上述102设备所属方对于上述104物联网设备上的应用管理依赖于上述101系统供应方,需要利用上述101系统供应方提供的密钥体系以及工具才能安装第三方应用,自己无法有效对上述104物联网设备上的应用进行管控,对于应用管理的独立性和安全性低,上述主应用可以是本申请实施例中的第一应用,上述第三方应用可以是本申请实施例中的第二应用。
针对上述方法存在的缺陷,本申请实施例提供了一种应用管理方法,该方法应用于物联网设备安装的第一应用,如图2所示,该方法可包括以下步骤:
201、接收服务器发送的第一信息,该第一信息包括第一标识、第一明文和第一签名,该第一明文包括第二应用数据。
上述第一应用是物联网设备上的主应用程序,由该物联网设备的所属方提供,上述第二应用是第三方应用开发方开发的第三方应用;示例性的,上述物联网设备可以是销售点(Point of sales,POS)机器,上述第一应用可以是POS机器上安装的银行收银系统,上述第二应用可以是能够对POS机器功能进行拓展的第三方应用,在该POS机器的使用过程中,除了利用到上述银行收银系统,还会利用到其他的一些功能,这种情况下,需要安装其他应用以扩展该POS机的功能。
上述第一应用接收服务器发送的上述第一信息,上述第一应用与上述服务器之间的消息传输可以基于超文本传输协议(Hyper Text Transfer Protocol,HTTP)的方式,还可以基于文件传输协议(File Transfer Protocol,FTP)的方式,本申请实施例对消息的传输方式不作限定。在采用HTTP的方式下载上述第二应用的情况下,上述第一应用可以通过网页向上述服务器发送获得应用数据的请求,服务器响应该请求后,会基于HTTP的方式向上述第一应用发送第三方应用的应用数据。上述第一应用通过对该第一信息进行解析,可得到信息中包括的多个字段信息,从该多个字段信息中可以得到上述第一标识、上述第一明文和上述第一签名。上述第一标识可以是密钥索引,用于上述第一应用获得对应的公钥,上述第一签名是上述第二应用的提供方通过数字签名技术加密得到的数字签名,用于验证应用数据的来源和完整性。
202、根据标识与公钥的对应关系,确定与上述第一标识对应的第一公钥。
在上述物联网设备中,内置有保存上述标识与公钥对应关系的文件,上述第一应用可以根据上述第一标识,在该文件中找到对应的公钥。上述第一标识是上述第二应用数据被签名使用的私钥的唯一标识,该第一应用可根据该密钥的第一标识识别对应的公钥。在非对称加密技术中,有两种密钥,分为私钥和公钥,私钥用于给数据进行加密,公钥用来解密加密后的数据,或者公钥用于给数据进行加密,私钥用来解密加密后的数据。
在本申请的一些实施例中,上述第一信息还包括:第一密文与第三校验信息,在执行步骤202之后,该方法还包括:
利用上述第一公钥对上述第一密文进行解密,获得第二明文;
利用第二函数对上述第二明文进行计算,获得第四校验信息;
比较上述第三校验信息和上述第四校验信息,获得校验结果;
在上述第三校验信息和上述第四校验信息相等的情况下,上述校验结果为通过;
在上述第三校验信息和上述第四校验信息不相等的情况下,上述校验结果为不通过;
在上述校验结果为通过的情况下,执行上述利用上述第一公钥,对上述第一签名进行验签步骤。
可以理解,上述第三校验信息和上述第四校验信息用于校验该第一密文的正确性。可选的,该校验信息可以是数字签名算法中的数字摘要,上述第一应用利用上述第一公钥对上述第一密文进行解密,所采用的加解密的算法可以是数据加密标准算法(Data Encryption  Standard,DES)、三重数据加密标准算法(Triple Data Encryption Algorithm,TDES)以及数字签名算法(Digital Signature Algorithm,DSA)等,上述第二函数用于计算上述第二明文的校验信息,上述第二函数可以是双倍密钥长算法,也可以是其他常用于计算校验信息的数学算法,本申请实施例对此不作限定。具体的,在上述第二函数为双倍密钥长算法的情况下,上述第一应用以上述第二明文作为密钥,该第二明文一半的长度位数的0作为原文,示例性的,在该第二明文为16位数字的情况下,该原文为8位数,每位上的数字为0,并采用双倍密钥算法对该原文进行加密,得到的结果,取该结果的前四位数作为上述第四校验信息。上述第二明文可以是上述第二应用的其他信息;示例性的,上述第二明文可以是上述第二应用的应用编号,在上述第一应用需要安装多个第三方应用的情况下,通过上述应用编号,便于识别下载得到的应用数据的归属,更好地管理多个第三方应用的应用数据;上述第二明文还可以是上述第二应用的数据标识,该数据标识用于记录上述第二应用数据的接收情况,在上述第二应用数据接收不完整的情况下,重新向上述服务器发送获得应用数据的请求,可以避免上述第二应用数据漏发的情况,保证上述第二应用数据传输的完整性。
203、利用上述第一公钥,对上述第一签名进行验签,获得验签结果。
在本申请的一些实施例中,在执行步骤203之前,该方法还包括:
采用第一函数对上述第一明文进行计算,获得第一校验信息;
上述执行步骤203包括:
利用上述第一公钥对上述第一签名进行解密,获得第二校验信息;
比较上述第一校验信息和上述第二校验信息,获得上述验签结果;
在上述第一校验信息等于上述第二校验信息的情况下,上述验签结果为通过;
在上述第一校验信息不等于上述第二校验信息的情况下,上述验签结果为不通过。
上述第一函数可以是常用的计算数字摘要的算法,比如信息摘要算法、安全散列算法以及十六进制编码算法等,上述第一应用利用上述第一公钥对上述第一签名进行解密,所采用的加解密算法可以是数据加密标准算法(Data Encryption Standard,DES)、三重数据加密标准算法(Triple Data Encryption Algorithm,TDES)以及数字签名算法(Digital Signature Algorithm,DSA)等,本申请实施例对上述第一函数和上述加解密算法不作限定。在上述第一校验信息和上述第二校验信息相等的情况下,上述验签通过,可以保证上述第二应用数据传输的完整性和确定上述第一信息的发送者的身份。
204、在上述验签结果为通过的情况下,将上述第二应用数据写入存储器。
可以理解,在上述验签结果为不通过的情况下,上述第一应用会丢弃上述第二应用数据。
在本申请的一些实施例中,步骤204包括:获得第二应用在上述存储器中预设存储的起始地址;
将上述第二应用数据从上述起始地址写入上述存储器。
上述第一应用根据设备所属方预设的规定,在上述物联网设备中为上述第二应用预设存储空间,在上述验签结果通过的情况下,上述第一应用将验证通过的上述第二应用数据写入存储器。进一步的,在有多个第三方应用需要安装的情况下,会为该多个第三方应用分别预设存储空间。可以理解,上述起始地址是根据上述第二应用的大小预先设定,上述第二应用数据从上述起始地址写入,可以提高上述存储器空间的利用率,合理规划上述物联网设备有限的存储空间。
在本申请的一些实施例中,在执行步骤201之前,还包括:
在启动上述第一应用的情况下,获得上述第二应用的状态信息,上述状态信息包括不存在或者存在;
在上述状态信息为上述不存在的情况下,判断网络连接状态,上述网络连接状态包括连接或者未连接;
在上述网络连接状态为上述连接的情况下,向上述服务器发送请求信息,上述请求信息用于请求下载上述第二应用数据;
在接收到上述服务器发送的上述第一信息的情况下,确定上述第二应用数据下载成功。
可以看出,在未接收到上述服务器发送的上述第一信息的情况下,表示该第二应用数据下载失败,上述第一应用会输出提示信息,表示该第二应用数据下载失败;在上述第二应用的状态信息为存在的情况下,表示该第二应用已被安装,上述第一应用可以直接启动该第二应用;在上述第二应用的状态信息为不存在的情况下,表示该第二应用没有被安装在上述物联网设备中,上述第一应用会向上述服务器发送上述请求信息,可以保证上述第二应用的下载权限掌握在上述第一应用,提高上述第一应用的独立性。在上述第一应用向上述服务器发送上述第二应用的请求信息之前,会判断与网络连接的状态,在确保与网络正常连接的情况下,会向上述服务器发送上述请求信息,可以保证下载上述第二应用的稳定性。
在本申请的一些实施例中,上述方法还包括:
检测上述第二应用的更新状态,上述更新状态包括待更新或者最新;
在上述更新状态为上述待更新的情况下,向上述服务器发送更新请求信息,上述更新请求信息用于请求下载上述第二应用的更新数据;
接收上述服务器发送的上述更新数据。
在上述第二应用可更新的情况下,上述服务器会向上述第一应用发送上述更新信息,该更新信息用于通知上述第二应用可以进行更新。在上述第一应用选择更新的情况下,会向上述服务器发送上述更新请求信息以及接收上述更新数据,可以提高上述第一应用对于第三方应用管理的及时性,保证上述第二应用数据的更新。
在本申请的一些实施例中,上述检测上述第二应用的更新状态包括:
获得上述第二应用的第一版本信息;
向上述服务器发送版本请求信息,上述版本请求信息用于上述第二应用的版本信息;
接收上述服务器发送的第二版本信息;
根据上述第一版本信息和上述第二版本信息,判断上述第二应用的上述更新状态。
上述版本信息可以是上述第二应用的版本号,上述第一版本信息为上述第二应用在上述物联网设备本地的版本信息,上述第二版本信息为上述第二应用在上述服务器的版本信息,示例性的,上述第一应用获取该第一版本信息为100与该第二版本信息为101,将两个版本信息进行比较可以看出,该第二版本信息大于该第一版本信息,故判断上述第二应用的上述更新状态为上述待更新,通过获取应用在本地和服务器的版本信息进行比较,便于及时判断应用的更新状态。
图2所示的方法可以由物联网设备来执行。
本申请实施例中,上述第一应用接收服务器发送的带有上述第二应用数据的信息,并获得对应的上述第一公钥,对上述第一明文和上述第一签名进行验签。对于诸如上述第二应用的第三方应用在物联网设备上能否下载、安装以及运行的权限交于上述第一应用,该第一应用验证上述第三方应用通过后,可将该第三方应用的数据写入上述物联网设备的存储器,由于上述第一应用由上述设备所属方提供,可以提高物联网设备上应用管理的独立性和安全性。
为了对本申请实施例中物联网设备上管理应用的方法进行更加详细的描述,本申请实施例提供了又一种物联网设备上应用管理的示意图,如图3所示。图3包括301系统供应方、302设备所属方、303第三方应用开发方、304物联网设备以及305服务器。上述301 系统供应方为上述304物联网设备提供系统模块以及负责固件开发,上述302设备所属方除了为上述304物联网设备提供主应用之外,还拥有自己的密钥系统和加解密方式,可以生产公私钥对,并将生产的私钥分发给303第三方应用开发方,还将上述104物联网设备的存储区域进行划分,为主应用和第三方应用预留存储空间,上述304物联网设备为上述302设备所属方提供服务,上述303第三方应用开发方为上述304物联网设备提供第三方应用,并将应用数据上传到上述305服务器,上述305服务器可将该应用数据发送至上述304物联网设备。在本图中,该304物联网设备在安装和下载第三方应用需要上述主应用进行验证,采用预先约定的验证方式验证、安装以及管理上述第三方应用,该303第三方应用开发方利用分发到的密钥对自己的应用数据进行加密,加密后上传至上述305服务器,由该305服务器将该应用数据发送至上述304物联网设备,上述主应用对接收到的应用数据进行解密验证,验证通过后可在该物联网设备上安装,上述主应用可以是本申请实施例中的第一应用,上述第三方应用可以是本申请实施例中的第二应用。
下面结合具体应用场景对应用管理方法进行介绍,如图4所示:该方法应用于物联网设备安装的第一应用,包括以下步骤:
401、第一应用启动。
上述第一应用是物联网设备上的主应用程序,可以是上述图1和图3中的主应用,由物联网设备的所属方直接提供,内置设备所属方的签名系统。上述物联网设备可以是POS机器,该第一应用可以是收银系统,该POS机器归属于银行,该银行是上述设备所属方,该物联网设备通过下载第三方应用,可以拓展POS机器的功能,满足变化的用户需求。
402、第二应用是否存在。
上述第一应用获得该第二应用的状态信息,该状态信息包括不存在或者存在,用于该第一应用判断该第二应用是否已安装在上述物联网设备中,本申请实施例以该状态信息为不存在为例。该第二应用可以是上述POS机器中需要使用的第三方应用,以满足功能的拓展。在上述第二应用的状态信息为上述不存在的情况下,上述第一应用会输出信息,表示上述第二应用不存在。
403、驻网,下载上述第二应用。
上述第一应用连接数据网络,在网络连接状态为连接的情况下,向该第二应用对应的服务器发送数据请求信息,并接收该服务器返回的信息,上述信息基于HTTP报文的方式传输。上述第二应用的开发方,即第三方应用开发方,该第三方应用开发方在该第一应用下载上述第二应用之前,将上述第二应用的应用数据以与上述物联网设备的所属方约定的算法进行加密,并上传到上述服务器,该约定的算法可以是DES、TDES或者DSA等。
404、上述第二应用是否下载成功。
上述第一应用判断是否收到上述服务器返回的第一信息,若收到,则上述第二应用下载成功,执行步骤405,否则,上述第二应用下载失败,执行414,输出下载错误提示信息。在上述服务器发送至上述第一应用的信息中,存在着特殊字段,该特殊字段表示该信息的用途,上述第一应用可以根据该特殊字段判断该信息的具体用途。
405、解析数据包,获得成员变量。
上述第一应用解析收到的上述数据包的各个字段,从中获得信息包括密钥索引、密文、第一校验值、第二应用数据以及纵向冗余校验值等。
406、纵向冗余校验是否通过。
上述第一应用将上述数据包除该纵向冗余校验值外的字段进行纵向冗余校验,得到另外一个纵向冗余校验值,比较这两个纵向冗余校验值是否相等,相等则代表通过,在不相等的情况下,执行步骤414,输出下载错误提示信息。纵向冗余校验可以对上述密文传输的准确性和完整性进行校验。
408、校验是否通过。
上述密文可以是加密后的上述第二应用的编号,首先上述第一应用根据上述密钥索引,从上述物联网设备中内置的文件中根据索引与公钥的关系,获得对应的公钥,利用该公钥和TDES算法,对上述密文进行解密,获得上述第二应用的应用编号,再采用该应用编号作为密钥,对该应用编号一半长度位数的数值0进行双倍长密钥算法,即电子密码本(Electronic CodeBook,ECB)算法,取结果的前四位作为校验值,比较该校验值与解析得到的上述第一校验值是否相等,相等则表示上述第二应用的应用编号校验通过,否则,表示不通过,执行步骤414,输出错误提示信息,该应用编号可以在上述第一应用下载多个第三方应用的情况下,区分不同的第三方应用的数据;可选的,上述密文还可以是加密后的上述第二应用的数据标识,该数据标识可用于记录上述第二应用数据的接收情况,在上述第二应用数据接收不完整的情况下,重新向上述服务器发送获得应用数据的请求,可以避免上述第二应用数据漏发的情况,保证上述第二应用数据传输的完整性。
409、验签是否通过。
在上述纵向冗余校验通过和上述校验通过的情况下,对解析得到的上述第二应用数据进行验签,该第二应用数据包括应用数据的镜像文件以及对应的数字签名。上述第一应用利用上述公钥和与上述第二应用的开发方约定的算法对该数字签名进行解密,该约定的算法可以是DES、TDES或者DSA等,获得一个校验信息,再对该镜像文件用哈希算法进行计算,获得另外一个校验信息,比较前述两个校验信息是否相等,若相等,则通过验签,否则,上述第一应用执行步骤414,输出错误提示信息。
410、将第二应用数据写入存储器。
在上述第二应用数据验签通过后,上述第一应用获得上述第二应用在存储器中预设存储的起始地址,该预设存储的起始地址由上述设备所属方预先设定,从该起始地址开始写入存储器。
411、修改上述第二应用的状态信息。
在上述第一应用将上述第二应用写入存储器之后,修改该状态信息从不存在为存在。
412、上述第二应用下载成功。
上述第二应用已被安装在上述物联网设备中,处于可运行的状态。
413、结束。
上述第二应用的安装过程结束。
414、输出错误提示。
上述第一应用根据出现错误的步骤所在的位置,输出对应的错误信息。示例性的,在步骤409验签未通过的情况下,输出上述第二应用数据验签未通过的提示信息。
图4所示的方法可以由物联网设备来执行。
在本申请实施例中,物联网设备上的第一应用通过获得第二应用的状态信息,判断该第二应用在系统中的状态,与服务器建立网络连接后,向服务器发送合适的请求信息,在收到该服务器发送的包含该第二应用数据的消息之后,对该消息中的数据包的信息安全和传输的准确性进行验证,可以保证系统中上述第二应用的更新以及提高物联网设备上应用管理的独立性和安全性。
下面结合应用管理装置的结构来描述应用管理的过程。图5为本申请实施例提供的一种应用管理的装置的结构示意图。根据图5所示,该应用管理的装置应用于物联网设备安装的第一应用,包括:
接收单元501,用于接收服务器发送的第一信息,上述第一信息包括第一标识、第一明文和第一签名,上述第一明文包括第二应用数据;
获得单元502,用于根据标识与公钥的对应关系,确定与上述第一标识对应的第一公 钥;
计算单元503,用于利用上述第一公钥,对上述第一签名进行验签;
上述获得单元502,还用于获得验签结果;
写入单元504,用于在上述验签结果为通过的情况下,将上述第二应用数据写入存储器。
在第二方面的一种可能的实施方式中,上述获得单元502,具体用于获得第一校验信息、第二校验信息和验签结果;
上述计算单元503,具体用于采用第一函数对上述第一明文进行计算;
上述计算单元503,具体用于利用上述第一公钥对上述第一签名进行解密;
上述计算单元503,具体用于比较上述第一校验信息和上述第二校验信息;
在上述第一校验信息等于上述第二校验信息的情况下,上述验签结果为通过;
在上述第一校验信息不等于上述第二校验信息的情况下,上述验签结果为不通过。
在第二方面的一种可能的实施方式中,上述第一信息还包括:第一密文与第三校验信息,上述获得单元502,上述获得单元502,还用于获得第二明文、第四校验信息和校验结果;
上述计算单元503,还用于利用上述第一公钥对上述第一密文进行解密;
上述计算单元503,还用于利用第二函数对上述第二明文进行计算;
上述计算单元503,还用于比较上述第三校验信息和上述第四校验信息;
在上述第三校验信息和上述第四校验信息相等的情况下,上述校验结果为通过;
在上述第三校验信息和上述第四校验信息不相等的情况下,上述校验结果为不通过;
上述计算单元503,还用于在上述校验结果为通过的情况下,执行上述利用上述第一公钥,对上述第一签名进行验签步骤。
在第二方面的一种可能的实施方式中,上述获得单元502,具体用于获得第二应用在上述存储器中预设存储的起始地址;
上述写入单元504,具体用于将上述第二应用数据从上述起始地址写入上述存储器。
在第二方面的一种可能的实施方式中,
上述获得单元502,还用于在启动上述第一应用的情况下,获得上述第二应用的状态信息,上述状态信息包括不存在或者存在;
上述计算单元503,还用于在上述状态信息为上述不存在的情况下,判断网络连接状态,上述网络连接状态包括连接或者未连接;
上述装置还包括:
发送单元505,用于在上述网络连接状态为上述连接的情况下,向上述服务器发送请求信息,上述请求信息用于请求下载上述第二应用数据;
上述计算单元503,还用于在接收到上述服务器发送的上述第一信息的情况下,确定上述第二应用数据下载成功。
在第二方面的一种可能的实施方式中,
上述计算单元503,还用于检测上述第二应用的更新状态,上述更新状态包括待更新或者最新;
上述发送单元505,还用于在上述更新状态为上述待更新的情况下,向上述服务器发送更新请求信息,上述更新请求信息用于请求下载上述第二应用的更新数据;
上述接收单元501,还用于接收上述服务器发送的上述更新数据。
在第二方面的一种可能的实施方式中,
上述获得单元502,具体用于获得上述第二应用的第一版本信息;
上述发送单元505,具体用于向上述服务器发送版本请求信息,上述版本请求信息用 于上述第二应用的版本信息;
上述接收单元501,具体用于接收上述服务器发送的第二版本信息;
上述计算单元503,具体用于根据上述第一版本信息和上述第二版本信息,判断上述第二应用的上述更新状态。
图5所示的应用管理的装置可以是物联网设备的组成部分。
应理解以上分区装置中的各个单元的划分是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。例如,以上各个单元可以为单独设立的处理元件,也可以集成在物联网设备的某一个芯片中实现,此外,也可以以程序代码的形式存储于控制器的存储元件中,由处理器的某一个处理元件调用并执行以上各个单元的功能。此外各个单元可以集成在一起,也可以独立实现。这里的处理元件可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。该处理元件可以是通用处理器,例如中央处理器(英文:central processing unit,简称:CPU),还可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(英文:application-specific integrated circuit,简称:ASIC),或,一个或多个微处理器(英文:digital signal processor,简称:DSP),或,一个或者多个现场可编程门阵列(英文:field-programmable gate array,简称:FPGA)等。
图6为本申请实施例提供的一种电子设备的结构示意图。如图6所示,该电子设备600包括处理器601、存储器602以及通信接口603;该处理器601、存储器602以及通信接口603通过总线相互连接。
存储器602包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmableread only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CDROM),该存储器602用于相关指令及数据。通信接口603用于接收和发送数据,其可以实现图5中发送单元505、接收单元501以及获得单元502的功能。
处理器601可以是一个或多个中央处理器(central processing unit,CPU),在处理器601是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。具体的,处理器601可实现图5中计算单元503以及写入单元504的功能。
该电子设备600中的处理器601用于读取该存储器602中存储的程序代码,执行前述实施例中的应用管理方法。
电子设备600可以包括物联网设备。
在本申请的实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现:接收服务器发送的第一信息,该第一信息包括第一标识、第一明文和第一签名,该第一明文包括第二应用数据;根据标识与公钥的对应关系,确定与所述第一标识对应的第一公钥;利用上述第一公钥,对上述第一签名进行验签,获得验签结果;在上述验签结果为通过的情况下,将上述第二应用数据写入存储器。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/ 或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。

Claims (10)

  1. 一种应用管理方法,其特征在于,所述方法应用于物联网设备安装的第一应用,所述方法包括:
    接收服务器发送的第一信息,所述第一信息包括第一标识、第一明文和第一签名,所述第一明文包括第二应用数据;
    根据标识与公钥的对应关系,确定与所述第一标识对应的第一公钥;
    利用所述第一公钥,对所述第一签名进行验签,获得验签结果;
    在所述验签结果为通过的情况下,将所述第二应用数据写入存储器。
  2. 根据权利要求1所述的方法,其特征在于,在所述利用所述第一公钥,对所述第一签名进行验签,获得验签结果之前,所述方法还包括:
    采用第一函数对所述第一明文进行计算,获得第一校验信息;
    所述利用所述第一公钥,对所述第一签名进行验签,获得验签结果包括:
    利用所述第一公钥对所述第一签名进行解密,获得第二校验信息;
    比较所述第一校验信息和所述第二校验信息,获得所述验签结果;
    在所述第一校验信息等于所述第二校验信息的情况下,所述验签结果为通过;
    在所述第一校验信息不等于所述第二校验信息的情况下,所述验签结果为不通过。
  3. 根据权利要求1或者2所述的方法,其特征在于,所述第一信息还包括:第一密文与第三校验信息,在所述根据标识与公钥的对应关系,确定与所述第一标识对应的第一公钥之后,所述方法还包括:
    利用所述第一公钥对所述第一密文进行解密,获得第二明文;
    利用第二函数对所述第二明文进行计算,获得第四校验信息;
    比较所述第三校验信息和所述第四校验信息,获得校验结果;
    在所述第三校验信息和所述第四校验信息相等的情况下,所述校验结果为通过;
    在所述第三校验信息和所述第四校验信息不相等的情况下,所述校验结果为不通过;
    在所述校验结果为通过的情况下,执行所述利用所述第一公钥,对所述第一签名进行验签步骤。
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,所述将所述第二应用数据写入存储器包括:
    获得第二应用在所述存储器中预设存储的起始地址;
    将所述第二应用数据从所述起始地址写入所述存储器。
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,在所述接收服务器发送的第一信息之前,所述方法还包括:
    在启动所述第一应用的情况下,获得所述第二应用的状态信息,所述状态信息包括不存在或者存在;
    在所述状态信息为所述不存在的情况下,判断网络连接状态,所述网络连接状态包括连接或者未连接;
    在所述网络连接状态为所述连接的情况下,向所述服务器发送请求信息,所述请求信息用于请求下载所述第二应用数据;
    在接收到所述服务器发送的所述第一信息的情况下,确定所述第二应用数据下载成功。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    检测所述第二应用的更新状态,所述更新状态包括待更新或者最新;
    在所述更新状态为所述待更新的情况下,向所述服务器发送更新请求信息,所述更新请求信息用于请求下载所述第二应用的更新数据;
    接收所述服务器发送的所述更新数据。
  7. 根据权利要求6所述的方法,其特征在于,所述检测所述第二应用的更新状态包括:
    获得所述第二应用的第一版本信息;
    向所述服务器发送版本请求信息,所述版本请求信息用于所述第二应用的版本信息;
    接收所述服务器发送的第二版本信息;
    根据所述第一版本信息和所述第二版本信息,判断所述第二应用的所述更新状态。
  8. 一种应用管理装置,其特征在于,所述装置应用于物联网设备的第一应用,所述装置包括:
    接收单元,用于接收服务器发送的第一信息,所述第一信息包括第一标识、第一明文和第一签名,所述第一明文包括第二应用数据;
    获得单元,用于根据标识与公钥的对应关系,确定与所述第一标识对应的第一公钥;
    计算单元,用于利用所述第一公钥,对所述第一签名进行验签;
    所述获得单元,还用于获得验签结果;
    写入单元,用于在所述验签结果为通过的情况下,将所述第二应用数据写入存储器。
  9. 一种电子设备,其特征在于,包括:
    存储器,用于存储程序;
    处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如权利要求1至7任意一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1至7任意一项所述的方法。
PCT/CN2022/098415 2021-12-07 2022-06-13 应用管理方法及相关产品 WO2023103316A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111486000.3 2021-12-07
CN202111486000.3A CN114285581B (zh) 2021-12-07 2021-12-07 应用管理方法及相关产品

Publications (1)

Publication Number Publication Date
WO2023103316A1 true WO2023103316A1 (zh) 2023-06-15

Family

ID=80871269

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098415 WO2023103316A1 (zh) 2021-12-07 2022-06-13 应用管理方法及相关产品

Country Status (2)

Country Link
CN (1) CN114285581B (zh)
WO (1) WO2023103316A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285581B (zh) * 2021-12-07 2024-05-14 西安广和通无线通信有限公司 应用管理方法及相关产品

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685138A (zh) * 2012-08-30 2014-03-26 卓望数码技术(深圳)有限公司 移动互联网上的Android平台应用软件的认证方法和系统
JP2017175226A (ja) * 2016-03-18 2017-09-28 株式会社インテック 公開鍵証明書を発行するためのプログラム、方法およびシステム
CN110362357A (zh) * 2019-05-21 2019-10-22 深圳壹账通智能科技有限公司 一种应用程序的配置文件管理方法及装置
CN112911588A (zh) * 2021-02-04 2021-06-04 郑州信大捷安信息技术股份有限公司 一种轻量级的窄带物联网安全传输方法和系统
CN113239398A (zh) * 2021-05-11 2021-08-10 支付宝(杭州)信息技术有限公司 业务处理方法及装置
CN114285581A (zh) * 2021-12-07 2022-04-05 西安广和通无线通信有限公司 应用管理方法及相关产品

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209730B (zh) * 2015-04-30 2020-03-10 华为技术有限公司 一种管理应用标识的方法及装置
CN105095729B (zh) * 2015-06-19 2018-05-25 广州密码科技有限公司 一种二维码登录方法、服务器及系统
CN106612179A (zh) * 2015-10-21 2017-05-03 中兴通讯股份有限公司 管理方法及系统、终端、密钥管理系统及终端厂商系统
GB2547921B (en) * 2016-03-03 2019-05-29 F Secure Corp Authenticating or controlling software application on end user device
CN105871867B (zh) * 2016-04-27 2018-01-16 腾讯科技(深圳)有限公司 身份认证方法、系统及设备
CN108092947B (zh) * 2016-11-23 2020-12-04 腾讯科技(深圳)有限公司 一种对第三方应用进行身份鉴别的方法及装置
CN109660353A (zh) * 2018-12-12 2019-04-19 新华三技术有限公司 一种应用程序安装方法及装置
CN110414190B (zh) * 2019-07-30 2023-06-27 宇龙计算机通信科技(深圳)有限公司 应用安装包的签名方法、相关装置、存储介质及电子设备
CN110995410A (zh) * 2019-11-12 2020-04-10 杭州云萃流图网络科技有限公司 一种公钥和私钥的生成方法、装置、设备以及介质
CN111414640B (zh) * 2020-02-14 2022-07-22 华为技术有限公司 秘钥访问控制方法和装置
CN114896570A (zh) * 2020-05-27 2022-08-12 支付宝(杭州)信息技术有限公司 小程序应用的安装管理方法、设备及系统
CN111953705B (zh) * 2020-08-20 2022-08-23 全球能源互联网研究院有限公司 物联网身份认证方法、装置及电力物联网身份认证系统
CN112202772B (zh) * 2020-09-29 2021-06-29 北京海泰方圆科技股份有限公司 一种授权管理方法、装置、电子设备及介质
CN112887099B (zh) * 2021-01-11 2023-05-16 深圳市新国都支付技术有限公司 数据签名方法、电子设备及计算机可读存储介质
CN112733107B (zh) * 2021-04-02 2021-06-22 腾讯科技(深圳)有限公司 一种信息验证的方法、相关装置、设备以及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685138A (zh) * 2012-08-30 2014-03-26 卓望数码技术(深圳)有限公司 移动互联网上的Android平台应用软件的认证方法和系统
JP2017175226A (ja) * 2016-03-18 2017-09-28 株式会社インテック 公開鍵証明書を発行するためのプログラム、方法およびシステム
CN110362357A (zh) * 2019-05-21 2019-10-22 深圳壹账通智能科技有限公司 一种应用程序的配置文件管理方法及装置
CN112911588A (zh) * 2021-02-04 2021-06-04 郑州信大捷安信息技术股份有限公司 一种轻量级的窄带物联网安全传输方法和系统
CN113239398A (zh) * 2021-05-11 2021-08-10 支付宝(杭州)信息技术有限公司 业务处理方法及装置
CN114285581A (zh) * 2021-12-07 2022-04-05 西安广和通无线通信有限公司 应用管理方法及相关产品

Also Published As

Publication number Publication date
CN114285581A (zh) 2022-04-05
CN114285581B (zh) 2024-05-14

Similar Documents

Publication Publication Date Title
US11662991B2 (en) Vehicle-mounted device upgrade method and related device
JP6151402B2 (ja) データセンタへのプラットフォームの内包検証
WO2022126980A1 (zh) 一种数据传输方法、装置、终端及存储介质
JP3858527B2 (ja) データ生成装置およびデータ検証装置ならびにその方法
US6871276B1 (en) Controlled-content recoverable blinded certificates
US8127146B2 (en) Transparent trust validation of an unknown platform
US8572673B2 (en) Data processing apparatus and method
JP4501349B2 (ja) システムモジュール実行装置
JP4638912B2 (ja) ディストリビューションcdを使用した、署名されたグループにおけるダイレクトプルーフの秘密鍵を装置に伝達する方法
Blanchet et al. Automated formal analysis of a protocol for secure file sharing on untrusted storage
CN111131278B (zh) 数据处理方法及装置、计算机存储介质、电子设备
CN113610526A (zh) 一种数据信任方法、装置、电子设备及存储介质
JP2023533319A (ja) ファームウェアデータ検証装置及び方法、並びにファームウェア更新装置、方法、及びシステム
WO2023103316A1 (zh) 应用管理方法及相关产品
US8862893B2 (en) Techniques for performing symmetric cryptography
US20220014456A1 (en) Secure heartbeat monitoring
Liu et al. Video data integrity verification method based on full homomorphic encryption in cloud system
US20080080707A1 (en) RSA signature authentication with reduced computational burden
KR100897075B1 (ko) 배포 cd를 사용하는 장치에 서명 그룹의 다이렉트 증명개인 키들을 전달하는 방법
WO2023119421A1 (ja) 情報処理システム、情報処理方法、および、情報処理プログラム
CN117556476A (zh) 一种数据验证方法、装置、设备及介质
CN116915388A (zh) 信息传输方法、相关设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22902754

Country of ref document: EP

Kind code of ref document: A1