Nothing Special   »   [go: up one dir, main page]

CN110138551A - Method for generating cipher code, device, computer equipment and storage medium - Google Patents

Method for generating cipher code, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110138551A
CN110138551A CN201910372028.0A CN201910372028A CN110138551A CN 110138551 A CN110138551 A CN 110138551A CN 201910372028 A CN201910372028 A CN 201910372028A CN 110138551 A CN110138551 A CN 110138551A
Authority
CN
China
Prior art keywords
data
encrypted message
password
bluetooth address
code
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
CN201910372028.0A
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.)
Shenzhen Water World Co Ltd
Original Assignee
Shenzhen Water World 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 Shenzhen Water World Co Ltd filed Critical Shenzhen Water World Co Ltd
Priority to CN201910372028.0A priority Critical patent/CN110138551A/en
Publication of CN110138551A publication Critical patent/CN110138551A/en
Pending legal-status Critical Current

Links

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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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
    • G07C2009/0042Electronically 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 the transmitted data signal containing a code which is changed

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Lock And Its Accessories (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

This application discloses a kind of method for generating cipher code, device, computer equipment and storage mediums, method includes: the first password information and the first Bluetooth address data for obtaining first terminal and sending, and the first password information includes that first password data and first use duration data;Judge in preset password library with the presence or absence of the second encrypted message identical with the first password information;If so, the first password data, described first are carried out cryptographic calculation using duration data and the first Bluetooth address data, to generate third encrypted message.Solves the problems, such as existing unlocking pin not enough safety and not convenient enough, the safety and convenience of realization raising unlocking pin.

Description

Method for generating cipher code, device, computer equipment and storage medium
Technical field
This application involves field of information security technology is arrived, a kind of method for generating cipher code, device, computer are especially related to Equipment and storage medium.
Background technique
With the fast development of science and technology, tradition machinery locks the demand that can no longer meet user, and smart lock has Higher safety, it is easy to use and convenient for management.Most of existing smart lock is fixed password (such as numerical ciphers, fingerprint Password etc.) unlock or radio frequency card unlock, but these unlocking pins all not enough safety or it is not convenient enough.For example, entering in user Firmly when hotel, using the smart lock of CUSTOM HOUSE HOTEL (radio frequency card) unlock door, user is needed to carry CUSTOM HOUSE HOTEL in this way, there are rooms Block the possibility lost;Once CUSTOM HOUSE HOTEL is lost, then needs user to handle to hotel and report the loss in the elaborate formalities such as CUSTOM HOUSE HOTEL and room Property existing for security risk it is higher;And the risk for equally existing and being stolen when being unlocked using fixed password, copy.
Summary of the invention
The application's is designed to provide a kind of method for generating cipher code, device, computer equipment and storage medium, it is intended to solve Certainly existing unlocking pin not enough safety and not convenient enough technical problem.
The application proposes a kind of method for generating cipher code, comprising:
First password information and the first Bluetooth address data that first terminal is sent are obtained, first password information includes first Password and first uses duration data;
Judge in preset password library with the presence or absence of the second encrypted message identical with first password information;
If so, first password data, first are carried out encryption fortune using duration data and the first Bluetooth address data It calculates, to generate third encrypted message.
Further, before the step of obtaining first password information and the first Bluetooth address data that first terminal is sent, Include:
It receives the second code data and second that second terminal is sent and uses duration data;
It uses duration data as the second encrypted message the second code data and second, and the second encrypted message is saved Into preset password library.
Further, judge the step that whether there is the second encrypted message identical with first password information in preset password library Suddenly, comprising:
First password information is matched one by one with multiple second encrypted messages in preset password library, it is default to judge It whether there is the second encrypted message of target in cryptographic libraries, the second code data of the second encrypted message of target and second use duration Data are identical using duration data as first password data and first respectively;
If so, determining there is the second encrypted message identical with first password information in preset password library.
Further, first password data, first are encrypted using duration data and the first Bluetooth address data Operation, the step of to generate third encrypted message after, comprising:,
The 4th encrypted message that first terminal is sent is obtained, the 4th encrypted message includes the 4th code data, third use Duration data and third Bluetooth address data;
Judge whether the 4th encrypted message is identical as first password information;
If so, unlocking control instruction is generated according to the 4th encrypted message, to be unlocked operation.
Further, first password data, first are encrypted using duration data and the first Bluetooth address data Operation, the step of to generate third encrypted message after, comprising:
Unlocking control instruction is generated according to third encrypted message, and is counted at the beginning of recording generation unlocking control instruction According to;
Operation is unlocked according to unlocking control instruction.
Further, after the step of being unlocked operation according to unlocking control instruction, further includes:
The 5th encrypted message of current time point data and first terminal transmission is obtained, the 5th encrypted message includes the 5th close Code data and the 5th Bluetooth address data;
Judge the 5th encrypted message Bluetooth address bluetooth data number of addresses whether identical as the first password information According to;
If so, judging whether the corresponding duration value of time difference data between current point in time and sart point in time is greater than First uses the corresponding duration value of duration data;
If being using duration data, the unlocking control instruction for being unlocked operation is generated according to the 5th encrypted message.
Further, first password data, first are encrypted using duration data and the first Bluetooth address data Operation, the step of to generate third encrypted message, comprising:
First password data, first are obtained using corresponding first number of duration data and the first Bluetooth address data Word text, the second digital text and third digital text;
According to default combination, the first digital text, the second digital text and third digital text are combined, obtained To combination digital text;
According to predetermined encryption algorithm, combination digital text is encrypted, the ciphertext of specified bytes is obtained;
According to default operation rule, ciphertext is subjected to operation, obtains third encrypted message;Default operation rule includes point It cuts, digitwise operation, one of logical operation or arithmetical operation or a variety of.
The application also proposes a kind of password generating apparatus, comprising:
First obtains module, for obtaining the first password information and the first Bluetooth address data of first terminal transmission, the One encrypted message includes that first password and first use duration data;
First judgment module, for judging in preset password library with the presence or absence of the second password identical with first password information Information;
First generation module is used for if so, using duration data and the first bluetooth by first password data, first Location data carry out cryptographic calculation, to generate third encrypted message.
The application also proposes that a kind of computer equipment, including memory and processor, memory are stored with computer program, The step of processor realizes above-mentioned method for generating cipher code when executing computer program.
The application also proposes a kind of storage medium, is stored thereon with computer program, and computer program is executed by processor The step of Shi Shixian above-mentioned method for generating cipher code.
The application uses duration data and the first Bluetooth address number by obtaining first password, first that first terminal is sent According to, so that unlocking pin has timeliness, make intelligent lock device always exist security risk after avoiding unlocking pin from revealing, with And the address bluetooth mac of first terminal can uniquely identify first terminal, therefore using the address bluetooth mac of first terminal as solution The component part of lock cipher can reduce the risk that unlocking pin is stolen, so that the safety of unlocking pin is higher;And first Terminal can be the mobile devices such as the portable mobile phone of user, smartwatch, carry other equipment without user, also not It needs to learn unlocking pin by heart, so that unlock operation is more convenient;By judging to whether there is and first in preset password library Identical second encrypted message of encrypted message, and when there is the second encrypted message identical with first password information, then by the One code data, first carry out cryptographic calculation using duration data and the first Bluetooth address data, to generate third message in cipher Breath, thus when in use in long data, using third encrypted message as the unlocking pin of the subsequent unlock of intelligent lock device, so that solution Lock cipher has higher safety.
Detailed description of the invention
The step schematic diagram of method for generating cipher code in one embodiment of Fig. 1 the application;
The structural schematic diagram of password generating apparatus in one embodiment of Fig. 2 the application;
The structural schematic diagram of password generating apparatus in another embodiment of Fig. 3 the application;
The structural schematic diagram of first judgment module in one embodiment of Fig. 4 the application in password generating apparatus;
The structural schematic diagram of password generating apparatus in the another embodiment of Fig. 5 the application;
The structural schematic diagram of password generating apparatus in Fig. 6 the application another embodiment;
The structural schematic diagram of password generating apparatus in Fig. 7 the application a further embodiment;
The structural schematic diagram of the first generation module in one embodiment of Fig. 8 the application in password generating apparatus;
The structural schematic diagram of computer equipment in one embodiment of Fig. 9 the application;
The structural schematic diagram of storage medium in one embodiment of Figure 10 the application.
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the application purpose.
Specific embodiment
It should be appreciated that specific embodiment described herein is only used to explain the application, it is not used to limit the application.
Referring to Fig.1, a kind of method for generating cipher code in one embodiment of the application, comprising:
S1, the first password information and the first Bluetooth address data, first password information for obtaining first terminal transmission include First password and first uses duration data;
S2 judges in preset password library with the presence or absence of the second encrypted message identical with first password information;
S3, if so, first password data, first are encrypted using duration data and the first Bluetooth address data Operation, to generate third encrypted message.
The above method can be applied to intelligent lock device, and above-mentioned intelligence lock device may include intelligent door lock, equipped with application lock Intelligent terminal etc., above-mentioned intelligent terminal may include mobile phone, tablet computer, PDA (Personal Digital Assistant, it is a Personal digital assistant), POS (Point of Sales, point-of-sale terminal), desktop computer, any terminal device such as vehicle-mounted computer.It is above-mentioned First terminal may include that mobile phone, tablet computer, PDA, POS, smartwatch, Intelligent bracelet, intelligent glasses etc. are arbitrarily removable whole End equipment.Above-mentioned intelligence lock device and first terminal are equipped with bluetooth module, and preferably by bluetooth connection.Above-mentioned first eventually The address bluetooth mac at end can uniquely identify first terminal, therefore using the address bluetooth mac of first terminal as unlocking pin Component part can reduce the risk that unlocking pin is stolen, so that the safety of unlocking pin is higher;And first terminal can be The mobile devices such as the portable mobile phone of user, smartwatch carry other equipment without user, also do not need to learn by heart Unlocking pin, so that unlock operation is more convenient.
Such as above-mentioned steps S1, above-mentioned intelligence lock device can be connected with first terminal by modes such as mobile network, WIFI, bluetooths It connects, since above-mentioned first Bluetooth address data can be used as the unique identification of first terminal, it is advantageous to be bluetooth connection, therefore intelligence Energy lock device can be by acquisition and mailing address when first terminal bluetooth connection, to obtain the first Bluetooth address of first terminal Data, i.e., intelligent lock device can only by identifying the first Bluetooth address data with first terminal bluetooth connection, and with other ends The the first Bluetooth address data that can not then recognize first terminal when bluetooth connection are held (can only to recognize the bluetooth of other terminals Address date) so that unlocking pin has more safety.Above-mentioned connection type is only used for for example, not as this is limited The implementation means of application.The first password data and first that above-mentioned first password information can edit on first terminal for user make Used time long data, the first password data and first that the transmission of other terminals can also be received for first terminal use duration data. Wherein, above-mentioned first password data can be for text password, graphic code (two dimensional code, bar code etc.) etc., the first long number when using According to the term of validity that can be used as unlocking pin, make unlocking pin that there is timeliness, to avoid smart lock is set after password leakage It is standby to always exist security risk.
Such as above-mentioned steps S2, above-mentioned preset password library can be set to the database communicated to connect with intelligent lock device, can also set Memory bank on intelligent lock device.Multiple second encrypted messages, each second encrypted message can be stored in preset password library Including at least the second code data and the second use duration data, and the second code data and second uses the presence pair of duration data It should be related to.If the second code data in second encrypted message and second using duration data respectively with first password information In first password data and first it is identical using duration data when, then can be determined that exist in preset password library and first password Identical second encrypted message of information, otherwise, it is determined that (i.e. first password information is invalid) is not present.
As above-mentioned steps S3 is then said when there is the second encrypted message identical with first password information in preset password library Bright first password information is effective, and above-mentioned first password information and the first Bluetooth address data are carried out cryptographic calculation.Specifically, According to predetermined encryption algorithm (such as DES algorithm, 3DES algorithm, MD5 algorithm and aes algorithm), first password data, first are made Used time long number is accordingly and the first Bluetooth address data are encrypted, and obtains corresponding ciphertext, if first password data are 123456, First use duration data are 72 hours, and the first Bluetooth address data are 3058902E8DFA, then obtain ciphertext after encrypting 123456723058902E8DFA;Further according to default operation rule (such as segmentation, digitwise operation, logical operation or arithmetical operation Deng), third encrypted message is generated after ciphertext is carried out operation, and third encrypted message is saved to above-mentioned preset password library.On State cryptographic calculation mode be only used for for example, and non-limiting the application implementation means.When in use in long data, by third Unlocking pin of the encrypted message as the subsequent unlock of intelligent lock device, to make unlocking pin that there is higher safety.
Further, in one embodiment, the effective degree of the second encrypted message only once, when generation third message in cipher After breath, the second encrypted message is invalid, can remove the second encrypted message from preset password library, invalid in cryptographic libraries to reduce Data, to improve the judging efficiency in step S2.In another embodiment, the second encrypted message has multiple effective time Number, after generating third encrypted message, the second encrypted message is still effective, then for multiple with identical as the second encrypted message First password information generate third encrypted message, i.e., support multiple first terminals to unlock simultaneously, meet user demand.
In one embodiment, the step of above-mentioned acquisition first terminal is sent first password information and the first Bluetooth address data Before rapid S1, comprising:
S01 receives the second code data and second that second terminal is sent and uses duration data;
Second code data and second are used duration data as the second encrypted message by S02, and by the second encrypted message It saves into preset password library.
Such as above-mentioned steps S01, above-mentioned second terminal and intelligent lock device are communicated to connect, when the second password and second are used Long data are sent to intelligent lock device.Above-mentioned second password can be text password, graphic code (two dimensional code, bar code etc.) etc..Into One step, intelligent lock device can be equipped with administrator right, it carries out second terminal and intelligent lock device to establish binding relationship, even if The administrator right that second terminal has intelligent lock device is obtained, only has the administrator right of intelligent lock device just can be to intelligence Can lock device send the second code data and second and use duration data, so that other terminals be avoided to send the to intelligent lock device Two code datas and second using duration data to configure the data of the second encrypted message in default library, and then smart lock is avoided to set It is standby to be attacked easily by hacker, to improve the safety of intelligent lock device.Further, there is the administrator right of intelligent lock device Second terminal, can be by sending unlocking control instruction so that the unlock of intelligent lock device, so that first terminal be avoided to lose and lead It causes intelligent lock device that can not unlock, and then is more in line with user experience.
As the second code data and second are used duration data close as second by above-mentioned steps S02 in one embodiment Code information is added to the mapping table of password and duration in preset password library, and above-mentioned mapping table includes the second password number According to second, using duration data, there are corresponding relationships.In another embodiment, the second code data and second are used into duration Data obtain the second encrypted message after carrying out cryptographic calculation, and the second encrypted message is added to the encrypted message in preset password library In table.
In a specific embodiment, above-mentioned second terminal is hotel's background terminal, and above-mentioned intelligence lock device is hotel visitor The intelligent door lock in room, when guest moves in hotel, attendant is corresponding by the room that hotel's background terminal is moved in guest Intelligent door lock sends the second code data and second and uses duration data, and intelligent door lock, which receives second code data and second, to be made Used time long data, and saving as the second encrypted message to preset password library, intelligent door lock is to hotel's background terminal after preservation Return save successfully as a result, simultaneously attendant by the second code data and second using duration data inform guest, by visitor People edits the second code data and second in its terminal (first terminal) and passes through hotel using duration data or attendant Second code data and second are sent to guest's terminal (first terminal) using duration data by background terminal, for executing State step S1.
In one embodiment, judge in preset password library with the presence or absence of the second encrypted message identical with first password information Step S2, comprising:
S21 matches first password information with multiple second encrypted messages in preset password library one by one, with judgement In preset password library whether there is the second encrypted message of target, second code data of second encrypted message of target and Described second uses duration data, identical using duration data as the first password data and described first respectively;
S22, if so, determining there is the second encrypted message identical with first password information in preset password library.
Such as above-mentioned steps S21 and S22, in one embodiment, when to be added to password corresponding with duration for the second encrypted message When relation table, then transfers the second code data in mapping table and second and use duration data, and judge that first is close one by one Whether code the second code data of each of data and the second encrypted message is consistent, if there is the consistent second password number of password According to, then judge whether second code data corresponding second is consistent using duration data with first using duration data, if when It is long consistent, then determine there is the second encrypted message identical with first password information in preset password library.In another embodiment, When the second encrypted message is added in encrypted message table, then the second encrypted message in encrypted message table is transferred, and to second Encrypted message obtains the second password and second and uses duration data after being decrypted, and judges first password data and second one by one Whether the second code data of each of encrypted message consistent, if there is consistent second code data of password, judge this Whether two code datas corresponding second are consistent using duration data with first using duration data, if duration is consistent, determine There is the second encrypted message identical with first password information in preset password library.First password data and second close should be met Code data are identical, meet first again and use duration data identical with second using duration data, to improve intelligent lock device Safety.
In one embodiment, above-mentioned to carry out first password, first using duration data and the first Bluetooth address data Cryptographic calculation, after the step S3 to generate third encrypted message, comprising:
S310a, obtains the 4th encrypted message that first terminal is sent, and the 4th encrypted message includes the 4th code data, the Four use duration data and the 4th Bluetooth address data;
S302a judges whether the 4th encrypted message is identical as the first password information;
S303a generates unlocking control instruction according to the 4th encrypted message if being, to be unlocked operation.
Such as above-mentioned steps S301a, after intelligent lock device generates third encrypted message, above-mentioned third encrypted message is unlock intelligence The newest unlocking pin of energy lock device.Therefore, in the present embodiment, when being unlocked next time, need to obtain first terminal The 4th encrypted message, with for being matched with third encrypted message.Wherein, third encrypted message includes first password data, the One uses duration data and the first Bluetooth address data, so the 4th encrypted message should also be as comprising code data, using duration Data and Bluetooth address data, i.e. respectively the 4th code data, the 4th use duration data and the 4th Bluetooth address data.
It is above-mentioned to judge whether the 4th encrypted message is identical as the first password information such as above-mentioned steps S302a and S303a It specifically includes: judging whether the 4th code data and first password data are identical, judge that the 4th is made using duration data with first Used time, whether long data were identical, and judged whether the 4th Bluetooth address data and the first Bluetooth address data are identical.Due to Three encrypted messages are obtained by cryptographic calculation, so needs first solve third encrypted message when carrying out information matches Close operation, specifically, first according to the corresponding inverse operation rule of above-mentioned default operation rule, after carrying out operation to third encrypted message Ciphertext is obtained, further according to the corresponding default decipherment algorithm of above-mentioned predetermined encryption algorithm, obtains first after which is decrypted Code data, first use duration data and the first Bluetooth address data.When first password data are identical as the 4th code data, First uses identical duration data and the first Bluetooth address data and the 4th Bluetooth address data with the 4th using duration data When identical, then illustrate that first terminal is the terminal for sending first password information and the first Bluetooth address data to intelligent lock device, To which intelligent lock device generates unlocking control instruction, and it is unlocked operation.Meet password, using duration data and bluetooth simultaneously Address date is identical, improves the safety of unlocking pin.
In one embodiment, above-mentioned to carry out first password, first using duration data and the first Bluetooth address data Cryptographic calculation, after the step S3 to generate third encrypted message, comprising:
S301b, according to third encrypted message generate unlocking control instruction, and record generate unlocking control instruction at the beginning of Between point data;
S302b is unlocked operation according to unlocking control instruction.
Such as above-mentioned steps S301b and S302b, intelligent lock device generates third encrypted message, then illustrates that first terminal has led to Password authentification is crossed, therefore unlocking control instruction is generated according to third encrypted message, to be unlocked operation.Due to third message in cipher Include the use duration data of intelligent lock device in breath, is counted so needing to obtain using the initial time that duration data come into force According to, therefore the start time point to come into force as first using duration data is put at the beginning of recording generation unlocking control instruction, So that third encrypted message has timeliness, so that encrypted message is suitable for the unlock of hotel's door lock, kith and kin are coming More usage scenarios such as the unlock of door lock when family is lived in short term.
In one embodiment, it is unlocked according to unlocking control instruction after the step S32b of operation, further includes:
S303b, obtains the 5th encrypted message that current point in time and first terminal are sent, and the 5th encrypted message includes the 5th Password and the 5th Bluetooth address data;
S304b judges whether the 5th encrypted message is identical as the first password information;
S305b, if so, judging that the corresponding duration value of time difference data between current point in time and sart point in time is It is no to be greater than first using the corresponding duration value of duration data;
S306b refers to if being using duration data according to the unlocking control that the generation of the 5th encrypted message is unlocked operation It enables.
Such as above-mentioned steps S303b and S304b, above-mentioned 5th encrypted message is after being unlocked according to third encrypted message The corresponding encrypted message of password authentification.It is above-mentioned to judge that whether identical as the first password information the 5th encrypted message is specific It include: to judge whether the 5th code data and first password data are identical, and judge that the 5th Bluetooth address data are blue with first Whether tooth address date is identical.In the present embodiment, after operation being decrypted in third encrypted message, first password number is obtained According to, first using after duration data and the first Bluetooth address data, in order to accelerate deterministic process, so not using duration to first Data are judged that (certainly in other embodiments, the 5th encrypted message may also include the 5th using duration data, and then may be used also To judge whether first is identical using duration data as the 5th using duration data), only judge the 5th code data and first close Whether code data are identical, and judge whether the 5th Bluetooth address data and the first Bluetooth address data are identical.
Such as above-mentioned steps S305b and S306b, above-mentioned the 5th code data of working as is identical as first password data, and the 5th is blue When tooth address date is identical as the first Bluetooth address data, then illustrate that the 5th encrypted message and the third for unlocking intelligent lock device are close Code information is consistent, but since third encrypted message has timeliness, so further judging whether current point in time exceeds timeliness Time difference between range, i.e. current point in time and sart point in time whether be greater than first use duration data, when the time difference not Duration data are used greater than first, then illustrate timeliness range of the current point in time without departing from third encrypted message, i.e. third password Information still has timeliness.It should be noted that in other embodiments, can also first judge current point in time and start Whether the time difference between time point, which is greater than first, uses duration data, if so, judging the 5th code data and first close again Whether code data are identical, and judge whether the 5th Bluetooth address data and the first Bluetooth address data are identical, if being, intelligence Energy lock device is unlocked operation.
In one embodiment, first password, first are subjected to cryptographic calculation using duration data and Bluetooth address data, To generate the step S3 of third encrypted message, comprising:
S31 obtains first password data, first using duration data and the first Bluetooth address data corresponding the One digital text, the second digital text and third digital text;
First digital text, the second digital text and third digital text are carried out group according to default combination by S32 It closes, obtains combination digital text;
Combination digital text is encrypted according to predetermined encryption algorithm, obtains the ciphertext of specified bytes by S33;
Ciphertext is carried out operation, obtains third encrypted message by S34 according to default operation rule;Default operation rule includes One of segmentation, digitwise operation, logical operation or arithmetical operation are a variety of.
Such as above-mentioned steps S31, above-mentioned first digital text, the second digital text and third digital text have respectively corresponded finger Fixed length.For example, the length of corresponding first digital text of first password is six digits, first is corresponding using duration data The length of second digital text is six digits, and the length of the corresponding third digital text of the first Bluetooth address data is 15 digits. When insufficient designated length, using designation number (any one number of such as 0-9) filling, such as using 0 filling, first password data are 123456, then the first digital text is 123456, and the first use duration data are 360 hours, then the second digital text is 000360 (or 360000), the first Bluetooth address data are 3058902E8DFA, then third digital text is 00305890E8DFA (or 305890E8DFA00).When being more than designated length, then error message can be reported, and prompt to re-enter designated length Information.
Such as above-mentioned steps S32, above-mentioned default combination can be for the first digital text, the second digital text and third number Word text is respectively whole combination, can also be in the first digital text, the second digital text and third digital text Designated position is the combination of sequence.For example, default combination is whole combination, then combining digital text can be 12345600036000305890E8DFA (can also be 00036012345600305890E8DFA etc., no longer exhaustive herein); Default combination is the combination that designated position is sequence, then combining digital text can be 12030500FA3456030890E8D60 (can also be 030890E81203056D60500FA34 etc., no longer exhaustive herein).
Such as above-mentioned steps S33 and S34, above-mentioned predetermined encryption algorithm includes DES, 3DES, MD5 etc., for example, being calculated using MD5 Method will then combine the ciphertext of digital text 12345600036000305890E8DFA encryption one group of 16 byte of generation.Using point It cuts, after digitwise operation, one of logical operation or arithmetical operation or a variety of operations, obtains third encrypted message.By to One password, first carry out cryptographic calculation using duration data and the first Bluetooth address data, improve the peace of third encrypted message Quan Xing.
Referring to Fig. 2, a kind of password generating apparatus in one embodiment of the application, comprising:
First obtains module 1, for obtaining the first password information and the first Bluetooth address data of first terminal transmission, the One encrypted message includes that first password data and first use duration data;
First judgment module 2, it is close with the presence or absence of identical with first password information second in preset password library for judging Code information;
First generation module 3 is used for if so, first password data, first are used duration data and the first bluetooth Address date carries out cryptographic calculation, to generate third encrypted message.
Referring to Fig. 3, in one embodiment, above-mentioned apparatus further include:
Receiving module 01, the second code data and second for receiving second terminal transmission use duration data;
Preserving module 02, for using duration data as the second encrypted message the second code data and second, and will Second encrypted message is saved into preset password library.
Referring to Fig. 4, in one embodiment, above-mentioned first judgment module 1, comprising:
Judging unit 21, for carrying out first password information and multiple second encrypted messages in preset password library one by one Matching, to judge in preset password library with the presence or absence of the second encrypted message of target, described the of second encrypted message of target Two code datas and described second use duration data, use duration data with the first password data and described first respectively It is identical;
Judging unit 22 is used for if so, determining close in the presence of identical with first password information second in preset password library Code information.
Referring to Fig. 5, in one embodiment, above-mentioned apparatus further include:
Second obtains module 301a, and for obtaining the 4th encrypted message of first terminal transmission, the 4th encrypted message includes 4th code data, the 4th use duration data and the 4th Bluetooth address data;
Second judgment module 302a, for judging whether the 4th encrypted message is identical as the first password information;
Second generation module 303a, if unlocking control instruction is generated according to the 4th encrypted message for being, to carry out Unlock operation.
Referring to Fig. 6, in one embodiment, above-mentioned apparatus further include:
Third generation module 301b for generating unlocking control instruction according to third encrypted message, and records generation and unlocks Point data at the beginning of control instruction;
Unlocked state 302b, for being unlocked operation according to unlocking control instruction.
Referring to Fig. 7, in one embodiment, above-mentioned apparatus further include:
Third obtains module 303b, the 5th encrypted message sent for obtaining current point in time and first terminal, and the 5th Encrypted message includes the 5th code data and the 4th Bluetooth address data;
Third judgment module 304b, for judging whether the 5th encrypted message is identical as the first password information;
4th judgment module 305b, for if so, judging the time between current time point data and sart point in time Whether the corresponding duration value of difference is greater than first using the corresponding duration value of duration data;
4th generation module 306b, for if so, generating the unlocking control for being unlocked operation according to the 5th encrypted message System instruction.
Referring to Fig. 8, in one embodiment, above-mentioned first generation module 3, comprising:
Acquiring unit 31, for obtaining first password data, the first use duration data and the first Bluetooth address data Corresponding first digital text, the second digital text and third digital text;
Assembled unit 32 is used for according to default combination, by the first digital text, the second digital text and third number Text is combined, and obtains combination digital text;
Encryption unit 33, for combination digital text being encrypted, specified bytes are obtained according to predetermined encryption algorithm Ciphertext;
Arithmetic element 34, for ciphertext being carried out operation, obtains third encrypted message according to operation rule being preset;It is default Operation rule includes one of segmentation, digitwise operation, logical operation or arithmetical operation or a variety of.
It should be noted that it is apparent to those skilled in the art that, for convenience and simplicity of description, on The device of description is stated, the specific work process of module and unit can refer to corresponding processes in the foregoing method embodiment, herein It repeats no more.
Referring to Fig. 9, in one embodiment of the application, computer equipment 1001 includes memory 1003 and processor 1002, institute It states memory 1003 and is stored with computer program 1004, the processor 1002 is realized when executing the computer program 1004 The step of stating method.
It will be understood by those skilled in the art that computer equipment 1001 described herein is above-mentioned involved for executing One or more equipment in method described herein.These equipment can specially be designed and be made for required purpose It makes, or also may include the known device in general purpose computer.These equipment have the computer program that is stored in it or Application program, these computer programs are selectively activated or are reconstructed.Such computer program can be stored in equipment (example Such as, computer) in readable medium or it is stored in and is suitable for storing e-command and is coupled to any kind of Jie of bus respectively In matter, the computer-readable medium include but is not limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and Magneto-optic disk), ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random storage Device), EPROM (Erasable Programmable Read-Only Memory, Erarable Programmable Read only Memory), (Electrically Erasable Programmable Read-Only Memory, electric erazable programmable is read-only to be deposited EEPROM Reservoir), flash memory, magnetic card or light card.It is, readable medium includes by equipment (for example, computer) can read Form storage or transmission information any medium.
Referring to Fig.1 0, in one embodiment of the application, storage medium 2001 is stored thereon with computer program 1004, the meter The step of calculation machine program 1004 realizes above-mentioned method for generating cipher code when being executed by processor.
Present invention also provides a kind of computer program products comprising instruction, when run on a computer, so that Computer executes method for generating cipher code described in above embodiments.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present application.The computer can To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead Body medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
The foregoing is merely preferred embodiment of the present application, are not intended to limit the scope of the patents of the application, all utilizations Equivalent structure or equivalent flow shift made by present specification and accompanying drawing content is applied directly or indirectly in other correlations Technical field, similarly include in the scope of patent protection of the application.

