CN107172005A - A kind of high security teletype code encryption method based on asymmetric arithmetic - Google Patents

A kind of high security teletype code encryption method based on asymmetric arithmetic Download PDF

Info

Publication number
CN107172005A
CN107172005A CN201710089943.XA CN201710089943A CN107172005A CN 107172005 A CN107172005 A CN 107172005A CN 201710089943 A CN201710089943 A CN 201710089943A CN 107172005 A CN107172005 A CN 107172005A
Authority
CN
China
Prior art keywords
code
service end
source document
ciphertext
encryption
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
CN201710089943.XA
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.)
Jiangsu Lsyw Polytron Technologies Inc
Original Assignee
Jiangsu Lsyw Polytron Technologies Inc
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 Jiangsu Lsyw Polytron Technologies Inc filed Critical Jiangsu Lsyw Polytron Technologies Inc
Priority to CN201710089943.XA priority Critical patent/CN107172005A/en
Publication of CN107172005A publication Critical patent/CN107172005A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption

Abstract

The present invention relates to data encryption security fields, more particularly in the case that one kind in small data to requiring that efficiency of transmission is not high but transmission security is higher, the security and uniqueness of data can be carried out effectively encrypting and ensureing so as to the high security teletype code encryption method based on asymmetric arithmetic of design, be specially:Service end generates public key (e, N) and private key (d, N) at random, and by the corresponding encipheror of public key (e, N) to encryption equipment, while the corresponding decryption program of private key (d, N) is retained in service end;Service end, which is sent, receives the authentication operation that signal and public key (e, N) to encryption equipment subsequently encrypt and decrypt.

Description

