CN110048994A - A kind of communication means and device - Google Patents
A kind of communication means and device Download PDFInfo
- Publication number
- CN110048994A CN110048994A CN201811478898.8A CN201811478898A CN110048994A CN 110048994 A CN110048994 A CN 110048994A CN 201811478898 A CN201811478898 A CN 201811478898A CN 110048994 A CN110048994 A CN 110048994A
- Authority
- CN
- China
- Prior art keywords
- server
- terminal
- random string
- algorithm
- sent
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 172
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 253
- 230000004044 response Effects 0.000 claims abstract description 50
- 238000012545 processing Methods 0.000 claims abstract description 48
- 238000000034 method Methods 0.000 claims description 52
- 230000005540 biological transmission Effects 0.000 abstract description 30
- 238000004590 computer program Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 8
- 125000004122 cyclic group Chemical group 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 241001269238 Data Species 0.000 description 2
- 241001441724 Tetraodontidae Species 0.000 description 2
- 238000013478 data encryption standard Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
- H04L1/0061—Error detection codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0863—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
Abstract
The embodiment of the invention provides a kind of communication means and devices, when receiving the connection request message of terminal transmission, the available random string of server, and according to the first predetermined encryption algorithm and preset-key, random string is encrypted, the connection response message for carrying encrypted random string is sent to terminal, when terminal receives the connection response message of server transmission, terminal can be according to the corresponding decipherment algorithm of the first predetermined encryption algorithm and preset-key, preset field in connection response message is decrypted, obtain random string, then, terminal and server can carry out coded communication according to random string and the second predetermined encryption algorithm.Based on above-mentioned processing, in instantaneous communication system, server carries out coded communication according to the random string obtained when connection is established every time with terminal, rather than fixed key is utilized to carry out coded communication, a possibility that data are cracked is reduced, and then improves the safety of communication.
Description
Technical field
The present invention relates to Internet technical fields, more particularly to a kind of communication means and device.
Background technique
With the fast development of Internet technology, the function of instant messaging (Instant Message, IM) service is not yet
It is disconnected abundant.In IM service, in order to guarantee the safety and reliability of communication, need to the industry transmitted between terminal and server
Business data are encrypted.
In the prior art, the mode for generalling use symmetric cryptography encrypts the business datum of transmission.For example, certain
In instant messaging service, terminal is encrypted as key to sent initial data using the user account logged in, is encrypted
Data, and encryption data is sent to server.After server receives encryption data, according to the user account of terminal login
Encryption data is decrypted, initial data is obtained.Similarly, server is logged in when sending data to terminal with the terminal
User account is that key pair initial data is encrypted, and obtains encryption data, and encryption data is sent to terminal.Terminal receives
To after encryption data, encryption data is decrypted according to the user account that the terminal logs in, obtains initial data.
As seen from the above, for same terminal, since the key of symmetric cryptography immobilizes, some malicious attackers are held very much
The key is easily cracked, and then can distort or steal the encryption data transmitted between the terminal and server, reduces communication
Safety.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of communication means and device, to improve the safety of communication.Specifically
Technical solution is as follows:
In a first aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of communication means, the method applications
Terminal in instantaneous communication system, the instantaneous communication system further include server, which comprises
Connection request message is sent to the server;
When receiving the connection response message that the server is sent, according to the corresponding decryption of the first predetermined encryption algorithm
Algorithm and preset-key are decrypted the preset field in the connection response message, obtain random string, wherein institute
State preset field be the server according to first predetermined encryption algorithm and the preset-key to the random string
It is encrypted;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the server.
Optionally, described according to the random string and the second predetermined encryption algorithm, it is encrypted with the server
Communication, comprising:
Obtain the initial data to be sent of user's input;
According to the random string and the second predetermined encryption algorithm, the initial data is encrypted, is encrypted
Data;
The encryption data is handled according to default checking algorithm, obtains the first check code;
The encryption data and first check code are sent to the server.
Optionally, described according to the random string and the second predetermined encryption algorithm, it is encrypted with the server
Communication, comprising:
Receive the encryption data and the second check code that the server is sent;
The encryption data is handled according to default checking algorithm, and judges processing result and second check code
It is whether identical;
If processing result is identical as second check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the server is sent;
If processing result and second check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
Second aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of communication means, the method applications
Server in instantaneous communication system, the instantaneous communication system further include terminal, which comprises
When receiving the connection request message that the terminal is sent, random string is obtained;
According to the first predetermined encryption algorithm and preset-key, the random string is encrypted;
The connection response message for carrying encrypted random string is sent to the terminal;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the terminal.
Optionally, described according to the random string and the second predetermined encryption algorithm, it is logical that encryption is carried out with the terminal
Letter, comprising:
It according to the random string and the second predetermined encryption algorithm, is encrypted, is obtained to sent initial data
Encryption data;
The encryption data is handled according to default checking algorithm, obtains the second check code;
The encryption data and second check code are sent to the terminal.
Optionally, described according to the random string and the second predetermined encryption algorithm, it is logical that encryption is carried out with the terminal
Letter, comprising:
Receive the encryption data and the first check code that the terminal is sent;
The encryption data is handled according to default checking algorithm, and judges processing result and first check code
It is whether identical;
If processing result is identical as first check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the terminal is sent;
If processing result and first check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
The third aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of communication device, described device applications
Terminal in instantaneous communication system, the instantaneous communication system further include server, and described device includes:
Sending module, for sending connection request message to the server;
Deciphering module, for when receiving the connection response message that the server is sent, according to the first predetermined encryption
The corresponding decipherment algorithm of algorithm and preset-key, are decrypted the preset field in the connection response message, obtain random
Character string, wherein the preset field is the server according to first predetermined encryption algorithm and the preset-key pair
What the random string was encrypted;
Communication module, for being added with the server according to the random string and the second predetermined encryption algorithm
Close communication.
Optionally, the communication module, specifically for obtaining the initial data to be sent of user's input;
According to the random string and the second predetermined encryption algorithm, the initial data is encrypted, is encrypted
Data;
The encryption data is handled according to default checking algorithm, obtains the first check code;
The encryption data and first check code are sent to the server.
Optionally, the communication module, specifically for receiving the encryption data and the second check code that the server is sent;
The encryption data is handled according to default checking algorithm, and judges processing result and second check code
It is whether identical;
If processing result is identical as second check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the server is sent;
If processing result and second check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
Fourth aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of communication device, described device applications
Server in instantaneous communication system, the instantaneous communication system further include terminal, and described device includes:
Module is obtained, for obtaining random string when receiving the connection request message that the terminal is sent;
Encrypting module, for being encrypted to the random string according to the first predetermined encryption algorithm and preset-key;
Sending module, for sending the connection response message for carrying encrypted random string to the terminal;
Communication module, for being encrypted with the terminal according to the random string and the second predetermined encryption algorithm
Communication.
Optionally, the communication module is specifically used for being treated according to the random string and the second predetermined encryption algorithm
The initial data of transmission is encrypted, and encryption data is obtained;
The encryption data is handled according to default checking algorithm, obtains the second check code;
The encryption data and second check code are sent to the terminal.
Optionally, the communication module, specifically for receiving the encryption data and the first check code that the terminal is sent;
The encryption data is handled according to default checking algorithm, and judges processing result and first check code
It is whether identical;
If processing result is identical as first check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the terminal is sent;
If processing result and first check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
In the another aspect that the present invention is implemented, in order to achieve the above object, the embodiment of the invention also discloses a kind of electronics
Equipment, above-mentioned electronic equipment include:
Memory, for storing computer program;
Processor when for executing the program stored on the memory, is realized logical as described in above-mentioned first aspect
Letter method.
In the another aspect that the present invention is implemented, in order to achieve the above object, the embodiment of the invention also discloses a kind of electronics
Equipment, above-mentioned electronic equipment include:
Memory, for storing computer program;
Processor when for executing the program stored on the memory, is realized logical as described in above-mentioned second aspect
Letter method.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is above-mentioned computer-readable
It is stored with instruction in storage medium, when run on a computer, realizes the communication means as described in above-mentioned first aspect.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is above-mentioned computer-readable
It is stored with instruction in storage medium, when run on a computer, realizes the communication means as described in above-mentioned second aspect.
At the another aspect that the present invention is implemented, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced
Product, when run on a computer, so that computer executes communication means described in above-mentioned first aspect.
At the another aspect that the present invention is implemented, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced
Product, when run on a computer, so that computer executes communication means described in above-mentioned second aspect.
The embodiment of the invention provides a kind of communication means and devices, when the connection request message for receiving terminal transmission
When, the available random string of server, and according to the first predetermined encryption algorithm and preset-key, random string is carried out
Encryption sends the connection response message for carrying encrypted random string to terminal, sends when terminal receives server
Connection response message when, terminal can be according to the corresponding decipherment algorithm of the first predetermined encryption algorithm and preset-key, to connection
Preset field in response message is decrypted, and obtains random string, and then, terminal and server can be according to random character
String and the second predetermined encryption algorithm carry out coded communication.Based on above-mentioned processing, server and terminal are when establishing connection every time, all
Available random string, the key that random string is communicated as this, that is, after establishing connection every time, server
The key that communication uses is carried out with terminal to be different from, and is carried out coded communication using fixed key compared with the existing technology, is mentioned
The high safety of communication, in addition, server and terminal can also add random string when transmitting random string
It is close, a possibility that random string is cracked is reduced, to further increase the safety of communication.
Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach all the above excellent
Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of frame diagram of networking provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of communication means provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart of communication means provided in an embodiment of the present invention;
Fig. 4 is a kind of structure chart of communication device provided in an embodiment of the present invention;
Fig. 5 is a kind of structure chart of communication device provided in an embodiment of the present invention;
Fig. 6 is a kind of exemplary flow chart of communication means provided in an embodiment of the present invention;
Fig. 7 is a kind of exemplary flow chart of communication means provided in an embodiment of the present invention;
Fig. 8 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 9 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The present invention provides a kind of communication means and device, the terminal and service in instantaneous communication system can be applied to
Device.
Referring to Fig. 1, Fig. 1 is a kind of frame diagram of networking provided in an embodiment of the present invention, is a kind of possible application scenarios.
The networking includes: terminal 1, terminal 2 and server.By taking terminal 1 as an example, when being communicated with server, terminal 1 can be to clothes
Business device sends connection request message.When server receives connection request message, the available random string of server, root
According to the first predetermined encryption algorithm and preset-key, random string is encrypted, and to terminal 1 transmission carry it is encrypted
The connection response message of random string.Terminal 1 can according to the corresponding decipherment algorithm of the first predetermined encryption algorithm and preset it is close
Key is decrypted the preset field in connection response message, obtains random string.Terminal 1 can be established with server to be connected
It connects, in turn, terminal 1 and server can carry out coded communication according to the second predetermined encryption algorithm and random string.2 He of terminal
The interactive process of server, it is similar with the interactive process of terminal 1 and server, it repeats no more.
As it can be seen that server and terminal can obtain random character when establishing connection every time in instantaneous communication system
String, the key that random string is communicated as this, that is, server and terminal carry out communication and make after establishing connection every time
Key is different from, and is carried out coded communication using fixed key compared with the existing technology, is improved the safety of communication,
In addition, server and terminal can also encrypt random string when transmitting random string, reduce random character
A possibility that string is cracked, can further increase the safety of communication.
It is described in detail again by specific embodiment to the present invention below.
Referring to fig. 2, Fig. 2 is a kind of flow chart of communication means provided in an embodiment of the present invention, and this method can be applied to
Terminal in instantaneous communication system, the instantaneous communication system can also include server, and this method may comprise steps of:
S201: connection request message is sent to server.
Wherein, terminal can be the corresponding application program of the server, alternatively, terminal is also possible to be equipped with the server
The electronic equipment of corresponding application program.For example, server can be the corresponding server of instant messaging application program, accordingly
, terminal can be then the instant messaging application program, alternatively, terminal may be to be equipped with the instant messaging application program
Electronic equipment.
In inventive embodiments, terminal can send connection request message to server, to establish connection with server.?
After being successfully established connection with server, terminal can carry out coded communication with server.It can be carried in connection request message
The mark of the mark of terminal, terminal can be the user account of the login terminal.
S202: when receiving the connection response message of server transmission, according to the corresponding solution of the first predetermined encryption algorithm
Close algorithm and preset-key are decrypted the preset field in connection response message, obtain random string.
Wherein, preset field can for server according to the first predetermined encryption algorithm and preset-key to random string into
Row encryption obtains.First predetermined encryption algorithm and preset-key can be rule of thumb configured by technical staff.For example, the
One predetermined encryption algorithm can be RSA (Ron Rivest, Adi Shamir, Leonard Adleman, Peter Lonard Li Weisi
Spy, A Di Shamir, Leonard A Deman) Encryption Algorithm such as algorithm, Blowfish (Bruce Shi Naier) algorithm, in advance
If key can be the user account of registration terminal, or, to be also possible to terminal and server both ends unified preset for preset-key
Other keys.
In inventive embodiments, after server receives the connection request message of terminal transmission, server is available
Random string, then, server can add random string according to the first predetermined encryption algorithm and preset-key
It is close, and the connection response message for carrying encrypted random string is sent to terminal, to establish connection with the terminal.Service
The method that device sends connection response message will be discussed in detail in subsequent embodiment.Correspondingly, terminal then can receive service
The connection response message that device is sent, and according to the corresponding decipherment algorithm of the first predetermined encryption algorithm and preset-key, connection is rung
It answers the preset field in message to be decrypted, obtains random string, to carry out subsequent processing.
S203: according to random string and the second predetermined encryption algorithm, coded communication is carried out with server.
Wherein, the second predetermined encryption algorithm can for Advanced Encryption Standard (Advanced Encryption Standard,
AES) algorithm, Reeves spy algorithm 4 (Rivest Cipher 4, RC4) or other Encryption Algorithm in the prior art, this implementation
Example is without limitation.The second predetermined encryption algorithm that terminal uses can be rule of thumb arranged by technical staff, and be stored in terminal.
It should be noted that the second predetermined encryption algorithm that terminal uses, used when encrypting with server to business datum
Encryption Algorithm is identical.
In inventive embodiments, terminal can according to the obtained random string of decryption and the second predetermined encryption algorithm, with
Server carries out coded communication.
As it can be seen that every time establish connection when, server can obtain random string, and be sent to terminal, terminal and
The key that server can communicate random string as this, that is, server and terminal carry out after establishing connection every time
It communicates the key used to be different from, carries out coded communication using fixed key compared with the existing technology, improve communication
Safety, in addition, server and terminal can also encrypt random string when transmitting random string, reduce
A possibility that random string is cracked can further increase the safety of communication.
Optionally, the first predetermined encryption algorithm can be RSA Algorithm.
Wherein, the degree of safety encrypted according to RSA Algorithm to data is higher.
In inventive embodiments, server can be encrypted random string according to RSA Algorithm and preset-key,
And the connection response message for carrying encrypted random string is sent to terminal.Correspondingly, terminal can then be calculated according to RSA
The corresponding decipherment algorithm of method and preset-key, are decrypted the preset field in connection response message, obtain random string.
Since the degree of safety of RSA Algorithm is higher, random string is encrypted according to RSA Algorithm, can reduce random
A possibility that character string is cracked further increases the safety of communication.
Optionally, the second predetermined encryption algorithm can be triple DES (Triple Data Encry ption
Standard, TDES) algorithm.
Wherein, TDES algorithm has many advantages, such as that enciphering rate is fast, and encryption data occupancy memory space is small.
In inventive embodiments, due to needing to transmit a large amount of business number in instantaneous communication system between terminal and server
According to therefore, terminal can carry out coded communication with server, and then can be improved logical according to random string and TDES algorithm
The efficiency of letter, and can reduce memory space shared by the data of transmission.
Optionally, terminal can carry out coded communication by following two mode and server.
Mode one, terminal can be generated check code and are sent to server when sending business datum to server, so that
Server can verify the integrality of business datum, and then improve the safety of communication, specifically, may comprise steps of:
Step 1 obtains the initial data to be sent of user's input.
Step 2 encrypts initial data according to random string and the second predetermined encryption algorithm, obtains encryption number
According to.
Step 3 is handled encryption data according to default checking algorithm, obtains the first check code.
Encryption data and the first check code are sent to server by step 4.
In inventive embodiments, user can input initial data to be sent to terminal by the input part of terminal
(being properly termed as the first initial data).Available first initial data of terminal, and add according to random string and second are default
Close algorithm encrypts the first initial data, obtains encryption data (being properly termed as the first encryption data).Then, terminal can be with
Encryption data is handled according to default checking algorithm, obtains corresponding check code (i.e. the first check code), and first is added
Ciphertext data and the first check code are sent to server.
Wherein, default checking algorithm can be calculated for even-odd check (Parity Check) algorithm, verification and (Check Sum)
Method, CRC (Cyclic Redundancy Check, cyclic redundancy check) algorithm or other checking algorithms, the first check code are used for
Verify integrality of first encryption data in transmission process.
For example, terminal can encrypt the first initial data, obtain first according to TDES algorithm and random string
Encryption data, then, terminal can be handled the first encryption data according to CRC algorithm, obtain the first check code, and by
One encryption data and the first check code are sent to server.
Mode two, terminal can also verify the business datum received when receiving the business datum of server transmission
Integrality, with improve communication safety, specifically, may comprise steps of:
Step 1 receives encryption data and the second check code that server is sent.
Step 2 is handled encryption data according to default checking algorithm, and judges processing result and the second check code
It is whether identical.
Step 3, if processing result is identical as the second check code, according to random string and the second predetermined encryption algorithm
Corresponding decipherment algorithm, is decrypted encryption data, obtains the initial data of server transmission.
Step 4 abandons encryption data if processing result and the second check code be not identical.
In inventive embodiments, server can be according to the second predetermined encryption algorithm and random string, to needing to send
Initial data (being properly termed as the second initial data) to terminal is encrypted, and is obtained encryption data and (is properly termed as the second encryption
Data), the second encryption data can also be handled according to checking algorithm is preset, obtain corresponding check code (i.e. the second school
Test code), then, the second encryption data and the second check code can be sent to terminal by server.
Terminal can receive the second encryption data and the second check code of server transmission, and then, terminal can basis
Default checking algorithm handles the second encryption data, and judges whether processing result is identical as the second check code.Work as terminal
When determination processing result is identical as the second check code, terminal can be confirmed that the second encryption data is not repaired in transmission process
Change, terminal can be according to the corresponding decipherment algorithm of the second predetermined encryption algorithm and random string, second sent to server
Encryption data is decrypted, and obtains the second initial data.When terminal decision process result and the second check code be not identical, terminal
It can be confirmed that the second encryption data is modified in transmission process, terminal can directly abandon the second encryption data.
For example, server can encrypt the second initial data according to TDES algorithm and random string, is obtained
Two encryption datas handle the second encryption data according to CRC algorithm, obtain the second check code, and then, server can incite somebody to action
Second encryption data and the second check code are sent to terminal.Terminal can be handled the second encryption data according to CRC algorithm,
And judge whether processing result is identical as the second check code.When terminal decision process result is identical as the second check code, terminal
The second encryption data can be decrypted according to the corresponding decipherment algorithm of TDES algorithm and random string, obtain the second original
Beginning data.When terminal decision process result and the second check code be not identical, terminal can abandon the second encryption data.
Referring to Fig. 3, Fig. 3 is a kind of flow chart of communication means provided in an embodiment of the present invention, and this method can be applied to
Server in instantaneous communication system, the instantaneous communication system can also include terminal, and this method may comprise steps of:
S301: when receiving the connection request message of terminal transmission, random string is obtained.
Wherein, server is corresponding with the terminal, for example, server can be the corresponding service of instant messaging application program
Device, correspondingly, terminal can be then the instant messaging application program, alternatively, terminal may be to be equipped with the instant messaging to answer
With the electronic equipment of program.
In inventive embodiments, terminal can send connection request message to server, to establish connection, phase with server
It answers, server then can receive the connection request message of terminal transmission.Since server can be built with multiple terminals simultaneously
Vertical connection, therefore, server can receive the connection request message that multiple terminals are sent.The connection sent for different terminals
Request message, server can obtain different random strings respectively, corresponding as the terminal for sending the connection request message
Random string.
In addition, server can obtain random string since server is after receiving connection request message every time,
That is, for multiple connection request messages that same terminal is sent in different moments, server can also obtain different random words
Symbol string.
Specifically, server obtain random string mode can be it is diversified.For example, can match in server
It is equipped with the application program for generating random string.Server can pre-generate multiple random strings, when server connects
When receiving a certain connection request message, server can select a random string from multiple random strings of generation,
As random string corresponding with the terminal of the connection request message is sent.Alternatively, being asked when server receives a certain connection
When seeking message, server can call generate random string application program, generate a random string, as with transmission
The corresponding random string of the terminal of the connection request message.For the method that server obtains random string, the present embodiment
It is not defined.
In addition, can carry the mark of terminal in connection request message, the mark of terminal can be to log in the terminal
User account.For the connection request message that terminal is sent, after obtaining random string (can be described as the first random string),
Server can recorde the mark and the corresponding relationship of the first random string of terminal, and then can be according to the first random string
Coded communication is carried out with the terminal.If the disconnecting of the terminal and server, terminal needs to send to server again
Connection request message.When server receives the connection request message of terminal transmission again, server can obtain again
Different random strings (being properly termed as the second random string), then, server can recorde the mark and second of terminal
The corresponding relationship of random string, and then coded communication can be carried out according to the second random string and the terminal, and so on,
The connection request message that server can be sent according to same terminal in different moments, obtains different random strings, to mention
The safety of height communication.
S302: according to the first predetermined encryption algorithm and preset-key, random string is encrypted.
Wherein, the first predetermined encryption algorithm and preset-key can be rule of thumb configured by technical staff.For example, the
One predetermined encryption algorithm can be the Encryption Algorithm such as RSA Algorithm, Blowfish algorithm, and preset-key can be the use of registration terminal
Family account, or, preset-key may be in other unified preset keys of terminal and server both ends.
In inventive embodiments, after server obtains random string, server can be calculated according to the first predetermined encryption
Method and preset-key, encrypt random string, obtain encrypted random string.
For example, after obtaining random string, server can according to RSA Algorithm and preset-key to random string into
Row encryption, obtains encrypted random string.
S303: the connection response message for carrying encrypted random string is sent to terminal.
In inventive embodiments, server can send the connection response for carrying encrypted random string to terminal
Message, to establish connection with the terminal.Correspondingly, terminal then can receive the connection response message of server transmission, and root
According to the corresponding decipherment algorithm of the first predetermined encryption algorithm and preset-key, the preset field in connection response message is solved
It is close, obtain random string.
S304: according to random string and the second predetermined encryption algorithm, coded communication is carried out with terminal.
Wherein, predetermined encryption algorithm can be aes algorithm, RC4 or in the prior art other Encryption Algorithm, the present embodiment
Without limitation.The Encryption Algorithm that server uses can be rule of thumb arranged by technical staff, and be stored in server.It needs
The second predetermined encryption algorithm bright, that server uses uses identical add when encrypting with terminal to business datum
Close algorithm is identical.
In inventive embodiments, after sending connection response message to terminal, server can establish connection with terminal.So
Afterwards, server can carry out coded communication with terminal according to random string and the second predetermined encryption algorithm.
As it can be seen that carrying different random strings in the connection response message that server is sent to different terminals.In addition,
After server receives the connection request message that same terminal was sent in different moments, connection that server is sent to the terminal
Also different random strings is carried in response message, that is, server and terminal carry out communication and make after establishing connection every time
Key is different from, and is carried out coded communication using fixed key compared with the existing technology, is improved the safety of communication,
In addition, server and terminal can also encrypt random string when transmitting random string, reduce random character
A possibility that string is cracked, to further increase the safety of communication.
Optionally, the first predetermined encryption algorithm can be RSA Algorithm.
Wherein, the degree of safety encrypted according to RSA Algorithm to data is higher.
In inventive embodiments, server can be encrypted random string according to RSA Algorithm and preset-key,
And the connection response message for carrying encrypted random string is sent to terminal.Correspondingly, terminal can then be calculated according to RSA
The corresponding decipherment algorithm of method and preset-key, are decrypted the preset field in connection response message, obtain random string.
Since the degree of safety of RSA Algorithm is higher, random string is encrypted according to RSA Algorithm, can reduce random
A possibility that character string is cracked further increases the safety of communication.
Optionally, the second predetermined encryption algorithm can be TDES algorithm.
Wherein, TDES algorithm has many advantages, such as that enciphering rate is fast, and encryption data occupancy memory space is small.
In inventive embodiments, due to needing to transmit a large amount of business number in instantaneous communication system between server and terminal
According to therefore, server can carry out coded communication with terminal, and then can be improved logical according to random string and TDES algorithm
The efficiency of letter, and can reduce memory space shared by the data of transmission.
Server can carry out coded communication by following two mode and terminal.
Mode one, server can be generated check code and are sent to terminal when sending business datum to terminal, so that eventually
End can verify the integrality of business datum, and then improve the safety of communication, specifically, may comprise steps of:
Step 1 is encrypted according to random string and the second predetermined encryption algorithm to sent initial data, is obtained
To encryption data.
Step 2 is handled encryption data according to default checking algorithm, obtains the second check code.
Encryption data and the second check code are sent to terminal by step 3.
In inventive embodiments, the available initial data (i.e. the second initial data) for being sent to terminal of server,
And according to the second predetermined encryption algorithm and random string, the second initial data is encrypted, obtains encryption data (i.e. second
Encryption data), server can also be handled the second encryption data according to default checking algorithm, obtain check code (i.e.
Two check codes), then, the second encryption data and the second check code can be sent to terminal by server.
Wherein, default checking algorithm can for parity arithmetic, checksum algorithm, cyclic redundancy check algorithm or other
Checking algorithm, the second check code is for verifying integrality of second encryption data in transmission process.
For example, server can encrypt the second initial data according to TDES algorithm and random string, is obtained
Two encryption datas, then, server can be handled the second encryption data according to CRC algorithm, obtain the second check code, and
Second encryption data and the second check code are sent to terminal.
Mode two, server can also verify the business datum received when receiving the business datum of terminal transmission
Integrality, with improve communication safety, specifically, may comprise steps of:
Step 1 receives encryption data and the first check code that terminal is sent.
Step 2 is handled encryption data according to default checking algorithm, and judges processing result and the first check code
It is whether identical.
Step 3, if processing result is identical as the first check code, according to random string and the second predetermined encryption algorithm
Corresponding decipherment algorithm, is decrypted encryption data, obtains the initial data of terminal transmission.
Step 4 abandons encryption data if processing result and the first check code be not identical.
In inventive embodiments, terminal can be sent to needs according to the second predetermined encryption algorithm and random string
The initial data (i.e. the first initial data) of server is encrypted, and encryption data (i.e. the first encryption data) is obtained, can be with
The first encryption data is handled according to default checking algorithm, obtains check code (i.e. the first check code), then, terminal can be with
First encryption data and the first check code are sent to server.
Server can receive the first encryption data and the first check code of terminal transmission, and then, server can root
The first encryption data is handled according to default checking algorithm, and judges whether processing result is identical as the first check code.Work as clothes
When device determination processing result of being engaged in is identical as the first check code, server can be confirmed that the first encryption data is not sent out in transmission process
Raw modification, server can send terminal according to the corresponding decipherment algorithm of the second predetermined encryption algorithm and random string
First encryption data is decrypted, and obtains the first initial data.When server determination processing result and the first check code be not identical
When, server can be confirmed that the first encryption data is modified in transmission process, and server can directly abandon the first encryption
Data.
For example, terminal can encrypt the first initial data, obtain first according to TDES algorithm and random string
Encryption data handles the first encryption data according to CRC algorithm, obtains the first check code, and then, terminal can be by first
Encryption data and the first check code are sent to server.Server can be handled the first encryption data according to CRC algorithm,
And judge whether processing result is identical as the first check code.When server determination processing result is identical as the first check code, clothes
Business device can be decrypted the first encryption data according to the corresponding decipherment algorithm of TDES algorithm and random string, obtain the
One initial data.When server determination processing result and the first check code be not identical, server can abandon the first encryption number
According to.
Referring to fig. 4, Fig. 4 is a kind of exemplary flow chart of communication means provided in an embodiment of the present invention, and this method is applied to
Terminal and server in instantaneous communication system, this method may comprise steps of:
S401: terminal to server sends connection request message.
S402: server obtains the first random string, according to RSA Algorithm and preset-key, to the first random string
It is encrypted.
S403: server sends to terminal and carries the connection response message of encrypted first random string, with
Terminal establishes connection.
S404: terminal is encrypted according to the first random string and TDES algorithm to sent initial data, is obtained
Encryption data handles encryption data according to CRC algorithm, obtains the first check code.
S405: encryption data and the first check code are sent to server by terminal.
S406: server is handled encryption data according to CRC algorithm, determination processing result and the first check code phase
Together, according to random string and the corresponding decipherment algorithm of TDES algorithm, encryption data is decrypted, obtains the original of terminal transmission
Beginning data.
Referring to Fig. 5, Fig. 5 is a kind of exemplary flow chart of communication means provided in an embodiment of the present invention, and this method is applied to
Terminal and server in instantaneous communication system, this method may comprise steps of:
S501: terminal to server sends connection request message.
S502: server obtains the second random string, according to RSA Algorithm and preset-key, to the second random string
It is encrypted.
S503: server sends to terminal and carries the connection response message of encrypted second random string, with
Terminal establishes connection.
S504: server is encrypted according to the second random string and TDES algorithm to sent initial data, is obtained
To encryption data, encryption data is handled according to CRC algorithm, obtains the second check code.
S505: encryption data and the second check code are sent to terminal by server.
S506: terminal is handled encryption data according to CRC algorithm, and determination processing result is identical as the second check code,
According to random string and the corresponding decipherment algorithm of TDES algorithm, encryption data is decrypted, obtains the original of server transmission
Beginning data.
As seen from the above, server and terminal can obtain random string, by random words when establishing connection every time
Key of the symbol string as this communication, that is, server and terminal carry out communicating the key used not after establishing connection every time
It is identical, coded communication is carried out using fixed key compared with the existing technology, the safety of communication is improved, in addition, server
With terminal when transmitting random string, random string can also be encrypted, reduce what random string was cracked
Possibility, to further increase the safety of communication.
Corresponding with the embodiment of the method for Fig. 2, referring to Fig. 6, Fig. 6 is a kind of communication device provided in an embodiment of the present invention
Structure chart, described device are applied to the terminal in instantaneous communication system, and the instantaneous communication system further includes server, the dress
It sets and includes:
Sending module 601, for sending connection request message to the server;
Deciphering module 602, for presetting and adding according to first when receiving the connection response message that the server is sent
The corresponding decipherment algorithm of close algorithm and preset-key, are decrypted the preset field in the connection response message, obtain with
Machine character string, wherein the preset field is the server according to first predetermined encryption algorithm and the preset-key
The random string is encrypted;
Communication module 603, for being carried out with the server according to the random string and the second predetermined encryption algorithm
Coded communication.
Optionally, the communication module 603, specifically for obtaining the initial data to be sent of user's input;
According to the random string and the second predetermined encryption algorithm, the initial data is encrypted, is encrypted
Data;
The encryption data is handled according to default checking algorithm, obtains the first check code;
The encryption data and first check code are sent to the server.
Optionally, the communication module 603, specifically for receiving the encryption data and the second verification that the server is sent
Code;
The encryption data is handled according to default checking algorithm, and judges processing result and second check code
It is whether identical;
If processing result is identical as second check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the server is sent;
If processing result and second check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
Corresponding with the embodiment of the method for Fig. 3, referring to Fig. 7, Fig. 7 is a kind of communication device provided in an embodiment of the present invention
Structure chart, described device are applied to the server in instantaneous communication system, and the instantaneous communication system further includes terminal, the dress
It sets and includes:
Module 701 is obtained, for obtaining random string when receiving the connection request message that the terminal is sent;
Encrypting module 702, for adding to the random string according to the first predetermined encryption algorithm and preset-key
It is close;
Sending module 703, for sending the connection response message for carrying encrypted random string to the terminal;
Communication module 704, for being added with the terminal according to the random string and the second predetermined encryption algorithm
Close communication.
Optionally, the communication module 704 is specifically used for according to the random string and the second predetermined encryption algorithm,
It is encrypted to sent initial data, obtains encryption data;
The encryption data is handled according to default checking algorithm, obtains the second check code;
The encryption data and second check code are sent to the terminal.
Optionally, the communication module 704, specifically for receiving the encryption data and the first verification that the terminal is sent
Code;
The encryption data is handled according to default checking algorithm, and judges processing result and first check code
It is whether identical;
If processing result is identical as first check code, according to the random string and the second predetermined encryption algorithm
The encryption data is decrypted in corresponding decipherment algorithm, obtains the initial data that the terminal is sent;
If processing result and first check code be not identical, the encryption data is abandoned.
Optionally, first predetermined encryption algorithm is RSA Algorithm.
Optionally, second predetermined encryption algorithm is triple data encryption algorithm TDES.
Communication device based on the embodiment of the present invention, server and terminal can be obtained when establishing connection every time
To random string, the key that random string is communicated as this, that is, after establishing connection every time, server and terminal
It carries out the key that communication uses to be different from, carries out coded communication using fixed key compared with the existing technology, improve logical
The safety of letter, in addition, server and terminal can also encrypt random string when transmitting random string, drop
A possibility that low random string is cracked, to further increase the safety of communication.
Referring to Fig. 8, Fig. 8 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention, including memory 801 and place
Manage device 802, wherein
Memory 801, for storing computer program;
Processor 802 when for executing the program stored on memory 801, realizes following steps:
Connection request message is sent to the server;
When receiving the connection response message that the server is sent, according to the corresponding decryption of the first predetermined encryption algorithm
Algorithm and preset-key are decrypted the preset field in the connection response message, obtain random string, wherein institute
State preset field be the server according to first predetermined encryption algorithm and the preset-key to the random string
It is encrypted;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the server.
Specific implementation and relevant explanation content about each step of this method may refer to preceding method embodiment portion
Point, this will not be repeated here.
Referring to Fig. 9, Fig. 9 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention, including memory 901 and place
Manage device 902, wherein
Memory 901, for storing computer program;
Processor 902 when for executing the program stored on memory 901, realizes following steps:
When receiving the connection request message that the terminal is sent, random string is obtained;
According to the first predetermined encryption algorithm and preset-key, the random string is encrypted;
The connection response message for carrying encrypted random string is sent to the terminal;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the terminal.
Specific implementation and relevant explanation content about each step of this method may refer to preceding method embodiment portion
Point, this will not be repeated here.
Above-mentioned electronic equipment can have the communication interface realized and communicated between above-mentioned electronic equipment and other equipment.
Above-mentioned processor, communication interface, memory complete mutual communication by communication bus, mentioned here
Communication bus can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expansion
Open up industrial standard architectures (Extended Industry Standard Architecture, EISA) bus etc..The communication bus
Address bus, data/address bus, control bus etc. can be divided into.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, stored in the computer readable storage medium
There is instruction, when run on a computer, so that computer execution is provided in an embodiment of the present invention to be applied to instant messaging system
The communication means of terminal in system.
Specifically, the above-mentioned communication means applied to the terminal in instantaneous communication system, comprising:
Connection request message is sent to the server;
When receiving the connection response message that the server is sent, according to the corresponding decryption of the first predetermined encryption algorithm
Algorithm and preset-key are decrypted the preset field in the connection response message, obtain random string, wherein institute
State preset field be the server according to first predetermined encryption algorithm and the preset-key to the random string
It is encrypted;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the server.
It should be noted that other implementations of the above-mentioned communication means applied to the terminal in instantaneous communication system with
Preceding method embodiment part is identical, and which is not described herein again.
The embodiment of the invention also provides a kind of computer readable storage medium, stored in the computer readable storage medium
There is instruction, when run on a computer, so that computer execution is provided in an embodiment of the present invention to be applied to instant messaging system
The communication means of server in system.
Specifically, the above-mentioned communication means applied to the server in instantaneous communication system, comprising:
When receiving the connection request message that the terminal is sent, random string is obtained;
According to the first predetermined encryption algorithm and preset-key, the random string is encrypted;
The connection response message for carrying encrypted random string is sent to the terminal;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the terminal.
It should be noted that other implementations of the above-mentioned communication means applied to the server in instantaneous communication system
Identical as preceding method embodiment part, which is not described herein again.
The embodiment of the invention also provides a kind of computer program products comprising instruction, when it runs on computers
When, so that computer executes the communication means provided in an embodiment of the present invention applied to the terminal in instantaneous communication system.
Specifically, the above-mentioned communication means applied to the terminal in instantaneous communication system, comprising:
Connection request message is sent to the server;
When receiving the connection response message that the server is sent, according to the corresponding decryption of the first predetermined encryption algorithm
Algorithm and preset-key are decrypted the preset field in the connection response message, obtain random string, wherein institute
State preset field be the server according to first predetermined encryption algorithm and the preset-key to the random string
It is encrypted;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the server.
It should be noted that other implementations of the above-mentioned communication means applied to the terminal in instantaneous communication system with
Preceding method embodiment part is identical, and which is not described herein again.
The embodiment of the invention also provides a kind of computer program products comprising instruction, when it runs on computers
When, so that computer executes the communication means provided in an embodiment of the present invention applied to the server in instantaneous communication system.
Specifically, the above-mentioned communication means applied to the server in instantaneous communication system, comprising:
When receiving the connection request message that the terminal is sent, random string is obtained;
According to the first predetermined encryption algorithm and preset-key, the random string is encrypted;
The connection response message for carrying encrypted random string is sent to the terminal;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the terminal.
It should be noted that other implementations of the above-mentioned communication means applied to the server in instantaneous communication system
Identical as preceding method embodiment part, which is not described herein again.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.Above-mentioned computer program
Product includes one or more computer instructions.When loading on computers and executing above-mentioned computer program instructions, all or
Partly generate the process or function above-mentioned according to the embodiment of the present invention.Above-mentioned computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.Above-mentioned computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, above-mentioned computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.Above-mentioned computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.Above-mentioned usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For electronic equipment, computer readable storage medium, computer program product embodiments, implement since it is substantially similar to method
Example, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of communication means, which is characterized in that the method is applied to the terminal in instantaneous communication system, the instant messaging
System further includes server, which comprises
Connection request message is sent to the server;
When receiving the connection response message that the server is sent, according to the corresponding decipherment algorithm of the first predetermined encryption algorithm
And preset-key, the preset field in the connection response message is decrypted, random string is obtained, wherein is described pre-
If field is that the server carries out the random string according to first predetermined encryption algorithm and the preset-key
What encryption obtained;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the server.
2. the method according to claim 1, wherein described according to the random string and the second predetermined encryption
Algorithm carries out coded communication with the server, comprising:
Obtain the initial data to be sent of user's input;
According to the random string and the second predetermined encryption algorithm, the initial data is encrypted, encryption data is obtained;
The encryption data is handled according to default checking algorithm, obtains the first check code;
The encryption data and first check code are sent to the server.
3. the method according to claim 1, wherein described according to the random string and the second predetermined encryption
Algorithm carries out coded communication with the server, comprising:
Receive the encryption data and the second check code that the server is sent;
The encryption data is handled according to default checking algorithm, and judges whether are processing result and second check code
It is identical;
It is corresponding according to the random string and the second predetermined encryption algorithm if processing result is identical as second check code
Decipherment algorithm, the encryption data is decrypted, the initial data that the server is sent is obtained;
If processing result and second check code be not identical, the encryption data is abandoned.
4. method according to claim 1-3, which is characterized in that second predetermined encryption algorithm is three tuples
According to Encryption Algorithm TDES.
5. a kind of communication means, which is characterized in that the method is applied to the server in instantaneous communication system, the Instant Messenger
Letter system further includes terminal, which comprises
When receiving the connection request message that the terminal is sent, random string is obtained;
According to the first predetermined encryption algorithm and preset-key, the random string is encrypted;
The connection response message for carrying encrypted random string is sent to the terminal;
According to the random string and the second predetermined encryption algorithm, coded communication is carried out with the terminal.
6. according to the method described in claim 5, it is characterized in that, described according to the random string and the second predetermined encryption
Algorithm carries out coded communication with the terminal, comprising:
It according to the random string and the second predetermined encryption algorithm, is encrypted, is encrypted to sent initial data
Data;
The encryption data is handled according to default checking algorithm, obtains the second check code;
The encryption data and second check code are sent to the terminal.
7. according to the method described in claim 5, it is characterized in that, described according to the random string and the second predetermined encryption
Algorithm carries out coded communication with the terminal, comprising:
Receive the encryption data and the first check code that the terminal is sent;
The encryption data is handled according to default checking algorithm, and judges whether are processing result and first check code
It is identical;
It is corresponding according to the random string and the second predetermined encryption algorithm if processing result is identical as first check code
Decipherment algorithm, the encryption data is decrypted, the initial data that the terminal is sent is obtained;
If processing result and first check code be not identical, the encryption data is abandoned.
8. according to the described in any item methods of claim 5-7, which is characterized in that second predetermined encryption algorithm is three tuples
According to Encryption Algorithm TDES.
9. a kind of communication device, which is characterized in that described device is applied to the terminal in instantaneous communication system, the instant messaging
System further includes server, and described device includes:
Sending module, for sending connection request message to the server;
Deciphering module, for when receiving the connection response message that the server is sent, according to the first predetermined encryption algorithm
Corresponding decipherment algorithm and preset-key are decrypted the preset field in the connection response message, obtain random character
String, wherein the preset field is for the server according to first predetermined encryption algorithm and the preset-key to described
What random string was encrypted;
Communication module, for it is logical to carry out encryption with the server according to the random string and the second predetermined encryption algorithm
Letter.
10. a kind of communication device, which is characterized in that described device is applied to the server in instantaneous communication system, described instant
Communication system further includes terminal, and described device includes:
Module is obtained, for obtaining random string when receiving the connection request message that the terminal is sent;
Close module, for being encrypted to the random string according to the first predetermined encryption algorithm and preset-key;
Sending module, for sending the connection response message for carrying encrypted random string to the terminal;
Communication module, for carrying out coded communication with the terminal according to the random string and the second predetermined encryption algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811478898.8A CN110048994A (en) | 2018-12-05 | 2018-12-05 | A kind of communication means and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811478898.8A CN110048994A (en) | 2018-12-05 | 2018-12-05 | A kind of communication means and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110048994A true CN110048994A (en) | 2019-07-23 |
Family
ID=67273269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811478898.8A Pending CN110048994A (en) | 2018-12-05 | 2018-12-05 | A kind of communication means and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110048994A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671740A (en) * | 2020-12-17 | 2021-04-16 | 平安普惠企业管理有限公司 | HPPT message transmission method and related device |
CN112953902A (en) * | 2021-01-26 | 2021-06-11 | 湖南北斗微芯数据科技有限公司 | Industrial Internet of things data encryption communication system and method |
CN113746642A (en) * | 2021-11-08 | 2021-12-03 | 西安热工研究院有限公司 | Method and system for communication between computers |
CN117728958A (en) * | 2024-02-05 | 2024-03-19 | 浙江大华技术股份有限公司 | Communication method, device and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056171A (en) * | 2006-06-20 | 2007-10-17 | 华为技术有限公司 | An encryption communication method and device |
CN102118392A (en) * | 2011-01-18 | 2011-07-06 | 南京朗睿软件科技有限公司 | Encryption/decryption method and system for data transmission |
CN102387152A (en) * | 2011-11-03 | 2012-03-21 | 北京锐安科技有限公司 | Preset-key-based symmetric encryption communication method |
CN102833253A (en) * | 2012-08-29 | 2012-12-19 | 五八同城信息技术有限公司 | Method and server for establishing safe connection between client and server |
US20180205541A1 (en) * | 2014-07-25 | 2018-07-19 | Cheng-Han KO | Multiple encrypting method and system for encrypting a file and/or a protocol |
CN108347419A (en) * | 2017-01-24 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
-
2018
- 2018-12-05 CN CN201811478898.8A patent/CN110048994A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056171A (en) * | 2006-06-20 | 2007-10-17 | 华为技术有限公司 | An encryption communication method and device |
CN102118392A (en) * | 2011-01-18 | 2011-07-06 | 南京朗睿软件科技有限公司 | Encryption/decryption method and system for data transmission |
CN102387152A (en) * | 2011-11-03 | 2012-03-21 | 北京锐安科技有限公司 | Preset-key-based symmetric encryption communication method |
CN102833253A (en) * | 2012-08-29 | 2012-12-19 | 五八同城信息技术有限公司 | Method and server for establishing safe connection between client and server |
US20180205541A1 (en) * | 2014-07-25 | 2018-07-19 | Cheng-Han KO | Multiple encrypting method and system for encrypting a file and/or a protocol |
CN108347419A (en) * | 2017-01-24 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671740A (en) * | 2020-12-17 | 2021-04-16 | 平安普惠企业管理有限公司 | HPPT message transmission method and related device |
CN112953902A (en) * | 2021-01-26 | 2021-06-11 | 湖南北斗微芯数据科技有限公司 | Industrial Internet of things data encryption communication system and method |
CN113746642A (en) * | 2021-11-08 | 2021-12-03 | 西安热工研究院有限公司 | Method and system for communication between computers |
CN113746642B (en) * | 2021-11-08 | 2022-02-11 | 西安热工研究院有限公司 | Method and system for communication between computers |
CN117728958A (en) * | 2024-02-05 | 2024-03-19 | 浙江大华技术股份有限公司 | Communication method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8989385B2 (en) | Data encryption method, data verification method and electronic apparatus | |
CN110048994A (en) | A kind of communication means and device | |
CN110460439A (en) | Information transferring method, device, client, server-side and storage medium | |
CN109672539A (en) | SM2 algorithm collaboration signature and decryption method, apparatus and system | |
US11374975B2 (en) | TLS integration of post quantum cryptographic algorithms | |
CN109688098B (en) | Method, device and equipment for secure communication of data and computer readable storage medium | |
CN106576043A (en) | Virally distributable trusted messaging | |
US20230096233A1 (en) | Chosen-plaintext secure cryptosystem and authentication | |
US9515989B1 (en) | Methods and apparatus for silent alarm channels using one-time passcode authentication tokens | |
CN114143117B (en) | Data processing method and device | |
CN112564887A (en) | Key protection processing method, device, equipment and storage medium | |
CN109818752A (en) | Credit scoring generation method, device, computer equipment and storage medium | |
CN102227106B (en) | Method and system for intelligent secret key equipment to communicate with computer | |
CN113630412B (en) | Resource downloading method, resource downloading device, electronic equipment and storage medium | |
CN109219950A (en) | For the method in safety-related exchanged between equipment message | |
CN116488919B (en) | Data processing method, communication node and storage medium | |
CN102694652B (en) | A kind of method using symmetric cryptographic algorithm to realize light-weight authentication encryption | |
CN106453069A (en) | Instant communication message sending, viewing and viewing control method and device thereof | |
CN107343001B (en) | Data processing method and device | |
CN114826728B (en) | Equipment authentication method, internet of things terminal equipment, electronic equipment and storage medium | |
WO2019207001A1 (en) | Method for generating on-board a cryptographic key using a physically unclonable function | |
CN113922976A (en) | Equipment log transmission method and device, electronic equipment and storage medium | |
JP2009111594A (en) | Authentication system using short sequence | |
Maddipati | Implementation of Captcha as Graphical Passwords For Multi Security | |
CN113411347B (en) | Transaction message processing method and processing device |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210527 Address after: 25, 5th floor, shuangjingfang office building, 3 frisha street, Singapore Applicant after: Zhuomi Private Ltd. Address before: Room 1101, Santai Commercial Building, 139 Connaught Road, Hong Kong, China Applicant before: HONG KONG LIVE.ME Corp.,Ltd. |
|
TA01 | Transfer of patent application right | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190723 |
|
RJ01 | Rejection of invention patent application after publication |