[go: up one dir, main page]

CN103391195B - A kind of method of work of dynamic token - Google Patents

A kind of method of work of dynamic token Download PDF

Info

Publication number
CN103391195B
CN103391195B CN201310270520.XA CN201310270520A CN103391195B CN 103391195 B CN103391195 B CN 103391195B CN 201310270520 A CN201310270520 A CN 201310270520A CN 103391195 B CN103391195 B CN 103391195B
Authority
CN
China
Prior art keywords
state
password
execute step
status
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310270520.XA
Other languages
Chinese (zh)
Other versions
CN103391195A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201310270520.XA priority Critical patent/CN103391195B/en
Publication of CN103391195A publication Critical patent/CN103391195A/en
Application granted granted Critical
Publication of CN103391195B publication Critical patent/CN103391195B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

本发明公开一种动态令牌的工作方法,涉及信息安全领域,包括当动态令牌被唤醒时判断唤醒类型,如为按键唤醒则根据被按下键的类型将系统状态设为相应的状态;如为其他唤醒则判断系统状态的类型,如为产生登录口令状态则根据密钥和当前时间生成登录口令并输出,将系统状态设为显示登录口令状态,将输入数据长度设为初始值;如为处理第一信息状态则根据密钥、当前时间和输入的第一信息生成第一口令并输出,将系统状态设为显示第一口令状态,将输入数据长度设为初始值,如为处理第二信息状态则对输入的第二信息进行处理,根据处理结果、密钥和当前时间生成第二口令并输出,将系统状态设为显示第二口令状态,将输入数据长度设为初始值。

The invention discloses a working method of a dynamic token, which relates to the field of information security, including judging the wake-up type when the dynamic token is woken up, and setting the system state to a corresponding state according to the type of the pressed key if it is a key-press wake-up; If it is other wake-up, judge the type of the system state, if it is to generate the login password state, generate and output the login password according to the key and the current time, set the system state to display the login password state, and set the input data length to the initial value; In order to process the first information state, then generate the first password and output it according to the first information of the key, current time and input, set the system state to display the first password state, and set the input data length to the initial value. The second information state processes the input second information, generates and outputs a second password according to the processing result, key and current time, sets the system state to display the second password state, and sets the input data length to an initial value.

Description

一种动态令牌的工作方法A way of working with dynamic tokens

技术领域technical field

本发明涉及信息安全领域,尤其涉及一种动态令牌的工作方法。The invention relates to the field of information security, in particular to a working method of a dynamic token.

背景技术Background technique

动态令牌是用来生成动态口令的终端,动态口令可以确认用户的合法身份,从而在用户以合法身份登录的基础上保障用户业务访问的安全性。动态口令认证技术被认为是目前能够最有效解决用户身份认证的方式之一,从而被广泛应用在银行、证券、第三方支付、大企业内部等各类信息系统场景中。现有技术中,只要通过动态口令登录了各类信息系统场景中,就可以对该信息系统场景中的所有项目进行操作,有恶意者趁用户不在就可以对该信息系统场景进行非法操作,应用安全性较低。A dynamic token is a terminal used to generate a dynamic password. The dynamic password can confirm the legal identity of the user, thereby ensuring the security of the user's business access on the basis of the user logging in with a legal identity. Dynamic password authentication technology is considered to be one of the most effective ways to solve user identity authentication at present, so it is widely used in various information system scenarios such as banking, securities, third-party payment, and large enterprises. In the existing technology, as long as you log in to various information system scenarios through a dynamic password, you can operate all items in the information system scenario. Malicious people can illegally operate the information system scenario while the user is away. Less security.

发明内容Contents of the invention

本发明的目的是为了克服现有技术的不足,提供一种动态令牌的工作方法,可提高登录信息系统场景及继续进行操作的安全性。The purpose of the present invention is to overcome the deficiencies of the prior art, and provide a working method of a dynamic token, which can improve the security of logging into the information system scene and continuing operations.

本发明提供一种动态令牌的工作方法,包括:The present invention provides a working method of a dynamic token, including:

步骤S1:动态令牌上电,进行初始化;Step S1: The dynamic token is powered on and initialized;

步骤S2:动态令牌打开按键中断,且将令牌状态设为休眠状态;Step S2: The dynamic token opening key is interrupted, and the token state is set to a dormant state;

当动态令牌被唤醒时,执行步骤S3;When the dynamic token is awakened, step S3 is executed;

步骤S3:判断是否为按键唤醒,是则执行步骤S4,否则执行步骤S14;Step S3: Determine whether it is a key-press wake-up, if yes, execute step S4, otherwise execute step S14;

步骤S4:关闭按键中断;Step S4: Turn off the button interrupt;

步骤S5:扫描按键获取键值并根据键值判断被按下键的类型,如为确认键则执行步骤S6,如为数字键则执行步骤S9,如为登录键则执行步骤S12;如为付款键则执行步骤S13;Step S5: Scan the key to obtain the key value and judge the type of the pressed key according to the key value. If it is a confirmation key, execute step S6. If it is a number key, execute step S9. If it is a login key, execute step S12; if it is a payment key key then execute step S13;

步骤S6:判断系统状态的类型,如为输入第一信息状态则执行步骤S7,如为输入第二信息状态则执行步骤S8;Step S6: Determine the type of system state, if it is the state of inputting the first information, execute step S7, if it is the state of inputting the second information, execute step S8;

步骤S7:将系统状态设为处理第一信息状态,执行步骤S14;Step S7: Set the system state as the state of processing the first information, and execute step S14;

步骤S8:将系统状态设为处理第二信息状态,执行步骤S14;Step S8: Set the system status as the status of processing the second information, and execute step S14;

步骤S9:判断系统状态的类型,如为第一类状态则执行步骤S10,如为第二类状态则将系统状态设为待机状态,执行步骤S14;所述第一类状态为待机状态或开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;所述第二类状态为显示登录口令状态或显示第一口令状态或显示第二口令状态;Step S9: Determine the type of the system state, if it is the first type of state, execute step S10, if it is the second type of state, set the system state to the standby state, and execute step S14; the first type of state is the standby state or power on Input password status or modify input password status or input new password status for the first time or second input new password status or input activation code status or input first information status or input second information status or input unlock code status; The second type of status is to display the status of the login password or to display the status of the first password or to display the status of the second password;

步骤S10:将数字键对应的数字顺序存入到数据缓存区中,按照第一预设方法更新输入数据长度,执行步骤S11;Step S10: Store the number sequence corresponding to the number key into the data buffer area, update the input data length according to the first preset method, and execute step S11;

步骤S11:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤S14;否则执行相应操作;Step S11: Determine whether the system state is in standby state, if yes, set the system state as the state of inputting the first information, and execute step S14; otherwise, execute the corresponding operation;

步骤S12:判断系统状态是否为第三类状态,是则将系统状态设为产生登录口令状态,执行步骤S14;否则执行相应操作;所述第三类状态为显示第一口令状态或显示第二口令状态;Step S12: Determine whether the system state is the third type of state, if so, set the system state to the state of generating a login password, and execute step S14; otherwise, perform the corresponding operation; the third type of state is the state of displaying the first password or the state of displaying the second password. password status;

步骤S13:判断系统状态是否为待机状态,是则将系统状态设为输入第二信息状态,执行步骤S14,否则执行相应操作;Step S13: judging whether the system status is the standby status, if yes, set the system status as the second information input status, and execute step S14, otherwise, execute the corresponding operation;

步骤S14:判断系统状态的类型,如系统状态为产生登录口令状态则执行步骤S15,如系统状态为处理第一信息状态则执行步骤S16,如系统状态为处理第二信息状态则执行步骤S17;如系统状态为第四类状态则返回步骤S2;所述第四类状态为待机状态或输入第一信息状态或输入第二信息状态;Step S14: Determine the type of the system state, if the system state is the state of generating a login password, then execute step S15, if the system state is the state of processing the first information, then execute step S16, if the system state is the state of processing the second information, then execute step S17; If the system state is the fourth type of state, return to step S2; the fourth type of state is the standby state or the state of inputting the first information or the state of inputting the second information;

步骤S15:根据密钥和动态令牌的当前时间生成登录口令并输出,将系统状态设为显示登录口令状态,将输入数据长度设为初始值,返回步骤S2;Step S15: Generate and output the login password according to the current time of the key and the dynamic token, set the system status to display the login password status, set the input data length to the initial value, and return to step S2;

步骤S16:根据密钥、动态令牌的当前时间和输入的第一信息生成第一口令并输出,将系统状态设为显示第一口令状态,将输入数据长度设为初始值,返回步骤S2;Step S16: Generate and output the first password according to the key, the current time of the dynamic token and the first input information, set the system state to display the first password state, set the input data length to the initial value, and return to step S2;

步骤S17:对输入的第二信息进行处理,根据处理结果、密钥和动态令牌的当前时间生成第二口令并输出,将系统状态设为显示第二口令状态,将输入数据长度设为初始值,返回步骤S2。Step S17: Process the input second information, generate and output the second password according to the processing result, the key and the current time of the dynamic token, set the system status to display the second password status, and set the input data length to initial value, return to step S2.

进一步地,所述步骤S3中判断是否为按键唤醒具体为:判断按键唤醒标志是否置位,是则为按键唤醒,否则不为按键唤醒。Further, in the step S3, judging whether it is a key-press wake-up is specifically: judging whether a key-press wake-up flag is set, if yes, it is a key-press wake-up, otherwise it is not a key-press wake-up.

进一步地,所述步骤S5中扫描按键获取键值与根据键值判断被按下键的类型之间包括:Further, in the step S5, scanning the key to obtain the key value and judging the type of the pressed key according to the key value include:

步骤A0:判断被按下的键是否为数字键或小数点键或功能键,是则将自动关机定时器的初始值设为自动关机时间,执行步骤A1,否则执行步骤S14;所述功能键包括开/关机键、确认键、删除键、登录键和付款键;Step A0: Determine whether the pressed key is a number key or a decimal point key or a function key, if so, set the initial value of the automatic shutdown timer as the automatic shutdown time, and perform step A1, otherwise perform step S14; the function keys include On/off key, confirmation key, delete key, login key and payment key;

步骤A1:判断当前处理状态,如为第一处理状态则执行步骤A2,如为第二处理状态则执行步骤A3,如为第三处理状态则执行步骤A4,如为其他则继续;Step A1: Determine the current processing state, if it is the first processing state, execute step A2, if it is the second processing state, execute step A3, if it is the third processing state, execute step A4, if it is other, continue;

步骤A2:将系统状态设为第一次输入新密码状态,执行步骤S14;Step A2: Set the system state to the state of entering a new password for the first time, and execute step S14;

步骤A3:将系统状态设为开机输入密码状态,执行步骤S14;Step A3: Set the system status to the password input status when powering on, and execute step S14;

步骤A4:将系统状态设为修改输入密码状态,执行步骤S14。Step A4: Set the system state to the state of modifying and entering the password, and execute step S14.

进一步地,当系统状态为新密码错误状态且被按下的按键类型不是开/关机键时当前处理状态为所述第一处理状态;当系统状态为开机密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为所述第二处理状态;当系统状态为修改密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为所述第三处理状态。Further, when the system state is the new password error state and the pressed key type is not the power on/off key, the current processing state is the first processing state; when the system state is the power-on password error state and the pressed key type When the type is not the on/off key, the current processing state is the second processing state; when the system state is the error state of changing the password and the type of the pressed button is not the on/off key, the current processing state is the third processing state .

进一步地,所述步骤S14还包括:Further, the step S14 also includes:

如为第一次输入新密码状态或开机输入密码状态或修改输入密码状态,则返回步骤S2。If it is the state of entering a new password for the first time or the state of entering a password when starting up or modifying the state of entering a password, then return to step S2.

进一步地,所述步骤S5还包括:如被按下键的类型为开/关机键则执行步骤B1;Further, the step S5 also includes: if the type of the pressed key is an on/off key, then execute step B1;

步骤B1:判断动态令牌内部是否存储有种子,是则执行步骤B2,否则进行显示屏自检并将系统状态设为关机状态,执行步骤S14;Step B1: Determine whether there is a seed stored in the dynamic token, if so, execute step B2, otherwise perform a self-check on the display screen and set the system status to shutdown, and execute step S14;

步骤B2:判断系统状态是否为关机状态,是则执行步骤B3,否则将系统状态设为切换到关机状态,执行步骤S14;Step B2: Determine whether the system state is off, if yes, execute step B3, otherwise set the system state to switch to off state, and execute step S14;