A kind of high security teletype code encryption method based on asymmetric arithmetic
Technical field
The present invention relates to data encryption security fields, more particularly to a kind of high security teletype code based on asymmetric arithmetic Encryption method.
Background technology
With the high speed development of electronic information technology, the use of teletype code is increasingly popularized, for example using its data it is small, pass The defeated low feature of frequency carries out network trading or transmission file, in order to ensure the security of teletype code in process of exchange, it is necessary to right Teletype code is encrypted, and prevents teletype code from being intercepted and captured by trojan horse program.
In the prior art, the transmission of teletype code (also referred to as small data) is extremely wide, and for example user generally makes The instruction that keyboard is tapped is transmitted as data, then the percussion instruction in such as post office using Morse code or other forms It is transmitted as telegram data, then for example now extremely widespread data transfer framework, i.e., between client and service end Data transfer (most of is small data), client is corresponding with service end, and client provides the user local service program, It is typically mounted in common client computer, it is necessary to be worked in coordination operation with service end, service end provides service for client, and deposits User related information is stored up, such as user account password, needs to recognize by password when user is by client login application program Card, and if client by trojan horse encroach on if user by input through keyboard password when can be recorded by trojan horse program, it is right Account safety threatens, and is this it has been proposed that a kind of Encryption Keyboard, such as " CN201220386190.1 " number, entitled The utility model patent of " Encryption Keyboard and the self-service device using the keyboard ", the Encryption Keyboard includes the first key that is stored with Memory module;The detecting module whether detecting Encryption Keyboard is destroyed;Be connected to memory module and detecting module, in detecting mould Block detects the first protection circuit of the first key deleted when Encryption Keyboard is destroyed in memory module.Although above-mentioned encryption key Disk can realize cryptoguard, but its manufacturing cost is high, poor universality, and must be equipped with computer in itself when using is common Keyboard replaces with this kind of Encryption Keyboard, and encryption efficiency is not high.
Simultaneously with the improvement of encryption and decryption technique, also begin to occur in that the safety encryption of asymmetric arithmetic in the prior art System, including:Keyboard (101), for inputting keypad code;
Encryption equipment (102), for encrypting, the encryption equipment (102) is added based on rivest, shamir, adelman to keypad code Close to obtain ciphertext, the ciphertext is sent to service end (104) by the encryption equipment (102);
Client (103), for login user system;
Service end (104), for decrypted authentication, the service end (104) receives ciphertext and according to decipherment algorithm to ciphertext The keypad code for obtaining keyboard (101) input is decrypted, when the service end (104) decrypts obtained keypad code and service end (104) when the keypad code of storage matches, service end (104) the certification success, it is allowed to which user logins custom system.
It is encrypted though the data that said system can be tapped to keyboard carry out asymmetric arithmetic, the problem of existing be, by In to the transmission of teletype code often in the case where transmission rate request is not high but transmission security requires higher, even with non- Symmetry algorithm is encrypted, and its operand decrypted, which also can not be realized, to be cracked, so for the encryption of data, especially It is that the transmission of the such small data of teletype code still has very high potential safety hazard.
The content of the invention
In order to solve, to not high but in the case that transmission security is higher in small data requirement efficiency of transmission, can to carry out effectively The security and uniqueness of encryption and guarantee data add so as to a kind of high security teletype code based on asymmetric arithmetic of design Decryption method.
The technical solution adopted for the present invention to solve the technical problems is:A kind of high security electricity based on asymmetric arithmetic Code encryption method is passed, is comprised the following steps:
S01 write-in program algorithms:Service end first generates public key (e, N) and private key (d, N) at random, and by public key (e, N) Corresponding encipheror is to encryption equipment, while the corresponding decryption program of private key (d, N) is retained in service end;
S02 processing encryptions:Service end, which is sent, receives signal and public key (e, N) to encryption equipment, and encryption equipment opens data receiver Function and the single keypad code for receiving input through keyboard, are handled the single keypad code, i.e., to continuing to add on single keypad code Plus the source document code formed after machine code, clock code, random code combination, according to the corresponding encipheror of public key (e, N) to source document code Encryption obtains ciphertext, and ciphertext is sent to service end by the encryption equipment;
S03 decrypted authentications:Service end receives ciphertext and on the one hand source document code is obtained according to the decryption of private key (d, N) decryption program Keypad code, machine code, clock code and random code in source document code, and the field in source document code is analyzed, to clock code It is compared with the clock code in the source document code that receives before, so that whether the source document code for judging to receive sends in real time Source document code, the machine code of the encryption equipment stored to the machine code received with service end is contrasted, if the clock in source document code Code and machine code all meet the requirements, then by service end decrypt obtained by the keypad code that stores of keypad code and service end contrasted simultaneously Judge whether matching, allow user to login the custom system of client if matching;If clock code or machine in source document code Any one is undesirable in code, then service end sends alarm signal.
Preferably, the determination method of the public key (e, N) and private key (d, N) is N=p1*p2.....pn, n >=3, piIt is Prime number, e*d=1mod ((p1-1)*(p2-1)*......(pn-1))。
Preferably, in the encipheror, being added using the public key (e, N) and equation below to the keypad code It is close, obtain the ciphertext:AeMod N=B, wherein, A represents the source document code, and B represents the ciphertext.
Preferably, in the decryption program, being decrypted, being obtained to the ciphertext using private key (d, N) and equation below To the keypad code:BdMod N=A, wherein, A represents the source document code, and B represents the ciphertext.
The beneficial effects of the invention are as follows:1. by being added machine code, clock code and random code and then shape to keypad code Into source document code, so as to greatly improve the difficulty cracked.
2. Time-Series analysis can be also carried out to clock code in the clock code obtained after source document code is decrypted and to source document code The machine code obtained after decryption is compared, it is ensured that the real-time and uniqueness of the data of reception, so that can not be by replicating number The form being transmitted according to bag is obscured, and the clock code and machine code that each source document code is obtained after decryption only meet the requirements In the case of just can further by service end to client carry out data feedback, otherwise can directly be alarmed, greatly be carried The high security of teletype code transmission and decryption.
3. the encryption equipment of the present invention is according to encrypted instruction, encrypts source document code using public key (e, N) and obtain ciphertext, and to service End sends ciphertext, and service end received after ciphertext, and ciphertext is decrypted using private key (d, N) according to decryption instructions, wherein, parameter N by At least three prime numbers, which are multiplied, to be obtained, N=p1*p2.....pn, n >=3, the relation between parameter e and parameter d meets e*d=1mod ((p1-1)*(p2-1)*......(pn- 1) the less p of several numerical value), is passed throughiMultiplication just results in a larger ginseng Number N, it is ensured that the security of encryption, reduces the time for the N that got parms before encryption, improves the efficiency of encryption.
Brief description of the drawings
The present invention is further described with reference to the accompanying drawings and examples.
Fig. 1 is the theory diagram of the secure encryption system of asymmetric arithmetic in the prior art;
Fig. 2 is the flow chart of the high security teletype code encryption method based on asymmetric arithmetic of the present invention.
Wherein:Keyboard 101, encryption equipment 102, client 103 and service end 104.
Embodiment
In conjunction with the accompanying drawings, the present invention is further explained in detail.These accompanying drawings are simplified schematic diagram, only with Illustration illustrates the basic structure of the present invention, therefore it only shows the composition relevant with the present invention.
A kind of high security teletype code encryption method based on asymmetric arithmetic, comprises the following steps:
S01 write-in program algorithms:Service end first generates public key (e, N) and private key (d, N) at random, and by public key (e, N) Corresponding encipheror is to encryption equipment, while the corresponding decryption program of private key (d, N) is retained in service end;
S02 processing encryptions:Service end, which is sent, receives signal and public key (e, N) to encryption equipment, and encryption equipment opens data receiver Function and the single keypad code for receiving input through keyboard, are handled the single keypad code, i.e., to continuing to add on single keypad code Plus the source document code that machine code, clock code, random code are combined into, according to the corresponding encipheror of public key (e, N) to source document code encryption Ciphertext is obtained, ciphertext is sent to service end by the encryption equipment;
S03 decrypted authentications:Service end receives ciphertext and on the one hand source document code is obtained according to the decryption of private key (d, N) decryption program Keypad code, machine code, clock code and random code in source document code, and the field in source document code is analyzed, to clock code It is compared with the clock code in the source document code that receives before, so that whether the source document code for judging to receive sends in real time Source document code, the machine code of the encryption equipment stored to the machine code received with service end is contrasted, if the clock in source document code Code and machine code all meet the requirements, then by service end decrypt obtained by the keypad code that stores of keypad code and service end contrasted simultaneously Judge whether matching, allow user to login the custom system of client if matching;If clock code or machine in source document code Any one is undesirable in code, then service end sends alarm signal.
The determination method of the public key (e, N) and private key (d, N) is N=p1*p2.....pn, n >=3, piIt is prime number, e*d =1mod ((p1-1)*(p2-1)*......(pn-1))。
In the encipheror, the keypad code is encrypted using the public key (e, N) and equation below, institute is obtained State ciphertext:AeModN=B, wherein, A represents the source document code, and B represents the ciphertext.
In the decryption program, the ciphertext is decrypted using private key (d, N) and equation below, the keyboard is obtained Code:BdModN=A, wherein, A represents the source document code, and B represents the ciphertext.
In the specific implementation, because user is not aware that how parameter N obtains, parameter N numerical value is only known, if Want decryption ciphertext, then need to carry out factorization to parameter N, can just obtain the private key (d, N) used during decryption, and to parameter N progress factorization is relatively difficult, therefore ensure that the security of ciphertext, i.e., due to sequential when convenient public key or private key are trapped The judgement of code and the judgement requirement of machine code, are also not in that the data duplication transmission of intercepting and capturing also can be decrypted and receive phenomenon.
Closed further, since the secrecy timeliness of ciphertext takes with decryption with parameter N and clock code-phase, parameter N is bigger, secrecy Timeliness and decryption time are longer, in order to strengthen the security of ciphertext, it will usually select the parameter N that numerical value is larger;When parameter N is two Individual prime number a1And a2Product when, to ensure parameter N it is very big, then need a1And a2Also it is very big, but numerical value very big prime number ratio It is more difficult to obtain, and on the one hand clock code directly can be compared in service end, on the other hand can be with before receiving Clock code is compared, so as to realize that the data received are orderly in real time, needs to expend ratio before encryption during selection parameter More time, the efficiency of encryption is affected;When parameter N is the product of at least three prime numbers, even if piNumerical value it is smaller, Make parameter N numerical value needs very big, it is only necessary to utilize several p moreiMultiplication, need not consume during selection parameter before encryption Take the more time, be conducive to improving encryption efficiency.
Keypad code, which is encrypted, using public key (e, N) for encryption equipment is obtained sending after ciphertext to service end, and service end is utilized Private key (d, N) decrypts ciphertext, obtains keypad code, and the security of keypad code transmission is ensure that in transmitting procedure;Encryption equipment is utilized Keypad code is encrypted public key (e, N) obtains ciphertext, and service end 104 is got using private key (d, N) decryption ciphertext after ciphertext, Keypad code is obtained, due to the user with bad motivation, such as hacker, it is not known that public key (e, N), even if having forged a string of characters To service end 104, the keypad code that service end 104 also cannot be matched correctly using private key (d, N) decryption, therefore body can be realized The purpose of part certification.Even if in addition, trojan horse program intercepts and captures the keypad code that keyboard 101 is inputted, because public key (e, N) is unknown, it is impossible to Obtain correct ciphertext, it is impossible to by the certification of service end 104, still can not login custom system, substantially increase security.
The encryption equipment of the present embodiment adds machine code, clock code, random code to keyboard, adds the main mesh of above-mentioned data Be in order to increase the difficulty that cracks and cause data and time and machine ID binding, with uniqueness, further according to encryption Instruction, encrypts source document code using public key (e, N) and obtains ciphertext, and sends ciphertext to service end 104, and service end 104 receives close Wen Hou, ciphertext is decrypted according to decryption instructions using private key (d, N), wherein, parameter N is multiplied by least three prime numbers to be obtained, N= p1*p2.....pn, n >=3, piIt is confidential parameter, the relation between parameter e and parameter d meets e*d=1mod ((p1- 1)*(p2-1)*......(pn- 1) the less p of several numerical value), is passed throughiMultiplication just results in a larger parameter N, protects The security of encryption is demonstrate,proved, the time for the N that got parms before encryption is reduced, improves the efficiency of encryption, furthermore, obtained after decryption Can also Time-Series analysis be carried out to clock code, it is ensured that the real-time and uniqueness of the data of reception, it is impossible to by replicating in clock code The form that packet is transmitted is obscured, and the clock code that each source document code is obtained after decryption only has satisfactory situation It is lower just data feedback further to be carried out to client by service end.
The beneficial effects of the invention are as follows:1. by being added machine code, clock code and random code and then shape to keypad code Into source document code, so as to greatly improve the difficulty cracked.
2. Time-Series analysis can be also carried out to clock code in the clock code obtained after source document code is decrypted and to source document code The machine code obtained after decryption is compared, it is ensured that the real-time and uniqueness of the data of reception, so that can not be by replicating number The form being transmitted according to bag is obscured, and the clock code and machine code that each source document code is obtained after decryption only meet the requirements In the case of just can further by service end to client carry out data feedback, otherwise can directly be alarmed, greatly be carried The high security of small data transmission and decryption.
3. the encryption equipment of the present invention is according to encrypted instruction, encrypts source document code using public key (e, N) and obtain ciphertext, and to service End sends ciphertext, and service end received after ciphertext, and ciphertext is decrypted using private key (d, N) according to decryption instructions, wherein, parameter N by At least three prime numbers, which are multiplied, to be obtained, N=p1*p2.....pn, n >=3, the relation between parameter e and parameter d meets e*d=1mod ((p1-1)*(p2-1)*......(pn- 1) the less p of several numerical value), is passed throughiMultiplication just results in a larger ginseng Number N, it is ensured that the security of encryption, reduces the time for the N that got parms before encryption, improves the efficiency of encryption.
Using the above-mentioned desirable embodiment according to the present invention as enlightenment, by above-mentioned description, relevant staff is complete Various changes and amendments can be carried out without departing from the scope of the technological thought of the present invention' entirely.The technology of this invention Property scope is not limited to the content on specification, it is necessary to its technical scope is determined according to right.

