CN112507403A - Method and system for protecting password by using security keyboard - Google Patents

Method and system for protecting password by using security keyboard Download PDF

Info

Publication number
CN112507403A
CN112507403A CN202011422677.6A CN202011422677A CN112507403A CN 112507403 A CN112507403 A CN 112507403A CN 202011422677 A CN202011422677 A CN 202011422677A CN 112507403 A CN112507403 A CN 112507403A
Authority
CN
China
Prior art keywords
list
character
ciphertext
password
linked list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011422677.6A
Other languages
Chinese (zh)
Inventor
刘康
杨玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Watchdata Co ltd
Original Assignee
Beijing Watchdata 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 Beijing Watchdata Co ltd filed Critical Beijing Watchdata Co ltd
Priority to CN202011422677.6A priority Critical patent/CN112507403A/en
Publication of CN112507403A publication Critical patent/CN112507403A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/83Protecting input, output or interconnection devices input devices, e.g. keyboards, mice or controllers thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a method and a system for protecting a password by using a security keyboard, wherein the method comprises the following steps: s100, after the safety keyboard is popped up, encrypting plaintext characters obtained by clicking keys each time to obtain corresponding ciphertext characters and performing dispersed storage; s200, when the password is used, after each found ciphertext character which is stored dispersedly is decrypted, a corresponding plaintext character is obtained. According to the method and the system provided by the invention, the password is safely stored and used in a one-word one-password and dispersed storage mode, the encrypted password is dispersedly stored, and the plaintext password is not continuously stored in the memory, so that an attacker cannot directly obtain the plaintext password through debugging software, and the password safety of a user is effectively ensured.

Description

