CN111211898A - Method for setting control authority of electronic equipment, electronic equipment and readable storage medium - Google Patents

Method for setting control authority of electronic equipment, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111211898A
CN111211898A CN201911425563.4A CN201911425563A CN111211898A CN 111211898 A CN111211898 A CN 111211898A CN 201911425563 A CN201911425563 A CN 201911425563A CN 111211898 A CN111211898 A CN 111211898A
Authority
CN
China
Prior art keywords
key
electronic device
setting
verification
authority
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.)
Granted
Application number
CN201911425563.4A
Other languages
Chinese (zh)
Other versions
CN111211898B (en
Inventor
白彬
胡明辉
王雪梅
姚艳红
尹光明
荆东华
李小康
徐增国
万光耀
邵文鹏
张宇
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201911425563.4A priority Critical patent/CN111211898B/en
Publication of CN111211898A publication Critical patent/CN111211898A/en
Application granted granted Critical
Publication of CN111211898B publication Critical patent/CN111211898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • 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/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The invention discloses a method for setting control authority of electronic equipment, which comprises the following steps: the electronic equipment acquires a verification key sent by the terminal equipment after receiving a verification instruction sent by the connected terminal equipment; determining a reference key matched with the verification key in prestored reference keys; and setting the authority level of the terminal equipment as the authority level corresponding to the reference key. The invention also discloses the electronic equipment and a computer readable storage medium, which achieve the effect of reducing the safety risk of the electronic equipment.

Description

Method for setting control authority of electronic equipment, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method for setting control permissions of an electronic device, and a computer-readable storage medium.
Background
The electronic equipment is composed of electronic components such as an integrated circuit, a transistor, an electron tube and the like, and plays a role by applying an electronic technology, while the electronic equipment of the scheme is electronic equipment with a control interface, and terminal equipment can read related data of the electronic equipment through the control interface and also can modify related programs stored in the electronic equipment, so that the electronic equipment has extremely high safety risk.
Disclosure of Invention
The present invention is directed to a method for setting control authority of an electronic device, an electronic device and a computer-readable storage medium, and aims to reduce security risk of the electronic device.
In order to achieve the above object, the present invention provides a method for setting control authority of an electronic device, including the following steps:
the electronic equipment acquires a verification key sent by the terminal equipment after receiving a verification instruction sent by the connected terminal equipment;
determining a reference key matched with the verification key in prestored reference keys;
and setting the authority level of the terminal equipment as the authority level corresponding to the reference key.
Optionally, after the electronic device receives a verification instruction sent by a connected terminal device, the step of obtaining a verification key sent by the terminal device includes:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, a locking identifier of the electronic device is obtained;
and when the locking identifier is a first preset identifier, acquiring a verification key sent by the terminal equipment.
Optionally, after the step of setting the permission level of the terminal device to the permission level corresponding to the reference key, the method further includes:
and when the permission setting time of the terminal equipment reaches the preset time, restoring the permission level corresponding to the terminal equipment to the permission level before the verification instruction is received.
Optionally, the reference key includes a public key and a private key, and the step of setting the authority level of the terminal device to the authority level corresponding to the reference key includes:
when the verification key is matched with the public key, the authority level of the terminal equipment is set to be a first authority level;
and when the verification key is matched with the private key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
Optionally, after the electronic device receives a verification instruction sent by a connected terminal device, the step of obtaining a verification key sent by the terminal device includes:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, version information of an operating system of the electronic device is obtained;
sending the version information to the terminal equipment so that the terminal equipment can send a verification key corresponding to the version information to the electronic equipment;
and receiving the verification key sent by the terminal equipment.
Optionally, the reference key includes a public key and a private key, and the step of setting the authority level of the terminal device to the authority level corresponding to the reference key includes:
when the verification secret key is matched with the public key, sending the equipment information of the electronic equipment to the terminal equipment so that the terminal equipment can send the verification secret key corresponding to the equipment information to the electronic equipment;
receiving the private key sent by the terminal equipment;
when the received private key is not matched with the private key in the reference private key, the authority level of the terminal equipment is set to be a first authority level;
and when the received private key is matched with a private key in the reference key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
Optionally, after the electronic device receives a verification instruction sent by a connected terminal device, before the step of obtaining a verification key sent by the terminal device, the method further includes:
after receiving a key generation instruction, the electronic equipment acquires a locking identifier of the electronic equipment;
when the locking identification is a second preset identification, obtaining a private key corresponding to the key generation instruction;
when the pre-stored public key is inconsistent with the private key, writing the private key into a storage unit;
and when the private key is successfully written, setting the locking identifier as a first preset identifier.
Optionally, the method for setting the control authority of the electronic device further includes:
when the pre-stored public key is consistent with the private key, generating error information;
and sending the error information to the terminal equipment so that the terminal equipment can regenerate a key generation instruction, and sending the key generation instruction to the electronic equipment.
In addition, to achieve the above object, the present invention also provides an electronic device, including: the device comprises a memory, a processor and a setting program of the control authority of the electronic equipment, wherein the setting program of the control authority of the electronic equipment is stored on the memory and can run on the processor, and when being executed by the processor, the setting program of the control authority of the electronic equipment realizes the setting method of the control authority of the electronic equipment.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a setting program of the control authority of the electronic device is stored, and the setting program of the control authority of the electronic device, when executed by a processor, implements the steps of the setting method of the control authority of the electronic device as described above.
According to the setting method of the control authority of the electronic equipment, the electronic equipment and the computer readable storage medium provided by the embodiment of the invention, after the electronic equipment receives the verification instruction sent by the connected terminal equipment, the verification key sent by the terminal equipment is obtained, then the reference key matched with the verification key in the prestored reference keys is determined, and finally the authority level of the terminal equipment is set to be the authority level corresponding to the reference key. According to the scheme, the levels of different control authorities are set, the control authorities of corresponding levels can be obtained only when the key matching is successful, the hierarchical control over the electronic equipment is realized, the service for modifying program defects is provided, and the effect of reducing the safety risk of the electronic equipment is achieved.
Drawings
FIG. 1 is a schematic diagram of an electronic device hardware architecture according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a method for setting control permissions of an electronic device according to the present invention;
fig. 3 is a flowchart illustrating a method for setting control permissions of an electronic device according to another embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Since the existing electronic device is sold, the electronic device supplier completely closes the control interface of the electronic device. Since the control interface of the electronic device is completely closed, when the electronic device is found to have a program problem, the electronic device supplier cannot acquire the control authority of the electronic device through the control interface, so that the defect in the program cannot be modified; however, if the control interface of the electronic device is not completely closed by the electronic device provider, anyone can acquire the control authority of the electronic device through the control interface of the electronic device, and the related programs of the electronic device are easily maliciously modified and maliciously utilized, so that the electronic device has a very high security risk.
In order to solve the foregoing drawbacks, an embodiment of the present invention provides a method for setting a control authority of an electronic device, and a computer-readable storage medium, where the method for setting the control authority of the electronic device mainly includes the following steps:
the electronic equipment acquires a verification key sent by the terminal equipment after receiving a verification instruction sent by the connected terminal equipment;
determining a reference key matched with the verification key in prestored reference keys;
and setting the authority level of the terminal equipment as the authority level corresponding to the reference key.
According to the scheme, the levels of different control authorities are set, so that the control authorities of corresponding levels can be obtained only when the key matching is successful, the hierarchical control over the electronic equipment is realized, the service for modifying program defects is provided, and the effect of reducing the safety risk of the electronic equipment is achieved.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present invention.
The electronic equipment of the embodiment of the invention can be electronic equipment such as a charging box of a Bluetooth headset.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a CPU, a control interface 1003, a memory 1004, and a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The control interface 1003 may include a USB (Universal Serial Bus) interface, and the like, and the optional control interface 1003 may also include a standard wired interface and a wireless interface. The memory 1004 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 1004 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the hardware architecture of the electronic device shown in fig. 1 does not constitute a limitation of the electronic device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, the memory 1004, which is a kind of computer storage medium, may include therein an operating system, a control interface module, and a setting program of control authority of the electronic device.
In the terminal shown in fig. 1, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and perform the following operations:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, a locking identifier of the electronic device is obtained;
and when the locking identifier is a first preset identifier, acquiring a verification key sent by the terminal equipment.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
and when the permission setting time of the terminal equipment reaches the preset time, restoring the permission level corresponding to the terminal equipment to the permission level before the verification instruction is received.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
when the verification key is matched with the public key, the authority level of the terminal equipment is set to be a first authority level;
and when the verification key is matched with the private key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, version information of an operating system of the electronic device is obtained;
sending the version information to the terminal equipment so that the terminal equipment can send a verification key corresponding to the version information to the electronic equipment;
and receiving the verification key sent by the terminal equipment.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
when the verification secret key is matched with the public key, sending the equipment information of the electronic equipment to the terminal equipment so that the terminal equipment can send the verification secret key corresponding to the equipment information to the electronic equipment;
receiving the private key sent by the terminal equipment;
when the received private key is not matched with the private key in the reference private key, the authority level of the terminal equipment is set to be a first authority level;
and when the received private key is matched with a private key in the reference key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
after receiving a key generation instruction, the electronic equipment acquires a locking identifier of the electronic equipment;
when the locking identification is a second preset identification, obtaining a private key corresponding to the key generation instruction;
when the pre-stored public key is inconsistent with the private key, writing the private key into a storage unit;
and when the private key is successfully written, setting the locking identifier as a first preset identifier.
Further, the processor 1001 may be configured to call a setting program of the electronic device control authority stored in the memory 1004, and further perform the following operations:
when the pre-stored public key is consistent with the private key, generating error information;
and sending the error information to the terminal equipment so that the terminal equipment can regenerate a key generation instruction, and sending the key generation instruction to the electronic equipment.
Referring to fig. 2, in an embodiment of the method for setting the control authority of the electronic device, the method for setting the control authority of the electronic device includes the following steps:
step S10, after the electronic equipment receives a verification instruction sent by the connected terminal equipment, the electronic equipment obtains a verification key sent by the terminal equipment;
step S20, determining a reference key matched with the verification key in the prestored reference keys;
and step S30, setting the authority level of the terminal equipment as the authority level corresponding to the reference key.
In this embodiment, the terminal device is a terminal device connected to an electronic device through a control interface, where the terminal device may be a PC, a smart phone, or the like; the control interface can receive information sent by the terminal equipment and can also send the information to the terminal equipment; the verification instruction is a control instruction used for starting a verification process of the terminal equipment authority level and is generated by the terminal equipment; the verification key is a parameter used for verifying the authority level of the terminal equipment; the reference key is a key stored in a memory of the electronic device, and may be stored in the form of a hash value of the key, where the reference key may include a public key and a private key; the permission level to which the reference key belongs may include a first permission level and a second permission level, or may be an initial permission level of the terminal device before receiving the verification instruction; the first permission level can receive and execute a reading instruction sent by the terminal equipment; the second permission level can receive and execute a read-write instruction sent by the terminal equipment, wherein the second permission level is higher than the first permission level; the initial permission level may receive and execute a verification instruction, a get version information instruction of an operating system, and a get lock identification instruction, where the first permission level is higher than the initial permission level.
And the processor receives a verification instruction sent by the terminal equipment and starts a setting flow of the control authority of the electronic equipment according to the verification instruction. The processor receives the verification key sent by the terminal equipment, then reads the reference key stored in the memory, matches the verification key with the pre-stored reference key, and acquires the authority level corresponding to the reference key when the verification key is successfully matched with the pre-stored reference key.
Specifically, when the verification key is matched with a pre-stored reference key, whether the parameters of the verification key and the parameters of the public key are completely consistent or not can be judged, and when the parameters of the verification key and the parameters of the public key are completely consistent, the verification key and the public key are successfully matched, and the authority level of the reference key is a first authority level; when the parameters of the verification key and the public key are not consistent, judging whether the parameters of the verification key and the private key are completely consistent, and when the parameters of the verification key and the private key are completely consistent, judging that the verification key and the private key are successfully matched, and setting the authority level of the reference key as a second authority level; and when the parameters of the verification key are inconsistent with the parameters of the private key, judging that the verification key is failed to be matched with the prestored reference key, and ending the setting process of the control authority of the electronic equipment.
Specifically, in this embodiment, when the verification key is matched with the pre-stored reference key, it may be further determined whether the parameters of the verification key and the private key are completely consistent, and then determined whether the parameters of the verification key and the public key are completely consistent. The judging process does not influence the matching result of the verification key and the pre-stored reference key.
Optionally, when the reference key stored in the memory is stored as the hash value of the key, the hash value of the verification key is calculated first, and then the hash value of the verification key is matched with the hash value of the reference key.
And after acquiring the authority level corresponding to the reference key, the processor sets the authority level of the terminal equipment as the authority level corresponding to the reference key.
Specifically, when the authority level corresponding to the reference key is a first authority level, the authority level of the terminal device is set to be the first authority level; and when the authority level corresponding to the reference key is the second authority level, setting the authority level of the terminal equipment to be the second authority level.
In the technical scheme disclosed in this embodiment, when the control interface of the electronic device is not closed, the control authority of the corresponding level can be obtained only when the key matching is successful by setting the levels of different control authorities, so as to implement hierarchical control on the electronic device, thereby providing a service for modifying program defects and achieving the effect of reducing the security risk of the electronic device.
Optionally, in this embodiment, since the electronic device may not perform the authority control, the memory may not have a pre-stored reference key, and therefore, after receiving the verification instruction sent by the connected terminal device, it may be determined whether the electronic device is in a locked state, that is, whether the electronic device performs the authority control.
And after receiving a verification instruction sent by the connected terminal equipment, the processor reads the locking identifier of the electronic equipment stored in the storage unit. And judging whether the read locking identification is a first preset identification, receiving the verification key sent by the terminal equipment when the read locking identification is the first preset identification, and executing a setting process of the control authority of the electronic equipment. The first preset identification is an identification of the electronic equipment in a locked state.
Illustratively, the locking flag may be a value stored on a locking flag bit of the storage unit, and the first preset flag may be a flag number with a value of 1 on the locking flag bit; the numerical value of the identification number is not limited to a specific numerical value. After reading the locking identification number on the locking identification position, the processor judges whether the locking identification number is equal to 1, and when the locking identification number is equal to 1, the processor judges that the read locking identification is a first preset identification; and when the number of the locking identifications is not equal to 1, judging that the read locking identification is not the first preset identification.
In the technical scheme disclosed in this embodiment, by determining whether the electronic device is in the locked state and then performing the verification process, a program error caused by the fact that a pre-stored reference key cannot be obtained is avoided, and the effect of reducing the number of times of the program error is achieved.
Optionally, in this embodiment, since the security of the electronic device needs to be ensured, the permission opening time may be controlled, and therefore, after the terminal device obtains the permission corresponding to the verification key, the terminal device needs to withdraw the control permission of the terminal device after a preset time period is reached. The preset duration is the duration of the control authority which can be owned by the terminal equipment, and is set by an electronic equipment supplier and stored in a memory of the electronic equipment.
And after the processor sets the authority level corresponding to the terminal equipment, starting a corresponding timer to acquire the authority setting duration. And the processor acquires the permission setting time recorded by the timer in real time, judges whether the permission setting time is greater than a preset time, and restores the permission level corresponding to the terminal equipment to the permission level before the verification instruction is received, namely the initial permission level, when the permission setting time is equal to the preset time.
In the technical scheme disclosed in this embodiment, the effect of improving the security of the electronic device is achieved by controlling the control authority duration of the terminal device.
Alternatively, in this embodiment, since the terminal device may not possess the authentication key, the authentication key corresponding to the electronic device stored in the server of the electronic device provider may be acquired.
The processor receives a verification instruction sent by a connected terminal device, and then receives an instruction sent by the terminal device for acquiring version information of an operating system of the electronic device, wherein the version information of the operating system can be a version number of the operating system, and different versions of the operating system correspond to different verification keys. The processor reads the version information of the operating system stored in the memory and transmits the version information to the terminal device. After receiving the version information, the terminal device may send the version information to a server of an electronic device provider to obtain a verification key corresponding to the version information, and then send the obtained verification key to the electronic device. The processor performs the step of matching the authentication key with the pre-stored reference key as described in the above embodiments after receiving the authentication key.
In the technical solution disclosed in this embodiment, the effect of obtaining the verification key is achieved by obtaining the verification key stored in the server of the electronic device provider.
Optionally, in this embodiment, since the authority level of the key corresponding to the version information is the first authority level, in order to acquire the second authority level, the terminal device may further acquire an authentication key of the second authority level corresponding to the electronic device, which is stored in the server of the electronic device provider. The key with the authority level being the first authority level can be a public key of the electronic equipment and corresponds to version information of an operating system of the electronic equipment; the key with the second authority level may be a private key of the electronic device, and corresponds to the device information of the electronic device one to one. The device information may be a device serial number of the electronic device, which is a unique identification of the electronic device.
The processor may receive a device information acquisition instruction of the electronic device sent by the terminal device when it is determined that the acquired authentication key matches the public key stored in the memory, then read the device information stored in the memory, and send the device information to the terminal device. After receiving the device information, the terminal device may send the device information to a server of an electronic device provider to obtain a verification key corresponding to the device information, and then send the obtained verification key to the electronic device. After receiving the verification key, that is, after receiving the private key, the processor performs the step of matching the verification key with the pre-stored reference key as described in the above embodiments.
And when judging that the received private key is not matched with the private key of the pre-stored reference key, the processor sets the authority level of the terminal equipment to be a first authority level. And the processor sets the authority level of the terminal equipment to be a second authority level when judging that the received private key is matched with the private key of the pre-stored reference key.
In the technical solution disclosed in this embodiment, the effect of obtaining the second permission level is achieved by obtaining the verification key corresponding to the device information again.
Optionally, referring to fig. 3, based on the foregoing embodiment, in another embodiment, the method for setting the control authority of the electronic device further includes the following steps:
step S40, after the electronic equipment receives the key generation instruction, acquiring a locking identifier of the electronic equipment;
step S50, when the locking identification is a second preset identification, obtaining a private key corresponding to the key generation instruction;
step S60, when the pre-stored public key is inconsistent with the private key, writing the private key into a storage unit;
and step S70, when the private key is successfully written, setting the locking identification as a first preset identification.
In this embodiment, the key generation instruction is a control instruction for generating a private key in a reference key of an electronic device; the second preset identifier is an identifier that the electronic device is not in a locked state, and the second preset identifier may be an identifier number with a numerical value of 0 on the locking identifier position; the numerical value of the identification number is not limited to a specific numerical value; the storage unit is a storage device for storing a private key and a locking identifier of the electronic device, and may be a storage device such as a Flash Memory.
And after receiving a key generation instruction sent by the terminal equipment, the processor reads the locking identifier of the electronic equipment stored in the storage unit and judges whether the locking identifier is a second preset identifier.
Illustratively, the processor determines whether the locking identification number is equal to 0 after reading the locking identification number on the locking identification bit, and determines that the read locking identification is a second preset identification when the locking identification number is equal to 0; and when the number of the locking identifications is not equal to 0, judging that the read locking identification is not the second preset identification.
And after judging that the locking identifier is the second preset identifier, the processor executes the key generation instruction, acquires a private key corresponding to the key generation instruction, reads the public key of the electronic equipment stored in the memory, judges whether the pre-stored public key is consistent with the generated private key or not, and writes the generated private key into the storage unit when the pre-stored public key is inconsistent with the generated private key. The processor reads the private key written in the storage unit, judges whether the generated private key is completely consistent with the read private key or not, judges that the private key is successfully written when the generated private key is completely consistent with the read private key, and sets the locking identifier in the storage unit as a first preset identifier.
Optionally, when the storage format of the reference key is the hash value of the reference key, the processor calculates the hash value of the private key after obtaining the private key corresponding to the key generation instruction, reads the hash value of the public key of the electronic device stored in the memory, and determines whether the pre-stored public key hash value is completely consistent with the generated private key hash value, and writes the private key hash value into the storage unit when the pre-stored public key hash value is not consistent with the generated private key hash value. The processor reads the private key hash value written in the storage unit, judges whether the generated private key hash value is completely consistent with the read private key hash value or not, judges that the private key is successfully written when the generated private key hash value is completely consistent with the read private key hash value, and sets the locking identifier in the storage unit as a first preset identifier.
In the technical scheme disclosed in this embodiment, the effect of improving the security of the electronic device is achieved by generating the private key of the electronic device, then storing the private key in the storage unit, and then performing authority control on the electronic device.
Optionally, in this embodiment, since the pre-stored public key may be consistent with the generated private key, when the pre-stored public key may be consistent with the generated private key, the processor generates error information and sends the error information to the terminal device connected to the electronic device.
Alternatively, since the generated private key hash value may not coincide with the read private key hash value, when the generated private key hash value does not coincide with the read private key hash value, the processor generates error information and transmits the error information to the terminal device connected to the electronic device.
After receiving the error information, the terminal device may regenerate the key generation instruction and send the key generation instruction to the electronic device.
In the technical scheme disclosed in this embodiment, when the generated private key is wrong or the writing of the private key fails, the processor may generate error information and send the error information to the terminal device, thereby achieving the effect of regenerating the private key.
In addition, an embodiment of the present invention further provides an electronic device, where the electronic device includes a memory, a processor, and a setting program of electronic device control authority that is stored in the memory and is executable on the processor, and when the setting program of electronic device control authority is executed by the processor, the steps of the setting method of electronic device control authority according to the above embodiments are implemented.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a setting program of the control authority of the electronic device is stored on the computer-readable storage medium, and when the setting program of the control authority of the electronic device is executed by a processor, the steps of the setting method of the control authority of the electronic device according to the above embodiments are implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for causing an electronic device (e.g. a charging box of a bluetooth headset, etc.) to perform the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for setting control authority of electronic equipment is applied to the electronic equipment, and is characterized in that the method for setting the control authority of the electronic equipment comprises the following steps:
the electronic equipment acquires a verification key sent by the terminal equipment after receiving a verification instruction sent by the connected terminal equipment;
determining a reference key matched with the verification key in prestored reference keys;
and setting the authority level of the terminal equipment as the authority level corresponding to the reference key.
2. The method for setting the control authority of the electronic device according to claim 1, wherein the step of obtaining the verification key sent by the terminal device after the electronic device receives the verification instruction sent by the connected terminal device comprises:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, a locking identifier of the electronic device is obtained;
and when the locking identifier is a first preset identifier, acquiring a verification key sent by the terminal equipment.
3. The method for setting the control authority of the electronic device according to claim 1, wherein after the step of setting the authority level of the terminal device to the authority level corresponding to the reference key, the method further comprises:
and when the permission setting time of the terminal equipment reaches the preset time, restoring the permission level corresponding to the terminal equipment to the permission level before the verification instruction is received.
4. The method for setting the control authority of the electronic device according to claim 1, wherein the reference key includes a public key and a private key, and the step of setting the authority level of the terminal device to the authority level corresponding to the reference key includes:
when the verification key is matched with the public key, the authority level of the terminal equipment is set to be a first authority level;
and when the verification key is matched with the private key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
5. The method for setting the control authority of the electronic device according to claim 1, wherein the step of obtaining the verification key sent by the terminal device after the electronic device receives the verification instruction sent by the connected terminal device comprises:
the method comprises the steps that after an electronic device receives a verification instruction sent by a connected terminal device, version information of an operating system of the electronic device is obtained;
sending the version information to the terminal equipment so that the terminal equipment can send a verification key corresponding to the version information to the electronic equipment;
and receiving the verification key sent by the terminal equipment.
6. The method for setting the control authority of the electronic device according to claim 5, wherein the reference key includes a public key and a private key, and the step of setting the authority level of the terminal device to the authority level corresponding to the reference key includes:
when the verification secret key is matched with the public key, sending the equipment information of the electronic equipment to the terminal equipment so that the terminal equipment can send the verification secret key corresponding to the equipment information to the electronic equipment;
receiving the private key sent by the terminal equipment;
when the received private key is not matched with the private key in the reference private key, the authority level of the terminal equipment is set to be a first authority level;
and when the received private key is matched with a private key in the reference key, setting the authority level of the terminal equipment to be a second authority level, wherein the second authority level is higher than the first authority level.
7. The method for setting the control authority of the electronic device according to claim 2, wherein after the electronic device receives the verification instruction sent by the connected terminal device, and before the step of obtaining the verification key sent by the terminal device, the method further comprises:
after receiving a key generation instruction, the electronic equipment acquires a locking identifier of the electronic equipment;
when the locking identification is a second preset identification, obtaining a private key corresponding to the key generation instruction;
when the pre-stored public key is inconsistent with the private key, writing the private key into a storage unit;
and when the private key is successfully written, setting the locking identifier as a first preset identifier.
8. The method for setting the control authority of the electronic device according to claim 7, wherein the method for setting the control authority of the electronic device further comprises:
when the pre-stored public key is consistent with the private key, generating error information;
and sending the error information to the terminal equipment so that the terminal equipment can regenerate a key generation instruction, and sending the key generation instruction to the electronic equipment.
9. An electronic device, characterized in that the electronic device comprises: a memory, a processor and a setting program of electronic device control authority stored on the memory and operable on the processor, the setting program of electronic device control authority implementing the steps of the setting method of electronic device control authority according to any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a setting program of electronic device control authority, which when executed by a processor implements the steps of the setting method of electronic device control authority according to any one of claims 1 to 8.
CN201911425563.4A 2019-12-31 2019-12-31 Method for setting control authority of electronic equipment, electronic equipment and readable storage medium Active CN111211898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911425563.4A CN111211898B (en) 2019-12-31 2019-12-31 Method for setting control authority of electronic equipment, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911425563.4A CN111211898B (en) 2019-12-31 2019-12-31 Method for setting control authority of electronic equipment, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111211898A true CN111211898A (en) 2020-05-29
CN111211898B CN111211898B (en) 2022-08-19

Family

ID=70788606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911425563.4A Active CN111211898B (en) 2019-12-31 2019-12-31 Method for setting control authority of electronic equipment, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111211898B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329000A (en) * 2020-07-22 2021-02-05 深圳Tcl新技术有限公司 Device verification method, master control device, controlled device and readable storage medium
CN113572756A (en) * 2021-07-21 2021-10-29 山东华芯半导体有限公司 Data security transmission device and method using secret key encryption

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04367956A (en) * 1991-06-14 1992-12-21 Nippon Steel Corp Electronic apparatus and releasing method for password lock of electronic apparatus
CN105282155A (en) * 2015-09-30 2016-01-27 努比亚技术有限公司 Authority control method, device and system for interaction among terminals
CN107205094A (en) * 2017-06-29 2017-09-26 珠海格力电器股份有限公司 Control method and device, electronic equipment, the terminal of equipment
CN110287725A (en) * 2019-06-04 2019-09-27 大唐微电子技术有限公司 A kind of equipment and its authority control method, computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04367956A (en) * 1991-06-14 1992-12-21 Nippon Steel Corp Electronic apparatus and releasing method for password lock of electronic apparatus
CN105282155A (en) * 2015-09-30 2016-01-27 努比亚技术有限公司 Authority control method, device and system for interaction among terminals
CN107205094A (en) * 2017-06-29 2017-09-26 珠海格力电器股份有限公司 Control method and device, electronic equipment, the terminal of equipment
CN110287725A (en) * 2019-06-04 2019-09-27 大唐微电子技术有限公司 A kind of equipment and its authority control method, computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329000A (en) * 2020-07-22 2021-02-05 深圳Tcl新技术有限公司 Device verification method, master control device, controlled device and readable storage medium
CN113572756A (en) * 2021-07-21 2021-10-29 山东华芯半导体有限公司 Data security transmission device and method using secret key encryption

Also Published As

Publication number Publication date
CN111211898B (en) 2022-08-19

Similar Documents

Publication Publication Date Title
US9870463B2 (en) Permission management method, apparatus, and terminal
CN110111472B (en) Vehicle key control method and device
CN107430658B (en) Security software certification and verifying
CN107733847B (en) Method and device for platform login website, computer equipment and readable storage medium
CN107743115B (en) Identity authentication method, device and system for terminal application
US8392724B2 (en) Information terminal, security device, data protection method, and data protection program
CN103974250A (en) Configuration method and equipment
CN111211898B (en) Method for setting control authority of electronic equipment, electronic equipment and readable storage medium
CN103744686A (en) Control method and system for installing application in intelligent terminal
CN111538517A (en) Server firmware upgrading method and system, electronic equipment and storage medium
CN108229144B (en) Verification method of application program, terminal equipment and storage medium
CN107124279B (en) Method and device for erasing terminal data
CN112398824B (en) Authority verification method, storage medium and electronic equipment
CN113645590A (en) Method, apparatus, device and medium for remotely controlling vehicle based on encryption algorithm
JP2009253783A (en) Mobile terminal, data protection method and program for data protection
CN111931254A (en) Hybrid identification method for unique identification of Android device
US9210134B2 (en) Cryptographic processing method and system using a sensitive data item
CN114861158A (en) Security authentication method, device, system, electronic equipment and storage medium
CN111523124B (en) Cloud sound box firmware protection method and system
CN110781478A (en) Method and device for realizing debugging by temporarily authorizing Root
CN108241798B (en) Method, device and system for preventing machine refreshing
CN106576239B (en) Method and device for managing content in security unit
CN111788458A (en) Vehicle-mounted function access control system, vehicle-mounted device and vehicle-mounted function access control method
CN112241633B (en) Bidirectional authentication implementation method and system for non-contact smart card
CN112585608A (en) Embedded equipment, legality identification method, controller and encryption chip

Legal Events

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