Claims (4)

1. a kind of high security teletype code encryption method based on asymmetric arithmetic, it is characterised in that:Comprise the following steps:
S01 write-in program algorithms:Service end generates public key (e, N) and private key (d, N) at random first, and public key (e, N) is corresponding Encipheror to encryption equipment, while the corresponding decryption program of private key (d, N) is retained in service end;
S02 processing encryptions:Service end, which is sent, receives signal and public key (e, N) to encryption equipment, and encryption equipment opens data receiver function And the single keypad code of input through keyboard is received, the single keypad code is handled, i.e., to continuing addition machine on single keypad code The source document code formed after device code, clock code, random code combination, according to the corresponding encipheror of public key (e, N) to source document code encryption Ciphertext is obtained, ciphertext is sent to service end by the encryption equipment;
S03 decrypted authentications:Service end receives ciphertext and on the one hand obtains source document according to the decryption of private key (d, N) decryption program to source document code Keypad code, machine code, clock code and random code in code, and the field in source document code is analyzed, to clock code therewith Before clock code in the source document code that receives be compared so that whether the source document code for judging to receive is the source document sent in real time Code, the machine code of encryption equipment store to the machine code received with service end contrasts, if the clock in source document yard yard with Machine code all meets the requirements, then by service end decrypt obtained by the keypad code that is stored with service end of keypad code contrasted and judged Whether match, allow user to login the custom system of client if matching;If in the clock code or machine code in source document code Any one is undesirable, then service end sends alarm signal.
2. the high security teletype code encryption method according to claim 1 based on asymmetric arithmetic, it is characterised in that:Institute The determination method for stating public key (e, N) and private key (d, N) is N=p1*p2.....pn, n >=3, piIt is prime number, e*d=1mod ((p1- 1)*(p2-1)*......(pn-1))。
3. the high security teletype code encryption method according to claim 1 based on asymmetric arithmetic, it is characterised in that:Institute State in encipheror, the keypad code is encrypted using the public key (e, N) and equation below, the ciphertext is obtained: AeMod N=B, wherein, A represents the source document code, and B represents the ciphertext.
4. the high security teletype code encryption method according to claim 1 based on asymmetric arithmetic, it is characterised in that:Institute State in decryption program, the ciphertext is decrypted using private key (d, N) and equation below, the keypad code is obtained:Bdmod N =A, wherein, A represents the source document code, and B represents the ciphertext.
CN201710089943.XA 2017-02-20 2017-02-20 A kind of high security teletype code encryption method based on asymmetric arithmetic Pending CN107172005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710089943.XA CN107172005A (en) 2017-02-20 2017-02-20 A kind of high security teletype code encryption method based on asymmetric arithmetic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710089943.XA CN107172005A (en) 2017-02-20 2017-02-20 A kind of high security teletype code encryption method based on asymmetric arithmetic

Publications (1)

Publication Number Publication Date
CN107172005A true CN107172005A (en) 2017-09-15

Family

ID=59849816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710089943.XA Pending CN107172005A (en) 2017-02-20 2017-02-20 A kind of high security teletype code encryption method based on asymmetric arithmetic

Country Status (1)

Country Link
CN (1) CN107172005A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064595A (en) * 2006-04-27 2007-10-31 联想(北京)有限公司 Computer network safe input authentication system and method
CN101236591A (en) * 2007-01-31 2008-08-06 联想(北京)有限公司 Method, terminal and safe chip for guaranteeing critical data safety
CN101924794A (en) * 2010-08-18 2010-12-22 厦门雅迅网络股份有限公司 Internet based method for monitoring total software operation quantity in real time
CN102437912A (en) * 2012-01-06 2012-05-02 厦门博鼎智文传媒科技有限公司 Digital rights management method based on N RSA (Rivest Shamir Adleman) encryption algorithms based on chaotic algorithm
WO2015017130A1 (en) * 2013-07-28 2015-02-05 Square, Inc. Raw sensor input encryption for passcode entry security
CN104618348A (en) * 2015-01-12 2015-05-13 中国科学院信息工程研究所 Method for resisting automatic programming batch illegalities

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064595A (en) * 2006-04-27 2007-10-31 联想(北京)有限公司 Computer network safe input authentication system and method
CN101236591A (en) * 2007-01-31 2008-08-06 联想(北京)有限公司 Method, terminal and safe chip for guaranteeing critical data safety
CN101924794A (en) * 2010-08-18 2010-12-22 厦门雅迅网络股份有限公司 Internet based method for monitoring total software operation quantity in real time
CN102437912A (en) * 2012-01-06 2012-05-02 厦门博鼎智文传媒科技有限公司 Digital rights management method based on N RSA (Rivest Shamir Adleman) encryption algorithms based on chaotic algorithm
WO2015017130A1 (en) * 2013-07-28 2015-02-05 Square, Inc. Raw sensor input encryption for passcode entry security
CN104618348A (en) * 2015-01-12 2015-05-13 中国科学院信息工程研究所 Method for resisting automatic programming batch illegalities