步骤B3:判断按键被按下的时间是否超过预设时长,是则清空数据缓存区,初始化显示屏,执行步骤B4,否则执行步骤S14;Step B3: Determine whether the time the button is pressed exceeds the preset duration, if yes, clear the data buffer area, initialize the display screen, and execute step B4; otherwise, execute step S14;

步骤B4:判断令牌状态是否为自毁,是则将系统状态设为令牌报废状态,执行步骤S14,否则执行步骤B5;Step B4: Determine whether the status of the token is self-destructing, if yes, set the system status to the status of token scrapping, and execute step S14; otherwise, execute step B5;

步骤B5:判断令牌状态是否为已激活,是则执行步骤B6,否则将系统状态设为输入激活码状态,执行步骤S14;Step B5: Determine whether the status of the token is activated, if so, execute step B6, otherwise set the system status as the status of inputting the activation code, and execute step S14;

步骤B6:判断令牌状态是否为已锁定,是则将系统状态设为输入解锁码状态,执行步骤S14,否则执行步骤B7;Step B6: Determine whether the status of the token is locked, if yes, set the system status to the status of inputting the unlock code, execute step S14, otherwise execute step B7;

步骤B7:判断动态令牌是否设置过密码,是则将系统状态设为开机输入密码状态,执行步骤S14;否则将系统状态设为第一次输入新密码状态,执行步骤S14。Step B7: Determine whether the dynamic token has been set with a password, if so, set the system state to the state of entering the password at power-on, and execute step S14; otherwise, set the system state to the state of entering a new password for the first time, and execute step S14.

进一步地,所述步骤B4中判断令牌状态是否为自毁具体为:判断自毁标志是否置位,是则令牌状态为自毁,否则令牌状态为正常;Further, in the step B4, judging whether the status of the token is self-destructing is specifically: judging whether the self-destructing flag is set, if yes, the status of the token is self-destructing, otherwise the status of the token is normal;

所述步骤B5中判断令牌状态是否为已激活具体为:判断激活标志是否置位,是则令牌状态为已激活,否则令牌状态为未激活。In the step B5, judging whether the token state is activated is specifically: judging whether the activation flag is set, if yes, the token state is activated, otherwise the token state is inactive.

进一步地,所述步骤S14还包括:Further, the step S14 also includes:

如为关机状态或输入激活码状态或输入解锁码状态或令牌报废状态,则返回步骤S2;If it is in the shutdown state or the state of entering the activation code or the state of entering the unlock code or the state of token scrapping, then return to step S2;

如为切换到关机状态则将系统状态设为关机状态,关闭显示屏,返回步骤S2。If it is to switch to the shutdown state, set the system state to the shutdown state, turn off the display screen, and return to step S2.

进一步地,所述步骤S5还包括:如被按下键的类型为小数点键则执行步骤P1,Further, the step S5 also includes: if the type of the pressed key is a decimal point key, then execute step P1,

步骤P1:判断系统状态是否为第五类状态,是则执行步骤P2,否则执行步骤S14;所述第五类状态为测试状态或待机状态或输入第一信息状态或输入第二信息状态;Step P1: Determine whether the system state is the fifth type of state, if yes, execute step P2, otherwise execute step S14; the fifth type of state is the test state or standby state or the state of inputting the first information or the state of inputting the second information;

步骤P2:将小数点顺序存入到数据缓存区中,按照所述第一预设方法更新输入数据长度,执行步骤P3;Step P2: Store the decimal points in the data buffer in sequence, update the input data length according to the first preset method, and execute step P3;

步骤P3:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤S14,否则执行步骤S14。Step P3: Determine whether the system state is the standby state, if yes, set the system state to the state of inputting the first information, execute step S14, otherwise execute step S14.

进一步地,所述输入数据长度的初始值为0;所述按照所述第一预设方法更新输入数据长度具体为:输入数据长度自加1。Further, the initial value of the input data length is 0; the updating of the input data length according to the first preset method specifically includes: adding 1 to the input data length.

进一步地,所述步骤S14还包括:如为输入第一信息状态,则返回步骤S2。Further, the step S14 also includes: if the first information status is input, return to step S2.

进一步地,所述步骤S5还包括:如被按下键的类型为删除键则执行步骤Q1,Further, the step S5 also includes: if the type of the pressed key is a delete key, then execute step Q1,

步骤Q1:判断输入数据长度是否为初始值,是则执行步骤Q2,否则执行步骤Q5;Step Q1: Determine whether the input data length is the initial value, if yes, execute step Q2, otherwise execute step Q5;

步骤Q2:判断系统状态是否为输入第二信息状态或第二类状态,是则将系统状态设为待机状态,执行步骤S14,否则执行步骤Q3;所述第二类状态为显示登录口令状态或显示第一口令状态或第二口令状态;Step Q2: judging whether the system state is the state of inputting the second information or the state of the second type, if yes, set the state of the system to the standby state, execute step S14, otherwise execute step Q3; the state of the second type is the state of displaying the login password or Display the first password status or the second password status;

步骤Q3:判断系统状态是否为待机状态,是则执行步骤Q4,否则执行步骤S14;Step Q3: Determine whether the system status is standby, if yes, execute step Q4, otherwise execute step S14;

步骤Q4:判断按键被按下的时间是否超过预设时长,是则将系统状态设为修改输入密码状态,执行步骤S14,否则执行步骤S14;Step Q4: Determine whether the time the button is pressed exceeds the preset duration, if so, set the system status to the status of modifying the input password, and execute step S14; otherwise, execute step S14;

步骤Q5:判断系统状态是否为第六类状态,是则删除数据缓存区中最后存入的数据,按照第二预设方法更新输入数据长度,执行步骤Q6,否则执行步骤Q8;所述第六类状态为开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;Step Q5: Determine whether the system state is the sixth type of state, if yes, delete the last stored data in the data buffer, update the length of the input data according to the second preset method, execute step Q6, otherwise execute step Q8; the sixth The state is the state of entering the password at startup or modifying the state of entering the password or the state of entering the new password for the first time or the state of entering the new password for the second time or the state of entering the activation code or the state of entering the first information or the state of entering the second information or the state of entering the unlock code ;

步骤Q6:判断系统状态是否为输入第一信息状态,是则执行步骤Q7,否则执行步骤S14;Step Q6: Determine whether the system state is the state of inputting the first information, if yes, execute step Q7, otherwise execute step S14;

步骤Q7:判断输入数据长度是否为初始值,是则将系统状态设为待机状态,执行步骤S14,否则执行步骤S14;Step Q7: Determine whether the length of the input data is the initial value, if yes, set the system state to the standby state, and execute step S14; otherwise, execute step S14;

步骤Q8:判断系统状态是否为按键测试状态,是则提示失败信息,执行步骤S14;否则执行步骤S14。Step Q8: Determine whether the system status is the button test status, if yes, prompt a failure message, and go to step S14; otherwise, go to step S14.

进一步地,所述输入数据长度的初始值为0;所述按照所述第一预设方法更新输入数据长度具体为:输入数据长度自加1;所述按照所述第二预设方法更新输入数据长度具体为:输入数据长度自减1。Further, the initial value of the input data length is 0; the updating of the input data length according to the first preset method is specifically: adding 1 to the input data length; the updating of the input data according to the second preset method The data length is specifically: the input data length is reduced by 1.

进一步地,所述步骤S6还包括:如系统状态为第一次输入新密码状态则执行步骤C1,如系统状态为第二次输入新密码状态则执行步骤C2,如系统状态为开机输入密码状态则执行步骤C3,如系统状态为按键测试状态则执行步骤C4;如为其他则执行步骤S14;Further, the step S6 also includes: if the system state is the state of entering a new password for the first time, then execute step C1, if the system state is the state of entering a new password for the second time, then execute step C2, if the system state is the state of entering a password when starting up Then execute step C3, if the system state is the button test state then execute step C4; if it is other then execute step S14;

步骤C1:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第一次输入新密码状态,执行步骤S14,否则执行步骤S14;Step C1: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system status to the state of processing the first input of a new password, and execute step S14; otherwise, execute step S14;

步骤C2:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第二次输入新密码状态,执行步骤S14,否则执行步骤S14;Step C2: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system state to process the second input of a new password, and execute step S14; otherwise, execute step S14;

步骤C3:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理开机密码状态,执行步骤S14,否则执行步骤S14;Step C3: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system status to the status of processing the power-on password, and execute step S14; otherwise, execute step S14;

步骤C4:提示成功信息,执行步骤S14。Step C4: A success message is prompted, and step S14 is executed.

进一步地,所述步骤S14还包括:Further, the step S14 also includes:

如系统状态为第七类状态,则判断数据缓存区中的数据是否与保存的第二次输入的新密码相同,是则执行步骤H1,否则执行步骤H3;所述第七类状态为处理开机密码状态或处理修改密码状态;If the system state is the seventh type of state, then judge whether the data in the data buffer area is identical with the new password of the second input of preservation, if yes, execute step H1, otherwise execute step H3; password status or handle changing password status;

步骤H1:将输入密码错误次数设为初始值,将自动解锁计数器设为自动解锁次数,将自动解锁定时器设为自动解锁周期,执行步骤H2;Step H1: Set the number of wrong password input times as the initial value, set the automatic unlocking counter as the number of automatic unlocking times, set the automatic unlocking timer as the automatic unlocking period, and execute step H2;

步骤H2:判断系统状态是否为处理开机密码状态,是则将系统状态设为待机状态,将输入数据长度设为初始值,执行步骤S14,否则将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,执行步骤S14;Step H2: Determine whether the system state is the state of processing the power-on password, if so, set the system state to the standby state, set the input data length to the initial value, and execute step S14, otherwise set the system state to the state of entering a new password for the first time, Set the input data length as an initial value, and execute step S14;

步骤H3:更新输入密码错误次数,提示开机密码输入错误,通过显示屏显示输入密码错误次数,执行步骤H4;Step H3: Update the number of incorrect passwords entered, prompting that the power-on password is incorrectly input, display the number of incorrect passwords entered on the display screen, and execute step H4;

步骤H4:判断输入密码错误次数是否等于预设重试次数,是则执行步骤H5,否则执行步骤H6;Step H4: Determine whether the number of wrong password input is equal to the preset number of retries, if yes, execute step H5, otherwise execute step H6;

步骤H5:设置令牌状态为已锁定,将系统状态设为输入解锁码状态,将输入数据长度设为初始值,返回步骤S2;Step H5: Set the status of the token as locked, set the status of the system as the status of inputting the unlock code, set the length of the input data as the initial value, and return to step S2;

步骤H6:判断系统状态是否为处理开机密码状态,是则将系统状态设为开机密码错误状态,将输入数据长度设为初始值,返回步骤S2,否则将系统状态设为修改密码错误状态,将输入数据长度设为初始值,返回步骤S2。Step H6: Determine whether the system state is the state of processing the power-on password, if so, set the system state to the state of the power-on password error, set the length of the input data to the initial value, and return to step S2, otherwise set the system state to the state of changing the password error, set The length of the input data is set to the initial value, and return to step S2.

进一步地,所述步骤S9还包括:如系统状态为为关机状态,则判断动态令牌内部是否存储有种子,是则将系统状态设为测试状态,执行步骤S14,否则直接执行步骤S14。Further, the step S9 also includes: if the system status is shutdown status, then judge whether there is a seed stored inside the dynamic token, if yes, set the system status as a test status, and execute step S14, otherwise, directly execute step S14.

进一步地,所述步骤S11中的执行相应操作包括:如系统状态为输入激活码状态则执行步骤D1;如系统状态为输入解锁码状态则执行步骤D2;如系统状态为修改输入密码状态则执行步骤D3;如系统状态为第一次输入新密码状态则执行步骤D5;如系统状态为第二次输入新密码状态则执行步骤D7;如为其他则执行步骤S14;Further, the execution of the corresponding operation in step S11 includes: if the system state is the activation code input state, then execute step D1; if the system state is the unlock code input state, then execute step D2; if the system state is the modification input password state, then execute Step D3; if the system state is the state of entering a new password for the first time, execute step D5; if the system state is the state of entering a new password for the second time, execute step D7; if it is other, execute step S14;

步骤D1:判断输入数据长度是否等于第一数值,是则将系统状态设为验证激活码状态,执行步骤S14,否则执行步骤S14;Step D1: Judging whether the length of the input data is equal to the first value, if yes, set the system state to verify the activation code state, and execute step S14; otherwise, execute step S14;

步骤D2:判断输入数据长度是否等于第二数值,是则将系统状态设为处理解锁码状态,执行步骤S14,否则执行步骤S14;Step D2: Determine whether the length of the input data is equal to the second value, if yes, set the system state to the state of processing the unlock code, and execute step S14; otherwise, execute step S14;

步骤D3:判断输入数据长度是否等于预设密码长度,是则执行步骤D4,否则执行步骤S14;Step D3: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D4, otherwise execute step S14;

步骤D4:判断动态令牌是否设置过密码,是则将系统状态设为处理修改密码状态,执行步骤S14,否则执行步骤S14;Step D4: Determine whether the dynamic token has been set with a password, and if so, set the system state to the status of processing and modifying the password, and execute step S14; otherwise, execute step S14;

步骤D5:判断输入数据长度是否等于预设密码长度,是则执行步骤D6,否则执行步骤S14;Step D5: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D6, otherwise execute step S14;

步骤D6:判断动态令牌是否设置过密码,是则将系统状态设为处理第一次输入新密码状态,执行步骤S14,否则执行步骤S14;Step D6: Determine whether a password has been set for the dynamic token, if so, set the system state to process the first input of a new password, and execute step S14; otherwise, execute step S14;

步骤D7:判断输入数据长度是否等于预设密码长度,是则执行步骤D8,否则执行步骤S14;Step D7: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D8, otherwise execute step S14;

步骤D8:判断动态令牌是否设置过密码,是则将系统状态设为处理第二次输入新密码状态,执行步骤S14,否则执行步骤S14。Step D8: Determine whether a password has been set on the dynamic token, if yes, set the system state to process the second input of a new password, and execute step S14, otherwise execute step S14.

进一步地,所述判断动态令牌是否设置过密码具体为:判断密码标识是否置位,是则动态令牌已设置过密码,否则动态令牌未设置过密码。Further, the judging whether the dynamic token has been set with a password specifically includes: judging whether the password flag is set, if yes, the dynamic token has been set with a password, otherwise, the dynamic token has not been set with a password.

进一步地,所述步骤S14还包括:Further, the step S14 also includes:

所述第四类状态为输入第一口令状态或测试状态或处理修改密码状态;The fourth type of state is the state of inputting the first password or the state of testing or processing and modifying the password;

如系统状态为验证激活码状态,则判断数据缓存区中的数据是否为正确的激活码,是则更新密钥,设置令牌状态为已激活,提示激活成功,将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,返回步骤S2;否则提示激活失败,将系统状态设为输入激活码状态,将输入数据长度设为初始值,返回步骤S2;If the system status is verifying the activation code status, then judge whether the data in the data cache area is the correct activation code, if so, update the key, set the token status as activated, prompt that the activation is successful, and set the system status as the first time Enter the new password state, set the input data length as the initial value, and return to step S2; otherwise, it prompts that the activation fails, set the system state as the input activation code state, set the input data length as the initial value, and return to step S2;

如系统状态为处理解锁码状态,则判断数据缓存区中的数据是否为正确的解锁码,是则提示解锁成功,设置令牌状态为未锁定,清空保存的所有密码,将系统状态设为第一次输入新密码状态,将输入密码错误次数和输入数据长度均设为初始值,返回步骤S2;否则提示解锁失败,关闭显示屏,将系统状态设为关机状态,将输入数据长度设为初始值,返回步骤S2;If the system state is processing the unlock code state, then judge whether the data in the data cache area is the correct unlock code, if yes, it will prompt that the unlock is successful, set the token state to unlock, clear all saved passwords, and set the system state to the first In the state of entering a new password once, set the number of wrong passwords entered and the length of the input data to the initial value, and return to step S2; otherwise, it will prompt that the unlocking fails, turn off the display, set the system state to the shutdown state, and set the length of the input data to the initial value value, return to step S2;

如系统状态为处理第一次输入新密码状态,则保存数据缓存区中的数据为第一次输入的新密码,将系统状态设为第二次输入新密码状态,将输入数据长度设为初始值,返回步骤S2;If the system state is the state of processing the new password input for the first time, then save the data in the data buffer area as the new password entered for the first time, set the system state to the state of entering the new password for the second time, and set the input data length to initial value, return to step S2;

如系统状态为处理第二次输入新密码状态,则判断数据缓冲区中的数据是否与保存的第一次输入的新密码相同,是则执行步骤E1,否则执行步骤E2;If the state of the system is to process the state of entering a new password for the second time, then it is judged whether the data in the data buffer is identical to the new password input for the first time saved, if so, step E1 is executed, otherwise step E2 is executed;

步骤E1:保存数据缓存区中的数据为第二次输入的新密码,提示新开机密码输入正确,将系统状态设为待机状态,将输入数据长度设为初始值,返回步骤S2;Step E1: Save the data in the data buffer area as the new password entered for the second time, prompting that the new power-on password is entered correctly, set the system state to the standby state, set the input data length to the initial value, and return to step S2;

步骤E2:提示新开机密码输入错误,将系统状态设为新密码错误状态,将输入数据长度设为初始值,返回步骤S2。Step E2: Prompt that the new power-on password is entered incorrectly, set the system state as the new password error state, set the input data length as the initial value, and return to step S2.

进一步地,所述设置令牌状态为已激活具体为:将激活标识置位;设置令牌状态为未锁定具体为:将锁定标识复位。Further, setting the status of the token as activated is specifically: setting the activation flag; setting the status of the token as unlocked is specifically: resetting the lock flag.

进一步地,所述输入密码错误次数的初始值为0;所述更新输入密码错误次数具体为:输入密码错误次数自加1。Further, the initial value of the number of times of wrong password input is 0; the update of the number of times of wrong password input is specifically: the number of times of wrong password input is incremented by 1.

进一步地,所述步骤S12中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第一字符,执行步骤S14;如为其他则执行步骤S14。Further, performing the corresponding operation in step S12 includes: if the system state is the test state, then output the first character through the display screen, and execute step S14; if it is otherwise, execute step S14.

进一步地,所述步骤S13中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第二字符,执行步骤S14,如为其他则执行步骤S14。Further, the execution of the corresponding operation in step S13 includes: if the system state is the test state, then outputting the second character through the display screen, then performing step S14, and if it is otherwise, then performing step S14.

进一步地,所述步骤S15中生成登录口令具体为:根据预设登录算法对密钥和动态令牌的当前时间进行计算得到登录口令。Further, generating the login password in the step S15 specifically includes: calculating the key and the current time of the dynamic token according to a preset login algorithm to obtain the login password.

进一步地,所述步骤S16中生成第一口令具体为:根据预设账号算法对密钥、动态令牌的当前时间、输入的第一信息和事件因子进行计算得到第一口令。Further, generating the first password in step S16 specifically includes: calculating the key, the current time of the dynamic token, the input first information and the event factor according to the preset account algorithm to obtain the first password.

进一步地,所述步骤S17中生成第二口令具体为:根据预设付款算法对密钥、动态令牌的当前时间、处理结果和事件因子进行计算得到第二口令。Further, generating the second password in the step S17 specifically includes: calculating the key, the current time of the dynamic token, the processing result and the event factor according to the preset payment algorithm to obtain the second password.

本发明与现有技术相比,具有以下优点:Compared with the prior art, the present invention has the following advantages:

本发明的动态令牌可产生登录口令、第一口令和第二口令三种口令,在登录信息系统场景进行操作时,首先需要通过登录口令验证用户身份,如要对信息系统场景中的第一项目或第二项目继续进行操作,则需输入第一口令或第二口令进行验证,防止恶意者非法操作,增强信息系统场景的应用安全性。The dynamic token of the present invention can generate three kinds of passwords: a login password, a first password and a second password. When operating in a login information system scenario, it is first necessary to verify the identity of the user through the login password. If the project or the second project continues to operate, it is necessary to enter the first password or the second password for verification, to prevent illegal operations by malicious people, and to enhance the application security of information system scenarios.

附图说明Description of drawings

图1-图2为本发明实施例提供的动态令牌的工作方法流程图。Figures 1-2 are flowcharts of the working method of the dynamic token provided by the embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.

本发明实施例提供了一种动态令牌的工作方法,如图1-图2所示,包括:The embodiment of the present invention provides a working method of a dynamic token, as shown in Fig. 1-Fig. 2, including:

步骤101:动态令牌上电,进行初始化;Step 101: The dynamic token is powered on and initialized;

本实施例中的初始化包括系统时钟设置、IO初始化设置、RTC设置和对输入变量、系统状态变量、自动关机变量等进行初始化;Initialization in the present embodiment includes system clock setting, IO initialization setting, RTC setting and input variable, system state variable, automatic shutdown variable etc. are initialized;

步骤102:打开中断,且将令牌状态设为休眠状态;Step 102: Turn on the interrupt, and set the token status to dormant status;

本实施例中的中断包括按键中断和全局中断;Interrupts in this embodiment include key interrupts and global interrupts;

当动态令牌被唤醒时,开始执行步骤103;When the dynamic token is awakened, start to execute step 103;

步骤103:判断是否为按键唤醒,是则执行步骤104,否则执行步骤114;Step 103: Determine whether it is a key-press wake-up, if yes, execute step 104, otherwise execute step 114;

判断是否为按键唤醒具体为:判断按键唤醒标志是否置位,是则为按键唤醒,否则不为按键唤醒;Judging whether it is a key-press wake-up is specifically: judging whether the key-press wake-up flag is set, if it is, it is a key-press wake-up, otherwise it is not a key-press wake-up;

在本实施例中,如接收到按键触发,则进入按键中断处理,按键中断处理包括:将按键唤醒标志置位,退出按键中断;In this embodiment, if a key trigger is received, enter the key interrupt processing, and the key interrupt processing includes: setting the key wake-up flag, and exiting the key interrupt;

步骤104:关闭按键中断;Step 104: Turn off the button interrupt;

本实施例中,步骤104中还包括将自动关机定时器的初始值设为预定关机时间值,开启定时器;当定时器的值为0时动态令牌自动关机;In this embodiment, step 104 also includes setting the initial value of the automatic shutdown timer as a predetermined shutdown time value, and starting the timer; when the value of the timer is 0, the dynamic token automatically shuts down;

步骤105:扫描按键获取键值并根据键值判断被按下键的类型,如为确认键则执行步骤106,如为数字键则执行步骤109,如为登录键则执行步骤112;如为付款键则执行步骤113;Step 105: Scan the key to obtain the key value and judge the type of the pressed key according to the key value. If it is a confirmation key, then perform step 106. If it is a number key, then perform step 109. If it is a login key, then perform step 112; if it is a payment key key then execute step 113;

步骤106:判断系统状态的类型,如为输入第一信息状态则执行步骤107,如为输入第二信息状态则执行步骤108;Step 106: Determine the type of the system status, if it is the input of the first information status, then execute step 107, if it is the input of the second information status, then execute the step 108;

在本实施例中,步骤106还包括:如系统状态为第一次输入新密码状态则执行步骤C1,如系统状态为第二次输入新密码状态则执行步骤C2,如系统状态为开机输入密码状态则执行步骤C3,如系统状态为按键测试状态则执行步骤C4;如为其他则执行步骤114;In this embodiment, step 106 also includes: if the system state is the state of entering a new password for the first time, then perform step C1, if the system state is the state of entering a new password for the second time, then perform step C2, if the system state is to enter a password when powering on state then executes step C3, if the system state is a button test state then executes step C4; if it is other then executes step 114;

步骤C1:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第一次输入新密码状态,执行步骤114,否则执行步骤114;Step C1: Determine whether the length of the input data is equal to the length of the preset password, if so, set the system state to the state of processing the first input of a new password, and execute step 114; otherwise, execute step 114;

步骤C2:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第二次输入新密码状态,执行步骤114,否则执行步骤114;Step C2: Determine whether the length of the input data is equal to the length of the preset password, if so, set the system state to process the second input of a new password, and execute step 114; otherwise, execute step 114;

步骤C3:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理开机密码状态,执行步骤114,否则执行步骤114;Step C3: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system state to process the power-on password, and execute step 114; otherwise, execute step 114;

步骤C4:提示成功信息,执行步骤114;Step C4: Prompt for success information, go to step 114;

步骤107:将系统状态设为处理第一信息状态,执行步骤114;Step 107: Set the system state as the state of processing the first information, and execute step 114;

步骤108:将系统状态设为处理第二信息状态,执行步骤114;Step 108: Set the system state as processing the second information state, and execute step 114;

步骤109:判断系统状态的类型,如为第一类状态则执行步骤110,如为第二类状态则将系统状态设为待机状态,执行步骤114;Step 109: Determine the type of the system state, if it is the first type of state, execute step 110, if it is the second type of state, then set the system state to the standby state, and execute step 114;

具体的,本实施例中的第一类状态为待机状态或开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;Specifically, the first type of state in this embodiment is the standby state or the power-on password input state or the modification input password state or the first input new password state or the second input new password state or the activation code input state or the first input state. Information status or input second information status or input unlock code status;

本实施例中的第二类状态为显示登录口令状态或显示第一口令状态或显示第二口令状态;The second type of state in this embodiment is to display the login password state or to display the first password state or to display the second password state;

所述步骤109还包括:如为系统状态为关机状态,则判断动态令牌内部是否存储有种子,是则直接执行步骤114,否则将系统状态设为测试状态,执行步骤114;Said step 109 also includes: if the system state is a power-off state, it is judged whether a seed is stored inside the dynamic token, and if so, step 114 is directly performed; otherwise, the system state is set as a test state, and step 114 is executed;

步骤110:将数字键对应的数字顺序存入到数据缓存区中,按照第一预设方法更新输入数据长度,执行步骤111;Step 110: Store the number sequence corresponding to the number key into the data buffer area, update the input data length according to the first preset method, and execute step 111;

具体的,本实施例中按照第一预设方法更新输入数据长度具体为:输入数据长度自加1;Specifically, in this embodiment, updating the length of the input data according to the first preset method is specifically: adding 1 to the length of the input data;

步骤111:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤114;否则执行相应操作;Step 111: Determine whether the system state is in standby state, if so, set the system state as the state of inputting the first information, and perform step 114; otherwise, perform corresponding operations;

本实施例中,该步骤111中的执行相应操作包括:如系统状态为输入激活码状态则执行步骤D1;如系统状态为输入解锁码状态则执行步骤D2;如系统状态为修改输入密码状态则执行步骤D3;如系统状态为第一次输入新密码状态则执行步骤D5;如系统状态为第二次输入新密码状态则执行步骤D7;如为其他则执行步骤114;In this embodiment, the execution of corresponding operations in step 111 includes: if the system state is the activation code input state, step D1 is executed; if the system state is the unlock code input state, then step D2 is executed; if the system state is the password input state, then Execute step D3; if the system state is the state of entering a new password for the first time, then execute step D5; if the system state is the state of entering a new password for the second time, then execute step D7; if it is other, then execute step 114;

步骤D1:判断输入数据长度是否等于第一数值,是则将系统状态设为验证激活码状态,执行步骤114,否则执行步骤114;Step D1: Judging whether the length of the input data is equal to the first value, if yes, set the system state to verify the activation code state, and execute step 114; otherwise, execute step 114;

具体的,本实施例中的第一数值为12;Specifically, the first value in this embodiment is 12;

步骤D2:判断输入数据长度是否等于第二数值,是则将系统状态设为处理解锁码状态,执行步骤114,否则执行步骤114;Step D2: judging whether the length of the input data is equal to the second value, if yes, set the system state to the state of processing the unlock code, and execute step 114; otherwise, execute step 114;

具体的,本实施例中的第二数值为8;Specifically, the second value in this embodiment is 8;

步骤D3:判断输入数据长度是否等于预设密码长度,是则执行步骤D4,否则执行步骤114;Step D3: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D4, otherwise execute step 114;

步骤D4:判断动态令牌是否设置过密码,是则将系统状态设为处理修改密码状态,执行步骤114,否则执行步骤114;Step D4: Determine whether the dynamic token has been set with a password, if so, set the system state to the status of processing and modifying the password, and execute step 114; otherwise, execute step 114;

在本实施例中,步骤D4中判断动态令牌是否设置过密码具体为:判断密码标识是否置位,是则动态令牌已设置过密码,否则动态令牌未设置过密码;In the present embodiment, judging whether the dynamic token has been set with a password in step D4 is specifically: judging whether the password flag is set, if yes, the dynamic token has been set with a password, otherwise the dynamic token has not been set with a password;

步骤D5:判断输入数据长度是否等于预设密码长度,是则执行步骤D6,否则执行步骤114;Step D5: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D6, otherwise execute step 114;

步骤D6:判断动态令牌是否设置过密码,是则将系统状态设为处理第一次输入新密码状态,执行步骤114,否则执行步骤114;Step D6: Determine whether a password has been set for the dynamic token, if so, set the system state to process the first input of a new password, and execute step 114; otherwise, execute step 114;

步骤D7:判断输入数据长度是否等于预设密码长度,是则执行步骤D8,否则执行步骤114;Step D7: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D8, otherwise execute step 114;

步骤D8:判断动态令牌是否设置过密码,是则将系统状态设为处理第二次输入新密码状态,执行步骤114,否则执行步骤114;Step D8: Determine whether a password has been set for the dynamic token, if so, set the system state to process the second input of a new password, and execute step 114; otherwise, execute step 114;

在本实施例中,步骤D8中判断动态令牌是否设置过密码具体为:判断密码标识是否置位,是则动态令牌已设置过密码,否则动态令牌未设置过密码;In this embodiment, judging whether a password has been set on the dynamic token in step D8 is specifically: judging whether the password flag is set, if yes, the password has been set on the dynamic token, otherwise the password has not been set on the dynamic token;

步骤112:判断系统状态是否为第三类状态,是则将系统状态设为产生登录口令状态,执行步骤114;否则执行相应操作;Step 112: judge whether the system state is the third type of state, if so, set the system state as the state of generating a login password, and perform step 114; otherwise, perform corresponding operations;

具体的,本实施例中的第三类状态为显示账号口令状态或显示第二口令状态;Specifically, the third type of state in this embodiment is the state of displaying the account password or the state of displaying the second password;

本实施例中,该步骤112中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第一字符,执行步骤114;如为其他则执行步骤114;具体的,第一字符为>;In this embodiment, the execution of corresponding operations in step 112 includes: if the system state is a test state, then output the first character through the display screen, and execute step 114; if it is otherwise, execute step 114; specifically, the first character is > ;

步骤113:判断系统状态是否为待机状态,是则将系统状态设为输入第二信息状态,执行步骤114,否则执行相应操作;Step 113: judging whether the system status is the standby status, if so, set the system status as the second information input status, and execute step 114, otherwise execute corresponding operations;

本实施例中,该步骤113中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第二字符,执行步骤114,如为其他则执行步骤114;具体的,本实施例中的第二字符为<;In this embodiment, the execution of corresponding operations in step 113 includes: if the system state is a test state, then output the second character through the display screen, and execute step 114, and if it is otherwise, execute step 114; specifically, in this embodiment The second character is <;

步骤114:检测系统状态的类型,如为产生登录口令状态则执行步骤115,如为处理第一信息状态则执行步骤116,如为处理第二信息状态则执行步骤117;如为第四类状态则返回步骤102;Step 114: Detect the type of the system state, if it is to generate a login password state, then execute step 115, if it is to process the first information state, it will execute step 116, if it is to process the second information state, it will execute step 117; if it is the fourth type of state Then return to step 102;

具体的,在本实施例中,第四类状态为待机状态或输入第一信息状态或输入第二信息状态;Specifically, in this embodiment, the fourth type of state is the standby state or the state of inputting the first information or the state of inputting the second information;

本实施例中,该步骤114还包括:In this embodiment, this step 114 also includes:

如系统状态为切换到关机状态则将系统状态设为关机状态,关闭显示屏,返回步骤102;If the system state is to switch to the shutdown state, then set the system state to the shutdown state, turn off the display screen, and return to step 102;

如系统状态为处理第一次输入新密码状态则保存数据缓存区中的数据为第一次输入的新密码,将系统状态设为第二次输入新密码状态,将输入数据长度设为初始值,返回步骤102;If the system state is to process the first input of a new password, save the data in the data buffer as the first input of the new password, set the system state to the second input of the new password, and set the length of the input data to the initial value , return to step 102;

如系统状态为处理第二次输入新密码状态则判断数据缓存区中的数据是否与保存的第一次输入的新密码相同,是则执行步骤E1,否则执行步骤E2;If the state of the system is to process the state of inputting a new password for the second time, then it is judged whether the data in the data buffer area is identical with the new password input for the first time saved, if so, step E1 is executed, otherwise step E2 is executed;

步骤E1:保存数据缓存区中的数据为第二次输入的新密码,提示新开机密码输入正确,将系统状态设为待机状态,将输入数据长度设为初始值,返回步骤102;Step E1: save the data in the data buffer area as the new password entered for the second time, prompt that the new power-on password is entered correctly, set the system state to standby state, set the input data length to the initial value, and return to step 102;

在本实施例中,步骤E1中还包括:将密码标识置位;In this embodiment, step E1 also includes: setting the password identification;

步骤E2:提示新开机密码输入错误,将系统状态设为新密码错误状态,将输入数据长度设为初始值,返回步骤102;Step E2: Prompt that the new power-on password is entered incorrectly, set the system status as the new password error state, set the input data length as the initial value, and return to step 102;

如系统状态为验证激活码状态则判断数据缓存区中的数据是否正确的激活码,是则执行步骤E3,否则执行步骤E4;If the system state is to verify the activation code state, then it is judged whether the data in the data buffer area is the correct activation code, if yes, step E3 is executed, otherwise step E4 is executed;

步骤E3:更新密钥,设置令牌状态为已激活,提示激活成功,将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,返回步骤102;Step E3: update the key, set the status of the token as activated, and prompt that the activation is successful, set the system status as the status of entering a new password for the first time, set the length of the input data as the initial value, and return to step 102;

在本实施例中,所述更新密钥具体为:调用预设算法产生新密钥并用其替换存储的密钥;In this embodiment, the update key specifically includes: calling a preset algorithm to generate a new key and using it to replace the stored key;

设置令牌状态为已激活具体为:将激活标识置位;Setting the status of the token as activated is specifically: setting the activation flag;

步骤E4:提示激活失败,将系统状态设为输入激活码状态,将输入数据长度设为初始值,返回步骤102;Step E4: Prompt that the activation failed, set the system status to the activation code input status, set the input data length to the initial value, and return to step 102;

如系统状态为第七类状态则判断数据缓存区中的数据是否与保存的第二次输入的新密码相同,是则执行步骤H1,否则执行步骤H3;If the system state is the seventh state, it is judged whether the data in the data buffer area is the same as the saved second-time input new password, if so, step H1 is executed, otherwise step H3 is executed;

具体的,该步骤中的第七类状态为处理开机密码状态或处理修改密码状态;Specifically, the seventh type of status in this step is the status of processing the power-on password or processing the status of modifying the password;

步骤H1:将输入密码错误次数设为初始值,将自动解锁计数器设为自动解锁次数,将自动解锁定时器设为自动解锁周期,执行步骤H2;Step H1: Set the number of wrong password input times as the initial value, set the automatic unlocking counter as the number of automatic unlocking times, set the automatic unlocking timer as the automatic unlocking period, and execute step H2;

步骤H2:判断系统状态是否为处理开机密码状态,是则将系统状态设为待机状态,将输入数据长度设为初始值,执行步骤114,否则将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,执行步骤114;Step H2: judge whether the system state is the state of processing the power-on password, if so, set the system state to the standby state, set the input data length to the initial value, and execute step 114, otherwise set the system state to the state of entering a new password for the first time, The input data length is set as an initial value, and step 114 is performed;

步骤H3:更新输入密码错误次数,提示开机密码输入错误,通过显示屏显示输入密码错误次数,执行步骤H4;Step H3: Update the number of incorrect passwords entered, prompting that the power-on password is incorrectly input, display the number of incorrect passwords entered on the display screen, and execute step H4;

具体的,在本实施例中,输入密码错误次数的初始值为0,步骤H3中更新输入密码错误次数具体为:输入密码错误次数自加1;Specifically, in this embodiment, the initial value of the number of wrong password input times is 0, and updating the number of wrong password input times in step H3 is specifically: the number of wrong password input times is incremented by 1;

步骤H4:判断输入密码错误次数是否等于预设重试次数,是则执行步骤H5,否则执行步骤H6;Step H4: Determine whether the number of wrong password input is equal to the preset number of retries, if yes, execute step H5, otherwise execute step H6;

步骤H5:设置令牌状态为已锁定,将系统状态设为输入解锁码状态,将输入数据长度设为初始值,返回步骤102;Step H5: Set the status of the token as locked, set the status of the system as the status of inputting the unlock code, set the length of the input data as the initial value, and return to step 102;

步骤H6:判断系统状态是否为处理开机密码状态,是则将系统状态设为开机密码错误状态,将输入数据长度设为初始值,返回步骤102,否则将系统状态设为修改密码错误状态,将输入数据长度设为初始值,返回步骤102;Step H6: Determine whether the system state is the state of processing the power-on password, if so, set the system state to the state of the power-on password error, set the length of the input data to the initial value, and return to step 102, otherwise set the system state to the state of changing the password error, set The input data length is set to the initial value, and returns to step 102;

如系统状态为处理解锁码状态则判断数据缓存区中的数据是否为正确的解锁码,是则提示解锁成功,设置令牌状态为未锁定,清空保存的所有密码,,将系统状态设为第一次输入新密码状态,将输入密码错误次数和输入数据长度均设为初始值,返回步骤102;否则提示解锁失败,关闭显示屏,将系统状态设为关机状态,将输入数据长度设为初始值,返回步骤102;If the system state is processing the unlock code state, then judge whether the data in the data buffer area is the correct unlock code, if yes, it will prompt that the unlock is successful, set the token state as unlocked, clear all saved passwords, and set the system state to No. In the state of entering a new password once, set the number of wrong passwords entered and the length of the input data to the initial value, and return to step 102; otherwise, it will prompt that the unlocking fails, turn off the display, set the system state to the shutdown state, and set the length of the input data to the initial value value, return to step 102;

具体的,设置令牌状态为未锁定且动态令牌内无密码为:将锁定标识复位,将密码标识复位;Specifically, setting the status of the token as unlocked and there is no password in the dynamic token is: reset the lock ID, and reset the password ID;

如系统状态为其他状态则返回步骤102;Return to step 102 if the system status is other status;

本实施例中,该步骤中的其他状态包括:第一次输入新密码状态、开机输入密码状态、修改输入密码状态、关机状态、输入激活码状态、输入解锁码状态、令牌报废状态以及输入第一信息状态;In this embodiment, other states in this step include: the state of entering a new password for the first time, the state of entering a password when powering on, the state of modifying an input password, the state of shutting down, the state of entering an activation code, the state of entering an unlock code, the state of invalidating a token, and the state of entering a password. first information status;

步骤115:根据密钥和动态令牌的当前时间生成登录口令并输出,将系统状态设为显示登录口令状态,将输入数据长度设为初始值,返回步骤102;Step 115: Generate and output the login password according to the current time of the key and the dynamic token, set the system status to display the login password status, set the input data length to the initial value, and return to step 102;

在本实施例中,生成登录口令具体为:根据预设登录算法对密钥和动态令牌的当前时间进行计算得到登录口令;In this embodiment, generating the login password specifically includes: calculating the current time of the key and the dynamic token according to a preset login algorithm to obtain the login password;

步骤116:根据密钥、动态令牌的当前时间和输入的第一信息生成第一口令并输出,将系统状态设为显示第一口令状态,将输入数据长度设为初始值,返回步骤102;Step 116: Generate and output the first password according to the current time of the key, the dynamic token and the first input information, set the system state to display the first password state, set the input data length to the initial value, and return to step 102;

在本实施例中,生成第一口令具体为:根据预设账号算法对密钥、动态令牌的当前时间、输入的第一信息和事件因子进行计算得到第一口令;In this embodiment, generating the first password specifically includes: calculating the key, the current time of the dynamic token, the input first information and the event factor according to the preset account algorithm to obtain the first password;

步骤117:对输入的第二信息进行处理,根据处理结果、密钥和动态令牌的当前时间生成第二口令并输出,将系统状态设为显示第二口令状态,将输入数据长度设为初始值,返回步骤102;Step 117: Process the input second information, generate and output the second password according to the processing result, the current time of the key and the dynamic token, set the system status to display the second password status, and set the input data length to initial value, return to step 102;

具体的,本实施例中对输入的第二信息进行处理为:格式化第二信息为保留小数点后两位格式;Specifically, in this embodiment, the input second information is processed as follows: formatting the second information to retain two decimal places;

在本实施例中,生成第二口令具体为:根据预设付款算法对密钥、动态令牌的当前时间、处理结果和事件因子进行计算得到第二口令。In this embodiment, generating the second password specifically includes: calculating the key, the current time of the dynamic token, the processing result, and the event factor according to a preset payment algorithm to obtain the second password.

本实施例中在步骤105中扫描按键获取键值与根据键值判断被按下键的类型之间包括:In this embodiment, in step 105, scanning the key to obtain the key value and judging the type of the pressed key according to the key value include:

步骤A0:判断被按下的键是否为数字键或小数点键或功能键,是则将自动关机定时器的初始值设为自动关机时间,执行步骤A1,否则执行步骤S14;功能键包括开/关机键、确认键、删除键、登录键和付款键;Step A0: Determine whether the pressed key is a number key or a decimal point key or a function key, if so, set the initial value of the automatic shutdown timer as the automatic shutdown time, and perform step A1, otherwise perform step S14; the function keys include on/off Power off key, confirmation key, delete key, login key and payment key;

步骤A1:判断当前处理状态,如为第一处理状态则执行步骤A2,如为第二处理状态则执行步骤A3,如为第三处理状态则执行步骤A4,如为其他则继续;Step A1: Determine the current processing state, if it is the first processing state, execute step A2, if it is the second processing state, execute step A3, if it is the third processing state, execute step A4, if it is other, continue;

本实施例中如判断当前处理状态则根据键值判断被按下键的类型,根据不同的被按下键执行对应操作;包括:如为确认键则执行步骤S6,如为数字键则执行步骤S9,如为登录键则执行步骤S12;如为付款键则执行步骤S13;In this embodiment, if the current processing state is judged, the type of the pressed key is judged according to the key value, and corresponding operations are performed according to different pressed keys; including: if it is a confirmation key, then step S6 is executed, and if it is a numeric key, then step S6 is executed. S9, if it is a login key, execute step S12; if it is a payment key, execute step S13;

具体的,在本实施例中,当系统状态为新密码错误状态且被按下的按键类型不是开/关机键时当前处理状态为第一处理状态;当系统状态为开机密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为第二处理状态;当系统状态为修改密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为第三处理状态;Specifically, in this embodiment, when the system state is the new password error state and the pressed key type is not the on/off key, the current processing state is the first processing state; When the type of the key pressed is not the on/off key, the current processing state is the second processing state; when the system state is changing the password error state and the type of the pressed key is not the on/off key, the current processing state is the third processing state ;

步骤A2:将系统状态设为第一次输入新密码状态,执行步骤114;Step A2: Set the system state to the state of entering a new password for the first time, and execute step 114;

步骤A3:将系统状态设为开机输入密码状态,执行步骤114;Step A3: Set the system status to power-on password input status, and execute step 114;

步骤A4:将系统状态设为修改输入密码状态,执行步骤114;Step A4: Set the system state to the state of modifying the input password, and execute step 114;

在本实施例中,步骤105还包括:如被按下键的类型为开/关机键则执行步骤B1;In this embodiment, step 105 further includes: if the type of the pressed key is an on/off key, then execute step B1;

步骤B1:判断动态令牌内部是否存储有种子,是则执行步骤B2,否则进行显示屏自检并将系统状态设为关机状态,执行步骤114;Step B1: Determine whether there is a seed stored in the dynamic token, if so, execute step B2, otherwise perform a self-check on the display screen and set the system status to shutdown, and execute step 114;

步骤B2:判断系统状态是否为关机状态,是则执行步骤B3,否则将系统状态设为切换到关机状态,执行步骤114;Step B2: Determine whether the system state is the shutdown state, if yes, execute step B3, otherwise set the system state to switch to the shutdown state, and execute step 114;

步骤B3:判断按键被按下的时间是否超过预设时长,是则清空数据缓存区,初始化显示屏,执行步骤B4,否则执行步骤114;Step B3: Determine whether the time the button is pressed exceeds the preset duration, if yes, clear the data buffer area, initialize the display screen, and execute step B4; otherwise, execute step 114;

步骤B4:判断令牌状态是否为自毁,是则将系统状态设为令牌报废状态,执行步骤114,否则执行步骤B5;Step B4: Determine whether the status of the token is self-destructing, if so, set the system status to the status of token scrapping, and execute step 114, otherwise, execute step B5;

具体的,本实施例中,判断令牌状态是否为自毁为:判断自毁标志是否置位,是则令牌状态为自毁,否则令牌状态为正常;Specifically, in this embodiment, judging whether the status of the token is self-destructing is as follows: judging whether the self-destructing flag is set, if yes, the status of the token is self-destructing, otherwise the status of the token is normal;

本实施例中的动态令牌在进行拆壳处理时将令牌状态设为自毁;The dynamic token in this embodiment sets the status of the token as self-destruction when the shelling process is performed;

步骤B5:判断令牌状态是否为已激活,是则执行步骤B6,否则将系统状态设为输入激活码状态,执行步骤114;Step B5: Determine whether the status of the token is activated, if so, execute step B6, otherwise set the system status as the status of inputting the activation code, and execute step 114;

具体的,本实施例中判断令牌状态是否为已激活为:判断激活标志是否置位,是则令牌状态为已激活,否则令牌状态为未激活;Specifically, in this embodiment, judging whether the status of the token is activated is as follows: judging whether the activation flag is set, if yes, the status of the token is activated, otherwise the status of the token is not activated;

步骤B6:判断令牌状态是否为已锁定,是则将系统状态设为输入解锁码状态,执行步骤114,否则执行步骤B7;Step B6: Determine whether the status of the token is locked, if so, set the system status to the status of inputting the unlock code, and execute step 114, otherwise execute step B7;

步骤B7:判断动态令牌是否设置过密码,是则将系统状态设为开机输入密码状态,执行步骤114;否则将系统状态设为第一次输入新密码状态,执行步骤114;Step B7: Determine whether the dynamic token has been set with a password, and if so, set the system state to the state of powering on and entering the password, and execute step 114; otherwise, set the system state to the state of entering a new password for the first time, and execute step 114;

具体的,在本实施例中,判断动态令牌是否设置过密码为:判断密码标识是否置位,是则动态令牌已设置过密码,否则动态令牌未设置过密码;Specifically, in this embodiment, judging whether the dynamic token has been set with a password is: judging whether the password flag is set, if so, the dynamic token has been set with a password, otherwise the dynamic token has not been set with a password;

本实施例的步骤105还包括:如被按下键的类型为小数点键则执行步骤P1;Step 105 of this embodiment also includes: if the type of the pressed key is a decimal point key, step P1 is executed;

步骤P1:判断系统状态是否为第五类状态,是则执行步骤P2,否则执行步骤114;Step P1: Determine whether the system state is the fifth type of state, if yes, execute step P2, otherwise execute step 114;

具体的,本实施例中的第五类状态为测试状态或待机状态或输入第一信息状态或输入第二信息状态;Specifically, the fifth type of state in this embodiment is the test state or standby state or the state of inputting the first information or the state of inputting the second information;

步骤P2:将小数点顺序存入到数据缓存区中,按照第一预设方法更新输入数据长度,执行步骤P3;Step P2: Store the decimal points in the data buffer in sequence, update the length of the input data according to the first preset method, and execute step P3;

具体的,在本实施例中,输入数据长度的初始值为0,按照第一预设方法输入数据长度为:输入数据长度自加1;Specifically, in this embodiment, the initial value of the input data length is 0, and the input data length according to the first preset method is: the input data length is incremented by 1;

步骤P3:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤114,否则执行步骤114;Step P3: Determine whether the system state is in standby state, if yes, set the system state as the state of inputting the first information, execute step 114, otherwise execute step 114;

本实施例的步骤105还包括:如被按下键的类型为删除键则执行步骤Q1;Step 105 of this embodiment also includes: if the type of the pressed key is a delete key, step Q1 is executed;

步骤Q1:判断输入数据长度是否为初始值,是则执行步骤Q2,否则执行步骤Q5;Step Q1: Determine whether the input data length is the initial value, if yes, execute step Q2, otherwise execute step Q5;

具体的,本实施例中输入数据长度的初始值为0;Specifically, the initial value of the input data length in this embodiment is 0;

步骤Q2:判断系统状态是否为输入第二信息状态或第二类状态,是则将系统状态设为待机状态,执行步骤114,否则执行步骤Q3;Step Q2: Determine whether the system state is the second information input state or the second type state, if yes, set the system state to the standby state, and execute step 114, otherwise, execute step Q3;

