CN113158172B - Chip-based password acquisition method, device, equipment and storage medium - Google Patents

Chip-based password acquisition method, device, equipment and storage medium Download PDF

Info

Publication number
CN113158172B
CN113158172B CN202110218566.1A CN202110218566A CN113158172B CN 113158172 B CN113158172 B CN 113158172B CN 202110218566 A CN202110218566 A CN 202110218566A CN 113158172 B CN113158172 B CN 113158172B
Authority
CN
China
Prior art keywords
password
chip
information segment
target
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110218566.1A
Other languages
Chinese (zh)
Other versions
CN113158172A (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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110218566.1A priority Critical patent/CN113158172B/en
Publication of CN113158172A publication Critical patent/CN113158172A/en
Application granted granted Critical
Publication of CN113158172B publication Critical patent/CN113158172B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of 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/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits

Abstract

The invention discloses a chip-based password acquisition method, a chip-based password acquisition device, equipment and a storage medium; in the scheme, at least two passwords are stored in the chip, so that the passwords are backed up, and if the passwords are not safe, other backup passwords stored in the chip can be used; in addition, when the password is acquired, the password use state is judged, so that the scheme can be ensured not to acquire unsafe invalid passwords, and the scheme enables a plurality of passwords to be arranged in the chip as backup passwords.

Description

Chip-based password acquisition method, device, equipment and storage medium
Technical Field
The present invention relates to the technical field of password acquisition, and more particularly, to a method, an apparatus, a device, and a storage medium for acquiring a password based on a chip.
Background
At present, in the password storage of integrated circuit design, because only one password is set in a chip, if the password is leaked or unsafe, and because the password in the chip can not be modified, the chip needs to be replaced, thereby increasing the frequency of replacing the chip and greatly reducing the benefit.
Therefore, how to reduce the replacement frequency of the chip is a problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a chip-based password acquisition method, a chip-based password acquisition device, equipment and a storage medium, so as to reduce the possibility of chip replacement due to password leakage and reduce the replacement frequency of chips.
In order to achieve the above object, the present invention provides a method for obtaining a password based on a chip, where at least two passwords are stored in a one-time programmable memory of the chip, and the method for obtaining a password comprises:
acquiring target password selection information;
determining the use state of each password from the one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
if the target password is in a valid state, acquiring the target password from the one-time programmable memory; and if the target password is in an invalid state, judging that the target password is an invalid password.
Wherein, the obtaining of the target password selection information includes:
acquiring a password selection information segment from a program memory of the chip; and the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password.
Wherein determining the use state of each password from the one-time programmable memory of the chip comprises:
determining a usage information segment from the one-time programmable memory; the position identification of the use information segment corresponds to the position identification of the password selection information segment, and the position identification of the use information segment and the password have a one-to-one correspondence relationship;
if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, the password corresponding to the current bit is in an invalid state.
If the target password is in a valid state, acquiring the target password from the one-time programmable memory; if the target password is in an invalid state, determining that the target password is an invalid password, including:
determining a first position identifier of the highest position with the value of 1 from the password selection information segment;
determining a second position identification of the highest position with the value of 1 from the use information segment;
calculating a difference between the first location identity and the second location identity;
if the difference value is 0 or 1, acquiring the target password from the one-time programmable memory; and if the difference is other values, judging that the target password is an invalid password.
If the difference is 1, after the target password is obtained from the one-time programmable memory, the method further includes:
setting a value corresponding to the first location identity in the usage information segment to 1.
In order to achieve the above object, the present invention further provides a chip-based password obtaining apparatus, where at least two passwords are stored in a one-time programmable memory of the chip, and the password obtaining apparatus includes:
the first acquisition module is used for acquiring target password selection information;
the determining module is used for determining the use state of each password from the one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
the second acquisition module is used for acquiring the target password from the one-time programmable memory when the target password is in a valid state; and if the target password is in an invalid state, judging that the target password is an invalid password.
The first obtaining module is specifically configured to: acquiring a password selection information segment from a program memory of the chip; and the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password.
Wherein the determining module is specifically configured to: determining a usage information segment from the one-time programmable memory; the position identification of the use information segment corresponds to the position identification of the password selection information segment, and the position identification of the use information segment and the password have a one-to-one correspondence relationship;
if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, the password corresponding to the current bit is in an invalid state.
To achieve the above object, the present invention further provides an electronic device comprising:
a memory for storing a computer program; and the processor is used for realizing the steps of the chip-based password acquisition method when executing the computer program.
To achieve the above object, the present invention further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the above chip-based password obtaining method.
According to the scheme, the password acquisition method based on the chip provided by the embodiment of the invention has the advantages that at least two passwords are stored in the one-time programmable memory of the chip, and the password acquisition method comprises the following steps: acquiring target password selection information; determining the use state of each password from the one-time programmable memory of the chip; if the target password is in a valid state, acquiring the target password from the one-time programmable memory; if the target password is in an invalid state, the target password is judged to be an invalid password.
Therefore, in the scheme, at least two passwords are stored in the chip, so that the passwords are backed up, and if the passwords are not safe, other backup passwords stored in the chip can be used; in addition, when the password is acquired, the password use state is judged, so that the scheme can be ensured not to acquire unsafe invalid passwords, and the scheme enables a plurality of passwords to be arranged in the chip as backup passwords. The invention also discloses a chip-based password acquisition device, equipment and a storage medium, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a chip-based password obtaining method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating another chip-based password obtaining method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a chip-based password obtaining apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic product according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a chip-based password acquisition method, a chip-based password acquisition device, chip-based password acquisition equipment and a storage medium, which are used for reducing the possibility of chip replacement due to password leakage and reducing the replacement frequency of chips.
Referring to fig. 1, in an embodiment of the present invention, a chip-based password obtaining method is provided, where at least two passwords are stored in a one-time programmable memory of a chip, and the password obtaining method includes:
s101, acquiring target password selection information;
in this embodiment, the One-Time Programmable Memory of the chip is an OTP ROM (One Time Programmable Read-Only Memory), the content in the One-Time Programmable Memory can Only be programmed once, at least two passwords are stored in the OTP ROM in advance, when One password is used, the other passwords serve as backup passwords of the password, in this embodiment, 8 passwords are stored in the chip as an example for description, but the number of the passwords is not limited thereto. After the chip is powered on and started, the corresponding password is read from the one-time programmable memory through the scheme, and when the password is read, a user firstly needs to send out target password selection information, such as: the chip stores 8 passwords, and if the target password selected by the user is the 4 th password, the target password selection information is the selection information for selecting the 4 th password.
Specifically, the process of acquiring the target password selection information in the scheme comprises the following steps: acquiring a password selection information segment from a program memory of the chip; the highest position mark with the value of 1 in the password selection information segment represents the mark of the selected target password.
The program memory of the chip is a flash memory of the chip, information for selecting a target password by a user is stored in the flash, the information can be specifically a password selection information segment stored in the flash, the number of bits of the password selection information segment is the same as the number of passwords stored in the chip, and the position identifier of the highest position with the value of 1 in the password selection information segment represents the identifier of the selected target password, for example: 8 passwords are stored in the chip, the password selection information segment is 8 bits, and if the password selection information segment is 00000001, the position mark of the highest bit with the value of 1 in the password selection information segment is 1, the target password selected by the user is the 1 st password; if the password selection information segment is 00001111 and the position identifier of the highest position with the value of 1 in the password selection information segment is 4, the target password selected by the user is the 4 th password, and similarly, if the password selection information segment is 00001011/00001001/00001000, the 4 th target password is also selected by the user because the position identifier of the highest position with the value of 1 is still 4. By the method, the user can select the password simply and definitely by programming the password selection information segment.
S102, determining the use state of each password from a one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
it should be noted that, because the chip in this scheme stores a plurality of passwords, in the using process, if a certain password is leaked or is no longer safe, the password will be discarded and cannot be reused, so in this scheme, in order to ensure that the discarded password cannot be reused, a use state is set for each password, and the use state can be an invalid state and a valid state, and the use state is set in the one-time programmable memory of the chip, thereby ensuring the safety of the use state.
When the scheme determines the use state of each password, the use information segment is determined from the one-time programmable memory; the position mark of the use information segment corresponds to the position mark of the password selection information segment, and the position mark of the use information segment and the password have one-to-one correspondence.
Specifically, in this scheme, in order to simply and clearly indicate the use state of each password, a use information segment is set in the otp memory, and each bit in the use information segment is used to indicate the use state of each password, so the number of bits of the use information segment is the same as the number of passwords, and similarly, the use information segment corresponds to a password selection information segment, such as: the first digit of the password selection information segment and the first digit of the use information segment correspond to the first password, the second digit of the password selection information segment and the second digit of the use information segment correspond to the second password, and so on, the numerical value of each digit of the password selection information segment represents the selection information, and the numerical value of each digit of the use information segment represents the use information.
S103, if the target password is in a valid state, acquiring the target password from the one-time programmable memory; if the target password is in an invalid state, the target password is judged to be an invalid password.
In the scheme, after the target password selection information and the use states of all passwords are determined, whether the target password should be acquired from the one-time programmable memory can be determined according to the target password selection information and the use states of all passwords. If the target password is in a valid state, the password selected by the user is not the disuse password, the target password can be directly obtained from the one-time programmable memory, if the target password is in an invalid state, the target password is judged to be the invalid password, at this moment, the target password selection information cannot be responded, at this moment, the illegal state is judged, and the controller is stopped to operate.
In summary, in the scheme, at least two passwords are stored in the chip, so that the passwords are backed up, and if the passwords are not safe, other backup passwords stored in the chip can be used; in addition, when the password is acquired, the password use state is judged, so that the scheme can be ensured not to acquire the abandoned invalid password, and the scheme can set a plurality of passwords as backup passwords in the chip, so that the scheme has the advantages of enhancing the use function of a plurality of backup password chips, reducing the frequency of replacing the chip and greatly improving the benefit compared with the chip with only one password.
Referring to fig. 2, another password obtaining method based on a chip according to an embodiment of the present invention is provided, where at least two passwords are stored in a one-time programmable memory of the chip, and the password obtaining method includes:
s201, acquiring a password selection information segment from a program memory of a chip; the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password;
s202, determining a use information segment from the one-time programmable memory; the position mark of the use information segment corresponds to the position mark of the password selection information segment, and the position mark of the use information segment and the password have one-to-one correspondence;
in this scheme, the bits of the usage information segment are programmed in sequence, and when the password is initially used, the first password is used, and then the corresponding usage information segment is: 00000001, if the first password is discarded, the second password is used, and the usage information segment is programmed as: 00000011 and so on. Such as: if the usage information segment is: 00000011, the first password is discarded and the second password is being used, so this scheme refers to the passwords with a value of 0 or a highest-order value of 1, both being valid states, the former being an unused valid state and the latter being a used valid state. Namely: if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, it represents that the password corresponding to the current bit is in an invalid state.
For example: the usage information segment is: 00000111, wherein the 8 th to 4 th bits are 0, which indicates that the 8 th to 4 th passwords are in an unused valid state, the 3 rd to 1 th bits are all 1, since the 3 rd bit is the most significant bit, which indicates that the 3 rd password is in a valid state in use, and the 2 nd to 1 st passwords are in an invalid state.
S203, determining a first position identifier of the highest position with the numerical value of 1 from the password selection information segment; determining a second position identification of the highest position with the value of 1 from the use information segment;
s204, calculating a difference value between the first position identifier and the second position identifier;
s205, if the difference value is 0 or 1, acquiring a target password from the one-time programmable memory; if the difference is other values, the target password is judged to be an invalid password.
Specifically, when the target password is in the valid state, if the target password is obtained from the otp memory, it means that no matter which password is selected, the password can be obtained as long as the password is in the valid state, and this method ensures that the obsolete password is not reused, but because the obtaining method is unordered, extra workload is brought to the management of the use state of each password, for example: the current usage information segment is: 00100001, the target password is the 5 th password, if the 5 th password is directly obtained, the usage information segment will become 00101001, and at this time, a piece of recorded information needs to be maintained as: the 1 st and 6 th bits have a1 representing an invalid state and a1 in the 5 th bit represents the valid state being used.
Therefore, in the scheme, the password selection process is set to be ordered, namely: the target password can only select the password in the active state being used, or the next password adjacent to the password in the active state being used, by which means the bits of the usage information field can be programmed sequentially, for example: the current usage information segment is: 00000011, since this scheme only supports selection: a second password in a valid state being used, or a third password in a valid state being unused adjacent to the second password, so if the password selection information segment is: 00100000, the acquisition can be refused, if the password selects the information segment as: 00000010, acquiring a second password, wherein if the password selection information segment is: 00000100, a third password is obtained.
In order to quickly judge whether the target password is obtained in order, the scheme is determined through S203 to S206. Specifically, the scheme firstly determines a first position identifier with the highest position of a numerical value 1 from the password selection information segment, wherein the first position identifier indicates that the numerical value 1 in the password selection information segment is the number of the most significant bits, and if the password selection information segment is: 00001000, the first location is identified as 4. Then, determining a second position identifier of the highest bit with the value of 1 from the use information segment, wherein the second position identifier indicates that the several passwords are in a valid state in use, and if the use information segment is: 00000111, the second position is identified as 3. Further, calculating a difference value between the first position identifier and the second position identifier; if the difference value is 0 or 1, acquiring a target password from the one-time programmable memory; if the difference is other values, the target password is judged to be an invalid password.
Such as: the password selects the content of the information segment F1 to compare with the content of the use information segment S1, if the difference DFS between the position mark FA1 with the highest bit of 1 of F1 and the position mark SA1 with the highest bit of 1 of S1 is 0 or 1, the state is a passing state, and if the difference DFS is other values, the state is a non-passing state.
When DFS is 0, using the password in the OTP ROM corresponding to the SA1 position;
when DFS is 1, using the password in the OTP ROM corresponding to the (SA1+1) position; since FA1-SA1 is 1, FA1 is SA1+1, that is: (SA1+1) the password corresponding to the position is the password selected by the position mark FA1 in F1;
when the DFS is other values, the DFS is in an illegal state, and the controller stops running.
Here, for the sake of clear explanation of the present embodiment, the following specific examples are given, and the case where the difference is 0, the difference is 1, and the difference is other values will be explained in detail:
if the password selection information segment is: 00000100, the usage information field is: 00000111, the first location id is 3, the second location id is 3, the difference between the first location id and the second location id is 0, in this case, the password representing the selection is: the password being used, in this case, the way of selecting the password in order, is allowed, so the target password can be directly obtained, i.e. the third password is obtained from the one-time programmable memory;
if the password selection information segment is: 00001000, the usage information segment is: 00000111, the first location id is 4, the second location id is 3, the difference between the first location id and the second location id is 1, in this case, the password representing the selection is: the next unused password next to the password being used, which is also an ordered selection password, is allowed, so that the target password can be retrieved directly, i.e. the fourth password is retrieved from the otp memory;
if the password selection information segment is: 01000000, the usage information field is: 00000111, the first location id is 7, the second location id is 3, the difference between the first location id and the second location id is 4, in this case, the password representing the selection is: unused passwords, in this case, are not a way of selecting passwords in order and are therefore not allowed, denying selection of the 7 th password.
If the password selection information segment is: 00000001, the usage information segment is: 00000111, in this case the first location identity is 1, the second location identity is 3, the first location identity minus the second location identity is-2, in this case representing the chosen password: invalid passwords, are not allowed, and therefore selection of the 1 st password is denied.
It should be noted that if the difference is 1, this indicates that a new password that is not used is selected this time, and at this time, the use state of the new password needs to be changed from the valid state that is not used to the valid state that is being used, so after the scheme acquires the target password from the otp memory, the value corresponding to the first location identifier in the use information field needs to be set to 1. For example: if the password selection information segment is: 00001000, the usage information segment is: 00000111, where the first location identifier is 4, the second location identifier is 3, and a difference between the first location identifier and the second location identifier is 1, in this case, after directly obtaining the fourth password from the otp memory, it is further necessary to set a value of the fourth bit in the usage information segment and the first location identifier to 1, and the modified usage information segment is: 00001111, indicating that the fourth password is currently being used, and the third password has been discarded and becomes invalid.
In conclusion, the scheme can reduce the possibility of replacing the chip due to password leakage, and the mode of avoiding reusing invalid passwords can ensure that the chip is safer. Furthermore, the scheme selects the passwords in an orderly mode, can conveniently maintain the use states of the passwords, and reduces the maintenance difficulty of the passwords on the basis of ensuring the safety of the passwords and the chip.
The following describes a password obtaining apparatus, a device, and a storage medium according to embodiments of the present invention, and the password obtaining apparatus, the device, and the storage medium described below may be referred to the password obtaining method described above.
Referring to fig. 3, a schematic structural diagram of a password obtaining apparatus based on a chip according to an embodiment of the present invention is provided, where at least two passwords are stored in a one-time programmable memory of the chip, and the password obtaining apparatus includes:
a first obtaining module 100, configured to obtain target password selection information;
a determining module 200, configured to determine a use state of each password from a one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
a second obtaining module 300, configured to obtain the target password from the otp memory when the target password is in a valid state; and if the target password is in an invalid state, judging that the target password is an invalid password.
The first obtaining module is specifically configured to: acquiring a password selection information segment from a program memory of the chip; and the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password.
Wherein the determining module is specifically configured to: determining a usage information segment from the one-time programmable memory; the position identification of the use information segment corresponds to the position identification of the password selection information segment, and the position identification of the use information segment and the password have a one-to-one correspondence relationship;
if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, the password corresponding to the current bit is in an invalid state.
Wherein the second obtaining module comprises:
the first obtaining unit is used for determining a first position identifier with the highest position of a numerical value of 1 from the password selection information segment;
a second obtaining unit, configured to determine, from the usage information segment, a second position identifier of a highest order bit having a value of 1;
a calculating unit, configured to calculate a difference between the first location identifier and the second location identifier;
a third obtaining unit, configured to obtain the target password from the otp memory when the difference is 0 or 1; and if the difference is other values, judging that the target password is an invalid password.
Wherein the apparatus further comprises:
and the setting module is used for setting the value corresponding to the first position identifier in the use information segment as 1 when the difference value is 1.
Referring to fig. 4, a schematic structural diagram of an electronic device is further disclosed for the embodiment of the present invention, including:
a memory 11 for storing a computer program;
a processor 12, configured to implement the steps of the chip-based password obtaining method according to any of the above method embodiments when executing the computer program.
The device may include a memory 11, a processor 12, and a bus 13. Wherein:
the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device, for example a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may be used not only to store application software installed in the device and various types of data such as program codes for performing a password acquisition method, etc., but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as program codes for executing a password obtaining method.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Further, the device may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface 15, the user interface 15 may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 15 may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the device and for displaying a visualized user interface.
Fig. 4 shows only the device with the components 11-15, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the device, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the chip-based password acquisition method in any method embodiment.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A password acquisition method based on a chip is characterized in that at least two passwords are stored in a one-time programmable memory of the chip, and the password acquisition method comprises the following steps:
acquiring target password selection information;
determining the use state of each password from the one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
if the target password is in a valid state, acquiring the target password from the one-time programmable memory; and if the target password is in an invalid state, judging that the target password is an invalid password.
2. The method according to claim 1, wherein the obtaining target password selection information includes:
acquiring a password selection information segment from a program memory of the chip; and the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password.
3. The method for obtaining the password according to claim 2, wherein determining the use status of each password from the one-time programmable memory of the chip comprises:
determining a usage information segment from the one-time programmable memory; the position identification of the use information segment corresponds to the position identification of the password selection information segment, and the position identification of the use information segment and the password have a one-to-one correspondence relationship;
if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, the password corresponding to the current bit is in an invalid state.
4. The method according to claim 3, wherein if the target password is in a valid state, the target password is obtained from the otp memory; if the target password is in an invalid state, determining that the target password is an invalid password, including:
determining a first position identifier of the highest position with the value of 1 from the password selection information segment;
determining a second position identification of the highest position with the value of 1 from the use information segment;
calculating a difference between the first location identity and the second location identity;
if the difference value is 0 or 1, acquiring the target password from the one-time programmable memory; and if the difference is other values, judging that the target password is an invalid password.
5. The method according to claim 4, wherein if the difference is 1, after obtaining the target password from the otp memory, the method further comprises:
setting a value corresponding to the first location identity in the usage information segment to 1.
6. A chip-based password obtaining apparatus, wherein at least two passwords are stored in a one-time programmable memory of the chip, the password obtaining apparatus comprising:
the first acquisition module is used for acquiring target password selection information;
the determining module is used for determining the use state of each password from the one-time programmable memory of the chip; the use state comprises a valid state and an invalid state;
the second acquisition module is used for acquiring the target password from the one-time programmable memory when the target password is in a valid state; and if the target password is in an invalid state, judging that the target password is an invalid password.
7. The password acquisition apparatus according to claim 6,
the first obtaining module is specifically configured to: acquiring a password selection information segment from a program memory of the chip; and the highest position mark with the numerical value of 1 in the password selection information segment represents the mark of the selected target password.
8. The password obtaining apparatus of claim 7, wherein the determining module is specifically configured to: determining a usage information segment from the one-time programmable memory; the position identification of the use information segment corresponds to the position identification of the password selection information segment, and the position identification of the use information segment and the password have a one-to-one correspondence relationship;
if the value of the current bit is 0, the password corresponding to the current bit is in an unused effective state; if the value of the current bit is 1 and the current bit is the highest bit with the value of 1, the password corresponding to the current bit is in the valid state in use; if the value of the current bit is 1 and the current bit is not the highest bit of the value 1, the password corresponding to the current bit is in an invalid state.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the chip-based password acquisition method according to any one of claims 1 to 5 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the chip-based password acquisition method according to any one of claims 1 to 5.
CN202110218566.1A 2021-02-26 2021-02-26 Chip-based password acquisition method, device, equipment and storage medium Active CN113158172B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110218566.1A CN113158172B (en) 2021-02-26 2021-02-26 Chip-based password acquisition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110218566.1A CN113158172B (en) 2021-02-26 2021-02-26 Chip-based password acquisition method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113158172A CN113158172A (en) 2021-07-23
CN113158172B true CN113158172B (en) 2022-03-22

Family

ID=76883612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110218566.1A Active CN113158172B (en) 2021-02-26 2021-02-26 Chip-based password acquisition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113158172B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688380B (en) * 2021-10-26 2022-02-18 苏州浪潮智能科技有限公司 Password protection method, device and medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290569A (en) * 2008-05-06 2008-10-22 国网南京自动化研究院 Method for parallel data processing adopting multi- password chip
CN101382963A (en) * 2008-03-22 2009-03-11 中国工程物理研究院电子工程研究所 Authorisation and verification method for password position grouping and special chip thereof
CN101639885A (en) * 2009-08-26 2010-02-03 成都卫士通信息产业股份有限公司 Safe preparation method for cipher chip to resist against bypass attack
CN101848086A (en) * 2009-03-27 2010-09-29 资通电脑股份有限公司 One-time password setting and authenticating method of electronic chip
CN102376358A (en) * 2010-08-11 2012-03-14 庄建祥 Circuit and system of aggregated area anti-fuse in cmos processes
CN102546149A (en) * 2012-01-16 2012-07-04 华南理工大学 Crypto chip system and secret key extraction method
CN103209379A (en) * 2012-01-16 2013-07-17 上海耐普微电子有限公司 Single-line programmable micro electromechanical system (MEMS) microphone and programming method and system thereof
US9230093B1 (en) * 2014-10-13 2016-01-05 Celestica Technology Consultancy (Shanghai) Co., Ltd. Protection method and system for computer security
CN105989309A (en) * 2015-02-17 2016-10-05 汪风珍 Password
CN106934295A (en) * 2015-12-31 2017-07-07 珠海金山办公软件有限公司 A kind of document processing method and device
CN108228768A (en) * 2017-12-27 2018-06-29 北京京存技术有限公司 Chip information querying method, device, equipment and storage medium
CN109426705A (en) * 2017-08-17 2019-03-05 阿里巴巴集团控股有限公司 A kind of interface display method, device, equipment and storage medium
US10331879B1 (en) * 2015-09-14 2019-06-25 Symantec Corporation Systems and methods for automatically generating passwords that comply with password restrictions
CN110175449A (en) * 2019-05-20 2019-08-27 维沃移动通信有限公司 Cipher-code input method and mobile terminal
CN110399166A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 Store method, device, equipment and the storage medium of ME Nonce value
CN110781468A (en) * 2019-10-24 2020-02-11 腾讯科技(深圳)有限公司 Identity authentication processing method and device, electronic equipment and storage medium
CN111028878A (en) * 2019-11-21 2020-04-17 深圳大普微电子科技有限公司 Flash memory writing method, flash memory chip and nonvolatile storage device
CN111448555A (en) * 2017-12-15 2020-07-24 Arm有限公司 Code domain
CN111883108A (en) * 2020-07-06 2020-11-03 珠海格力电器股份有限公司 Password embedding method and device, password matching method and device and control system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102636638B1 (en) * 2016-12-21 2024-02-15 삼성전자주식회사 Method for managing contents and electronic device for the same

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382963A (en) * 2008-03-22 2009-03-11 中国工程物理研究院电子工程研究所 Authorisation and verification method for password position grouping and special chip thereof
CN101290569A (en) * 2008-05-06 2008-10-22 国网南京自动化研究院 Method for parallel data processing adopting multi- password chip
CN101848086A (en) * 2009-03-27 2010-09-29 资通电脑股份有限公司 One-time password setting and authenticating method of electronic chip
CN101639885A (en) * 2009-08-26 2010-02-03 成都卫士通信息产业股份有限公司 Safe preparation method for cipher chip to resist against bypass attack
CN102376358A (en) * 2010-08-11 2012-03-14 庄建祥 Circuit and system of aggregated area anti-fuse in cmos processes
CN102546149A (en) * 2012-01-16 2012-07-04 华南理工大学 Crypto chip system and secret key extraction method
CN103209379A (en) * 2012-01-16 2013-07-17 上海耐普微电子有限公司 Single-line programmable micro electromechanical system (MEMS) microphone and programming method and system thereof
US9230093B1 (en) * 2014-10-13 2016-01-05 Celestica Technology Consultancy (Shanghai) Co., Ltd. Protection method and system for computer security
CN105989309A (en) * 2015-02-17 2016-10-05 汪风珍 Password
US10331879B1 (en) * 2015-09-14 2019-06-25 Symantec Corporation Systems and methods for automatically generating passwords that comply with password restrictions
CN106934295A (en) * 2015-12-31 2017-07-07 珠海金山办公软件有限公司 A kind of document processing method and device
CN109426705A (en) * 2017-08-17 2019-03-05 阿里巴巴集团控股有限公司 A kind of interface display method, device, equipment and storage medium
CN111448555A (en) * 2017-12-15 2020-07-24 Arm有限公司 Code domain
CN108228768A (en) * 2017-12-27 2018-06-29 北京京存技术有限公司 Chip information querying method, device, equipment and storage medium
CN110175449A (en) * 2019-05-20 2019-08-27 维沃移动通信有限公司 Cipher-code input method and mobile terminal
CN110399166A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 Store method, device, equipment and the storage medium of ME Nonce value
CN110781468A (en) * 2019-10-24 2020-02-11 腾讯科技(深圳)有限公司 Identity authentication processing method and device, electronic equipment and storage medium
CN111028878A (en) * 2019-11-21 2020-04-17 深圳大普微电子科技有限公司 Flash memory writing method, flash memory chip and nonvolatile storage device
CN111883108A (en) * 2020-07-06 2020-11-03 珠海格力电器股份有限公司 Password embedding method and device, password matching method and device and control system

Also Published As

Publication number Publication date
CN113158172A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN107729083B (en) Method for loading driver and embedded device
CN101276389B (en) Separation of logical trusted platform modules within a single physical trusted platform module
US10430238B1 (en) Programmatically applying labels to nodes in cluster orchestration platforms
CN104424008A (en) System and method for secure boot ROM patch
EP2680137A1 (en) Method and system for managing bios configuration data of basic input/output system
CN103116511A (en) Double-booting method based on single FLASH storage chip
CN111240601B (en) Method, device, equipment and storage medium for determining superblock of partitioned space
CN113158172B (en) Chip-based password acquisition method, device, equipment and storage medium
CN110020528A (en) A kind of BMC starting method, apparatus and electronic equipment and storage medium
CN105005343A (en) Rule-based register checking for digital voltage regulator controllers
US10419436B2 (en) Method to improve keyboard, video and mouse (KVM) security on blocking incoming KVM privilege request
CN112181595A (en) NUMA node binding method, device, equipment and storage medium of virtual machine
CN110399166B (en) ME Nonce value saving method, device, equipment and storage medium
CN111694843A (en) Missing number detection method and device, electronic equipment and storage medium
CN110083491A (en) A kind of BIOS initialization method, apparatus, equipment and storage medium
CN106648713A (en) OTP programming method and device
CN105653960A (en) Linux capability distribution method and device
US20170147247A1 (en) Data Processing Method and Device for Storage Card
CN111221470A (en) Data processing method, electronic device and storage medium
US10305740B2 (en) System and method for performing mass renaming of list of items at run-time with variable differentiation factor
CN109933409B (en) Docker data saving method and system, electronic device and computer readable storage medium
CN112306959A (en) File scanning method of mobile storage device, storage medium and device terminal
CN111680334A (en) Disk security access method, device, equipment and medium
CN111158733A (en) BMC upgrading method, device, equipment and computer readable storage medium
CN112654964A (en) Brush machine control method, brush machine control device and terminal equipment

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