Similar Documents

Publication Publication Date Title
EP3633913B1 (en) Provisioning a secure connection using a pre-shared key
US7571320B2 (en) Circuit and method for providing secure communications between devices
CN104023013B (en) Data transmission method, server side and client
CN103763631B (en) Authentication method, server and television set
CN104219228B (en) A kind of user's registration, user identification method and system
CN110535868A (en) Data transmission method and system based on Hybrid Encryption algorithm
CN107248075B (en) Method and device for realizing bidirectional authentication and transaction of intelligent key equipment
CN108347419A (en) Data transmission method and device
CN104253694A (en) Encrypting method for network data transmission
CN107800675A (en) A kind of data transmission method, terminal and server
CN101809964A (en) Method for securing information exchange, and corresponding device and computer software product
CN103986583A (en) Dynamic encryption method and encryption communication system thereof
GB2607846A (en) Dongle for ciphering data
CN102811224A (en) Method, device and system for implementation of SSL (secure socket layer)/TLS (transport layer security) connection
CN104901935A (en) Bilateral authentication and data interaction security protection method based on CPK (Combined Public Key Cryptosystem)
CN109309566B (en) Authentication method, device, system, equipment and storage medium
CN103716166A (en) Self-adaptation hybrid encryption method and device and encryption communication system
CN104270242A (en) Encryption and decryption device used for network data encryption transmission
JPH0934356A (en) High-bandwidth cryptographic system with low-bandwidth cryptographic module
CN104901803A (en) Data interaction safety protection method based on CPK identity authentication technology
CN204180095U (en) A kind of ciphering and deciphering device for network data encryption transmission
CN107104795A (en) Method for implanting, framework and the system of RSA key pair and certificate
CN104935553A (en) Unified identity authentication platform and authentication method
CN109104278A (en) A kind of encrypting and decrypting method
WO2019165571A1 (en) Method and system for transmitting data

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170915

RJ01 Rejection of invention patent application after publication