具体的,本实施例中的第二类状态为显示登录口令状态或显示第一口令状态或显示第二口令状态;Specifically, the second type of state in this embodiment is the state of displaying the login password or the state of displaying the first password or the state of displaying the second password;

步骤Q3:判断系统状态是否为待机状态,是执行步骤Q4,否则执行步骤S14;Step Q3: Judging whether the system state is in the standby state, execute step Q4, otherwise execute step S14;

步骤Q4:判断按键被按下的时间是否超过预设时长,是则将系统状态设为修改输入密码状态,执行步骤114,否则执行步骤114;Step Q4: Determine whether the time the button is pressed exceeds the preset duration, if so, set the system status to the status of modifying the input password, and execute step 114, otherwise execute step 114;

步骤Q5:判断系统状态是否为第六类状态,是则删除数据缓存区中最后存入的数据,按照第二预设方法更新输入数据长度,执行步骤Q6,否则执行步骤Q8;Step Q5: Determine whether the system state is the sixth state, if yes, delete the last stored data in the data buffer, update the length of the input data according to the second preset method, execute step Q6, otherwise execute step Q8;

具体的,在本实施例中,数据长度的初始值为0,按照第二预设方法更新输入数据长度为:输入数据长度自减1;Specifically, in this embodiment, the initial value of the data length is 0, and the length of the input data is updated according to the second preset method: the length of the input data is decremented by 1;

本实施例中,该步骤Q5中的第六类状态为开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;In this embodiment, the sixth type of state in step Q5 is the power-on password input state or the modification input password state or the first input new password state or the second input new password state or the activation code input state or the first information input state or enter the second information state or enter the unlock code state;

步骤Q6:判断系统状态是否为输入第一信息状态,是则执行步骤Q7,否则执行步骤114;Step Q6: Determine whether the system state is the state of inputting the first information, if yes, execute step Q7, otherwise execute step 114;

步骤Q7:判断输入数据长度是否为初始值,是则将系统状态设为待机状态,执行步骤114,否则执行步骤114;Step Q7: Determine whether the length of the input data is the initial value, if yes, set the system state to the standby state, and execute step 114; otherwise, execute step 114;

步骤Q8:判断系统状态是否为按键测试状态,是则提示失败信息,执行步骤114;如为其他则执行步骤114。Step Q8: Determine whether the system status is the button test status, if yes, prompt a failure message, and go to step 114; if it is otherwise, go to step 114.

在本实施例中,关机状态是关显示屏状态,休眠状态是进入低功耗状态。In this embodiment, the shutdown state is a state of turning off the display screen, and the sleep state is a state of entering a low power consumption state.

在本实施例中,输入数据长度的初始值也可以为其他正整数,按照第一预设方法更新输入数据长度也可以为:输入数据长度自加N,按照第二预设方法更新输入数据长度也可以为:输入数据长度自减N,其中N为正整数。本实施例中的第一预设方法和第二预设方法是互逆的。In this embodiment, the initial value of the input data length can also be other positive integers, and updating the input data length according to the first preset method can also be: adding N to the input data length, and updating the input data length according to the second preset method It can also be: the length of the input data is reduced by N, where N is a positive integer. The first preset method and the second preset method in this embodiment are reciprocal.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明公开的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any changes or variations that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (26)

1.一种动态令牌的工作方法,其特征在于,包括:1. A working method of a dynamic token, comprising: 步骤S1:动态令牌上电,进行初始化;Step S1: The dynamic token is powered on and initialized; 步骤S2:动态令牌打开按键中断,且将令牌状态设为休眠状态;Step S2: The dynamic token opening key is interrupted, and the token state is set to a dormant state; 当动态令牌被唤醒时,执行步骤S3;When the dynamic token is awakened, step S3 is executed; 步骤S3:判断是否为按键唤醒,是则执行步骤S4,否则执行步骤S14;Step S3: Determine whether it is a key-press wake-up, if yes, execute step S4, otherwise execute step S14; 步骤S4:关闭按键中断;Step S4: Turn off the button interrupt; 步骤S5:扫描按键获取键值并根据键值判断被按下键的类型,如为确认键则执行步骤S6,如为数字键则执行步骤S9,如为登录键则执行步骤S12;如为付款键则执行步骤S13;Step S5: Scan the key to obtain the key value and judge the type of the pressed key according to the key value. If it is a confirmation key, execute step S6. If it is a number key, execute step S9. If it is a login key, execute step S12; if it is a payment key key then execute step S13; 步骤S6:判断系统状态的类型,如为输入第一信息状态则执行步骤S7,如为输入第二信息状态则执行步骤S8;Step S6: Determine the type of system state, if it is the state of inputting the first information, execute step S7, if it is the state of inputting the second information, execute step S8; 步骤S7:将系统状态设为处理第一信息状态,执行步骤S14;Step S7: Set the system state as the state of processing the first information, and execute step S14; 步骤S8:将系统状态设为处理第二信息状态,执行步骤S14;Step S8: Set the system status as the status of processing the second information, and execute step S14; 步骤S9:判断系统状态的类型,如为第一类状态则执行步骤S10,如为第二类状态则将系统状态设为待机状态,执行步骤S14;所述第一类状态为待机状态或开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;所述第二类状态为显示登录口令状态或显示第一口令状态或显示第二口令状态;Step S9: Determine the type of the system state, if it is the first type of state, execute step S10, if it is the second type of state, set the system state to the standby state, and execute step S14; the first type of state is the standby state or power on Input password status or modify input password status or input new password status for the first time or second input new password status or input activation code status or input first information status or input second information status or input unlock code status; The second type of status is to display the status of the login password or to display the status of the first password or to display the status of the second password; 步骤S10:将数字键对应的数字顺序存入到数据缓存区中,按照第一预设方法更新输入数据长度,执行步骤S11;Step S10: Store the number sequence corresponding to the number key into the data buffer area, update the input data length according to the first preset method, and execute step S11; 步骤S11:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤S14;否则执行相应操作;Step S11: Determine whether the system state is in standby state, if yes, set the system state as the state of inputting the first information, and execute step S14; otherwise, execute the corresponding operation; 步骤S12:判断系统状态是否为第三类状态,是则将系统状态设为产生登录口令状态,执行步骤S14;否则执行相应操作;所述第三类状态为显示第一口令状态或显示第二口令状态;Step S12: Determine whether the system state is the third type of state, if so, set the system state to the state of generating a login password, and execute step S14; otherwise, perform the corresponding operation; the third type of state is the state of displaying the first password or the state of displaying the second password. password status; 步骤S13:判断系统状态是否为待机状态,是则将系统状态设为输入第二信息状态,执行步骤S14,否则执行相应操作;Step S13: judging whether the system status is the standby status, if yes, set the system status as the second information input status, and execute step S14, otherwise, execute the corresponding operation; 步骤S14:判断系统状态的类型,如系统状态为产生登录口令状态则执行步骤S15,如系统状态为处理第一信息状态则执行步骤S16,如系统状态为处理第二信息状态则执行步骤S17;如系统状态为第四类状态则返回步骤S2;所述第四类状态为待机状态或输入第一信息状态或输入第二信息状态;Step S14: Determine the type of the system state, if the system state is the state of generating a login password, then execute step S15, if the system state is the state of processing the first information, then execute step S16, if the system state is the state of processing the second information, then execute step S17; If the system state is the fourth type of state, return to step S2; the fourth type of state is the standby state or the state of inputting the first information or the state of inputting the second information; 步骤S15:根据密钥和动态令牌的当前时间生成登录口令并输出,将系统状态设为显示登录口令状态,将输入数据长度设为初始值,返回步骤S2;Step S15: Generate and output the login password according to the current time of the key and the dynamic token, set the system status to display the login password status, set the input data length to the initial value, and return to step S2; 步骤S16:根据密钥、动态令牌的当前时间和输入的第一信息生成第一口令并输出,将系统状态设为显示第一口令状态,将输入数据长度设为初始值,返回步骤S2;Step S16: Generate and output the first password according to the key, the current time of the dynamic token and the first input information, set the system state to display the first password state, set the input data length to the initial value, and return to step S2; 步骤S17:对输入的第二信息进行处理,根据处理结果、密钥和动态令牌的当前时间生成第二口令并输出,将系统状态设为显示第二口令状态,将输入数据长度设为初始值,返回步骤S2。Step S17: Process the input second information, generate and output the second password according to the processing result, the key and the current time of the dynamic token, set the system status to display the second password status, and set the input data length to initial value, return to step S2. 2.如权利要求1所述的方法,其特征在于,所述步骤S3中判断是否为按键唤醒具体为:判断按键唤醒标志是否置位,是则为按键唤醒,否则不为按键唤醒。2. The method according to claim 1, wherein the step S3 of judging whether it is a key wake-up is specifically: judging whether a key-press wake-up flag is set, if yes, it is a key-press wake-up, otherwise it is not a key-press wake-up. 3.如权利要求1所述的方法,其特征在于,所述步骤S5中扫描按键获取键值与根据键值判断被按下键的类型之间包括:3. The method according to claim 1, wherein scanning the key to obtain the key value and judging the type of the pressed key according to the key value in the step S5 include: 步骤A0:判断被按下的键是否为数字键或小数点键或功能键,是则将自动关机定时器的初始值设为自动关机时间,执行步骤A1,否则执行步骤S14;所述功能键包括开/关机键、确认键、删除键、登录键和付款键;Step A0: Determine whether the pressed key is a number key or a decimal point key or a function key, if so, set the initial value of the automatic shutdown timer as the automatic shutdown time, and perform step A1, otherwise perform step S14; the function keys include On/off key, confirmation key, delete key, login key and payment key; 步骤A1:判断当前处理状态,如为第一处理状态则执行步骤A2,如为第二处理状态则执行步骤A3,如为第三处理状态则执行步骤A4,如为其他则继续;Step A1: Determine the current processing state, if it is the first processing state, execute step A2, if it is the second processing state, execute step A3, if it is the third processing state, execute step A4, if it is other, continue; 步骤A2:将系统状态设为第一次输入新密码状态,执行步骤S14;Step A2: Set the system state to the state of entering a new password for the first time, and execute step S14; 步骤A3:将系统状态设为开机输入密码状态,执行步骤S14;Step A3: Set the system status to the password input status when powering on, and execute step S14; 步骤A4:将系统状态设为修改输入密码状态,执行步骤S14。Step A4: Set the system state to the state of modifying and entering the password, and execute step S14. 4.如权利要求3所述的方法,其特征在于,当系统状态为新密码错误状态且被按下的按键类型不是开/关机键时当前处理状态为所述第一处理状态;当系统状态为开机密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为所述第二处理状态;当系统状态为修改密码错误状态且被按下的按键的类型不是开/关机键时当前处理状态为所述第三处理状态。4. The method according to claim 3, wherein, when the system state is a new password error state and the pressed button type is not an on/off key, the current processing state is the first processing state; when the system state When the power-on password is wrong and the type of the pressed key is not the power on/off key, the current processing state is the second processing state; when the system state is the wrong state of changing the password and the type of the pressed key is not the power on/off When the button is pressed, the current processing state is the third processing state. 5.如权利要求4所述的方法,其特征在于,所述步骤S14还包括:5. The method according to claim 4, wherein said step S14 further comprises: 如为第一次输入新密码状态或开机输入密码状态或修改输入密码状态,则返回步骤S2。If it is the state of entering a new password for the first time or the state of entering a password when starting up or modifying the state of entering a password, then return to step S2. 6.如权利要求5所述的方法,其特征在于,所述步骤S5还包括:如被按下键的类型为开/关机键则执行步骤B1;6. The method according to claim 5, wherein the step S5 further comprises: if the type of the pressed key is an on/off key, then execute step B1; 步骤B1:判断动态令牌内部是否存储有种子,是则执行步骤B2,否则进行显示屏自检并将系统状态设为关机状态,执行步骤S14;Step B1: Determine whether there is a seed stored in the dynamic token, if so, execute step B2, otherwise perform a self-check on the display screen and set the system status to shutdown, and execute step S14; 步骤B2:判断系统状态是否为关机状态,是则执行步骤B3,否则将系统状态设为切换到关机状态,执行步骤S14;Step B2: Determine whether the system state is off, if yes, execute step B3, otherwise set the system state to switch to off state, and execute step S14; 步骤B3:判断按键被按下的时间是否超过预设时长,是则清空数据缓存区,初始化显示屏,执行步骤B4,否则执行步骤S14;Step B3: Determine whether the time the button is pressed exceeds the preset duration, if yes, clear the data buffer area, initialize the display screen, and execute step B4; otherwise, execute step S14; 步骤B4:判断令牌状态是否为自毁,是则将系统状态设为令牌报废状态,执行步骤S14,否则执行步骤B5;Step B4: Determine whether the status of the token is self-destructing, if yes, set the system status to the status of token scrapping, and execute step S14; otherwise, execute step B5; 步骤B5:判断令牌状态是否为已激活,是则执行步骤B6,否则将系统状态设为输入激活码状态,执行步骤S14;Step B5: Determine whether the status of the token is activated, if so, execute step B6, otherwise set the system status as the status of inputting the activation code, and execute step S14; 步骤B6:判断令牌状态是否为已锁定,是则将系统状态设为输入解锁码状态,执行步骤S14,否则执行步骤B7;Step B6: Determine whether the status of the token is locked, if yes, set the system status to the status of inputting the unlock code, execute step S14, otherwise execute step B7; 步骤B7:判断动态令牌是否设置过密码,是则将系统状态设为开机输入密码状态,执行步骤S14;否则将系统状态设为第一次输入新密码状态,执行步骤S14。Step B7: Determine whether the dynamic token has been set with a password, if so, set the system state to the state of entering the password at power-on, and execute step S14; otherwise, set the system state to the state of entering a new password for the first time, and execute step S14. 7.如权利要求6所述的方法,其特征在于,7. The method of claim 6, wherein, 所述步骤B4中判断令牌状态是否为自毁具体为:判断自毁标志是否置位,是则令牌状态为自毁,否则令牌状态为正常;In the step B4, judging whether the status of the token is self-destructing is specifically: judging whether the self-destructing flag is set, if so, the status of the token is self-destructing, otherwise the status of the token is normal; 所述步骤B5中判断令牌状态是否为已激活具体为:判断激活标志是否置位,是则令牌状态为已激活,否则令牌状态为未激活。In the step B5, judging whether the token state is activated is specifically: judging whether the activation flag is set, if yes, the token state is activated, otherwise the token state is inactive. 8.如权利要求6所述的方法,其特征在于,所述步骤S14还包括:8. The method according to claim 6, wherein said step S14 further comprises: 如为关机状态或输入激活码状态或输入解锁码状态或令牌报废状态,则返回步骤S2;If it is in the shutdown state or the state of entering the activation code or the state of entering the unlock code or the state of token scrapping, then return to step S2; 如为切换到关机状态则将系统状态设为关机状态,关闭显示屏,返回步骤S2。If it is to switch to the shutdown state, set the system state to the shutdown state, turn off the display screen, and return to step S2. 9.如权利要求8所述的方法,其特征在于,所述步骤S5还包括:如被按下键的类型为小数点键则执行步骤P1,9. The method according to claim 8, wherein said step S5 further comprises: if the type of the pressed key is a decimal point key, step P1 is executed, 步骤P1:判断系统状态是否为第五类状态,是则执行步骤P2,否则执行步骤S14;所述第五类状态为测试状态或待机状态或输入第一信息状态或输入第二信息状态;Step P1: Determine whether the system state is the fifth type of state, if yes, execute step P2, otherwise execute step S14; the fifth type of state is the test state or standby state or the state of inputting the first information or the state of inputting the second information; 步骤P2:将小数点顺序存入到数据缓存区中,按照所述第一预设方法更新输入数据长度,执行步骤P3;Step P2: Store the decimal points in the data buffer in sequence, update the input data length according to the first preset method, and execute step P3; 步骤P3:判断系统状态是否为待机状态,是则将系统状态设为输入第一信息状态,执行步骤S14,否则执行步骤S14。Step P3: Determine whether the system state is the standby state, if yes, set the system state to the state of inputting the first information, execute step S14, otherwise execute step S14. 10.如权利要求9所述的方法,其特征在于,所述输入数据长度的初始值为0;10. The method according to claim 9, wherein the initial value of the input data length is 0; 所述按照所述第一预设方法更新输入数据长度具体为:输入数据长度自加1。The updating of the length of the input data according to the first preset method specifically includes adding 1 to the length of the input data. 11.如权利要求9所述的方法,其特征在于,所述步骤S14还包括:11. The method according to claim 9, wherein said step S14 further comprises: 如为输入第一信息状态,则返回步骤S2。If it is in the state of inputting the first information, return to step S2. 12.如权利要求10所述的方法,其特征在于,所述步骤S5还包括:如被按下键的类型为删除键则执行步骤Q1,12. The method according to claim 10, characterized in that, said step S5 further comprises: if the type of the pressed key is a delete key, step Q1 is executed, 步骤Q1:判断输入数据长度是否为初始值,是则执行步骤Q2,否则执行步骤Q5;Step Q1: Determine whether the input data length is the initial value, if yes, execute step Q2, otherwise execute step Q5; 步骤Q2:判断系统状态是否为输入第二信息状态或第二类状态,是则将系统状态设为待机状态,执行步骤S14,否则执行步骤Q3;所述第二类状态为显示登录口令状态或显示第一口令状态或第二口令状态;Step Q2: judging whether the system state is the state of inputting the second information or the state of the second type, if yes, set the state of the system to the standby state, execute step S14, otherwise execute step Q3; the state of the second type is the state of displaying the login password or Display the first password status or the second password status; 步骤Q3:判断系统状态是否为待机状态,是则执行步骤Q4,否则执行步骤S14;Step Q3: Determine whether the system status is standby, if yes, execute step Q4, otherwise execute step S14; 步骤Q4:判断按键被按下的时间是否超过预设时长,是则将系统状态设为修改输入密码状态,执行步骤S14,否则执行步骤S14;Step Q4: Determine whether the time the button is pressed exceeds the preset duration, if so, set the system status to the status of modifying the input password, and execute step S14; otherwise, execute step S14; 步骤Q5:判断系统状态是否为第六类状态,是则删除数据缓存区中最后存入的数据,按照第二预设方法更新输入数据长度,执行步骤Q6,否则执行步骤Q8;所述第六类状态为开机输入密码状态或修改输入密码状态或第一次输入新密码状态或第二次输入新密码状态或输入激活码状态或输入第一信息状态或输入第二信息状态或输入解锁码状态;Step Q5: Determine whether the system state is the sixth type of state, if yes, delete the last stored data in the data buffer, update the length of the input data according to the second preset method, execute step Q6, otherwise execute step Q8; the sixth The state is the state of entering the password at startup or modifying the state of entering the password or the state of entering the new password for the first time or the state of entering the new password for the second time or the state of entering the activation code or the state of entering the first information or the state of entering the second information or the state of entering the unlock code ; 步骤Q6:判断系统状态是否为输入第一信息状态,是则执行步骤Q7,否则执行步骤S14;Step Q6: Determine whether the system state is the state of inputting the first information, if yes, execute step Q7, otherwise execute step S14; 步骤Q7:判断输入数据长度是否为初始值,是则将系统状态设为待机状态,执行步骤S14,否则执行步骤S14;Step Q7: Determine whether the length of the input data is the initial value, if yes, set the system state to the standby state, and execute step S14; otherwise, execute step S14; 步骤Q8:判断系统状态是否为按键测试状态,是则提示失败信息,执行步骤S14;否则执行步骤S14。Step Q8: Determine whether the system status is the button test status, if yes, prompt a failure message, and go to step S14; otherwise, go to step S14. 13.如权利要求12所述的方法,其特征在于,所述输入数据长度的初始值为0;13. The method according to claim 12, wherein the initial value of the input data length is 0; 所述按照所述第一预设方法更新输入数据长度具体为:输入数据长度自加1;The updating of the length of the input data according to the first preset method is specifically: adding 1 to the length of the input data; 所述按照所述第二预设方法更新输入数据长度具体为:输入数据长度自减1。The updating of the input data length according to the second preset method specifically includes: decrementing the input data length by 1. 14.如权利要求13所述的方法,其特征在于,所述步骤S6还包括:如系统状态为第一次输入新密码状态则执行步骤C1,如系统状态为第二次输入新密码状态则执行步骤C2,如系统状态为开机输入密码状态则执行步骤C3,如系统状态为按键测试状态则执行步骤C4;如为其他则执行步骤S14;14. The method according to claim 13, characterized in that, the step S6 further comprises: if the system state is the state of entering a new password for the first time, then execute step C1, if the state of the system is the state of entering a new password for the second time, then Execute step C2, if the system state is the power-on password input state, then execute step C3, if the system state is the button test state, then execute step C4; if it is other, then execute step S14; 步骤C1:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第一次输入新密码状态,执行步骤S14,否则执行步骤S14;Step C1: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system status to the state of processing the first input of a new password, and execute step S14; otherwise, execute step S14; 步骤C2:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理第二次输入新密码状态,执行步骤S14,否则执行步骤S14;Step C2: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system state to process the second input of a new password, and execute step S14; otherwise, execute step S14; 步骤C3:判断输入数据长度是否等于预设密码长度,是则将系统状态设为处理开机密码状态,执行步骤S14,否则执行步骤S14;Step C3: Determine whether the length of the input data is equal to the length of the preset password, if yes, set the system status to the status of processing the power-on password, and execute step S14; otherwise, execute step S14; 步骤C4:提示成功信息,执行步骤S14。Step C4: A success message is prompted, and step S14 is executed. 15.如权利要求14所述的方法,其特征在于,所述步骤S14还包括:15. The method according to claim 14, characterized in that said step S14 further comprises: 如系统状态为第七类状态,则判断数据缓存区中的数据是否与保存的第二次输入的新密码相同,是则执行步骤H1,否则执行步骤H3;所述第七类状态为处理开机密码状态或处理修改密码状态;If the system state is the seventh type of state, then judge whether the data in the data buffer area is identical with the new password of the second input of preservation, if yes, execute step H1, otherwise execute step H3; password status or handle changing password status; 步骤H1:将输入密码错误次数设为初始值,将自动解锁计数器设为自动解锁次数,将自动解锁定时器设为自动解锁周期,执行步骤H2;Step H1: Set the number of wrong password input times as the initial value, set the automatic unlocking counter as the number of automatic unlocking times, set the automatic unlocking timer as the automatic unlocking period, and execute step H2; 步骤H2:判断系统状态是否为处理开机密码状态,是则将系统状态设为待机状态,将输入数据长度设为初始值,执行步骤S14,否则将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,执行步骤S14;Step H2: Determine whether the system state is the state of processing the power-on password, if so, set the system state to the standby state, set the input data length to the initial value, and execute step S14, otherwise set the system state to the state of entering a new password for the first time, Set the input data length as an initial value, and execute step S14; 步骤H3:更新输入密码错误次数,提示开机密码输入错误,通过显示屏显示输入密码错误次数,执行步骤H4;Step H3: Update the number of incorrect passwords entered, prompting that the power-on password is incorrectly input, display the number of incorrect passwords entered on the display screen, and execute step H4; 步骤H4:判断输入密码错误次数是否等于预设重试次数,是则执行步骤H5,否则执行步骤H6;Step H4: Determine whether the number of wrong password input is equal to the preset number of retries, if yes, execute step H5, otherwise execute step H6; 步骤H5:设置令牌状态为已锁定,将系统状态设为输入解锁码状态,将输入数据长度设为初始值,返回步骤S2;Step H5: Set the status of the token as locked, set the status of the system as the status of inputting the unlock code, set the length of the input data as the initial value, and return to step S2; 步骤H6:判断系统状态是否为处理开机密码状态,是则将系统状态设为开机密码错误状态,将输入数据长度设为初始值,返回步骤S2,否则将系统状态设为修改密码错误状态,将输入数据长度设为初始值,返回步骤S2。Step H6: Determine whether the system state is the state of processing the power-on password, if so, set the system state to the state of the power-on password error, set the length of the input data to the initial value, and return to step S2, otherwise set the system state to the state of changing the password error, set The length of the input data is set to the initial value, and return to step S2. 16.如权利要求15所述的方法,其特征在于,所述步骤S9还包括:如系统状态为关机状态,则判断动态令牌内部是否存储有种子,是则将系统状态设为测试状态,执行步骤S14,否则直接执行步骤S14。16. The method according to claim 15, wherein said step S9 further comprises: if the system state is a shutdown state, then judging whether a seed is stored inside the dynamic token, if so, setting the system state to a test state, Execute step S14, otherwise directly execute step S14. 17.如权利要求16所述的方法,其特征在于,所述步骤S11中的执行相应操作包括:如系统状态为输入激活码状态则执行步骤D1;如系统状态为输入解锁码状态则执行步骤D2;如系统状态为修改输入密码状态则执行步骤D3;如系统状态为第一次输入新密码状态则执行步骤D5;如系统状态为第二次输入新密码状态则执行步骤D7;如为其他则执行步骤S14;17. The method according to claim 16, characterized in that, performing the corresponding operation in the step S11 comprises: if the system state is the activation code input state, then execute step D1; if the system state is the unlock code input state, then execute step D1 D2; if the system state is to modify the input password state, then perform step D3; if the system state is the first time to enter a new password state, then perform step D5; if the system state is to enter a new password state for the second time, then perform step D7; if it is other Then execute step S14; 步骤D1:判断输入数据长度是否等于第一数值,是则将系统状态设为验证激活码状态,执行步骤S14,否则执行步骤S14;Step D1: Judging whether the length of the input data is equal to the first value, if yes, set the system state to verify the activation code state, and execute step S14; otherwise, execute step S14; 步骤D2:判断输入数据长度是否等于第二数值,是则将系统状态设为处理解锁码状态,执行步骤S14,否则执行步骤S14;Step D2: Determine whether the length of the input data is equal to the second value, if yes, set the system state to the state of processing the unlock code, and execute step S14; otherwise, execute step S14; 步骤D3:判断输入数据长度是否等于预设密码长度,是则执行步骤D4,否则执行步骤S14;Step D3: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D4, otherwise execute step S14; 步骤D4:判断动态令牌是否设置过密码,是则将系统状态设为处理修改密码状态,执行步骤S14,否则执行步骤S14;Step D4: Determine whether the dynamic token has been set with a password, and if so, set the system state to the status of processing and modifying the password, and execute step S14; otherwise, execute step S14; 步骤D5:判断输入数据长度是否等于预设密码长度,是则执行步骤D6,否则执行步骤S14;Step D5: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D6, otherwise execute step S14; 步骤D6:判断动态令牌是否设置过密码,是则将系统状态设为处理第一次输入新密码状态,执行步骤S14,否则执行步骤S14;Step D6: Determine whether a password has been set for the dynamic token, if so, set the system state to process the first input of a new password, and execute step S14; otherwise, execute step S14; 步骤D7:判断输入数据长度是否等于预设密码长度,是则执行步骤D8,否则执行步骤S14;Step D7: Determine whether the length of the input data is equal to the length of the preset password, if yes, execute step D8, otherwise execute step S14; 步骤D8:判断动态令牌是否设置过密码,是则将系统状态设为处理第二次输入新密码状态,执行步骤S14,否则执行步骤S14。Step D8: Determine whether a password has been set on the dynamic token, if yes, set the system state to process the second input of a new password, and execute step S14, otherwise execute step S14. 18.如权利要求17所述的方法,其特征在于,所述判断动态令牌是否设置过密码具体为:判断密码标识是否置位,是则动态令牌已设置过密码,否则动态令牌未设置过密码。18. The method according to claim 17, wherein said judging whether a password has been set for the dynamic token is specifically: judging whether the password flag is set, if yes, the password has been set for the dynamic token, otherwise the dynamic token has not been set. A password has been set. 19.如权利要求17所述的方法,其特征在于,所述步骤S14还包括:19. The method according to claim 17, wherein said step S14 further comprises: 所述第四类状态为输入第一口令状态或测试状态或处理修改密码状态;The fourth type of state is the state of inputting the first password or the state of testing or processing and modifying the password; 如系统状态为验证激活码状态,则判断数据缓存区中的数据是否为正确的激活码,是则更新密钥,设置令牌状态为已激活,提示激活成功,将系统状态设为第一次输入新密码状态,将输入数据长度设为初始值,返回步骤S2;否则提示激活失败,将系统状态设为输入激活码状态,将输入数据长度设为初始值,返回步骤S2;If the system status is verifying the activation code status, then judge whether the data in the data cache area is the correct activation code, if so, update the key, set the token status as activated, prompt that the activation is successful, and set the system status as the first time Enter the new password state, set the input data length as the initial value, and return to step S2; otherwise, it prompts that the activation fails, set the system state as the input activation code state, set the input data length as the initial value, and return to step S2; 如系统状态为处理解锁码状态,则判断数据缓存区中的数据是否为正确的解锁码,是则提示解锁成功,设置令牌状态为未锁定,清空保存的所有密码,将系统状态设为第一次输入新密码状态,将输入密码错误次数和输入数据长度均设为初始值,返回步骤S2;否则提示解锁失败,关闭显示屏,将系统状态设为关机状态,将输入数据长度设为初始值,返回步骤S2;If the system state is processing the unlock code state, then judge whether the data in the data cache area is the correct unlock code, if yes, it will prompt that the unlock is successful, set the token state to unlock, clear all saved passwords, and set the system state to the first In the state of entering a new password once, set the number of wrong passwords entered and the length of the input data to the initial value, and return to step S2; otherwise, it will prompt that the unlocking fails, turn off the display, set the system state to the shutdown state, and set the length of the input data to the initial value value, return to step S2; 如系统状态为处理第一次输入新密码状态,则保存数据缓存区中的数据为第一次输入的新密码,将系统状态设为第二次输入新密码状态,将输入数据长度设为初始值,返回步骤S2;If the system state is the state of processing the new password input for the first time, then save the data in the data buffer area as the new password entered for the first time, set the system state to the state of entering the new password for the second time, and set the input data length to initial value, return to step S2; 如系统状态为处理第二次输入新密码状态,则判断数据缓冲区中的数据是否与保存的第一次输入的新密码相同,是则执行步骤E1,否则执行步骤E2;If the state of the system is to process the state of entering a new password for the second time, then it is judged whether the data in the data buffer is the same as the first input new password saved, if so, step E1 is executed, otherwise step E2 is executed; 步骤E1:保存数据缓存区中的数据为第二次输入的新密码,提示新开机密码输入正确,将系统状态设为待机状态,将输入数据长度设为初始值,返回步骤S2;Step E1: Save the data in the data buffer area as the new password entered for the second time, prompting that the new power-on password is entered correctly, set the system state to the standby state, set the input data length to the initial value, and return to step S2; 步骤E2:提示新开机密码输入错误,将系统状态设为新密码错误状态,将输入数据长度设为初始值,返回步骤S2。Step E2: Prompt that the new power-on password is entered incorrectly, set the system state as the new password error state, set the input data length as the initial value, and return to step S2. 20.如权利要求19所述的方法,其特征在于,所述设置令牌状态为已激活具体为:将激活标识置位;20. The method according to claim 19, wherein said setting the status of the token as activated is specifically: setting the activation flag; 设置令牌状态为未锁定具体为:将锁定标识复位。To set the status of the token as unlocked is to reset the lock flag. 21.如权利要求19所述的方法,其特征在于,所述输入密码错误次数的初始值为0;所述更新输入密码错误次数具体为:输入密码错误次数自加1。21. The method according to claim 19, wherein the initial value of the number of wrong password input is 0; the updating of the wrong password input times is specifically: adding 1 to the number of wrong password input times. 22.如权利要求19所述的方法,其特征在于,所述步骤S12中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第一字符,执行步骤S14;如为其他则执行步骤S14。22. The method according to claim 19, characterized in that, performing the corresponding operation in the step S12 comprises: if the system state is a test state, then output the first character through the display screen, and execute step S14; if it is other, execute Step S14. 23.如权利要求22所述的方法,其特征在于,所述步骤S13中的执行相应操作包括:如系统状态为测试状态则通过显示屏输出第二字符,执行步骤S14,如为其他则执行步骤S14。23. The method according to claim 22, characterized in that, performing the corresponding operation in the step S13 comprises: if the system state is a test state, then output the second character through the display screen, execute step S14, and execute if it is other Step S14. 24.如权利要求1所述的方法,其特征在于,所述步骤S15中生成登录口令具体为:根据预设登录算法对密钥和动态令牌的当前时间进行计算得到登录口令。24. The method according to claim 1, wherein generating the login password in the step S15 specifically comprises: calculating the current time of the key and the dynamic token according to a preset login algorithm to obtain the login password. 25.如权利要求1所述的方法,其特征在于,所述步骤S16中生成第一口令具体为:根据预设账号算法对密钥、动态令牌的当前时间、输入的第一信息和事件因子进行计算得到第一口令。25. The method according to claim 1, characterized in that, generating the first password in the step S16 specifically includes: pairing the key, the current time of the dynamic token, the input first information and the event according to the preset account algorithm Factors are calculated to obtain the first password. 26.如权利要求1所述的方法,其特征在于,所述步骤S17中生成第二口令具体为:根据预设付款算法对密钥、动态令牌的当前时间、处理结果和事件因子进行计算得到第二口令。26. The method according to claim 1, wherein generating the second password in the step S17 is specifically: calculating the key, the current time of the dynamic token, the processing result and the event factor according to the preset payment algorithm Get the second password.
CN201310270520.XA 2013-07-01 2013-07-01 A kind of method of work of dynamic token Expired - Fee Related CN103391195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310270520.XA CN103391195B (en) 2013-07-01 2013-07-01 A kind of method of work of dynamic token

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310270520.XA CN103391195B (en) 2013-07-01 2013-07-01 A kind of method of work of dynamic token