Claims (10)

1. a kind of method for generating cipher code characterized by comprising
First password information and the first Bluetooth address data that first terminal is sent are obtained, the first password information includes first Code data and first uses duration data;
Judge in preset password library with the presence or absence of the second encrypted message identical with the first password information;
If so, by the first password data, described first using duration data and the first Bluetooth address data into Row cryptographic calculation, to generate third encrypted message.
2. method for generating cipher code according to claim 1, which is characterized in that the first of the acquisition first terminal transmission is close Before the step of code information and the first Bluetooth address data, comprising:
It receives the second code data and second that second terminal is sent and uses duration data;
Use duration data as second encrypted message second code data and described second, and by described second Encrypted message is saved into the preset password library.
3. method for generating cipher code according to claim 2, which is characterized in that whether there is in the judgement preset password library The step of the second encrypted message identical with the first password information, comprising:
The first password information is matched one by one with multiple second encrypted messages in the preset password library, with Judge that, with the presence or absence of the second encrypted message of target in the preset password library, described the second of second encrypted message of target is close Code data and described second use duration data, use duration data phase with the first password data and described first respectively Together;
If so, determining there is the second encrypted message identical with the first password information in the preset password library.
4. method for generating cipher code according to claim 1, which is characterized in that it is described by the first password data, it is described First carries out cryptographic calculation using duration data and the first Bluetooth address data, the step of to generate third encrypted message Later, comprising:
The 4th encrypted message that first terminal is sent is obtained, the 4th encrypted message includes the 4th code data, the 4th use Duration data and the 4th Bluetooth address data;
Judge whether the 4th encrypted message is identical as the first password information;
If so, unlocking control instruction is generated according to the 4th encrypted message, to be unlocked operation.
5. method for generating cipher code according to claim 1, which is characterized in that it is described by the first password data, it is described First carries out cryptographic calculation using duration data and the first Bluetooth address data, the step of to generate third encrypted message Later, comprising:
Unlocking control instruction is generated according to the third encrypted message, and at the beginning of recording and generating the unlocking control instruction Point data;
Operation is unlocked according to the unlocking control instruction.
6. method for generating cipher code according to claim 5, which is characterized in that described to be carried out according to the unlocking control instruction After the step of unlock operation, further includes:
The 5th encrypted message of current time point data and first terminal transmission is obtained, the 5th encrypted message includes the 5th close Code data and the 5th Bluetooth address data;
Judge whether the 5th encrypted message is identical as the first password information;
If so, when judging that time difference data between the current time point data and the time started point data is corresponding Whether long value is greater than described first using the corresponding duration value of duration data;
If so, generating the unlocking control instruction for being unlocked operation according to the 5th encrypted message.
7. method for generating cipher code according to claim 1, which is characterized in that it is described by the first password data, it is described First carries out cryptographic calculation using duration data and the first Bluetooth address data, to generate the step of third encrypted message Suddenly, comprising:
It obtains the first password data, described first respectively corresponded using duration data and the first Bluetooth address data The first digital text, the second digital text and third digital text;
According to default combination, by first digital text, second digital text and the third digital text into Row combination obtains combination digital text;
According to predetermined encryption algorithm, the combination digital text is encrypted, the ciphertext of specified bytes is obtained;
According to default operation rule, the ciphertext is subjected to operation, obtains the third encrypted message;The default operation rule Including one of segmentation, digitwise operation, logical operation or arithmetical operation or a variety of.
8. a kind of password generating apparatus characterized by comprising
First obtains module, for obtaining the first password information and the first Bluetooth address data of first terminal transmission, described the One encrypted message includes that first password data and first use duration data;
First judgment module, for judging in preset password library with the presence or absence of the second password identical with the first password information Information;
First generation module is used for if so, by the first password data, described first using duration data and described the One Bluetooth address data carry out cryptographic calculation, to generate third encrypted message.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the processor realizes method for generating cipher code described in any one of claims 1 to 7 when executing the computer program Step.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is held by processor The step of method for generating cipher code described in any one of claims 1 to 7 is realized when row.
CN201910372028.0A 2019-05-06 2019-05-06 Method for generating cipher code, device, computer equipment and storage medium Pending CN110138551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910372028.0A CN110138551A (en) 2019-05-06 2019-05-06 Method for generating cipher code, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910372028.0A CN110138551A (en) 2019-05-06 2019-05-06 Method for generating cipher code, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110138551A true CN110138551A (en) 2019-08-16

Family

ID=67576216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910372028.0A Pending CN110138551A (en) 2019-05-06 2019-05-06 Method for generating cipher code, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110138551A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249457A1 (en) * 2008-03-25 2009-10-01 Graff Bruno Y Accessing secure network resources
CN104537738A (en) * 2014-02-24 2015-04-22 袁磊 Dynamic coded lock system for acquiring codes by virtue of table look-up
CN106548554A (en) * 2016-12-22 2017-03-29 贵州商学院 A kind of bluetooth door opening method and door lock based on mobile terminal APP
CN107181591A (en) * 2017-05-10 2017-09-19 上海上讯信息技术股份有限公司 The method and apparatus generated for system password
CN107481181A (en) * 2017-07-27 2017-12-15 银江股份有限公司 A kind of picture hidden method, restoring method and picture for being used to protect individual privacy hides system
CN107657692A (en) * 2017-09-12 2018-02-02 佛山君兰智能科技有限公司 A kind of temporary password generates system and method
CN108012265A (en) * 2017-12-15 2018-05-08 北京坤腾畅联科技有限公司 Automatic connection method and system based on WIFI

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249457A1 (en) * 2008-03-25 2009-10-01 Graff Bruno Y Accessing secure network resources
CN104537738A (en) * 2014-02-24 2015-04-22 袁磊 Dynamic coded lock system for acquiring codes by virtue of table look-up
CN106548554A (en) * 2016-12-22 2017-03-29 贵州商学院 A kind of bluetooth door opening method and door lock based on mobile terminal APP
CN107181591A (en) * 2017-05-10 2017-09-19 上海上讯信息技术股份有限公司 The method and apparatus generated for system password
CN107481181A (en) * 2017-07-27 2017-12-15 银江股份有限公司 A kind of picture hidden method, restoring method and picture for being used to protect individual privacy hides system
CN107657692A (en) * 2017-09-12 2018-02-02 佛山君兰智能科技有限公司 A kind of temporary password generates system and method
CN108012265A (en) * 2017-12-15 2018-05-08 北京坤腾畅联科技有限公司 Automatic connection method and system based on WIFI

