CN115171247A - Intelligent lock, storage method, decryption method and storage medium - Google Patents

Intelligent lock, storage method, decryption method and storage medium Download PDF

Info

Publication number
CN115171247A
CN115171247A CN202210722987.2A CN202210722987A CN115171247A CN 115171247 A CN115171247 A CN 115171247A CN 202210722987 A CN202210722987 A CN 202210722987A CN 115171247 A CN115171247 A CN 115171247A
Authority
CN
China
Prior art keywords
password
inclusion body
unlocking
digit
secret key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210722987.2A
Other languages
Chinese (zh)
Inventor
柯广川
陈鸿填
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Hutlon Technology Co Ltd
Foshan Hutlon Intelligent Technology Co Ltd
Original Assignee
Guangdong Hutlon Technology Co Ltd
Foshan Hutlon Intelligent 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 Guangdong Hutlon Technology Co Ltd, Foshan Hutlon Intelligent Technology Co Ltd filed Critical Guangdong Hutlon Technology Co Ltd
Priority to CN202210722987.2A priority Critical patent/CN115171247A/en
Publication of CN115171247A publication Critical patent/CN115171247A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses an intelligent lock, a storage method, a decryption method and a storage medium, wherein a receiving module is arranged for receiving an input registration password, a processing module stored with a secret key is arranged for carrying out bit complementing processing on the registration password to obtain a password inclusion body, and the number of bits is increased through the bit complementing processing to improve the concealment of the registration password and improve the safety; the method comprises the steps that encryption processing is carried out on a password inclusion body through an encryption algorithm according to a secret key to obtain a password ciphertext and the password ciphertext is stored, so that when the intelligent lock is violently damaged, the encrypted password ciphertext can be read, and the password ciphertext is a random code which is not a regular password, so that a registered password cannot be known; meanwhile, the encryption algorithm cannot be read, the encryption algorithm with which the cipher text is encrypted cannot be known, and on the other hand, the secret key cannot be known and the decryption cannot be performed even if the encryption algorithm with which the cipher text is encrypted is known, so that the safety is improved.

Description

Intelligent lock, storage method, decryption method and storage medium
Technical Field
The invention relates to the field of intelligent locks, in particular to an intelligent lock, a storage method, a decryption method and a storage medium.
Background
The password verification door opening mode is a verification door opening mode of the intelligent lock, the password is generally stored in a memory of the lock after being registered by a user, then when the user needs to unlock, the password is input into the intelligent lock, the input password is compared with the password in the memory by the intelligent lock, and the verification is successful when the comparison result is the same. However, since the password is directly stored in the memory, when the smart lock is violently destroyed, the password registered by the user can be read in the memory to unlock the smart lock, and therefore the security is low, and a solution is required.
Disclosure of Invention
In view of the above, in order to solve the above technical problems, an object of the present invention is to provide an intelligent lock, a storage method, a decryption method and a storage medium.
The embodiment of the invention adopts the technical scheme that:
a smart lock, comprising:
the receiving module is used for receiving the input registration password;
and the processing module is used for performing bit complementing processing on the registered password to obtain a password inclusion body, and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext and storing the password ciphertext.
Further, the processing module includes a processor, and the secret key includes an identification code of the processor and a custom password.
The embodiment of the invention also provides a storage method applied to the intelligent lock, which comprises the following steps:
receiving a registration password;
carrying out bit complementing processing on the registered password to obtain a password inclusion body;
and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext and storing the password ciphertext.
Further, the performing bit complement processing on the registration password to obtain a password inclusion body includes:
adding first content with a first preset digit before a first digit of the registered password to obtain a password inclusion body;
or,
adding a second content with a second preset digit after the last digit of the registered password to obtain a password inclusion body;
or,
and adding a third content with a third preset digit before the first digit of the registration password and adding a fourth content with a fourth preset digit after the last digit of the registration password to obtain a password inclusion body.
Further, the encrypting the password inclusion body according to the secret key through an encryption algorithm to obtain a password ciphertext and storing the password ciphertext includes:
reading a secret key stored by a processing module, and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext;
storing the cipher text in the processing module;
wherein the length of the cipher inclusion body, the length of the secret key and the length of the cipher text are all the same.
An embodiment of the present invention further provides an intelligent lock, including:
the receiving module is used for receiving an unlocking password;
the processing module is used for decrypting the cipher text through a decryption algorithm according to the secret key to obtain a cipher inclusion body, and comparing the unlocking cipher with the registered cipher of the cipher inclusion body to obtain a comparison processing result; and when the comparison processing results are the same, representing that the unlocking verification is successful.
The embodiment of the invention also provides a decryption method, which is applied to the intelligent lock and comprises the following steps:
receiving an unlocking password;
decrypting the cipher ciphertext through a decryption algorithm according to the secret key to obtain a cipher inclusion body;
comparing the unlocking password with the registration password of the password inclusion body to obtain a comparison result; and when the comparison processing results are the same, representing that the unlocking verification is successful.
Further, the comparing the unlocking password with the password inclusion body to obtain a comparison result includes:
determining the password content with the preset digits at the front position from the unlocking password;
and comparing the password content with the registered password, obtaining a comparison processing result which is the same when the comparison result is the same, removing the first digit in the unlocking password to obtain a new unlocking password when the comparison result is different, returning the password content with the preset digit at the front position determined from the unlocking password according to the new unlocking password, and determining that the comparison processing result is different until the comparison result is the same or until the total digit of the new unlocking password is less than the preset digit.
Further, before the comparing process is performed according to the unlocking password and the password inclusion body, the method further includes:
determining the total digits of the unlocking password;
when the total digits of the unlocking passwords are larger than or equal to the preset digits, the step of determining the password content with the preset digits at the front position from the unlocking passwords is executed;
or,
and when the total digits of the unlocking password are smaller than the preset digits, determining that the comparison processing results are different.
An embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the storage method or the decryption method.
The beneficial effects of the invention are: the method comprises the steps that a receiving module is arranged and used for receiving an input registration password, a processing module stored with a secret key is arranged and used for carrying out bit complementing processing on the registration password to obtain a password inclusion body, and the number of bits is increased through the bit complementing processing to improve the concealment of the registration password and improve the safety; encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext and storing the password ciphertext, so that when the intelligent lock is violently damaged, the encrypted password ciphertext can be read, and the password ciphertext is a password with messy codes which are not regular, so that the registered password cannot be known; meanwhile, the encryption algorithm cannot be read, the encryption algorithm cannot be known which encryption algorithm is used for encrypting the cipher text, and in the other step, the secret key cannot be known even if the encryption algorithm is known, the secret key cannot be decrypted, and the safety is improved.
Drawings
FIG. 1 is a block diagram of an intelligent lock according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of a storage method according to the present invention;
FIG. 3 is a flowchart illustrating the steps of the decryption method according to the present invention.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all 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 application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As shown in fig. 1, a first embodiment of the present invention provides an intelligent lock, which includes a receiving module and a processing module.
In the embodiment of the invention, the receiving module is used for receiving the input registration password, for example, when a user needs to set an unlocking password of the intelligent lock, the registration password can be input and received by the receiving module. Optionally, the receiving module may be a mechanical key, a screen with a touch screen function, or may be a communication unit, and may receive a registration password sent by a terminal of a user owner, which is not limited specifically.
As shown in fig. 1, in the embodiment of the present invention, the processing module includes a storage unit and a processor, and in other embodiments, the storage unit may be located in the processor, that is, the storage unit may be a word unit of the processor, and is not limited specifically.
As shown in fig. 1, in the embodiment of the present invention, a storage unit stores a key, all contents or part of contents of the key may be set in advance in a smart lock generation process and stored in the storage unit, or part of contents of the key may be set by a user and stored in the storage unit. For example, the secret key includes an identification code of the processor and a custom password, and when the smart lock is produced, the developer may use the identification code of the processor and the custom word set by the developer as the custom password to form the secret key, for example, the developer may include but is not limited to determining the custom word according to the property of the lock, the company name, the random setting, and the like, and the custom may include numbers or english letters; or the developer may store the id as part of the key in the storage unit, and the owner may set another part of the key as needed and form the key with the id of the processor. In the embodiment of the invention, the identity identification code of the processor is used as a part of the secret key, so that each intelligent lock has a corresponding unique secret key, and the subsequent encryption process is safer.
Optionally, the processor may be composed of any one or more processor chips including an MCU singlechip, an FPGA, a CPLD, a DSP, an ARM, and the like. In an embodiment of the present invention, the processor is configured to perform bit padding on the registered password to obtain a password inclusion body, and perform encryption processing on the password inclusion body through an encryption algorithm according to the key to obtain a password ciphertext and store the password ciphertext, for example, in the storage unit or in the processor.
As shown in fig. 2, a second embodiment of the present invention provides a storage method, which can be applied to the above-mentioned smart lock, including steps S100-S300:
s100, receiving a registration password.
Alternatively, the user may input the registration password through a mechanical key, a screen with a touch screen function, or the user may input the registration password on a terminal in communication with the smart lock, and the registration password is received by the receiving module of the smart lock.
S200, carrying out bit complementing processing on the registered password to obtain a password inclusion body.
In the embodiment of the invention, the password inclusion body is a password obtained by adding other characters or symbols in front of and behind the registered password or adding other characters or symbols in front of and behind the registered password for bit complementing processing, so that the security of the password can be improved.
Specifically, step S200 includes one of steps S210, S220, and S230:
s210, adding first content with a first preset digit before the first digit of the password is registered to obtain a password inclusion body.
Optionally, the first predetermined number of digits may be adjusted as needed, and the first content may be any text, for example, the registered password is 123456, and the first predetermined number of digits is 6, where the first content may be 888999, so as to obtain the password inclusion 888999123456.
S220, adding second content with a second preset digit after the last digit of the password is registered to obtain a password inclusion body.
Similarly, the second predetermined number of digits can be adjusted as needed, and the second content can be any character, for example, the registered password is 123456, the first predetermined number of digits is 6, and the first content can be 666444, so that the password containing body is 1234566444.
And S230, adding a third content with a third preset digit before the first digit of the registered password and adding a fourth content with a fourth preset digit after the last digit of the registered password to obtain a password inclusion body.
Similarly, the third predetermined number of digits and the fourth predetermined number of digits may be adjusted as needed, and the third content and the fourth content may be any characters, for example, the registered password is 123456, the third predetermined number of digits is 3, the first content may be 444, the fourth predetermined number of digits is 3, the first content may be 122, and thus the password inclusion body 444123456122 is obtained.
S300, encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext and storing the password ciphertext.
Specifically, the processor reads the secret key in the storage unit, encrypts the password inclusion body by using the secret key and an encryption algorithm, thereby encrypting the password inclusion body into a password ciphertext, and stores the password ciphertext in the processor or the storage unit in the processing module for practical verification during subsequent unlocking. It should be noted that the encryption algorithm includes, but is not limited to, AES128, DES, 3DES, MD5, sha1, sha256, and the like, and is not limited in particular.
For example, taking AES128 as an example, the length of the cipher inclusion body after the bit padding processing is 16 bytes, the processor id with the key being eight bytes + the custom cipher with eight bytes, that is, the length of the key is also 16 bytes, and after the cipher inclusion body is encrypted by using the key in combination with AES128, a cipher text with 16 bytes can be obtained.
As shown in fig. 1, a third embodiment of the present invention provides another intelligent lock, which includes a receiving module and a processing module. It should be noted that the receiving module and the processing module of the smart lock of the third embodiment have the same structure as the smart lock of the first embodiment. The receiving module of the third embodiment may be configured to receive an unlocking password in addition to the function of the first embodiment, the storage unit in the processing module of the third embodiment stores a secret key and a password ciphertext stored by the storage method of the second embodiment, and the processor in the processing module may be configured to decrypt the password ciphertext by a decryption algorithm according to the secret key in addition to the function of the first embodiment to obtain a password inclusion body, and perform comparison processing according to the unlocking password and a registered password of the password inclusion body to obtain a comparison processing result. It should be noted that, when the comparison processing results are the same, the representation of successful unlocking verification can unlock the intelligent lock, and when the comparison processing results are different, the representation of unsuccessful unlocking verification does not unlock the intelligent lock.
As shown in fig. 3, a fourth embodiment of the present invention provides a decryption method, which can be applied to the smart lock of the third embodiment, including steps S400-S600:
s400, receiving an unlocking password.
Alternatively, the input object (e.g., the householder or other person) may input the unlocking password through a mechanical key, a screen with a touch screen function, or a terminal in communication with the smart lock, and the unlocking password is received by the receiving module of the smart lock. It should be noted that the unlocking password may be a registration password or may be a dummy password containing the registration password.
S500, the cipher ciphertext is decrypted through a decryption algorithm according to the secret key, and a cipher inclusion body is obtained.
Specifically, the decryption algorithm corresponds to the encryption algorithm, for example, the encryption algorithm used is an AES128 algorithm, the decryption algorithm is also the AES128 algorithm, the processor acquires all cipher texts from the storage unit, then decrypts the cipher texts by using the key through the decryption algorithm, and at this time, the plaintext of the cipher inclusion body is obtained and stored in the cache of the processor. It is understood that the password inclusion body includes a registration password for registration performed by the subscriber.
S600, comparing the unlocking password with the registration password of the password inclusion body to obtain a comparison processing result.
And when the comparison processing results are the same, the characteristic unlocking verification is successful, and when the comparison processing results are different, the characteristic unlocking verification is failed. In the embodiment of the invention, the registered password of the intelligent lock is encrypted by AES128 and then stored in the storage unit, after the input object inputs the unlocking password, the encrypted password ciphertext is read out from the storage unit and decrypted into the plaintext of the password inclusion body when the comparison processing is needed, the comparison between the unlocking password and the registered password in the password inclusion body is carried out to determine whether the comparison processing results are the same or different, the safety of the registered password can be well protected, when the intelligent lock is violently damaged and the storage unit is taken out, the data read out from the storage unit is the encrypted password ciphertext which is a messy code, which algorithm cannot be used for encryption, and the encryption algorithm cannot be read. In the other step, even if the encryption algorithm is known as AES128, the secret key cannot be known, and the cipher text cannot be decrypted, so that the security of the registered cipher is improved.
In the embodiment of the present invention, S600 includes steps S610 to S620:
s610, password content with preset digits at the front position is determined from the unlocking password.
Alternatively, in order to improve security and prevent peeping, when the input object inputs the unlocking password, in addition to directly inputting the same content as the registration password, a meaningless other number may be added before and/or after the registration password, so that the content in the input unlocking password needs to be compared one or more times for such a case. It should be noted that the preset number of bits is the number of bits of the registered password, and the registered password is exemplarily 123456 and 6 bits, where the preset number of bits is 6 bits, and it is assumed that the unlock password is 88812345699, and the content of the password in the first 6 bits is 888123.
S620, comparing the password content with the registered password, obtaining the same comparison processing result when the comparison result is the same, removing the first digit in the unlocking password to obtain a new unlocking password when the comparison result is different, and returning to the step of determining the password content with the preset digit at the front position from the unlocking password according to the new unlocking password until the comparison result is the same or until the total digit of the new unlocking password is smaller than the preset digit, and determining that the comparison processing result is different.
Specifically, the processor compares the password content with the registered password contained in the password containing body by calling a comparison function, and when the comparison result is the same, the obtained comparison processing result is the same, at the moment, the unlocking verification is successful, and the intelligent lock is unlocked. It should be noted that, when a plurality of password inclusion bodies are stored in the storage unit, the password content and the registered password in each password inclusion body are compared one by one during the comparison. Taking the example in step S610 as an example, the 888123 and the registered password 123456 are compared, the comparison result is different, the first digit in the unlocking password is removed to obtain a new unlocking password, that is, the new unlocking password is 8812345699, and the password content with the front position preset digit is determined from the unlocking password according to the new unlocking password, that is, the password content with the front 6 digits is determined as 881234 again, the 881234 and the registered password 123456 are compared, the comparison result is also different, the first digit in the unlocking password is removed again to obtain a new unlocking password, that is, the new unlocking password is 812345699, the password content with the front 6 digits is continuously determined again until the password content with the front 6 digits is 123456 and is consistent with the registered password 123456, the comparison result is obtained to be the same, or the comparison processing result is determined to be different until the total digit of the new unlocking password is smaller than the preset digit. For example, the unlocking password is 88812346959, when the first bit in the unlocking password is removed to obtain a new unlocking password of 46959 when the comparison is continuously performed and the password content of the first 6 bits is determined, only 5 bits of 46959 are smaller than 6 bits at this time, the comparison results cannot be the same, and therefore it is determined that the comparison processing results are different, and the intelligent lock is not unlocked.
Optionally, the processing module may further include a speaker, and after it is determined that the comparison processing result is different, the prompt content may be played through the speaker or displayed in the screen when the receiving module is the screen, so as to prompt that the password is wrong and the password needs to be re-input.
Optionally, the decryption method according to the embodiment of the present invention may further include step S700, where S700 is located before S600:
s700, determining the total digit of the unlocking password;
when the total digits of the unlocking passwords are larger than or equal to the preset digits, the password content with the preset digits at the front position is determined from the unlocking passwords;
or,
and when the total digit of the unlocking password is less than the preset digit, determining that the comparison processing results are different.
Optionally, the preset digit is a digit of the registration password, for example, if the registration password is 123456, the preset digit is 6 digits, the processor determines a total digit of the unlock password input by the input object, and if the total digit of the unlock password is greater than or equal to the preset digit, then step S610 is executed. And when the total digit of the unlocking password is less than the preset digit, the unlocking password does not have the possibility of being the same as the registration password, so that the comparison processing result is directly determined to be different, and the intelligent lock is not unlocked.
An embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where at least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded by the processor and executed to implement the storage method or the decryption method of the foregoing embodiment. The electronic device of the embodiment of the invention includes but is not limited to a mobile phone, a tablet computer, a vehicle-mounted computer, an intelligent lock and the like.
The contents in the above method embodiments are all applicable to the present apparatus embodiment, the functions specifically implemented by the present apparatus embodiment are the same as those in the above method embodiments, and the beneficial effects achieved by the present apparatus embodiment are also the same as those achieved by the above method embodiments.
An embodiment of the present invention further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the storage method or the decryption method of the foregoing embodiment.
Embodiments of the present invention also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the storage method or the decryption method of the foregoing embodiment.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, 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 above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. An intelligent lock, comprising:
the receiving module is used for receiving the input registration password;
and the processing module is used for performing bit complementing processing on the registered password to obtain a password inclusion body, and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain and store a password ciphertext.
2. The intelligent lock of claim 1, wherein: the processing module comprises a processor, and the secret key comprises an identification code and a custom password of the processor.
3. A storage method applied to the intelligent lock of claim 1 or 2, comprising:
receiving a registration password;
carrying out bit complementing processing on the registered password to obtain a password inclusion body;
and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext and storing the password ciphertext.
4. The storage method according to claim 3, wherein: the bit complementing processing is performed on the registration password to obtain a password inclusion body, and the method includes:
adding first content with a first preset digit before a first digit of the registered password to obtain a password inclusion body;
or,
adding a second content with a second preset digit after the last digit of the registered password to obtain a password inclusion body;
or,
and adding a third content with a third preset digit before the first digit of the registration password and adding a fourth content with a fourth preset digit after the last digit of the registration password to obtain a password inclusion body.
5. The storage method according to claim 3 or 4, wherein: the encrypting process is carried out on the cipher inclusion body through an encryption algorithm according to the secret key to obtain and store a cipher text, and the method comprises the following steps:
reading a secret key stored in a processing module, and encrypting the password inclusion body through an encryption algorithm according to the secret key to obtain a password ciphertext;
storing the cipher text in the processing module;
wherein, the length of the cipher inclusion body, the length of the secret key and the length of the cipher text are all the same.
6. An intelligent lock, comprising:
the receiving module is used for receiving an unlocking password;
the processing module is used for decrypting the cipher text through a decryption algorithm according to the secret key to obtain a cipher inclusion body, and comparing the unlocking cipher with the registered cipher of the cipher inclusion body to obtain a comparison processing result; and when the comparison processing results are the same, representing that the unlocking verification is successful.
7. A decryption method applied to the smart lock of claim 6, comprising:
receiving an unlocking password;
decrypting the cipher ciphertext through a decryption algorithm according to the secret key to obtain a cipher inclusion body;
comparing the unlocking password with the registration password of the password inclusion body to obtain a comparison result; and when the comparison processing results are the same, representing that the unlocking verification is successful.
8. The decryption method of claim 7, wherein: the comparing processing is carried out according to the unlocking password and the password inclusion body to obtain a comparison processing result, and the method comprises the following steps:
determining the password content with the preset digits at the front position from the unlocking password;
and comparing the password content with the registered password, obtaining a comparison processing result which is the same when the comparison result is the same, removing the first digit in the unlocking password to obtain a new unlocking password when the comparison result is different, returning the password content with the preset digit at the front position determined from the unlocking password according to the new unlocking password, and determining that the comparison processing result is different until the comparison result is the same or until the total digit of the new unlocking password is less than the preset digit.
9. The decryption method of claim 8, wherein: before the comparing process is performed according to the unlocking password and the password inclusion body, the method further includes:
determining the total digits of the unlocking password;
when the total digit of the unlocking password is larger than or equal to the preset digit, executing the step of determining the password content with the preset digit at the front position from the unlocking password;
or,
and when the total digits of the unlocking password are smaller than the preset digits, determining that the comparison processing results are different.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the storage method of any one of claims 3-5 or the decryption method of any one of claims 7-9.
CN202210722987.2A 2022-06-24 2022-06-24 Intelligent lock, storage method, decryption method and storage medium Pending CN115171247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210722987.2A CN115171247A (en) 2022-06-24 2022-06-24 Intelligent lock, storage method, decryption method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210722987.2A CN115171247A (en) 2022-06-24 2022-06-24 Intelligent lock, storage method, decryption method and storage medium

Publications (1)

Publication Number Publication Date
CN115171247A true CN115171247A (en) 2022-10-11

Family

ID=83487165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210722987.2A Pending CN115171247A (en) 2022-06-24 2022-06-24 Intelligent lock, storage method, decryption method and storage medium

Country Status (1)

Country Link
CN (1) CN115171247A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041603A1 (en) * 2015-09-10 2017-03-16 深圳市中兴微电子技术有限公司 Data encryption method and apparatus, mobile terminal, and computer storage medium
CN109448208A (en) * 2019-01-08 2019-03-08 青岛海信智慧家居系统股份有限公司 A kind of method for unlocking and control device of intelligent door lock
CN109617678A (en) * 2018-11-20 2019-04-12 上海庆科信息技术有限公司 Intelligent lock system and password store method, device, equipment, computer media
CN109787749A (en) * 2019-01-07 2019-05-21 中国电子科技集团公司第七研究所 A kind of door lock method for generating cipher code and its cipher management method based on DES algorithm
CN111125456A (en) * 2019-12-02 2020-05-08 惠州拓邦电气技术有限公司 Virtual password comparison method and system and intelligent lock
CN112464258A (en) * 2020-11-02 2021-03-09 中国银联股份有限公司 Data encryption and decryption method, device, equipment and storage medium
CN113946847A (en) * 2021-10-18 2022-01-18 北京沃东天骏信息技术有限公司 Digital encryption and decryption method and device, terminal equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041603A1 (en) * 2015-09-10 2017-03-16 深圳市中兴微电子技术有限公司 Data encryption method and apparatus, mobile terminal, and computer storage medium
CN109617678A (en) * 2018-11-20 2019-04-12 上海庆科信息技术有限公司 Intelligent lock system and password store method, device, equipment, computer media
CN109787749A (en) * 2019-01-07 2019-05-21 中国电子科技集团公司第七研究所 A kind of door lock method for generating cipher code and its cipher management method based on DES algorithm
CN109448208A (en) * 2019-01-08 2019-03-08 青岛海信智慧家居系统股份有限公司 A kind of method for unlocking and control device of intelligent door lock
CN111125456A (en) * 2019-12-02 2020-05-08 惠州拓邦电气技术有限公司 Virtual password comparison method and system and intelligent lock
CN112464258A (en) * 2020-11-02 2021-03-09 中国银联股份有限公司 Data encryption and decryption method, device, equipment and storage medium
CN113946847A (en) * 2021-10-18 2022-01-18 北京沃东天骏信息技术有限公司 Digital encryption and decryption method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN100508448C (en) Content processing apparatus and content protection program
US8572392B2 (en) Access authentication method, information processing unit, and computer product
CN106506159A (en) Encryption method and equipment for key safety
CN110175475B (en) Smart card data processing method and device and computer readable storage medium
CN101467430A (en) Portable telecommunication apparatus
CN105005731A (en) Data encryption and decryption methods and mobile terminal
CN104537300A (en) Safe password setting and verifying mode
CN101815292B (en) Device and method for protecting data of mobile terminal
CN111614467B (en) System backdoor defense method and device, computer equipment and storage medium
CN110771190A (en) Controlling access to data
CN104125064B (en) A kind of dynamic cipher authentication method, client and Verification System
CN108494783A (en) The guard method of high in the clouds data
US20040181673A1 (en) Method and apparatus for preventing unauthorized access to data and for destroying data upon receiving an unauthorized data access attempt
CN101099207B (en) Portable data support with watermark function
CN110968878B (en) Information transmission method, system, electronic equipment and readable medium
CN111859423A (en) Information security encryption method and device
JP4620307B2 (en) Technology for safely storing data in memory
CN116361774A (en) Password cracking method and device
CN115171247A (en) Intelligent lock, storage method, decryption method and storage medium
JP2005208841A (en) Communication system, portable terminal and program
CN114244620B (en) Board card network access verification method and device and board card control center
CN107889102B (en) Method and device for encrypting and decrypting information in short message
CN112199730A (en) Method and device for processing application data on terminal and electronic equipment
CN114360110A (en) IC card encryption method, IC card verification method, device, equipment and medium
KR101624394B1 (en) Device for authenticating password and operating method thereof

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