Publications (2)

Publication Number Publication Date
CN103391195A CN103391195A (en) 2013-11-13
CN103391195B true CN103391195B (en) 2016-04-06

Family

ID=49535360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310270520.XA Expired - Fee Related CN103391195B (en) 2013-07-01 2013-07-01 A kind of method of work of dynamic token

Country Status (1)

Country Link
CN (1) CN103391195B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731272B (en) * 2014-01-06 2017-06-06 飞天诚信科技股份有限公司 A kind of identity identifying method, system and equipment
WO2016049870A1 (en) * 2014-09-30 2016-04-07 宇龙计算机通信科技(深圳)有限公司 Method and system for generating dynamic login credential
CN104333454B (en) * 2014-10-28 2017-07-14 飞天诚信科技股份有限公司 A kind of method of work of the dynamic token of renewable seed
CN104394145B (en) * 2014-11-25 2015-09-23 飞天诚信科技股份有限公司 A kind of dynamic token and method of work thereof with journal function
CN105391553A (en) * 2015-10-15 2016-03-09 上海动联信息技术股份有限公司 Method for generating challenge-response dynamic password based on sum-contained challenge factor
CN107332819A (en) * 2017-05-25 2017-11-07 苏州科达科技股份有限公司 A kind of method for authenticating and device for conference system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611556A (en) * 2012-03-31 2012-07-25 飞天诚信科技股份有限公司 Working method of dynamic token

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8060750B2 (en) * 2007-06-29 2011-11-15 Emc Corporation Secure seed provisioning

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611556A (en) * 2012-03-31 2012-07-25 飞天诚信科技股份有限公司 Working method of dynamic token

Also Published As

Publication number Publication date
CN103391195A (en) 2013-11-13

Similar Documents

Publication Publication Date Title
CN103391195B (en) A kind of method of work of dynamic token
CN102611556B (en) Working method of dynamic token
US10069821B2 (en) Operating method for one-time password with updatable seed
CN102883026B (en) A kind of mobile terminal realizes the method for power-on protection
US9749141B2 (en) Secure boot devices, systems, and methods
CN104506319B (en) The method of work of one kind of multiple sub- dynamic tokens
CN101166085A (en) Remote unlocking method and system
CN110113507A (en) Cipher authentication device
WO2014173244A1 (en) Working method of smart key device
CN103312517A (en) Implementation method for sharing display screens and keys in dual-purpose equipment
US20210326487A1 (en) Locking method and related electronic device
CN105657147B (en) Anti-theft method and device for mobile terminal
WO2011127697A1 (en) Security management method for mobile terminal and mobile terminal thereof
CN103198247A (en) Computer safety protection method and computer safety protection system
CN103209077B (en) A kind of unlock method being applicable to dynamic token
US9781104B2 (en) Working method of dynamic token
CN103220269B (en) A kind of token of replaceable battery and the method for work of system thereof
WO2017193517A1 (en) Decryption method and system for terminal
CN104518878B (en) A kind of control method of the term of validity of dynamic token
CN116340920A (en) Intelligent wearable equipment coded lock system based on security model
JP5565030B2 (en) Confidential information erasing method, confidential information erasing device and program thereof
KR101265907B1 (en) Card of the bank type with a user-actuatable switch
JP4560119B2 (en) Screen saver display method and information processing system
TWI506469B (en) Data security method, electronic device and external storage device
JP2004295386A (en) Information terminal device, its program and method for security

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160406

CF01 Termination of patent right due to non-payment of annual fee