CN113963468B - Unlocking code generation method and device - Google Patents
Unlocking code generation method and device Download PDFInfo
- Publication number
- CN113963468B CN113963468B CN202111239104.4A CN202111239104A CN113963468B CN 113963468 B CN113963468 B CN 113963468B CN 202111239104 A CN202111239104 A CN 202111239104A CN 113963468 B CN113963468 B CN 113963468B
- Authority
- CN
- China
- Prior art keywords
- unlocked
- lock
- unlocking
- initial parameters
- lockset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000004590 computer program Methods 0.000 claims description 16
- 238000003860 storage Methods 0.000 claims description 9
- 238000012795 verification Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000006798 recombination Effects 0.000 description 2
- 238000005215 recombination Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME 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/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Lock And Its Accessories (AREA)
Abstract
The invention discloses a method and a device for generating an unlocking code, wherein the method comprises the following steps: receiving an unlocking request of an operator for a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock; combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked; and (3) obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock. The invention can improve the safety of the unlocking code and avoid the hidden trouble of unlocking code leakage.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for generating an unlocking code.
Background
The bank self-service equipment safety management is the key point in management work, the bank self-service equipment in the current bank mostly adopts the mode of mechanical lock to guarantee the safety of cash, and manual management mechanical key and password depend on staff's own quality completely to avoid the password leakage risk, and at present this kind of mechanism exists that lawless persons steal the phenomenon of cash in the bank box through the mode of embezzling the key, brings economic loss for bank and user, also can reduce the public trust of bank simultaneously, in addition, current unlocking code setting is simpler, and lawless persons easily guess the unlocking code, have the hidden danger that the unlocking code revealed.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method for generating an unlocking code, which is used for improving the safety of the unlocking code and comprises the following steps:
Receiving an unlocking request of an operator to a lock on a bank note box, and determining lock parameters of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock, and the lock parameters comprise: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked;
Obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock; the security password is applied to the bank when the lockset is activated.
The embodiment of the invention provides a device for generating an unlocking code, which is used for improving the safety of the unlocking code and comprises the following steps:
the lock parameter determining module is used for receiving an unlocking request of an operator to a lock on a bank note box and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock, and the lock parameter comprises: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
The initial parameter determining module is used for combining the lockset parameters of the to-be-unlocked tool and determining the initial parameters of the unlocking code of the to-be-unlocked tool;
The encryption module is used for obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock; the security password is applied to the bank when the lockset is activated.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the unlocking code generation method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the unlocking code generation method.
The embodiment of the invention is as follows: receiving an unlocking request of an operator for a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock; combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked; and (3) obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock. According to the invention, by installing the dynamic coded lock on the bank note box, the manual operation in the unlocking process can be reduced, the initial parameters of the unlocking code are determined based on the lockset parameters according to the unlocking request, the unlocking code is determined based on the safety code and APHash algorithm, the safety of the unlocking code can be improved, and the hidden danger of unlocking code leakage is avoided.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of a flow of a method for generating an unlocking code in an embodiment of the present invention;
FIG. 2 is a schematic diagram showing a specific flow of step 102 in FIG. 1;
FIG. 3 is a schematic diagram showing a specific flow of step 103 in FIG. 1;
FIG. 4 is a schematic diagram of a device for generating an unlocking code according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of a specific structure of the unlock code encryption module 03 in fig. 4.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
In order to solve the technical problems that the banknote box of the existing bank self-service equipment adopts a mechanical lock, a key and a password are managed manually, the password is set simply, and hidden danger of password leakage exists, the embodiment of the invention provides a method for generating an unlocking code, which is used for improving the safety of the unlocking code, and fig. 1 is a schematic diagram of the flow of the method for generating the unlocking code in the embodiment of the invention, as shown in fig. 1, the method comprises the following steps:
Step 101: receiving an unlocking request of an operator to a lock on a bank note box, and determining lock parameters of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock, and the lock parameters comprise: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
Step 102: combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked;
Step 103: obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock; the security password is applied to the bank when the lockset is activated.
As shown in fig. 1, the embodiment of the invention is implemented by: receiving an unlocking request of an operator for a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock; combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked; and (3) obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock. According to the invention, by installing the dynamic coded lock on the bank note box, the manual operation in the unlocking process can be reduced, the initial parameters of the unlocking code are determined based on the lockset parameters according to the unlocking request, the unlocking code is determined based on the safety code and APHash algorithm, the safety of the unlocking code can be improved, and the hidden danger of unlocking code leakage is avoided.
In one embodiment, step 101 receives an unlocking request of an operator for a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool may include:
And verifying the biological characteristic information of the operator, and determining the lockset parameters of the tool to be unlocked after the biological characteristic information passes the verification.
In the specific implementation, in step 101, in order to reduce human participation in the management of the banknote box lockset of the self-service device of the bank, a dynamic coded lock can be installed on the banknote box, and an unlocking code (OTC One Time Code) of the dynamic coded lock is disposable, after unlocking and locking operations are performed each time, the original unlocking code is invalid, and a new unlocking code needs to be generated when unlocking the banknote box next time, so that illegal molecules can be stopped from cracking the codes, and the security of the banknote box is improved. Before receiving an unlocking request of an operator for a lock on a bank note box, a bank administrator can firstly establish an unlocking task and input task information in the unlocking task, wherein the task information can comprise, for example: the number and name of the designated operator, and corresponding lockset parameters, the operator can input the number and name to log in the system, select an unlocking task and issue an unlocking request, and after receiving the unlocking request of the operator, the operator can be prompted to input biometric information, wherein the biometric information can comprise: fingerprint, voice, face image and other information, the relevant information input by the operator can be verified according to the biological characteristic information of the operator stored in the system in advance, and for example, the method can comprise the following steps: fingerprint identification, voice identification, facial image identification and the like, verifying whether an operator designated in an unlocking task is consistent with an operator initiating an unlocking request, if so, executing a subsequent unlocking step, and if not, prompting that verification is not passed and unlocking fails.
In step 101, the lock parameters may include: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time, wherein the lock number is an inherent attribute of the lock, and each dynamic coded lock has a fixed lock ID, for example, the lock ID can be: 040404040404040404040404; each time an unlocking request is received, a random number may be generated, for example, it may be: 22222222; after each unlocking and locking operation is performed by the dynamic coded lock, a locking check code can be generated, for example, the following steps are: 33333333.
Fig. 2 is a schematic flowchart of step 102 in fig. 1, and in an embodiment, in step 102, combining lock parameters of a to-be-unlocked tool to determine initial parameters of an unlocking code of the to-be-unlocked tool may include:
step 1021: performing character type conversion on the random number and the locking check code, including: converting the random number and the locking check code of the character string type into a character array type;
Step 1022: and combining the lockset number with the random number after the character type conversion and the locking check code, and determining initial parameters of an unlocking code of the lockset to be unlocked.
In specific implementation, the lock number, the random number and the locking check code can be combined to determine initial parameters of the unlocking code of the to-be-unlocked tool, for example: the string type random number 22222222 and the locking check code 33333333 can be converted into the char array with the length of 32, 32323232323232323333333333333333, and then the char array and the lock number 040404040404040404040404 are combined into hexadecimal initial parameters, namely 04040404040404040404040432323232323232323333333333333333, the initial parameters are only simple combination among the lock number, the random number and the locking check code, the password characteristic is not possessed, the security is low, and the initial parameters are further encrypted through various encryption algorithms.
Fig. 3 is a schematic flowchart of step 103 in fig. 1, and in an embodiment, in step 103, a security code of the to-be-unlocked is obtained, and according to the security code, initial parameters of the unlocking code are encrypted based on APHash algorithm, and determining the unlocking code of the to-be-unlocked may include:
Step 1031: encrypting initial parameters of the unlocking code based on a national encryption algorithm SM3, and reorganizing the encrypted initial parameters;
Step 1032: adding the security password into the encrypted and recombined initial parameters, and carrying out secondary encryption on the encrypted and recombined initial parameters based on a national encryption algorithm SM 4;
Step 1033: carrying out APHash operation on the initial parameters after the secondary encryption, and determining the unlocking code of the to-be-unlocked tool.
In one embodiment, in step 1031, the reorganizing the encrypted initial parameters may include:
dividing the encrypted initial parameters into two groups of data with the same bit number;
and performing exclusive OR operation on the two groups of data, and recombining the encrypted initial parameters.
In specific implementation, in step 1031, the cryptographic algorithm SM3 is a hash algorithm, belongs to a hash algorithm, and may encrypt the initial parameters in step 102 based on the cryptographic algorithm SM3, for example, may be: firstly filling initial parameters, enabling the data length of the filled initial parameters to BE an integer multiple of 512, then grouping the filled initial parameters into a group according to 512 bits, finally performing iterative compression to obtain a group of hash value data, namely C015EC CD168F792C5CEC4CC4E537A5542BF2325E2378EC2B79A896949FD4BE6E, thus completing primary encryption of the initial parameters, then recombining the encrypted initial parameters, dividing the encrypted initial parameters into two groups of data with the same bit number, performing exclusive OR operation on the two groups of data, and halving the data length after recombination to obtain hexadecimal data, namely EBE7DE9335F795072544DA507AE31B3A, thus completing recombination of the encrypted initial parameters.
In the specific implementation, in step 103, the security password (DMK) may be applied to a security service system of a bank when the lock is activated for the first time, for further encrypting the unlocking code, a transmission password (TMK) may be applied first, then the security password is generated according to the transmission password, in step 1032, the DMK may be added into the encrypted and recombined initial parameter, and based on the national encryption algorithm SM4, the encrypted and recombined initial parameter is encrypted for the second time, where the national encryption algorithm SM4 is a block encryption algorithm, the block length of which is 128 bits, and the key length is also 128 bits. The encryption algorithm and the key expansion algorithm both adopt a 32-round nonlinear iteration structure, encryption operation is carried out by taking a word (32 bits) as a unit, each iteration operation is a round of transformation function, and initial parameters after secondary encryption can be as follows: F1F7281564FB0C11EA85F2C32BEFC3E4.
In the specific implementation, step 1033, APHash is a hash algorithm, which can convert the input of any content into an encryption mode of the output with the same length, and can decompose the multiplication into bit operation and addition and subtraction, so that the hash distribution effect is outstanding, and the method has outstanding advantages in the occasion with very strict security requirements. The initial parameters after secondary encryption can be firstly converted into char arrays with the length of 32, namely 7049705550564953545270664867494969655653705067515066697067516952, then odd numbers and even numbers in the arrays are separated, each character affects the final result according to bit operation, so that an intermediate calculated value is obtained, then the intermediate calculated value and 100000000 are subjected to remainder taking operation, an unlocking code with 8 digits after APHash operation, namely 37313465, can be determined as the final unlocking code, thus a password with higher security can be obtained through a security password (DMK), a national encryption algorithm SM3, SM4 and a APHash algorithm, communication automation is realized in the whole process, human participation is not needed, and the security and unlocking efficiency of the unlocking code are improved.
In one embodiment, after determining the unlock code of the to-be-unlocked lock in step 103, the method further includes:
after the lock is opened, the unlocking code is disabled.
When the method is implemented, after the unlocking code of the lockset to be unlocked is determined, under the condition that the system communication is normal, the unlocking code can be sent to the lockset to be unlocked, whether the unlocking code automatically generated by the lockset to be unlocked is consistent with the unlocking code or not is judged, if the unlocking code is consistent with the unlocking code, the lockset can be unlocked, if the unlocking code is inconsistent, verification failure is prompted, the unlocking code can be sent to an operator under the emergency conditions such as abnormal system communication, if the unlocking code finally input by the operator is consistent with the unlocking code of the lockset to be unlocked, the lockset can be unlocked, and if the unlocking code is inconsistent, verification failure is prompted, and the unlocking failure is prompted. After the lockset is opened, the unlocking code is invalidated, and the next time an operator initiates an unlocking request to the lockset, the process needs to be re-executed to generate a new unlocking code.
The following presents a specific example to facilitate understanding of how the present invention may be practiced.
Firstly, a dynamic coded lock is installed on a banknote box of a bank self-service device, a bank administrator establishes an unlocking task in advance, task information is input in the unlocking task, and then the following steps are executed:
The first step: receiving an unlocking request of an operator to the lockset, verifying whether a corresponding unlocking task exists, prompting the operator to input a fingerprint after the unlocking request passes, identifying the fingerprint input by the operator, verifying whether the designated operator in the unlocking task is consistent with the operator initiating the unlocking request, if so, executing a second step, and if not, rejecting the unlocking request;
And a second step of: combining the lockset number, the random number generated based on the unlocking request and the locking check code generated when the lockset is locked last time, and determining initial parameters of the unlocking code of the to-be-unlocked tool;
And a third step of: encrypting the unlocking code once based on a national encryption algorithm SM3, and reorganizing the encrypted unlocking code;
Fourth step: applying a security password (DMK) to a security service system of a bank when the lockset is activated for the first time, adding the DMK into the encrypted and recombined initial parameters, and carrying out secondary encryption on the encrypted and recombined initial parameters based on a national encryption algorithm SM 4;
fifth step: carrying out APHash operation on the initial parameters after the secondary encryption, and determining an unlocking code after APHash operation as an unlocking code of the tool to be unlocked;
sixth step: the unlocking code is sent to the tool to be unlocked, whether the unlocking code automatically generated by the tool to be unlocked is consistent with the unlocking code or not is judged, if so, the unlocking code is determined to be effective, the lockset can be unlocked, if not, verification failure is prompted, and the unlocking is failed;
seventh step: after the lockset is opened, the unlocking code is invalidated, and the next time an operator initiates an unlocking request to the lockset, the steps one to six need to be re-executed to generate a new unlocking code.
Based on the same inventive concept, the embodiment of the invention also provides a device for generating the unlocking code, as in the following embodiment. Because the principle of the unlocking code generating device for solving the problem is similar to that of the unlocking code generating method, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a schematic diagram of a structure of an unlocking code generating device according to an embodiment of the present invention, as shown in fig. 4, the device includes:
the lock parameter determining module 01 is configured to receive an unlocking request of an operator for a lock on a bank note box, determine a lock parameter of a to-be-unlocked tool, where the to-be-unlocked tool is a dynamic coded lock, and the lock parameter includes: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
The initial parameter determining module 02 is used for combining the lockset parameters of the to-be-unlocked tool to determine the initial parameters of the unlocking code of the to-be-unlocked tool;
the encryption module 03 obtains a safety password of the to-be-unlocked lock, encrypts initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determines an unlocking code of the to-be-unlocked lock; the security password is applied to the bank when the lockset is activated.
In one embodiment, the lock parameter determining module 01 is specifically configured to:
And verifying the biological characteristic information of the operator, and determining the lockset parameters of the tool to be unlocked after the biological characteristic information passes the verification.
In one embodiment the initial parameter determination module 02 is specifically configured to:
performing character type conversion on the random number and the locking check code, including: converting the random number and the locking check code of the character string type into a character array type;
And combining the lockset number with the random number after the character type conversion and the locking check code, and determining initial parameters of an unlocking code of the lockset to be unlocked.
Fig. 5 is a schematic diagram of a specific structure of the encryption module 03 in fig. 4, as shown in fig. 5, in an embodiment, the encryption module 03 may include:
encryption and reassembly unit 031: the method comprises the steps of encrypting initial parameters of an unlocking code based on a national encryption algorithm SM3, and reorganizing the encrypted initial parameters;
A secondary encryption unit 032, configured to add the security password to the encrypted and reassembled initial parameter, and perform secondary encryption on the encrypted and reassembled initial parameter based on the national encryption algorithm SM 4;
APHash operation unit 033, configured to perform APHash operation on the initial parameter after the secondary encryption, and determine an unlocking code of the to-be-unlocked tool.
In one embodiment, the encryption and reassembly unit 031 is further to:
dividing the encrypted initial parameters into two groups of data with the same bit number;
and performing exclusive OR operation on the two groups of data, and recombining the encrypted initial parameters.
In one embodiment, the apparatus further comprises: after the lock is opened, the unlocking code is disabled.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the unlocking code generation method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the unlocking code generation method.
In summary, the embodiment of the invention is as follows: receiving an unlocking request of an operator for a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock; combining lockset parameters of the lockset to be unlocked, and determining initial parameters of unlocking codes of the lockset to be unlocked; and (3) obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining an unlocking code of the to-be-unlocked lock. According to the invention, by installing the dynamic coded lock on the bank note box, the manual operation in the unlocking process can be reduced, the initial parameters of the unlocking code are determined based on the lockset parameters according to the unlocking request, the unlocking code is determined based on the safety code and APHash algorithm, the safety of the unlocking code can be improved, and the hidden danger of unlocking code leakage is avoided.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. The method for generating the unlocking code is characterized by comprising the following steps:
Receiving an unlocking request of an operator to a lock on a bank note box, and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock, and the lock parameter comprises: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
combining the lockset parameters of the lockset to be unlocked, and determining initial parameters of an unlocking code of the lockset to be unlocked;
obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining the unlocking code of the to-be-unlocked lock; the security password is obtained by applying for a bank when the lockset is activated;
Combining the lockset parameters of the lockset to be unlocked to determine initial parameters of an unlocking code of the lockset to be unlocked, wherein the method comprises the following steps:
performing character type conversion on the random number and the locking check code, including: converting the random number and the locking check code of the character string type into a character array type;
Combining the lockset number with the random number converted from the character string type and the locking check code, and determining initial parameters of an unlocking code of the lockset to be unlocked;
according to the security code, based on APHash algorithm, the initial parameters of the unlocking code are encrypted, including:
Encrypting the initial parameters of the unlocking code based on a national encryption algorithm SM3, and reorganizing the encrypted initial parameters;
Adding the security password into the encrypted and recombined initial parameters, and carrying out secondary encryption on the encrypted and recombined initial parameters based on a national encryption algorithm SM 4;
Carrying out APHash operation on the initial parameters after the secondary encryption, and determining the unlocking code of the to-be-unlocked tool.
2. The method of claim 1, wherein receiving an operator unlock request to a bank note box, determining a lock parameter of a tool to be unlocked, comprises:
And verifying the biological characteristic information of the operator, and determining the lockset parameters of the tool to be unlocked after the biological characteristic information passes the verification.
3. The method of claim 1, wherein reorganizing the encrypted initial parameters comprises:
dividing the encrypted initial parameters into two groups of data with the same bit number;
And performing exclusive OR operation on the two groups of data, and recombining the encrypted initial parameters.
4. The method as recited in claim 1, further comprising: after the lock is opened, the unlocking code is disabled.
5. An unlocking code generating device, characterized by comprising:
The lock parameter determining module is used for receiving an unlocking request of an operator to a lock on a bank note box and determining a lock parameter of a to-be-unlocked tool, wherein the to-be-unlocked tool is a dynamic coded lock, and the lock parameter comprises: the lock number and the random number generated based on the unlocking request, and the locking check code generated when the lock is locked last time;
The initial parameter determining module is used for combining the lockset parameters of the lockset to be unlocked and determining initial parameters of unlocking codes of the lockset to be unlocked;
The encryption module is used for obtaining a safety password of the to-be-unlocked lock, encrypting initial parameters of the unlocking code based on APHash algorithm according to the safety password, and determining the unlocking code of the to-be-unlocked lock; the security password is obtained by applying for a bank when the lockset is activated;
the initial parameter determining module is specifically configured to:
performing character type conversion on the random number and the locking check code, including: converting the random number and the locking check code of the character string type into a character array type;
Combining the lockset number with the random number converted from the character string type and the locking check code, and determining initial parameters of an unlocking code of the lockset to be unlocked;
the encryption module is specifically used for:
Encrypting the initial parameters of the unlocking code based on a national encryption algorithm SM3, and reorganizing the encrypted initial parameters;
Adding the security password into the encrypted and recombined initial parameters, and carrying out secondary encryption on the encrypted and recombined initial parameters based on a national encryption algorithm SM 4;
Carrying out APHash operation on the initial parameters after the secondary encryption, and determining the unlocking code of the to-be-unlocked tool.
6. The apparatus of claim 5, wherein the unlock code encryption module is specifically configured to:
Encrypting the initial parameters of the unlocking code based on a national encryption algorithm SM3, and reorganizing the encrypted initial parameters;
Adding the security password into the encrypted and recombined initial parameters, and carrying out secondary encryption on the encrypted and recombined initial parameters based on a national encryption algorithm SM 4;
Carrying out APHash operation on the initial parameters after the secondary encryption, and determining the unlocking code of the to-be-unlocked tool.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111239104.4A CN113963468B (en) | 2021-10-25 | 2021-10-25 | Unlocking code generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111239104.4A CN113963468B (en) | 2021-10-25 | 2021-10-25 | Unlocking code generation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113963468A CN113963468A (en) | 2022-01-21 |
CN113963468B true CN113963468B (en) | 2024-06-21 |
Family
ID=79466518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111239104.4A Active CN113963468B (en) | 2021-10-25 | 2021-10-25 | Unlocking code generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113963468B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114758433A (en) * | 2022-02-23 | 2022-07-15 | 珠海汇金科技股份有限公司 | Cloud-based dynamic password generation method and system and intelligent lock |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827576A (en) * | 2015-01-05 | 2016-08-03 | 珠海汇金科技股份有限公司 | Unlocking method and system based on dynamic cipher lock |
CN107301697A (en) * | 2017-05-09 | 2017-10-27 | 南昌大学 | The dynamic encryption and localization method of a kind of electronic lock |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103532719B (en) * | 2013-10-22 | 2017-01-18 | 天地融科技股份有限公司 | Dynamic password generation method, dynamic password generation system, as well as processing method and processing system of transaction request |
CN206097260U (en) * | 2016-10-12 | 2017-04-12 | 北华大学 | Developments trick lock control system based on GSM communication module |
CN110098923B (en) * | 2019-04-08 | 2021-08-27 | 浙江大华技术股份有限公司 | Method and equipment for generating and verifying temporary password |
CN110415414B (en) * | 2019-07-31 | 2021-09-21 | 中国工商银行股份有限公司 | Unlocking method and device of dynamic coded lock based on two-party authentication |
CN111563983B (en) * | 2020-05-27 | 2020-10-13 | 南京东屋电气有限公司 | Multi-lock unlocking authorization control method and system based on dynamic password and lockset |
-
2021
- 2021-10-25 CN CN202111239104.4A patent/CN113963468B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827576A (en) * | 2015-01-05 | 2016-08-03 | 珠海汇金科技股份有限公司 | Unlocking method and system based on dynamic cipher lock |
CN107301697A (en) * | 2017-05-09 | 2017-10-27 | 南昌大学 | The dynamic encryption and localization method of a kind of electronic lock |
Also Published As
Publication number | Publication date |
---|---|
CN113963468A (en) | 2022-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109741500B (en) | Temporary password setting and verification method for intelligent lock | |
US8001383B2 (en) | Secure serial number | |
JP2004534333A (en) | Integrated protection method and system for distributed data processing in computer networks | |
CN102281138B (en) | Method and system for improving safety of verification code | |
CN108830983A (en) | A kind of access control system and its working method based on block chain | |
CN101976317A (en) | Virtual machine image safety method in private cloud computing application | |
JP2010165323A (en) | Biometric authentication method and system | |
CN104881595B (en) | The self-help remote unlocking method managed based on PIN code | |
CN109743174A (en) | The monitoring and managing method that electric power monitoring security management and control system program updates | |
CN113963468B (en) | Unlocking code generation method and device | |
CN114758433A (en) | Cloud-based dynamic password generation method and system and intelligent lock | |
CN106921491A (en) | A kind of safely and efficiently outsourcing calculates method and system | |
CN114267100A (en) | Unlocking authentication method and device, security chip and electronic key management system | |
CN1953366B (en) | Password management method and system for intelligent secret key device | |
KR20110065139A (en) | Method of generating fuzzy vault based on biometric information and verifying user's indentification using fuzzy vault | |
CN113591103A (en) | Identity authentication method and system between intelligent terminals of power internet of things | |
CN117879827A (en) | Token transmission verification method, device, system, equipment and medium | |
Manikandan et al. | A novel and secure authentication scheme for the Internet of Things over algebraic structure | |
CN115208676B (en) | Data encryption method and system based on blockchain technology | |
CN100566239C (en) | The key transmission method of multi-stage intelligent key apparatus and system | |
CN110298941A (en) | A kind of disposable temporary password generation method of intelligent door lock | |
CN113487766B (en) | Unlocking method and system | |
CN115426107A (en) | Identity authentication method and device | |
JP2003333028A (en) | Data processor | |
CN110111103B (en) | Password resetting method and system for digital currency wallet |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |