WO2020155794A1 - 基于时间戳的加密及认证方法、系统和计算机设备 - Google Patents
基于时间戳的加密及认证方法、系统和计算机设备 Download PDFInfo
- Publication number
- WO2020155794A1 WO2020155794A1 PCT/CN2019/119482 CN2019119482W WO2020155794A1 WO 2020155794 A1 WO2020155794 A1 WO 2020155794A1 CN 2019119482 W CN2019119482 W CN 2019119482W WO 2020155794 A1 WO2020155794 A1 WO 2020155794A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- same
- timestampb
- timestampa
- randkeyb
- randkeya
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
Definitions
- This application relates to the technical field of security authentication, and in particular to a method, system and computer equipment for encryption and authentication based on timestamp.
- the existing security authentication method includes the following steps: 1. The user enters the user name and password; 2. The client uses an asymmetric encryption algorithm (such as RSA, SM2) to encrypt the user's password and then transmits it to the back-end server; 3 , The server decrypts the password according to the asymmetric algorithm, and then verifies the user and password.
- asymmetric encryption algorithm such as RSA, SM2
- Security authentication through the above methods has the following risks: if the ciphertext of the user name and encrypted password is leaked, the user can use the ciphertext of the user name and password through the interface to directly defraud the back-end authentication.
- the main purpose of this application is to provide a timestamp-based encryption and authentication method, system, and computer equipment, which aims to solve the current security authentication method that can use the user name and password to encrypt the ciphertext of the user name and encrypted password. Wen uses the interface to directly deceive the insecure problem of back-end authentication.
- this application provides a timestamp-based encryption method, which includes the following steps:
- the front-end obtains an encrypted instruction, the encrypted instruction is generated by the operation of the front-end user;
- randKey is a random key value generated by the front end, and timestamp is the current timestamp
- the contactUserID and the contactPassword are respectively encrypted using a public key of an asymmetric encryption algorithm to obtain encryptUserID and encryptPassword.
- This application also provides a timestamp-based authentication method for decrypting ciphertext encrypted according to the timestamp-based encryption method, including the following steps:
- the back end receives the encryptUserID and the encryptPassword sent by the front end;
- timestampA is the same as the timestampB, and the randKeyA is the same as the randKeyB, then authenticate the userID and the Password, and determine whether the authentication is successful;
- This application also provides a timestamp-based encryption and authentication system, including a front end and a back end;
- the front end is used to obtain an encrypted instruction, and the encrypted instruction is generated by the operation of the front end user;
- randKey is a random key value generated by the front end, and timestamp is the current timestamp
- the back end is configured to receive the encryptUserID and the encryptPassword sent by the front end;
- timestampA is the same as the timestampB, and the randKeyA is the same as the randKeyB, then authenticate the userID and the Password, and determine whether the authentication is successful;
- the present application also provides a computer device, including a memory and a processor, and a computer program is stored in the memory, wherein the processor implements the above-mentioned timestamp-based encryption method and/or when the computer program is executed by the processor. Or the steps of any one of the above-mentioned timestamp-based authentication methods.
- the present application also provides a computer-readable storage medium on which a computer program is stored.
- the computer program is characterized in that, when the computer program is executed by a processor, the above-mentioned timestamp-based encryption method and/or the timestamp-based encryption method are implemented.
- the above-mentioned timestamp-based encryption method and/or the timestamp-based encryption method are implemented.
- the timestamp-based authentication method, system, computer equipment, and storage medium provided in this application generate a random key value randKey at the front end and obtain the current timestamp timestamp, and use randKey and timestamp to splice into an encryptKey, and use a separator to separate the encryptKey with UserID and password are spliced, and encrypted by asymmetric algorithm to obtain encryptUserID and encryptPassword; the back-end uses asymmetric algorithm to reversely analyze encryptUserID and encryptPassword to obtain timestampA, timestampB, randKeyA and randKeyB, and judge the random key value obtained after analysis And the timestamps respectively correspond to the same, if they correspond to the same, then the user name and password are authenticated; by cross-authenticating the random key value and timestamp hidden by encryptUserID and encryptPassword, the security of authentication is improved, so as to avoid the user name and password.
- Figure 1 is a schematic diagram of the steps of a timestamp-based encryption method in an embodiment of the present application
- FIG. 2 is a schematic diagram of the steps of a timestamp-based authentication method in an embodiment of the present application
- Figure 3 is a structural block diagram of a timestamp-based encryption and authentication system in an embodiment of the present application
- FIG. 4 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
- an embodiment of the present application provides a timestamp-based encryption method, which includes the following steps:
- Step S1 the front-end obtains an encrypted instruction, the aforementioned encrypted instruction is generated by the operation of the front-end user;
- Step S2 generate a randKey, and obtain a timestamp, where randKey is a random key value generated by the front end, and timestamp is the current timestamp;
- Step S3 splicing the aforementioned randKey and the aforementioned timestamp through the first preset separator to form an encryptKey
- Step S4 Obtain userID and password, and join the userID and the encryptKey through a second preset separator to form a contactUserID; join the password and the encryptKey through a third preset separator to form a contactPassword; where userID is User name, password is the password;
- Step S5 Encrypt the contactUserID and the contactPassword using the public key of an asymmetric encryption algorithm to obtain encryptUserID and encryptPassword.
- the front-end user of the system sends an encrypted instruction to the front-end by operating the front-end.
- the encrypted instruction can be automatically generated after the front-end user enters the account name and password, or it can be generated by clicking a specific button. It is generated after the front-end user enters the account name and password and clicks "Submit”.
- the front end receives the encryption instruction.
- the front-end can be the front-end part of the security authentication system or the client.
- the front end randomly generates a UUID, that is, a random key value, and the random key value is called randKey.
- the front end also obtains the timestamp (current timestamp).
- the front end splices the generated randKey and the obtained timestamp through the first preset separator to form an encryptKey.
- the first preset separator such as -, @, #, $, %, & and other characters.
- the userID (user name) and password (password) are obtained.
- the time of obtaining the userID and password is not the same as the time when the front-end user inputs the user name and password.
- the first response of the front-end is to generate an encrypted instruction as described in step S1, and the user name and password in step S1 will not be used immediately.
- the previously entered userID and password are specifically used. Specifically, the userID and encryptKey are spliced together through the second preset separator to form a contactUserID; the password and encryptKey are spliced together through the third preset separator to form a contactPassword.
- the functions of the second preset separator and the third preset separator are the same as the above-mentioned first preset separator, and there is no necessary difference or connection.
- the first preset separator and the second preset separator can be Both the preset separator and the third preset separator are set to "-".
- the encryptKey obtained through the above steps is 2b162f8e38a045d78ed5606c8bdbea3a-1541057401, and the userID and encryptKey are spliced together by the second preset separator "-" to form a contactUserID of zhangsan-2b162f8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed5606c8e38a045d78ed56
- the contactUserID is encrypted using the public key of the asymmetric encryption algorithm to obtain the encryptUserID.
- Asymmetric encryption algorithms mainly include RSA, Elgamal, knapsack algorithm, Rabin, DH and ECC (elliptic curve encryption algorithm).
- RSA is the most widely used asymmetric encryption algorithm. RSA was developed by Ronald Levist in 1977 ( Ron Rivest), Adi Samer (Adi Shamir) and Leonard Adleman (Leonard Adleman) proposed together that RSA is composed of the initial letters of the three of them.
- contactUserID (zhangsan-2b162f8e38a045d78ed5606c8bdbea3a-1541057401) is encrypted, to obtain encryptUserId 919A237AA02D7383AA01AB9E64FB6664C3FC129C4C94012AA716FE07F9003FCB765AD81DAA56BA37AC4D06E3C0C9FF4DAC352DE288D437FF4BD1B68B4A322FB8456CC7161D6995847FD57FB99735F45E4B90EBECAB1192B988E30D3AC9A584CD673170B59594138A7669F5B68C8AF6A3304A4970519111D94B603986E57CAFE744FE0E7A9AFCEEA9F6D8769E5C0A6AC1CD
- Encrypt the contactPassword using the public key of an asymmetric encryption algorithm to obtain encryptPassword.
- EncryptPassword 74CA36C0DC2C1EB0A285726FC2D58F3038B72916B5CEE7255B1AF27F1680A1FFCAFA6E492DBA1B3264AB6E569E47DF81E5B7F82AF10F9F82B0CD5053FEB9EB04BBD5BFD159EDE9383EF39CDB5778D7127E74E6DAF3227653F162E4F13442C6E711D2478B6773D0BF625C3DF327E9F12303F8E487EB42256D73C0CF6616FA
- the front end transmits the encryptUserID and encryptPassword obtained after encryption by the asymmetric encryption algorithm to the back end of the system for the back end to perform security authentication.
- an embodiment of the present application also provides a timestamp-based authentication method, including the following steps:
- Step S6 the backend receives the encryptUserID and the encryptPassword sent by the frontend;
- Step S7 Use the private key that matches the public key of the asymmetric encryption algorithm to decrypt the encryptUserID and the encryptPassword, respectively, to obtain the userID, randKeyA, timestampA, the password, randKeyB, and timestampB;
- Step S8 respectively determining whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same;
- Step S9 if the timestampA is the same as the timestampB, and the randKeyA is the same as the randKeyB, then the userID and the Password are authenticated, and it is determined whether the authentication is successful;
- Step S10 if yes, the authentication is passed
- Step S11 if not, the authentication is not passed.
- the back-end receives the encryptUserID and encryptPassword transmitted from the front-end, where the back-end may be the back-end server of the system.
- step S7 use the private key that matches the public key of the above asymmetric encryption algorithm to decrypt the above encryptUserID
- Private mode module A67DF0337FAF559163BCBA89EE597C2DB0F17CEF87F4E0F476216C44831369504876B78FEB848DFD352BB598615B81C26D1027AC8481116BE40DBA6BD34A92524412936EDA2C6D402D81119DB33F180551DB1762B5F367B0AB319290C546A12B6483F65C55B6BFF19337FDCD79DE78A815725E9AE9FDA48C0FDCEBD6AFD8F9BC1BA254F93D8B189A7C8F6D205C5715B9C82F1EAEC1AA4D7BEE8679D58A0DB8AE4ED24B5B1942EE893BF4B2343D50F5CB38D4C38544D56E1C1877B6629A53BCCEB91B994A
- userID zhangsan
- randKeyA 2b162f8e38a045d78ed5606c8bdbea3a
- timestampA 1541057401.
- encryptUserID and encryptPassword are derived from the random value randKey generated by the same front-end and the obtained timestamp timestamp, then they are decrypted by the private key that matches the public key of the asymmetric encryption algorithm, and the resulting randKeyA and randKeyB It should be the same, and the timestampA and timestampB obtained should also be the same. If any group is not equal, it means that the encryptUserID and encryptPassword are not generated by the same request, and it is likely to be fabricated. Therefore, in the above step S8, it is determined whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same.
- step S9 if the judgment result obtained after the above judgment is that timestampA is the same as timestampB, and randKeyA is the same as randKeyB, it means that there is no problem with the encryption of UserID and Password, and encryptUserID and encryptPassword are generated by the same request. Then the userID and the Password are further authenticated, and it is judged whether the authentication is successful. As described in step S10 above, if both the userID and Password pass the authentication, the authentication is passed, thereby allowing the front-end user to enter the back-end/back-end service system to perform related operations. As mentioned in step S11 above, if either of the userID and Password fails the authentication, the authentication is not passed, and a prompt of authentication failure is returned to the front end.
- This solution generates a random key value randKey on the front end and obtains the current timestamp timestamp, uses randKey and timestamp to splice into an encryptKey, uses a separator to splice the encryptKey with userID and password respectively, and encrypts it through an asymmetric algorithm to obtain encryptUserID and encryptPassword;
- the back-end uses an asymmetric algorithm to reversely analyze encryptUserID and encryptPassword to obtain timestampA, timestampB, randKeyA, and randKeyB, and judge whether the random key value and timestamp obtained after parsing correspond to the same value.
- the username and password are Perform authentication; cross-authenticate the hidden random key values and timestamps of encryptUserID and encryptPassword to improve the security of authentication, so as to avoid the leakage of the user name and encrypted password ciphertext, and the user name and password ciphertext are directly defrauded
- the insecure authentication situation of end authentication improves the security of authentication.
- step S8 of separately determining whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same the method further includes:
- Step S801 Obtain a timestampServer, where the above timestampServer is the current time obtained by the backend;
- Step S802 Calculate the absolute value m of the time difference between the aforementioned timestampServer and the aforementioned imestampA or the aforementioned timestampB;
- Step S803 judging whether the above-mentioned absolute value m is greater than a set threshold timeThreshold;
- Step S804 if yes, the authentication is not passed
- Step S805 if not, generate and execute a command of "respectively judge whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same".
- the backend obtains the current time timestampServer, and calculates the absolute value m of the time difference between the timestampServer and the timestampA or timestampB. Because here the default timestampA and timestampB are equal to the timestamp generated during the front-end encryption, so by calculating the absolute value m of the time difference between timestampServer and timestampA or timestampB, it is equivalent to calculating the absolute value of the time difference between timestampServer and timestamp.
- step S803 it is determined whether the absolute value m is greater than the set threshold timeThreshold.
- step S804 if the absolute value m of the time difference between timestampServer and timestampA or timestampB is greater than the set threshold timeThreshold, it is considered that the time from encryption to authentication and decryption exceeds a reasonable computer processing time, indicating that the ciphertext is possible If it is generated a long time ago, or it may be leaked, the authentication will not be passed, and a prompt of authentication failure will be directly returned to the front end, and the authentication will be ended, thereby improving the safety and effectiveness of the authentication.
- step S805 if the absolute value m of the time difference between timestampServer and timestampA or timestampB is not greater than the set threshold timeThreshold, it is considered that the time from encryption to authentication and decryption is within a reasonable computer processing time, indicating the ciphertext If the generation time is not suspicious, generate and execute the command "respectively determine whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same", so as to enter the next step to determine whether the timestampA and the timestampB are the same And step S8 of whether the randKeyA and the randKeyB are the same.
- step S8 of separately determining whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same the method further includes:
- Step S806 obtain the aforementioned randKey
- Step S807 Determine whether the above randKey is the same as the above randKeyA or the above randKeyB;
- Step S808 if not, the authentication is not passed
- Step S809 if yes, generate and execute a command of "respectively judging whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same".
- step S806 the back end obtains the randKey transmitted by the front end.
- the randKey is also transmitted to the back end, so that the back end can obtain the randKey transmitted by the front end for use in the next judgment.
- randKey is the same as the foregoing randKeyA or the foregoing randKeyB.
- the backend decrypts the encryptUserID and encryptPassword, it obtains userID, randKeyA, timestampA, the above password, randKeyB, and timestampB. Let us assume that randKeyA and randKeyB are the same. Therefore, the randKey obtained above can be compared with either randKeyA or randKeyB to determine whether they are the same.
- step S808 if the comparison result of randKey and randKeyA or randKeyB is not the same, it means that the discrete value randKeyA used to generate encryptUserID or the discrete value randKeyB used to generate encryptPassword is not the original randKey generated by the front-end. There may be discrete values that are fabricated or faked. In this case, the authentication is not passed, and the prompt of authentication failure is directly returned to the front end, and the authentication is ended, thereby improving the safety and effectiveness of authentication.
- randKeyA or randKeyB that generates encryptUserID or encryptPassword is the original randKey generated by the front end.
- the generation and execution "judge whether the timestampA and the timestampB are the same, the randKeyA and the randKeyB Is the same" command to enter the corresponding authentication step.
- step S8 of separately determining whether the timestampA and the timestampB are the same, and whether the randKeyA and the randKeyB are the same the method further includes:
- Step S810 obtain the aforementioned timestamp
- Step S811 Determine whether the timestamp is the same as the timestampA or timestampB;
- Step S812 if not, the authentication is not passed
- the backend obtains the timestamp transmitted by the frontend.
- the timestamp is also transmitted to the back end, so that the back end can obtain the timestamp transmitted by the front end for use in the next judgment.
- timestamp is the same as timestampA or timestampB.
- the backend decrypts the encryptUserID and encryptPassword, it obtains userID, timestampA, timestampA, the above password, timestampB, and timestampB.
- timestampA is the same as timestampB. Therefore, the timestamp obtained above can be compared with either timestampA or timestampB to determine whether they are the same.
- step S812 if the comparison result of timestamp and timestampA or timestampB is not the same, it means that the timestamp timestampA used to generate encryptUserID or the timestamp timestampB used to generate encryptPassword is not the timestamp originally generated by the front-end. It may be a fabricated or fake time stamp. In this case, the authentication is not passed, and the prompt of authentication failure is directly returned to the front end, and the authentication is ended, thereby improving the safety and effectiveness of authentication.
- timestampA for generating encryptUserID or timestampB for generating encryptPassword is the timestamp originally generated by the front end.
- the generation execution "determines whether the timestampA and timestampB are the same, the timestampA and timestampB are the same. Is the same" command to enter the corresponding authentication step.
- the method further includes:
- Step S814 record the number of consecutive authentication failures
- Step S815 It is judged whether the number of consecutive authentication failures mentioned above reaches a set number of times;
- step S814 if the result of the authentication is that the authentication is not passed, that is, the authentication fails, the number of consecutive authentication failures is recorded. If any authentication succeeds, the subsequent authentication needs to recalculate the number of consecutive authentication failures. As described in step S8015, it is determined whether the number of consecutive authentication failures reaches a set number, such as 3 or 5 times. As described in step S8016 above, when the number of consecutive authentication failures reaches the set number (for example, 5 times), the authentication work in the subsequent predetermined time period (for example, 1 day) is suspended. In the case of multiple consecutive authentication failures, it may be that someone maliciously attempts to enter the system. Through this solution, the subsequent authentication work within a predetermined time period is suspended to avoid malicious attempts to enter the system and cause losses, and to improve the security of authentication.
- a set number such as 3 or 5 times.
- the authentication work in the subsequent predetermined time period for example, 1 day
- the method includes:
- step S8017 an early warning is issued to the management personnel.
- step S8017 if the number of consecutive authentication failures reaches the set number, the subsequent authentication work within the predetermined time period will be suspended, and an early warning reminder will be sent to the manager.
- the warning reminder can be sent to the manager by means of SMS, etc.
- a mobile terminal or a fixed monitoring system that you carry with you to remind the management personnel that someone is trying to enter the system (requiring safety certification) illegally, so that the management personnel can know and monitor the relevant situation in time and take measures to avoid losses.
- the method further includes:
- Step S8018 Send an instruction to control the front end to turn on the front end camera to shoot the front end operator's portrait to the front end.
- step S8018 if the number of consecutive authentication failures reaches the set number, then while suspending the subsequent authentication work within the predetermined period of time, send an instruction to control the front-end camera to shoot the front-end operator's portrait to the front-end, open the front-end
- the camera takes a picture of the front-end operator. Therefore, when someone tries to enter the system illegally, the facial features of the operator are captured, and in case the system is illegally entered, causing losses, it can provide clues for finding the intruder or filing a case for investigation.
- the front-end operator's avatar captured by shooting can be stored locally or sent to a remote monitoring system for viewing or remote monitoring at any time.
- an embodiment of the present application also provides a timestamp-based encryption and authentication system, including a front end 10 and a back end 20;
- the aforementioned front-end 10 is used to obtain encrypted instructions, and the aforementioned encrypted instructions are generated by operations of front-end users;
- randKey is a random key value generated by the front end, and timestamp is the current timestamp
- the back end 20 is configured to receive the encryptUserID and the encryptPassword sent by the front end 10;
- the aforementioned timestampA is the same as the aforementioned timestampB, and the aforementioned randKeyA is the same as the aforementioned randKeyB, then the aforementioned userID and the aforementioned Password are authenticated, and it is determined whether the authentication is successful;
- an embodiment of the present application also provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG. 4.
- the computer equipment includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
- the memory of the computer device includes a storage medium and an internal memory.
- the storage medium may be a volatile storage medium or a non-volatile storage medium.
- the storage medium stores an operating system, a computer program, and a database.
- the internal memory provides an environment for the operation of the operating system and computer programs in the storage medium.
- the database of the computer equipment is used to store the encryptedUserID, encryptPassword, randKey, timestamp and other data transmitted from the front end.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer program is executed by the processor to implement the above-mentioned timestamp-based encryption method or the timestamp-based authentication method.
- FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- An embodiment of the present application further provides a computer-readable storage medium.
- the computer-readable storage medium may be a volatile computer-readable storage medium or a non-volatile computer-readable storage medium.
- a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned time-stamp-based encryption method or the above-mentioned time-stamp-based authentication method is implemented.
- any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and/or volatile memory.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
Description
Claims (20)
- 一种基于时间戳的加密方法,其特征在于,包括以下步骤:前端获取加密指令,所述加密指令是由前端用户操作而产生;生成randKey,并获取timestamp,其中,randKey是前端产生的一个随机key值,timestamp是当前时间戳;将所述randKey和所述timestamp通过第一预置分隔符拼接起来,形成encryptKey;获取userID和password,将所述userID和所述encryptKey通过第二预置分隔符拼接起来,形成contactUserID;将所述password与所述encryptKey通过第三预置分隔符拼接起来,形成contactPassword;其中,userID是用户名,password是密码;对所述contactUserID和所述contactPassword使用非对称加密算法的公钥分别进行加密,得到encryptUserID和encryptPassword。
- 一种基于时间戳的认证方法,用于解密依据如权利要求1所述的基于时间戳的加密方法进行加密的密文,其特征在于,包括以下步骤:后端接收所述前端发送的所述encryptUserID和所述encryptPassword;使用与所述非对称加密算法的公钥相匹配的私钥对所述encryptUserID和所述encryptPassword分别进行解密,得到所述userID、randKeyA、timestampA、所述password、randKeyB和timestampB;分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同;若所述timestampA与所述timestampB相同,且所述randKeyA与所述randKeyB相同,则对所述userID和所述Password进行认证,并判断是否认证成功;若是,则予以认证通过;若否,则不予认证通过。
- 根据权利要求2所述的基于时间戳的认证方法,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取timestampServer,所述timestampServer是后端获取的当前时间;计算所述timestampServer与所述imestampA或所述timestampB时间差值的绝对值m;判断所述绝对值m是否大于设定阈值timeThreshold;若是,则不予认证通过;若否,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 根据权利要求2所述的基于时间戳的认证方法,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述randKey;判断所述randKey是否与所述randKeyA或所述randKeyB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 根据权利要求2所述的基于时间戳的认证方法,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述timestamp;判断所述timestamp是否与所述timestampA或所述timestampB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 根据权利要求2所述的基于时间戳的认证方法,其特征在于,所述不予认证通过的步骤之后,还包括:记录连续认证失败的次数;判断所述连续认证失败的次数是否达到设定次数;若是,则暂停后续预设时间内的认证工作。
- 根据权利要求6所述的基于时间戳的认证方法,其特征在于,所述暂停后续预设时间内的认证工作的步骤之后,还包括:发送控制所述前端的摄像头拍摄所述前端的操作者头像的指令给所述前端。
- 一种基于时间戳的加密及认证系统,其特征在于,包括前端和后端;所述前端,用于获取加密指令,所述加密指令是由前端用户操作而产生;生成randKey,并获取timestamp,其中,randKey是前端产生的一个随机key值,timestamp是当前时间戳;将所述randKey和所述timestamp通过第一预置分隔符拼接起来,形成encryptKey;获取userID和password,将所述userID和所述encryptKey通过第二预置分隔符拼接起来,形成contactUserID;将所述password与所述encryptKey通过第三预置分隔符拼接起来,形成contactPassword;其中,userID是用户名;对所述contactUserID和所述contactPassword使用非对称加密算法分别进行加密,得到encryptUserID和encryptPassword;所述后端,用于接收所述前端发送的所述encryptUserID和所述encryptPassword;使用与所述非对称加密算法的公钥相匹配的私钥对所述encryptUserID和所述encryptPassword分别进行解密,得到所述userID、randKeyA、timestampA、所述password、randKeyB和timestampB;分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同;若所述timestampA与所述timestampB相同,且所述randKeyA与所述randKeyB相同,则对所述userID和所述Password进行认证,并判断是否认证成功;若是,则予以认证通过;若否,则不予认证通过。
- 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,其特征在于,所述处理器执行一种基于时间戳的认证方法,该方法用于解密依据如权利要求1所述的基于时间戳的加密方法进行加密的密文,包括如下步骤:后端接收所述前端发送的所述encryptUserID和所述encryptPassword;使用与所述非对称加密算法的公钥相匹配的私钥对所述encryptUserID和所述encryptPassword分别进行解密,得到所述userID、randKeyA、timestampA、所述password、randKeyB和timestampB;分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同;若所述timestampA与所述timestampB相同,且所述randKeyA与所述randKeyB相同,则对所述userID和所述Password进行认证,并判断是否认证成功;若是,则予以认证通过;若否,则不予认证通过。
- 如权利要求9所述的计算机设备,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取timestampServer,所述timestampServer是后端获取的当前时间;计算所述timestampServer与所述imestampA或所述timestampB时间差值的绝对值m;判断所述绝对值m是否大于设定阈值timeThreshold;若是,则不予认证通过;若否,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求9所述的计算机设备,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述randKey;判断所述randKey是否与所述randKeyA或所述randKeyB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求9所述的计算机设备,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述timestamp;判断所述timestamp是否与所述timestampA或所述timestampB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求9所述的计算机设备,其特征在于,所述不予认证通过的步骤之后,还包括:记录连续认证失败的次数;判断所述连续认证失败的次数是否达到设定次数;若是,则暂停后续预设时间内的认证工作。
- 如权利要求13所述的计算机设备,其特征在于,所述暂停后续预设时间内的认证工作的步骤之后,还包括:发送控制所述前端的摄像头拍摄所述前端的操作者头像的指令给所述前端。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现一种基于时间戳的认证方法,该方法用于解密依据如权利要求1所述的基于时间戳的加密方法进行加密的密文,包括如下步骤:后端接收所述前端发送的所述encryptUserID和所述encryptPassword;使用与所述非对称加密算法的公钥相匹配的私钥对所述encryptUserID和所述encryptPassword分别进行解密,得到所述userID、randKeyA、timestampA、所述password、randKeyB和timestampB;分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同;若所述timestampA与所述timestampB相同,且所述randKeyA与所述randKeyB相同,则对所述userID和所述Password进行认证,并判断是否认证成功;若是,则予以认证通过;若否,则不予认证通过。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取timestampServer,所述timestampServer是后端获取的当前时间;计算所述timestampServer与所述imestampA或所述timestampB时间差值的绝对值m;判断所述绝对值m是否大于设定阈值timeThreshold;若是,则不予认证通过;若否,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述randKey;判断所述randKey是否与所述randKeyA或所述randKeyB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同的步骤之前,还包括:获取所述timestamp;判断所述timestamp是否与所述timestampA或所述timestampB相同;若否,则不予认证通过;若是,则生成执行“分别判断所述timestampA与所述timestampB是否相同,所述randKeyA与所述randKeyB是否相同”的命令。
- 如权利要求15所述的计算机可读存储介质,其特征在于,所述不予认证通过的步骤之后,还包括:记录连续认证失败的次数;判断所述连续认证失败的次数是否达到设定次数;若是,则暂停后续预设时间内的认证工作。
- 如权利要求19所述的计算机可读存储介质,其特征在于,所述暂停后续预设时间内的认证工作的步骤之后,还包括:发送控制所述前端的摄像头拍摄所述前端的操作者头像的指令给所述前端。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910100423.3A CN109936447B (zh) | 2019-01-31 | 2019-01-31 | 基于时间戳的加密及认证方法、系统和计算机设备 |
| CN201910100423.3 | 2019-01-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020155794A1 true WO2020155794A1 (zh) | 2020-08-06 |
Family
ID=66985411
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/119482 Ceased WO2020155794A1 (zh) | 2019-01-31 | 2019-11-19 | 基于时间戳的加密及认证方法、系统和计算机设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109936447B (zh) |
| WO (1) | WO2020155794A1 (zh) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112822155A (zh) * | 2020-12-21 | 2021-05-18 | 陕西土豆数据科技有限公司 | 一种基于国密的航拍数据加解密方法 |
| CN112953968A (zh) * | 2021-03-30 | 2021-06-11 | 云谷技术(珠海)有限公司 | 一种基于安全认证的配电终端运维通信方法及装置 |
| CN114697099A (zh) * | 2022-03-24 | 2022-07-01 | 浪潮云信息技术股份公司 | 一种基于椭圆曲线加密算法的多方授权认证方案 |
| CN115065503A (zh) * | 2022-05-11 | 2022-09-16 | 浪潮云信息技术股份公司 | 一种api网关防重放攻击的方法 |
| CN115190481A (zh) * | 2022-06-01 | 2022-10-14 | 统信软件技术有限公司 | 数据加密方法和装置,设备准入认证方法、装置和系统 |
| CN119254412A (zh) * | 2024-09-11 | 2025-01-03 | 南京熊猫电子股份有限公司 | 一种基于时间的对称加密算法、系统及其存储介质 |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109936447B (zh) * | 2019-01-31 | 2021-10-08 | 平安科技(深圳)有限公司 | 基于时间戳的加密及认证方法、系统和计算机设备 |
| CN112311740B (zh) * | 2019-07-31 | 2022-06-21 | 深圳市云海物联科技有限公司 | 数据加密方法、数据解密方法、终端及存储介质 |
| CN112488728B (zh) * | 2019-08-22 | 2024-09-06 | 佛山市顺德区美的饮水机制造有限公司 | 用于耗材的防伪识别方法、装置和电子设备 |
| CN111859435B (zh) * | 2020-07-29 | 2023-06-23 | 北京千丁互联科技有限公司 | 一种数据安全处理方法及装置 |
| CN112333154A (zh) * | 2020-10-16 | 2021-02-05 | 四川九八村信息科技有限公司 | 一种基于动态密码进行权限控制方法及其血浆采集机 |
| CN113015111B (zh) * | 2021-02-23 | 2022-03-29 | 中国人民解放军火箭军工程大学 | 基于动态时间戳和国密算法的短报文加密通信方法 |
| CN114726573A (zh) * | 2022-02-28 | 2022-07-08 | 新华三技术有限公司 | 一种管理密码的方法、云平台和终端设备 |
| CN116318899B (zh) * | 2023-02-17 | 2023-10-17 | 深圳市创势互联科技有限公司 | 数据加密解密的处理方法、系统、设备及介质 |
| CN118827031A (zh) * | 2024-07-10 | 2024-10-22 | 浪潮通信技术有限公司 | 基于mqtt服务器插件的动态鉴权方法及系统 |
| CN119442209A (zh) * | 2024-09-09 | 2025-02-14 | 农信银资金清算中心有限责任公司 | 一种基于时间戳加密的单点登录访问方法 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105207782A (zh) * | 2015-11-18 | 2015-12-30 | 上海爱数软件有限公司 | 一种基于restful架构的身份验证方法 |
| CN107483415A (zh) * | 2017-07-26 | 2017-12-15 | 国网江西省电力公司南昌供电分公司 | 一种共享用电交互系统的双向认证方法 |
| US20180025145A1 (en) * | 2015-02-10 | 2018-01-25 | Bundesdruckerei Gmbh | Computer-implemented method for controlling access |
| CN109936447A (zh) * | 2019-01-31 | 2019-06-25 | 平安科技(深圳)有限公司 | 基于时间戳的加密及认证方法、系统和计算机设备 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8156333B2 (en) * | 2008-05-29 | 2012-04-10 | Red Hat, Inc. | Username based authentication security |
| US9106426B2 (en) * | 2008-11-26 | 2015-08-11 | Red Hat, Inc. | Username based authentication and key generation |
| CN102395006B (zh) * | 2011-10-24 | 2013-09-11 | 南京大学 | 一种基于视频流的外网安全审查系统 |
| CN105072132B (zh) * | 2015-08-27 | 2019-05-14 | 宇龙计算机通信科技(深圳)有限公司 | 验证方法、验证系统和通信设备 |
| CN106453391A (zh) * | 2016-11-13 | 2017-02-22 | 北海和思科技有限公司 | 一种重复长数据加密传输的方法及系统 |
| CN108737326B (zh) * | 2017-04-14 | 2021-03-30 | 北京京东尚科信息技术有限公司 | 用于进行令牌验证的方法、系统、装置及电子设备 |
| CN107454115B (zh) * | 2017-10-10 | 2020-01-31 | 北京奇艺世纪科技有限公司 | 一种摘要认证方法及摘要认证系统 |
| CN108234458A (zh) * | 2017-12-21 | 2018-06-29 | 广东汇泰龙科技有限公司 | 一种云锁密码的加密储存及解密提取的方法、系统 |
| CN108183907A (zh) * | 2017-12-29 | 2018-06-19 | 浪潮通用软件有限公司 | 一种认证方法、服务器及认证系统 |
| CN108650210A (zh) * | 2018-03-14 | 2018-10-12 | 深圳市中易通安全芯科技有限公司 | 一种认证系统和方法 |
-
2019
- 2019-01-31 CN CN201910100423.3A patent/CN109936447B/zh active Active
- 2019-11-19 WO PCT/CN2019/119482 patent/WO2020155794A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180025145A1 (en) * | 2015-02-10 | 2018-01-25 | Bundesdruckerei Gmbh | Computer-implemented method for controlling access |
| CN105207782A (zh) * | 2015-11-18 | 2015-12-30 | 上海爱数软件有限公司 | 一种基于restful架构的身份验证方法 |
| CN107483415A (zh) * | 2017-07-26 | 2017-12-15 | 国网江西省电力公司南昌供电分公司 | 一种共享用电交互系统的双向认证方法 |
| CN109936447A (zh) * | 2019-01-31 | 2019-06-25 | 平安科技(深圳)有限公司 | 基于时间戳的加密及认证方法、系统和计算机设备 |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112822155A (zh) * | 2020-12-21 | 2021-05-18 | 陕西土豆数据科技有限公司 | 一种基于国密的航拍数据加解密方法 |
| CN112953968A (zh) * | 2021-03-30 | 2021-06-11 | 云谷技术(珠海)有限公司 | 一种基于安全认证的配电终端运维通信方法及装置 |
| CN114697099A (zh) * | 2022-03-24 | 2022-07-01 | 浪潮云信息技术股份公司 | 一种基于椭圆曲线加密算法的多方授权认证方案 |
| CN114697099B (zh) * | 2022-03-24 | 2024-05-17 | 浪潮云信息技术股份公司 | 一种基于椭圆曲线加密算法的多方授权认证方法 |
| CN115065503A (zh) * | 2022-05-11 | 2022-09-16 | 浪潮云信息技术股份公司 | 一种api网关防重放攻击的方法 |
| CN115065503B (zh) * | 2022-05-11 | 2024-05-31 | 浪潮云信息技术股份公司 | 一种api网关防重放攻击的方法 |
| CN115190481A (zh) * | 2022-06-01 | 2022-10-14 | 统信软件技术有限公司 | 数据加密方法和装置,设备准入认证方法、装置和系统 |
| CN119254412A (zh) * | 2024-09-11 | 2025-01-03 | 南京熊猫电子股份有限公司 | 一种基于时间的对称加密算法、系统及其存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109936447B (zh) | 2021-10-08 |
| CN109936447A (zh) | 2019-06-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020155794A1 (zh) | 基于时间戳的加密及认证方法、系统和计算机设备 | |
| KR102443857B1 (ko) | 암호화키를 사용한 신뢰 실행 환경의 어드레싱 기법 | |
| KR102689195B1 (ko) | 세션 식별자 동기화를 실현하는 방법 및 장치 | |
| CN112565205B (zh) | 可信认证和度量方法、服务器、终端及可读存储介质 | |
| US8413221B2 (en) | Methods and apparatus for delegated authentication | |
| CN107040513B (zh) | 一种可信访问认证处理方法、用户终端和服务端 | |
| CN107294937B (zh) | 基于网络通信的数据传输方法、客户端及服务器 | |
| CN108111497B (zh) | 摄像机与服务器相互认证方法和装置 | |
| CN112637131A (zh) | 用户身份认证方法、装置、设备和存储介质 | |
| US10938555B2 (en) | Method and assembly for establishing a secure communication between a first network device (initiator) and a second network device (responder) | |
| CN111444499B (zh) | 用户身份认证方法及系统 | |
| CN113204772A (zh) | 数据处理方法、装置、系统、终端、服务器和存储介质 | |
| JP2008250931A (ja) | 分散情報復元システム、情報利用装置、および、検証装置 | |
| KR20150079489A (ko) | 실시간 통신 방법 및 시스템 | |
| EP2993859B1 (en) | Secure communication method | |
| CN110505185A (zh) | 身份验证方法、设备和系统 | |
| WO2023124958A1 (zh) | 密钥更新方法、服务器、客户端及存储介质 | |
| CN106790045A (zh) | 一种基于云环境分布式虚拟机代理架构及数据完整性保障方法 | |
| CN105577619B (zh) | 一种客户端登录方法、客户端以及系统 | |
| CN108900595B (zh) | 访问云存储服务器数据的方法、装置、设备及计算介质 | |
| CN110147658B (zh) | 用户信息加解密方法、系统和计算机设备 | |
| CN110912857B (zh) | 移动应用间共享登录的方法、存储介质 | |
| CN113297091B (zh) | SoC芯片的调试方法、装置及SoC芯片 | |
| CN114065170A (zh) | 平台身份证书的获取方法、装置和服务器 | |
| CN114218542B (zh) | 访客身份审核方法及系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19913622 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19913622 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/01/2022) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19913622 Country of ref document: EP Kind code of ref document: A1 |