CN106059750B - A kind of encipher-decipher method based on Chinese Hash - Google Patents

A kind of encipher-decipher method based on Chinese Hash Download PDF

Info

Publication number
CN106059750B
CN106059750B CN201610345944.1A CN201610345944A CN106059750B CN 106059750 B CN106059750 B CN 106059750B CN 201610345944 A CN201610345944 A CN 201610345944A CN 106059750 B CN106059750 B CN 106059750B
Authority
CN
China
Prior art keywords
buffer area
ciphertext
hash function
character
buffer
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
CN201610345944.1A
Other languages
Chinese (zh)
Other versions
CN106059750A (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201610345944.1A priority Critical patent/CN106059750B/en
Publication of CN106059750A publication Critical patent/CN106059750A/en
Application granted granted Critical
Publication of CN106059750B publication Critical patent/CN106059750B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention relates to the enciphering and deciphering algorithm based on Chinese Hash, ciphering process: the data for reading key and being encrypted;From memory application buffer area, its length and suffix are set;Selection hash function handles data, obtains the corresponding position in ciphertext of each plaintext character;Segmentation in plain text, applies for buffer area;The nonce that data obtain after hash function is handled is stored in buffer area;The buffer location of blank is filled up;Character encryption is carried out to each character in buffer area;Decrypting process: reading key and ciphertext, handles input ciphertext;Buffer size and buffer area suffix are set;Hash function is selected, ciphertext is divided;Apply for buffer area, determines ciphertext in buffer location using hash function;The each character in buffer area is decrypted, suffix is intercepted;The character of buffer area is utilized hash function composition plaintext.This invention ensures that the secure storage of privacy of user data, Chinese pin design is can be used in user, convenient for memory.

Description

A kind of encipher-decipher method based on Chinese Hash
Technical field
The present invention relates to encipher-decipher methods, and in particular to the encipher-decipher method based on Chinese Hash.
Background technique
With the application of various information systems, people have the text of many privacies or password to need to be recorded in a safety Memory space, maintaining design to realize one can will be popular in the method for secure storage privacy of user.In addition, people are for close The memory of code obviously is easier to be remembered using Chinese than letter and number mixing.However, existing encryption and decryption technique, one As only allow user to carry out combination pin using letter, number and some additional characters, be not easy to user and remember.
Summary of the invention
It is of the existing technology in order to solve the problems, such as, guarantee that the safety of private data, the present invention propose a kind of based on Chinese The encipher-decipher method of Hash guarantees the secure storage of privacy of user data using symmetric encryption method, and Chinese can be used in user Pin design, convenient for memory.The present invention is realized using following technical scheme: the encipher-decipher method based on Chinese Hash, including Ciphering process and decrypting process, wherein ciphering process include:
S11, the data for reading key and being encrypted;Whether check key is correct, correctly thens follow the steps S12;
S12, from memory application buffer area, buffer length and suffix are set;
S13, selection hash function handle data, obtain the corresponding position in ciphertext of each plaintext character;
S14, segmentation in plain text, apply for buffer area;
S15, the nonce that data obtain after hash function is handled is stored in buffer area;
S16, the buffer location of blank is filled up;
S17, character encryption is carried out to each character in buffer area, obtains final ciphertext;
Decrypting process includes:
S21, key and ciphertext are read, the ciphertext of input is handled;Whether check key is correct, correctly then executes step Rapid S22;
S22, setting buffer size and buffer area suffix;
S23, selection hash function, divide ciphertext;
S24, application buffer area, determine ciphertext in buffer location using hash function;
S25, each character in buffer area is decrypted, intercepts suffix;
S26, the character of buffer area is utilized hash function composition plaintext.
Preferably, the hash function are as follows: unitary n times equation method, leaving remainder method, generating random number method or key row Sequence method.
Preferably, the symbol of encryption described in step S17 is plus-minus or exclusive or.
Preferably, the key is Chinese key.
Compared with prior art, the present invention has the advantages that and advantage:
1, the present invention can input key and important text data and add as the distinctive mnemonic combinations information of user It is close, it inputs ciphertext and key and is decrypted, in the case where user key is not revealed, data after user encryption can be completely secured Safety, and any significant plaintext cannot be obtained using ciphertext under the premise of no key, effective protection user data Safety.
2, the present invention is based on the realization of Hash thinking, enciphering rate is fast.In addition, based on encryption method of the invention, Ke Yishe Multiple encipherors are counted out, a possibility that being cracked using public encryption method there are key is avoided.
3, Chinese characters encryption can be used in the present invention, and the characteristic of Chinese is made full use of to ensure its safety.For example, user can To use Chinese to design oneself exclusive encryption key.If forgetting key, there is no other methods other than attempting encryption key method Available data content can be effectively protected the privacy of user.
Detailed description of the invention
Fig. 1 is encryption flow of the invention;
Fig. 2 is decryption process of the invention.
Specific embodiment
In order to clearly describe the present invention, below in conjunction with specific embodiment and attached drawing, to technical solution of the present invention Clear, complete description is carried out, embodiments of the present invention are not limited thereto.
Embodiment
Encipher-decipher method of the invention is encrypted using hash function, and Chinese can be used in key.Ciphering process such as Fig. 1 It is shown, comprising the following steps:
S11, first the data of input are handled: input user setting, the data for reading key and being encrypted;It verifies close Whether key (also referred to as password) is correct, correctly thens follow the steps S12;
S12, from memory application buffer area, buffer length and suffix are set;
S13, selection hash function handle data, obtain the corresponding position in ciphertext of each plaintext character;Institute Stating hash function can choose: unitary n times equation method, leaving remainder method, generating random number method or key ranking method.
S14, segmentation in plain text, apply for buffer area;
S15, the nonce that data obtain after hash function is handled is stored in buffer area;
S16, the buffer location of blank is filled up;
S17, character encryption is carried out to each character in buffer area, obtains final ciphertext.Encrypted symbols can be used exclusive or, Plus-minus.
Decrypting process such as Fig. 2, comprising the following steps:
S21, key and ciphertext are read, the ciphertext of input is handled;Whether check key is correct, correctly then executes step Rapid S22;
S22, setting buffer size and buffer area suffix;
S23, selection hash function, divide ciphertext;
S24, application buffer area, determine ciphertext in buffer location using hash function;
S25, each character in buffer area is decrypted, intercepts suffix;
S26, the character of buffer area is utilized hash function composition plaintext.
Embodiment of the present invention are not limited by the above embodiments, other are any without departing from Spirit Essence of the invention With changes, modifications, substitutions, combinations, simplifications made under principle, equivalent substitute mode should be, be included in of the invention Within protection scope.

Claims (3)

1. a kind of encipher-decipher method based on Chinese Hash, which is characterized in that including ciphering process and decrypting process, wherein encrypting Process includes:
S11, the data for reading key and being encrypted;Whether check key is correct, correctly thens follow the steps S12;
S12, from memory application buffer area, buffer length and suffix are set;
S13, selection hash function handle data, obtain the corresponding position in ciphertext of each plaintext character;
S14, segmentation in plain text, apply for buffer area;
S15, the nonce that data obtain after hash function is handled is stored in buffer area;
S16, the buffer location of blank is filled up;
S17, character encryption is carried out to each character in buffer area, obtains final ciphertext;
Decrypting process includes:
S21, key and ciphertext are read, the ciphertext of input is handled;Whether check key is correct, correctly thens follow the steps S22;
S22, setting buffer size and buffer area suffix;
S23, selection hash function, divide ciphertext;
S24, application buffer area, determine ciphertext in buffer location using hash function;
S25, each character in buffer area is decrypted, intercepts suffix;
S26, the character of buffer area is utilized hash function composition plaintext;
The key is Chinese key.
2. the encipher-decipher method according to claim 1 based on Chinese Hash, which is characterized in that the hash function are as follows: Unitary n times equation method, leaving remainder method, generating random number method or key ranking method.
3. the encipher-decipher method according to claim 1 based on Chinese Hash, which is characterized in that encrypted described in step S17 For plus-minus or exclusive or.
CN201610345944.1A 2016-05-20 2016-05-20 A kind of encipher-decipher method based on Chinese Hash Expired - Fee Related CN106059750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610345944.1A CN106059750B (en) 2016-05-20 2016-05-20 A kind of encipher-decipher method based on Chinese Hash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610345944.1A CN106059750B (en) 2016-05-20 2016-05-20 A kind of encipher-decipher method based on Chinese Hash

Publications (2)

Publication Number Publication Date
CN106059750A CN106059750A (en) 2016-10-26
CN106059750B true CN106059750B (en) 2019-08-27

Family

ID=57177505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610345944.1A Expired - Fee Related CN106059750B (en) 2016-05-20 2016-05-20 A kind of encipher-decipher method based on Chinese Hash

Country Status (1)

Country Link
CN (1) CN106059750B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360858B (en) * 2020-03-04 2022-09-09 武汉斗鱼网络科技有限公司 Method and system for processing function switch data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
哈希函数构造方法研究;杜志林、等;《计算机光盘软件与应用》;20140531;全文 *
字符型密码随机加密与解密算法的设计与实现;崔艳荣;《计算机工程与设计》;20130331;第34卷(第3期);全文 *

Also Published As

Publication number Publication date
CN106059750A (en) 2016-10-26

Similar Documents

Publication Publication Date Title
CN110650010B (en) Method, device and equipment for generating and using private key in asymmetric key
US9485096B2 (en) Encryption / decryption of data with non-persistent, non-shared passkey
US9372987B1 (en) Apparatus and method for masking a real user controlling synthetic identities
CN105117635B (en) A kind of safety system and method for local data
CN104868996A (en) Data encryption and decryption method, device thereof, and terminal
CN105406969A (en) Apparatus And Method For Data Encryption
US20150256343A1 (en) Securely Generating and Storing Passwords in a Computer System
Rajput et al. An improved cryptographic technique to encrypt text using double encryption
KR20230175184A (en) Computer file security encryption methods, decryption methods and readable storage media
WO2017090014A1 (en) Technique to generate symmetric encryption algorithms
CN106357608A (en) Method for encrypting and decrypting private data for personal healthcare data
Amin et al. Remote access control mechanism using rabin public key cryptosystem
CN103501220B (en) encryption method and device
CN106549756A (en) A kind of method and device of encryption
CN106059750B (en) A kind of encipher-decipher method based on Chinese Hash
Rathidevi et al. Trends of cryptography stepping from ancient to modern
CN106656496A (en) Data encryption method and apparatus
Rajan et al. Advancement in Caesar cipher by randomization and delta formation
CN103235910A (en) Method achieving network account protection control based on smart card in iOS operation system
Goyal et al. Network security: a survey paper on playfair cipher and its variants
WO2018142291A1 (en) Identity verification
CN108197482A (en) A kind of internal storage data encrypting and decrypting method and device
Nassar et al. Enhanced mobile security using sim encryption
CN109787965B (en) Quantum computing resistant cloud storage method and system based on multiple asymmetric key pools
CN109587170B (en) Anti-quantum computing cloud storage method and system based on multiple public asymmetric key pools

Legal Events

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

Granted publication date: 20190827

Termination date: 20200520