Similar Documents

Publication Publication Date Title
US10572682B2 (en) Secure high speed data storage, access, recovery, and transmission of an obfuscated data locator
CN104700268B (en) A kind of method of mobile payment and mobile device
CN105915502B (en) The method and system being added conducive to network
EP2731040B1 (en) Computer system for storing and retrieval of encrypted data items, client computer, computer program product and computer-implemented method
CN110365670A (en) Blacklist sharing method, device, computer equipment and storage medium
CN111787530B (en) Block chain digital identity management method based on SIM card
CN107820238B (en) SIM card, blockchain application security module, client and security operation method thereof
CN104320389B (en) A kind of fusion identity protection system and method based on cloud computing
CN109325342A (en) Identity information management method, apparatus, computer equipment and storage medium
CN106503492A (en) A kind of authorization management method, server, customer equipment and system
CN109151820A (en) One kind being based on the safety certifying method and device of " one machine of a people, one card No.1 "
CN108337210A (en) Equipment configuration method and device, system
CN104636682A (en) Password management system and method based on hardware device
CN106778178A (en) The call method and device of fingerprint business card
US20020044655A1 (en) Information appliance and use of same in distributed productivity environments
CA2800939C (en) A method of authorizing a person, an authorizing architecture and a computer program product
CN107124407A (en) Data transmission method, device, readable storage medium storing program for executing, electronic equipment and system
CN108701200A (en) improved storage system
CN110138551A (en) Method for generating cipher code, device, computer equipment and storage medium
CN115331336B (en) NFC digital key mobile equipment adaptation method and device based on card simulation scheme
Jayasinghe et al. Extending emv tokenised payments to offline-environments
CN105095780B (en) The access method and device of test port in a kind of chip
Akram et al. Recovering from a lost digital wallet
Armando et al. Trusted host-based card emulation
CN104134025B (en) Mobile terminal locking method, device and mobile terminal based on SIM card

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190816

RJ01 Rejection of invention patent application after publication