Method and system for protecting password by using security keyboard
Technical Field
The invention relates to the field of information security and cryptography, in particular to a method and a system for protecting a password by using a security keyboard.
Background
With the widespread application of mobile phone internet banking, it becomes more and more important to protect the security of user passwords. When the system default keyboard is used for inputting the password, the password can be intercepted by a hacker, sensitive information is leaked, and a user bears the risk of causing huge economic loss. Therefore, in order to protect sensitive information from being leaked, the user inputs the password and encrypts the input password after the keyboard is retracted. However, when the user finishes inputting the password and the keyboard is not recovered, the memory stores continuous plaintext passwords, which increases the risk of password leakage.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method and a system for protecting a password by using a security keyboard, which are used for safely storing and using the password by using a self-made password keyboard in a one-word one-password and decentralized storage mode in order to protect the security of the password input by a user.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method of securing a password using a secure keyboard, the method comprising:
s100, after the safety keyboard is popped up, encrypting plaintext characters obtained by clicking keys each time to obtain corresponding ciphertext characters and performing dispersed storage;
s200, when the password is used, after each found ciphertext character which is stored dispersedly is decrypted, a corresponding plaintext character is obtained.
Further, the method as described above, S100, comprises:
s101, creating a linked list and a list with specified lengths, wherein the linked list is used for storing the ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list;
s102, recording the current encryption times M1 when encrypting the current plaintext characters, wherein M1 is a positive integer;
s103, traversing from the starting position of the list to the back, and taking out the data N1 stored at the M1 th position of the list when the M1 times, wherein N1 is a positive integer;
and S104, traversing from the initial position of the linked list from front to back, and storing the ciphertext character corresponding to the current plaintext character at the N1 th position of the linked list at the N1 th time.
Further, the method as described above, S200 includes:
s201, finding the chain table and the list;
s202, when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer;
s203, traversing from the starting position of the list to the back, and taking out the data N2 stored at the M2 th position of the list when the M2 times, wherein N2 is a positive integer;
s204, traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the N2 th position of the linked list for the N2 times, and decrypting to obtain the corresponding plaintext character.
Further, the method as described above, before the security keyboard pops up, further comprising:
and acquiring an encryption key, wherein the encryption key is used for encrypting the plaintext character through an RC4 algorithm and decrypting the ciphertext character.
Further, as in the method described above, the displayed key positions after each ejection of the security keyboard are randomly distributed;
and after the safety keyboard is popped up each time, the data in the list is refilled by random numbers, so that the encrypted ciphertext characters stored in the linked list after the safety keyboard is popped up each time are different in position.
A system for securing a password using a secure keyboard, the system comprising:
the safety storage module is used for encrypting plaintext characters obtained by clicking the keys each time after the safety keyboard is popped up to obtain corresponding ciphertext characters and performing dispersed storage;
and the using module is used for decrypting each found and dispersedly stored ciphertext character to obtain a corresponding plaintext character when the password is used.
Further, in the system as described above, the secure storage module is specifically configured to:
creating a linked list and a list with specified lengths, wherein the linked list is used for storing the ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list;
when the current plaintext character is encrypted, recording the current encryption frequency M1, wherein M1 is a positive integer;
traversing from the starting position of the list to the back, and taking out data N1 stored at the M1 th position of the list at the M1 th time, wherein N1 is a positive integer;
traversing from the initial position of the linked list to the back, and storing the ciphertext character corresponding to the current plaintext character at the N1 position of the linked list at the N1 times.
Further, as with the system described above, the usage module is specifically configured to:
finding the linked list and the list;
when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer;
traversing from the starting position of the list to the back, and taking out data N2 stored at the M2 th position of the list at the M2 th time, wherein N2 is a positive integer;
traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the N2 th position of the linked list when the linked list is subjected to the N2 times, and decrypting to obtain the corresponding plaintext character.
Further, the system as described above, wherein prior to the ejection of the security keyboard, the system is further configured to:
and acquiring an encryption key, wherein the encryption key is used for encrypting the plaintext character through an RC4 algorithm and decrypting the ciphertext character.
Further, the system as described above, the displayed key positions after each ejection of the security keyboard are randomly distributed;
and after the safety keyboard is popped up each time, the data in the list is refilled by random numbers, so that the encrypted ciphertext characters stored in the linked list after the safety keyboard is popped up each time are different in position.
The invention has the beneficial effects that: according to the method and the system provided by the invention, the password is safely stored and used in a one-word one-password and dispersed storage mode, the encrypted password is dispersedly stored, and the plaintext password is not continuously stored in the memory, so that an attacker cannot directly obtain the plaintext password through debugging software, and the password safety of a user is effectively ensured.
Drawings
Fig. 1 is a schematic flowchart of a method for protecting a password using a security keyboard according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for protecting a password using a security keyboard according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating the storage or retrieval of ciphertext characters as provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a system for protecting a password using a security keyboard according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and the detailed description.
In order to protect the security of the password input by the user, a self-made password keyboard is used, and the password is safely stored and used in a one-word one-password and scattered storage mode.
As shown in fig. 1, an embodiment of the present invention provides a method for protecting a password using a secure keyboard, including:
s100, after the safety keyboard is popped up, encrypting plaintext characters obtained by clicking keys each time to obtain corresponding ciphertext characters and performing dispersed storage,
before the safe keyboard is popped up, an encryption key is required to be obtained, and the encryption key is used for encrypting plaintext characters and decrypting ciphertext characters through an RC4 algorithm. After the keyboard is popped up, the obtained plaintext characters are encrypted each time the keyboard key is clicked, and finally all ciphertext is dispersedly stored in the memory.
S100 includes:
s101, creating a linked list and a list with specified lengths, wherein the linked list is used for storing ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list;
s102, recording the current encryption times M1 when encrypting the current plaintext characters, wherein M1 is a positive integer;
s103, traversing from the initial position of the list to the back, and taking out the data N1 stored at the M1 th position of the list when the M1 times, wherein N1 is a positive integer;
and S104, traversing from the initial position of the linked list from front to back, and storing the ciphertext character corresponding to the current plaintext character at the N1 position of the linked list at the N1 times.
S200, when the password is used, after each found ciphertext character which is stored dispersedly is decrypted, a corresponding plaintext character is obtained.
When the passwords are used, the passwords which are dispersedly stored in the memory need to be found one by one, and the process is opposite to the storage process.
S200 specifically comprises the following steps:
s201, finding a linked list and a list;
s202, when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer;
s203, traversing from the initial position of the list to the back, and taking out the data N2 stored at the M2 th position of the list when the M2 times, wherein N2 is a positive integer;
and S204, traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the Nth 2 position of the linked list for N2 times, and decrypting to obtain the corresponding plaintext character.
As shown in fig. 2-3, in order to effectively ensure the security of the user password, an encryption key S is obtained through some algorithm, and a plaintext password and S are calculated through RC4 to obtain a ciphertext password. In order to prevent an attacker from directly obtaining a plaintext password through debugging software, the obtained ciphertext password needs to be stored dispersedly, and a specific position of the ciphertext password stored in a memory needs to be determined first, wherein the process is as follows:
1) and creating a linked list N with a specified length for storing the ciphertext cipher. A list L is created to determine where the ciphertext cipher is stored in the linked list N.
2) And recording the current encryption times I during each encryption, namely the current I-th encryption.
3) Traversing from the starting position of the list L from front to back, and at the I time, taking out the data P stored in the position of the list L.
4) Traversing from the initial position of the linked list N to back, and storing the ciphertext password at the position at the P time.
After the ciphertext password is stored, when the password is used, the passwords which are dispersedly stored in the memory need to be found one by one, and the process is opposite to the storage process, and specifically as follows:
1) the previously used linked list N and list L are found.
2) And recording the current decryption times I each time the decryption is to be performed, namely the current I-th decryption.
3) Traversing from the starting position of the list L from front to back, and at the I time, taking out the data P stored in the position of the list L.
4) And traversing from the initial position of the linked list N to the back, and taking out the ciphertext password stored in the position of the linked list N at the P time and carrying out decryption operation. For the decryption operation of the ciphertext, the ciphertext needs to be operated with the previously calculated S through the RC4 algorithm to obtain the plaintext password.
In order to reduce the risk that an attacker simulates the key position distribution to calculate the actual password of the user, the key positions of the safety keyboard popped up each time need to be designed to be randomly distributed. After the safe keyboard is popped up each time, the data in the list L is refilled by random numbers, so that different positions of encrypted ciphertext stored in the memory after the keyboard is popped up each time are ensured, and the difficulty of searching the ciphertext storage position by an attacker is increased. The user password can be effectively protected by using the self-made safety keyboard, and the leakage risk is reduced. After the safety keyboard is popped up each time, the password key positions are randomly distributed, and each character input by the user can be encrypted and dispersedly stored in the memory. Because the key positions are random and the cipher text is stored in the memory, a hacker can hardly intercept the true cipher of the user, and the safety is greatly improved.
As shown in fig. 4, an embodiment of the present invention further provides a system for protecting a password by using a security keyboard, where when a user uses the security keyboard to type a password, the typed password is stored and used securely by way of one word and one password and distributed storage. The system comprises:
the secure storage module 100 is configured to encrypt plaintext characters obtained by clicking a key each time after the secure keyboard is popped up to obtain corresponding ciphertext characters, and perform distributed storage;
the using module 200 is configured to decrypt each found and dispersedly stored ciphertext character to obtain a corresponding plaintext character when using the password.
The secure storage module 100 is specifically configured to:
creating a linked list and a list with specified lengths, wherein the linked list is used for storing ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list; when the current plaintext character is encrypted, recording the current encryption frequency M1, wherein M1 is a positive integer; traversing from the starting position of the list to the back, and taking out the data N1 stored at the M1 th position of the list at the M1 th time, wherein N1 is a positive integer; traversing from the initial position of the linked list from front to back, and storing the ciphertext character corresponding to the current plaintext character at the N1 position of the linked list at the N1 times.
The usage module 200 is specifically configured to:
finding a linked list and a list; when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer; traversing from the starting position of the list to the back, and taking out the data N2 stored at the M2 th position of the list at the M2 th time, wherein N2 is a positive integer; traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the N2 th position of the linked list when the linked list is subjected to the N2 times, and decrypting to obtain the corresponding plaintext character.
Before the safe keyboard is popped up, the system is also used for acquiring an encryption key, and the encryption key is used for encrypting plaintext characters and decrypting ciphertext characters through an RC4 algorithm.
The technical scheme of the invention has the following beneficial effects:
1) and the user password is encrypted, so that the security of the user password is effectively ensured. The encrypted passwords are stored in a scattered mode, and therefore the decoding difficulty of an attacker is improved.
2) In the life cycle of the whole safety keyboard, the plaintext password is not continuously stored in the memory, and an attacker cannot directly obtain the plaintext password through debugging software.
3) The password encryption and decentralized storage processes are high in performance, short in time consumption and low in memory overhead, and users can hardly perceive the password encryption and decentralized storage processes, so that user experience is not influenced.
4) The security keyboard is adapted to most mobile phones, does not conflict with the system keyboard, has high portability, and is convenient for developers to integrate and call and to make some personalized customizations.
5) The safety keyboard and the system keyboard are basically the same in appearance design and function realization, and the previous use habit and input experience of a user are not influenced.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such modifications and variations.

Claims (10)

1. A method for securing a password using a secure keyboard, the method comprising:
s100, after the safety keyboard is popped up, encrypting plaintext characters obtained by clicking keys each time to obtain corresponding ciphertext characters and performing dispersed storage;
s200, when the password is used, after each found ciphertext character which is stored dispersedly is decrypted, a corresponding plaintext character is obtained.
2. The method of claim 1, wherein S100 comprises:
s101, creating a linked list and a list with specified lengths, wherein the linked list is used for storing the ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list;
s102, recording the current encryption times M1 when encrypting the current plaintext characters, wherein M1 is a positive integer;
s103, traversing from the starting position of the list to the back, and taking out the data N1 stored at the M1 th position of the list when the M1 times, wherein N1 is a positive integer;
and S104, traversing from the initial position of the linked list from front to back, and storing the ciphertext character corresponding to the current plaintext character at the N1 th position of the linked list at the N1 th time.
3. The method of claim 2, wherein S200 comprises:
s201, finding the chain table and the list;
s202, when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer;
s203, traversing from the starting position of the list to the back, and taking out the data N2 stored at the M2 th position of the list when the M2 times, wherein N2 is a positive integer;
s204, traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the N2 th position of the linked list for the N2 times, and decrypting to obtain the corresponding plaintext character.
4. The method of any of claims 1-3, further comprising, prior to the security keyboard popping up:
and acquiring an encryption key, wherein the encryption key is used for encrypting the plaintext character through an RC4 algorithm and decrypting the ciphertext character.
5. The method according to any of claims 1-3, wherein the displayed keys after each ejection of the security keyboard are randomly distributed;
and after the safety keyboard is popped up each time, the data in the list is refilled by random numbers, so that the encrypted ciphertext characters stored in the linked list after the safety keyboard is popped up each time are different in position.
6. A system for securing a password using a secure keyboard, the system comprising:
the safety storage module is used for encrypting plaintext characters obtained by clicking the keys each time after the safety keyboard is popped up to obtain corresponding ciphertext characters and performing dispersed storage;
and the using module is used for decrypting each found and dispersedly stored ciphertext character to obtain a corresponding plaintext character when the password is used.
7. The system of claim 6, wherein the secure storage module is specifically configured to:
creating a linked list and a list with specified lengths, wherein the linked list is used for storing the ciphertext characters, and the list is used for storing the storage position of each ciphertext character in the linked list;
when the current plaintext character is encrypted, recording the current encryption frequency M1, wherein M1 is a positive integer;
traversing from the starting position of the list to the back, and taking out data N1 stored at the M1 th position of the list at the M1 th time, wherein N1 is a positive integer;
traversing from the initial position of the linked list to the back, and storing the ciphertext character corresponding to the current plaintext character at the N1 position of the linked list at the N1 times.
8. The system of claim 7, wherein the usage module is specifically configured to:
finding the linked list and the list;
when the current ciphertext character is to be decrypted, recording the current decryption frequency M2, wherein M2 is a positive integer;
traversing from the starting position of the list to the back, and taking out data N2 stored at the M2 th position of the list at the M2 th time, wherein N2 is a positive integer;
traversing from the initial position of the linked list from front to back, and taking out the current ciphertext character stored at the N2 th position of the linked list when the linked list is subjected to the N2 times, and decrypting to obtain the corresponding plaintext character.
9. The system of any of claims 6-8, wherein prior to the security keyboard popping, the system is further configured to:
and acquiring an encryption key, wherein the encryption key is used for encrypting the plaintext character through an RC4 algorithm and decrypting the ciphertext character.
10. The system according to any one of claims 6-8, wherein the displayed keys after each ejection of the security keyboard are randomly distributed;
and after the safety keyboard is popped up each time, the data in the list is refilled by random numbers, so that the encrypted ciphertext characters stored in the linked list after the safety keyboard is popped up each time are different in position.
CN202011422677.6A 2020-12-08 2020-12-08 Method and system for protecting password by using security keyboard Pending CN112507403A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011422677.6A CN112507403A (en) 2020-12-08 2020-12-08 Method and system for protecting password by using security keyboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011422677.6A CN112507403A (en) 2020-12-08 2020-12-08 Method and system for protecting password by using security keyboard

Publications (1)

Publication Number Publication Date
CN112507403A true CN112507403A (en) 2021-03-16

Family

ID=74971266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011422677.6A Pending CN112507403A (en) 2020-12-08 2020-12-08 Method and system for protecting password by using security keyboard

Country Status (1)

Country Link
CN (1) CN112507403A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791695A (en) * 2021-09-17 2021-12-14 深圳壹账通智能科技有限公司 Password input method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791695A (en) * 2021-09-17 2021-12-14 深圳壹账通智能科技有限公司 Password input method and device, electronic equipment and storage medium
CN113791695B (en) * 2021-09-17 2024-04-09 深圳壹账通智能科技有限公司 Password input method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10348497B2 (en) System and method for content protection based on a combination of a user pin and a device specific identifier
US8819448B2 (en) Method and system for managing information on mobile devices
US20060107047A1 (en) Method, device, and system of securely storing data
CN105812332A (en) Data protection method
CN105450620A (en) Information processing method and device
US20130136256A1 (en) Block encryption
CN105681039A (en) Method and device for secret key generation and corresponding decryption
CN204360381U (en) mobile device
US20100058067A1 (en) Securing a password database
KR20170091609A (en) Method and apparatus for encrypting/decrypting data on mobile terminal
CN109905233B (en) Equipment data processing method and system
CN109687966A (en) Encryption method and its system
CN103929312A (en) Mobile terminal and method and system for protecting individual information of mobile terminal
CN104601820A (en) Mobile terminal information protection method based on TF password card
CN105825142A (en) Method and device for encrypting and decrypting documents in mobile terminal
US10110373B2 (en) System and method for manipulating both the plaintext and ciphertext of an encryption process prior to dissemination to an intended recipient
CN112507403A (en) Method and system for protecting password by using security keyboard
CN109995508B (en) Encryption and decryption device and method for FPGA code stream
CN115694921B (en) Data storage method, device and medium
CN101692266A (en) Method of intensively encrypting and protecting files by using hidden partition (HPA) and CPU ID
US11997191B2 (en) System and method for protecting secret data items using multiple tiers of encryption and secure element
KR101999209B1 (en) A system and method for encryption of pointers to virtual function tables
CN103491384A (en) Encrypting method and device of video and decrypting method and device of video
CN110830252B (en) Data encryption method, device, equipment and storage medium
Rahardjo et al. Design and implementation of self encryption method on file security

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination