CN108718302A - A kind of synchronous method of Message Record, device and equipment - Google Patents
A kind of synchronous method of Message Record, device and equipment Download PDFInfo
- Publication number
- CN108718302A CN108718302A CN201810438823.0A CN201810438823A CN108718302A CN 108718302 A CN108718302 A CN 108718302A CN 201810438823 A CN201810438823 A CN 201810438823A CN 108718302 A CN108718302 A CN 108718302A
- Authority
- CN
- China
- Prior art keywords
- message record
- ciphertext
- terminal
- key
- target
- 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
Classifications
-
- 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
- H04L63/0435—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 wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/216—Handling conversation history, e.g. grouping of messages in sessions or threads
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
-
- 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/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
- Telephonic Communication Services (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the present application discloses a kind of synchronous method of Message Record, including:Obtain target message record, using the encryption key negotiated in advance with second terminal, target message record is encrypted in conjunction with symmetric encipherment algorithm, obtain Message Record ciphertext, then Message Record ciphertext is sent to sync server, sync server can store Message Record ciphertext, and generate corresponding key assignments item, second terminal can download message records ciphertext from sync server according to key assignments item, then the key by negotiating in advance, Message Record ciphertext is decrypted in conjunction with the algorithm for inversion of symmetric encipherment algorithm, obtain target message record, to realize the synchronization of target message record.Target message record is transmitted with ciphertext, and encryption key only communicating pair knows, has ensured the safety and reliability that Message Record synchronizes.Disclosed herein as well is a kind of synchronizing device of Message Record, equipment and Related products.
Description
Technical field
This application involves computer communication technology field more particularly to a kind of synchronous method of Message Record, device, equipment
And computer readable storage medium.
Background technology
With the development of computer communication technology, user can be interacted by intelligent terminal.In interactive process
In, Message Record can be generated.Message Record may include the different types of data such as word, picture, voice, video.However,
In some cases, user needs to browse Message Record using other intelligent terminals, for example, present terminal equipment is intelligent hand
Machine can not browse the file of a certain type in Message Record, need on personal computer (Personal Computer, PC)
This document is browsed, then Message Record can be synchronized on PC, so that user checks.
How Message Record is synchronized to terminal device, and the security risk for avoiding Message Record leakage from bringing becomes one
The technical issues of a urgent need to resolve.
Invention content
The embodiment of the present application provides a kind of synchronous method of Message Record, device and relevant device so that message is remembered
Record is transmitted with ciphertext form, and only communicating pair knows encryption key, it is ensured that Message Record synchronous safety improves
User experience.
In view of this, the application first aspect provides a kind of synchronous method of Message Record, the method includes:
Obtain target message record;
Using the encryption key negotiated in advance with second terminal, target message record is added in conjunction with symmetric encipherment algorithm
It is close, obtain Message Record ciphertext;
The Message Record ciphertext is sent to sync server, so that the sync server preservation Message Record is close
Text, and generate corresponding with Message Record ciphertext key assignments item, the second terminal is according to the key assignments item from the synchronization
The Message Record ciphertext is downloaded in server, and according to the algorithm for inversion of the encryption key combination symmetric encipherment algorithm of negotiation to institute
It states Message Record ciphertext to be decrypted, obtains the target message record.
Optionally, the encryption key obtains in the following way:
The first random number and the first public key are sent to second terminal;
Receive the second random number and the second public key that second terminal returns;
According to first public key and second public key, shared key is calculated using cipher key agreement algorithm;
According to first random number, second random number and the shared key, using key exported algorithm meter
Calculation obtains encryption key.
Optionally, target message record include target complex Message Record or in the Message Record of target user extremely
It is one few.
Optionally, the method further includes:
Target message record is compressed, compressed message record is obtained;
It is then described using the encryption key negotiated in advance with second terminal, target message is recorded in conjunction with symmetric encipherment algorithm
It is encrypted, obtaining Message Record ciphertext includes:
Using the encryption key negotiated in advance with second terminal, compressed message record is added in conjunction with symmetric encipherment algorithm
It is close, obtain Message Record ciphertext.
The application second aspect provides a kind of synchronizing device of Message Record, and described device includes:
Acquisition module obtains target message record for the Message Record according to first terminal;
Encrypting module, for using the encryption key negotiated in advance with second terminal, in conjunction with symmetric encipherment algorithm to target
Message Record is encrypted, and obtains Message Record ciphertext;
Sending module, for sending the Message Record ciphertext to sync server, so that the sync server preserves
The Message Record ciphertext, and key assignments item corresponding with the Message Record ciphertext is generated, the second terminal is according to the key
Value item downloads the Message Record ciphertext from the sync server, and is calculated according to the encryption key combination symmetric cryptography of negotiation
The Message Record ciphertext is decrypted in the algorithm for inversion of method, obtains the target message record.
Optionally, described device further includes receiving module and computing module:
The sending module is additionally operable to send the first random number and the first public key to second terminal;
The receiving module, the second random number and the second public key for receiving second terminal return;
The computing module, for according to first public key and second public key, being calculated using cipher key agreement algorithm
Obtain shared key;According to first random number, second random number and the shared key, is exported and calculated using key
Encryption key is calculated in method.
Optionally, target message record include target complex Message Record or in the Message Record of target user extremely
It is one few.
Optionally, described device further includes:
Compression module obtains compressed message record for being compressed to target message record;
Then the encrypting module is specifically used for:
Using the encryption key negotiated in advance with second terminal, compressed message record is added in conjunction with symmetric encipherment algorithm
It is close, obtain Message Record ciphertext.
The application third aspect provides a kind of synchronizer of Message Record, and the equipment includes processor and storage
Device:
Said program code is transferred to the processor by the memory for storing program code;
The processor is used to be remembered according to the message that instruction execution the application first aspect in said program code provides
The synchronous method of record.
The application fourth aspect provides a kind of synchronous method of Message Record, the method includes:
Receive the key assignments item that the sync server is sent;The key assignments item includes the store path of Message Record ciphertext;
Download link corresponding with the Message Record ciphertext is generated according to the key assignments item;
The Message Record ciphertext is downloaded from server according to the download link;The Message Record ciphertext is to utilize
The encryption key negotiated in advance records target message and encrypts to obtain using symmetric encipherment algorithm;
According to the encryption key, the Message Record ciphertext is decrypted using the algorithm for inversion of symmetric encipherment algorithm,
Obtain the target message record.
Optionally, when the Message Record ciphertext be to target message record compress, then to compressed data into
When row encryption obtains;
Described that the Message Record ciphertext is decrypted, obtaining the target message record includes:
The Message Record is decrypted, compressed message record is obtained;
Compressed message record is unziped it, target message record is obtained.
Optionally, the key assignments item further includes check value;
Then generating download link corresponding with the Message Record ciphertext according to the key assignments item includes:
According to the store path of the Message Record ciphertext and the check value generate with the Message Record ciphertext pair
The download link answered.
Optionally, the method further includes:
The download link, the encryption key and the symmetric encipherment algorithm are sent to third terminal;
So that the third terminal downloads the Message Record ciphertext according to the download link, and it is close using the encryption
Key is decrypted the Message Record ciphertext in conjunction with the algorithm for inversion of the Encryption Algorithm, obtains the target message record.
The 5th aspect of the application provides a kind of synchronizing device of Message Record, and described device includes:
Receiving module, the key assignments item sent for receiving the sync server;The key assignments item includes that Message Record is close
The store path of text;
Generation module, for generating download link corresponding with the Message Record ciphertext according to the key assignments item;
Download module, for downloading the Message Record ciphertext from server according to the download link;The message
Record ciphertext is to be recorded to target message using the encryption key negotiated in advance and encrypt to obtain using symmetric encipherment algorithm;
Deciphering module is used for according to the encryption key, using the algorithm for inversion of symmetric encipherment algorithm to the Message Record
Ciphertext is decrypted, and obtains the target message record.
Optionally, the deciphering module is specifically used for:
When the Message Record ciphertext is to be compressed to target message record, then compressed data are encrypted
Then, the Message Record is decrypted, obtains compressed message record, compressed message record is unziped it, is obtained
It is recorded to target message.
Optionally, the key assignments item further includes check value;
Then the generation module is specifically used for:
According to the store path of the Message Record ciphertext and the check value generate with the Message Record ciphertext pair
The download link answered.
Optionally, described device further includes:
Sending module, for the download link, the encryption key and the symmetric encipherment algorithm to be sent to third
Terminal;So that the third terminal downloads the Message Record ciphertext according to the download link, and the encryption key is utilized,
The Message Record ciphertext is decrypted in conjunction with the algorithm for inversion of the Encryption Algorithm, obtains the target message record.
As can be seen from the above technical solutions, the embodiment of the present application has the following advantages:
In the embodiment of the present application, a kind of synchronous method of Message Record is provided, this method includes obtaining target message note
Record is encrypted target message record in conjunction with symmetric encipherment algorithm, is obtained using the encryption key negotiated in advance with second terminal
To Message Record ciphertext, Message Record ciphertext is then sent to sync server, sync server can be close to Message Record
Text is stored, and generates corresponding key assignments item, and second terminal, which can be downloaded according to key assignments item from sync server, to disappear
Breath record ciphertext carries out Message Record ciphertext in conjunction with the algorithm for inversion of symmetric encipherment algorithm then by the key negotiated in advance
Decryption obtains target message record, to realize the synchronization of target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to target message recording of encrypted
Used encryption key is that receiving-transmitting sides are negotiated to obtain, and it is close can not to get the encryption for sync server or illegal molecule
Key, thus the plaintext of target message record can not be got, it is ensured that target message record will not be revealed in transmission process, be protected
The safety and reliability of Message Record synchronization is hindered.
Description of the drawings
Fig. 1 is a kind of application scenarios schematic diagram of the synchronous method of Message Record in the embodiment of the present application;
Fig. 2 is a kind of flow chart of the synchronous method of Message Record in the embodiment of the present application;
Fig. 3 is a kind of flow chart of method that negotiating encryption key in the embodiment of the present application;
Fig. 4 is a kind of flow chart of the synchronous method of Message Record in the embodiment of the present application;
Fig. 5 is an a kind of structural schematic diagram of the synchronizing device of Message Record in the embodiment of the present application;
Fig. 6 is a kind of another structural schematic diagram of the synchronizing device of Message Record in the embodiment of the present application;
Fig. 7 is a kind of another structural schematic diagram of the synchronizing device of Message Record in the embodiment of the present application;
Fig. 8 is an a kind of structural schematic diagram of the synchronizing device of Message Record in the embodiment of the present application;
Fig. 9 is a kind of another structural schematic diagram of the synchronizing device of Message Record in the embodiment of the present application;
Figure 10 is an a kind of structural schematic diagram of terminal in the embodiment of the present application;
Figure 11 is an a kind of structural schematic diagram of terminal in the embodiment of the present application.
Specific implementation mode
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only this
Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist
The every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
Term " first ", " second ", " third " in the description and claims of this application and above-mentioned attached drawing, "
The (if present)s such as four " are for distinguishing similar object, without being used to describe specific sequence or precedence.It should manage
The data that solution uses in this way can be interchanged in the appropriate case, so that embodiments herein described herein for example can be to remove
Sequence other than those of illustrating or describe herein is implemented.In addition, term " comprising " and " having " and theirs is any
Deformation, it is intended that cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, production
Product or equipment those of are not necessarily limited to clearly to list step or unit, but may include not listing clearly or for this
The intrinsic other steps of processes, method, product or equipment or unit a bit.
This technical problem is synchronized for Message Record, the prior art provides some synchronous method, is used for an intelligence
Chat record on energy terminal device is synchronized on another intelligent terminal.With wechat this application as an example, user
The chat record on mobile phone can be synchronized on PC by server, specifically, after opening synchronizing function, is located at mobile phone
Wechat client can obtain Message Record, and the Message Record is sent to server, in this way, the wechat client on PC can
The corresponding Message Record of wechat account is obtained from server with request, to realize Message Record by mobile phone to the same of PC
Step.However, in this synchronizing process, chat record is easy to be stolen, and then generates security risk.
In view of this, the embodiment of the present application provides a kind of synchronous method of Message Record, including obtain target message note
Record is encrypted target message record in conjunction with symmetric encipherment algorithm, is obtained using the encryption key negotiated in advance with second terminal
To Message Record ciphertext, Message Record ciphertext is then sent to sync server, sync server can be close to Message Record
Text is stored, and generates corresponding key assignments item, and second terminal, which can be downloaded according to key assignments item from sync server, to disappear
Breath record ciphertext carries out Message Record ciphertext in conjunction with the algorithm for inversion of symmetric encipherment algorithm then by the key negotiated in advance
Decryption obtains target message record, to realize the synchronization of target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to target message recording of encrypted
Used encryption key is that receiving-transmitting sides are negotiated to obtain, and it is close can not to get the encryption for sync server or illegal molecule
Key, thus the plaintext of target message record can not be got, it is ensured that target message record will not be revealed in transmission process, be protected
The safety and reliability of Message Record synchronization is hindered.
For the ease of understanding the technical solution of the application, the embodiment of the present application is provided below in conjunction with concrete application scene
The synchronous method of Message Record be introduced.
Fig. 1 show the application scenarios schematic diagram of the synchronous method of Message Record provided by the embodiments of the present application, such as Fig. 1 institutes
Show, in the application scenarios, including first terminal 110, second terminal 120 and sync server 130, wherein first terminal 110
It is the user equipment for referring to interact with server with second terminal 110, including but not limited to:It is existing, researching and developing or
It is the smart mobile phone, tablet computer of research and development in the future, laptop PC, desktop personal computer, minicomputer, medium-sized
Computer, mainframe computer etc..Sync server 130 is a kind of server for being synchronized to Message Record, is needed
Bright, sync server 130 can be exclusively used in the server of Message Record synchronization, can also be with Message Record synchronizing function
Application server.Sync server 130 can be individual server, can also be server cluster.
In the application scenarios, first terminal 110 can obtain target message record from the Message Record that itself is stored,
Wherein, target message record can be target complex Message Record or at least one of with the Message Record of target good friend, so
The encryption key that first terminal 110 may be used and negotiate in advance afterwards is carried out in conjunction with being recorded to target message to this Encryption Algorithm
Encryption, obtains Message Record ciphertext.
In this way, Message Record ciphertext can be sent to sync server 130 by first terminal 110, sync server 130 can
To be stored to the Message Record ciphertext, and record storage path.Sync server 130 can be based on the information such as store path
Generate key assignments item corresponding with Message Record ciphertext.
When user wants to check target message record in second terminal 120, second terminal 120 can receive server
The key assignments item of transmission, and corresponding Message Record ciphertext is downloaded from sync server 130 according to the key assignments item.Then, second
Terminal 120 can according to the algorithm for inversion of the encryption key combination symmetric encipherment algorithm of negotiation to the Message Record ciphertext that downloads into
Row decryption obtains target message record.
The present embodiment to server by before sending target message record, using the encryption key negotiated in advance, in conjunction with
Target message record is encrypted in symmetric encipherment algorithm so that target message record is transmitted with ciphertext form, and at end
The encryption key of end through consultation is decrypted, and on the one hand realizes the synchronization of Message Record, on the other hand also improves target
The safety that Message Record synchronizes.
It is to be appreciated that above application scene is only a kind of tool of the synchronous method of Message Record provided by the embodiments of the present application
Body is realized, in the embodiment of the present application in other possible realization methods, which can also be applied to other scenes, this
Application embodiment is not construed as limiting this.
Next, from the angle of first terminal, the synchronization in conjunction with attached drawing to Message Record provided by the embodiments of the present application
Method is described in detail.
Fig. 2 is a kind of flow chart of the synchronous method of Message Record provided by the embodiments of the present application, referring to Fig. 2, this method
Including:
S201:Obtain target message record.
Wherein, Message Record refer to participate in communication member link up when the generated record to communication.For example,
Message Record can be short message in short message application, and in the instant messaging applications such as wechat, Message Record is that instant messaging is answered
Chat record.Message Record can exist in a variety of forms, for example, Message Record can be word, picture, voice or regard
At least one of frequency or other third-party application files, wherein third-party application file refers to being generated by third-party application
Or the file for thering is third-party application to open, such as compressed file, form document, executable project file.
Target message record refers to the Message Record of pending synchronization.Target message record can be system default need into
The synchronous Message Record of row can will then be set for example, default needs the Message Record to setting file type to synchronize
The Message Record for determining file type is determined as target message record.Target message record can also be that user triggers simultaneously operating institute
Specified Message Record.
In some possible realization methods, the first client can obtain Message Record from local data base, then
The Message Record that user view synchronizes is determined from the Message Record of acquisition, the Message Record that user view is synchronized is as mesh
Mark Message Record.
When user view synchronizes the Message Record of some group, which can be determined as to target complex, mesh
The Message Record for marking group is target complex Message Record, which can be determined as to target message record.When
When user view pair and the Message Record of some user synchronize, which can be determined as target user, it can will be with
The Message Record of target user is determined as target message record.Based on this, target message record include target complex Message Record or
At least one of with the Message Record of target user.
S202:Using the encryption key negotiated in advance with second terminal, target message is recorded in conjunction with symmetric encipherment algorithm
It is encrypted, obtains Message Record ciphertext.
The purpose of the present embodiment is that by the target message on first terminal safely recording synchronism to second terminal, because
This, needs that target message record is encrypted.In order to avoid in transmission process, target message record is stolen, and the application carries
A kind of encryption mechanism has been supplied, specifically target message record is encrypted using symmetric encipherment algorithm, obtains Message Record ciphertext.
Wherein, it is identical that a feature of symmetric encipherment algorithm, which is key used by encryption and decryption, therefore, in synchronizing process
In, only used key is clearly encrypted or decrypted to sender and recipient namely first terminal and second terminal.
Based on this, first terminal and second terminal can negotiate encryption key in advance, and then first terminal may be used pre-
The encryption key first negotiated is encrypted target message record in conjunction with symmetric encipherment algorithm, Message Record ciphertext is obtained, to disappear
Breath record ciphertext replaces target message record to be transmitted, in this way, even if server or illegal molecule get Message Record
Ciphertext can not also decrypt Message Record ciphertext to obtain target message record, ensure that target message due to lacking encryption key
Record the safety of transmission.
In the present embodiment, symmetric encipherment algorithm can be DES algorithms, 3DES algorithms, TDEA algorithms, RC5 algorithms or
Any one in IDEA algorithms, the present embodiment is not construed as limiting the type of symmetric encipherment algorithm.
In some possible realization methods, in order to reduce transport overhead and storage overhead, target message can also be remembered
Record carries out compression processing, reduces data volume.As a kind of possible realization method, target message can be recorded and be pressed
Contracting obtains compressed message record, then using the encryption key negotiated in advance with second terminal, in conjunction with symmetric encipherment algorithm to pressure
Contracting Message Record is encrypted, and obtains Message Record ciphertext.
In the present embodiment, in order to make full use of transfer resource, the type that can be recorded according to target message selects to correspond to
Compression algorithm.It, can be by way of lossless compression for the target message record that the accuracy requirement of data is stringenter
It is compressed, and the relatively low target message of the accuracy requirement of data is recorded, lossy compression mode may be used and carry out
The volume of target message record can be so greatly lowered in compression.
Wherein, lossless compression includes entropy coding, entropy coding be a kind of statistical information using data compressed without language
The lossless coding of adopted data flow.Wherein, the statistical information of data includes comentropy, and comentropy refers to the average information of information source.
In some possible realization methods, entropy coding includes run length code (Run-Length Encoding, RLE), LZW codings, Shannon
Any one or more in coding, Huffman encoding and arithmetic coding.Lossy compression includes message sink coding, and message sink coding is one
Class is using signal number according to the correlation and the lossy coding that is compressed of redundancy in time-domain and frequency domain.
Message sink coding can be further subdivided into the modes such as predictive coding, transition coding, hierarchical coding.Wherein, prediction is compiled
Code was using previously and the data that limit are to below in the time or spatially adjacent or later data are predicted, to reach
The purpose of compression, if delta modulation (DM), difference and adaptive coding (ADPCM) are the specific implementation of predictive coding.
Transition coding refer to use various mathematic(al) manipulation methods, by the data of former time-domain or spatial domain transform to frequency domain or other
Domain, the feature felt using data redundancy in the transform domain as illustrated or the mankind are compressed.Common transition coding has quick Fu
In leaf transformation FFT, discrete cosine transform, wavelet transform DWT and iterative function system IPS.And hierarchical coding refer to by
Former data are divided into several subregions on time-space domain or frequency domain, carry out compressed encoding using the feature that the mankind feel, then again
Merge, the specific implementation of hierarchical coding includes two-value position, sub-sampling, sub-band coding etc..
In some cases, it can also be compressed using hybrid coding mode.Hybrid coding refers to entropy coding and information source
A kind of coding mode of coded combination can carry out lossy compression in some possible realization methods first with message sink coding,
Make further lossless compression using entropy coding.
S203:The Message Record ciphertext is sent to sync server, so that the sync server preserves the message
Ciphertext is recorded, and generates corresponding with Message Record ciphertext key assignments item, the second terminal is according to the key assignments item from institute
It states and downloads the Message Record ciphertext in sync server, and the inverse operator of the encryption key combination symmetric encipherment algorithm according to negotiation
The Message Record ciphertext is decrypted in method, obtains the target message record.
After generating Message Record ciphertext, first terminal can send the Message Record ciphertext to sync server, in this way,
Sync server can preserve the Message Record ciphertext, and generate key assignments item corresponding with Message Record ciphertext, and second terminal can
With according to key assignments item, download message records ciphertext from sync server.Then second terminal can be close according to the encryption of negotiation
Key is decrypted Message Record ciphertext in conjunction with the algorithm for inversion of symmetric encipherment algorithm, obtains target message record.
It should be noted that when Message Record ciphertext is by compressing to target message record, then disappearing to compression
When breath recording of encrypted obtains, then encryption key is utilized, Message Record ciphertext is solved in conjunction with the algorithm for inversion of symmetric encipherment algorithm
It is close, compressed message record is obtained, then Message Record is decompressed to obtain target message record.
In some cases, Message Record ciphertext can also be and first target message record be encrypted, then disappear to target
Breath record is compressed to obtain, in this way, second terminal then needs first to unzip it, is then docked compressed ciphertext again and is solved
It is close, obtain target message record.
From the foregoing, it will be observed that the embodiment of the present application provides a kind of synchronous method of Message Record, this method includes obtaining target
Message Record records target message in conjunction with symmetric encipherment algorithm and is carried out using the encryption key negotiated in advance with second terminal
Encryption, obtains Message Record ciphertext, Message Record ciphertext is then sent to sync server, sync server can be to message
Record ciphertext is stored, and generates corresponding key assignments item, and second terminal can be according to key assignments item from sync server
Download message records ciphertext, and then by the key negotiated in advance, the algorithm for inversion in conjunction with symmetric encipherment algorithm is close to Message Record
Text is decrypted, and obtains target message record, to realize the synchronization of target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to target message recording of encrypted
Used encryption key is that receiving-transmitting sides are negotiated to obtain, and it is close can not to get the encryption for sync server or illegal molecule
Key, thus the plaintext of target message record can not be got, it is ensured that target message record will not be revealed in transmission process, be protected
The safety and reliability of Message Record synchronization is hindered.
Target message record security is synchronized to second terminal in order to realize, key is to ensure the peace of encryption key
Quan Xing, in the present embodiment, security key are that first terminal is negotiated to obtain with second terminal, in order to make the technical side of the application
Case becomes apparent from, and below in conjunction with attached drawing, the machinery of consultation of encryption key provided by the embodiments of the present application is introduced.
Fig. 3 is a kind of flow chart of method for negotiating encryption key provided by the embodiments of the present application, referring to Fig. 3, this method
Including:
S301:The first random number and the first public key are sent to second terminal.
First random number is the random number for generating encryption key.First random number can be generated by first terminal, so
First random number is sent to second terminal by first terminal afterwards, in this way, first terminal and second terminal can obtain this with
Machine number, for generating encryption key.
First public key is the public key for generating encryption key.First public key is the public key that can be held with first terminal,
By the way that the first public key is sent to second terminal, in this way, first terminal and second terminal can obtain first public key, it is used for
Generate encryption key.
S302:Receive the second random number and the second public key that second terminal returns.
After sending the first random number and the first public key to second terminal, second terminal returns to second at random to first terminal
Number and the second public key.Wherein, the second random number is the random number for generating encryption key.Second random number can be by second eventually
End generates, and is then returned to first terminal.Second public key is the public key for generating encryption key.Second public key can be second
Second public key is returned to first terminal by the public key that terminal is held, second terminal, so that first terminal utilizes second public affairs
Key generates encryption key.
After receiving the second random number and the second public key that second terminal returns, first terminal and second terminal all have the
One random number, the second random number, the first public key and the second public key, first terminal and second terminal can be random using first
Number, the second random number, the first public key and the second public key generate encryption key.
S303:According to first public key and second public key, shared key is calculated using cipher key agreement algorithm.
After getting the first public key and the second public key, cipher key agreement algorithm may be used, a shared key is calculated.
First terminal and second terminal can be encrypted using the shared key or decryption oprerations.
S304:According to first random number, second random number and the shared key, is exported and calculated using key
Encryption key is calculated in method.
After obtaining shared key, it can be led using key according to the first random number, the second random number and shared key
Go out algorithm and encryption key is calculated, the safety of the encryption key is higher, it is difficult to be stolen, ensure the safety of Message Record
Property.
It should be noted that these are only a kind of specific implementation of first terminal and second terminal arranging key,
In other possible realization methods of the embodiment of the present application, other modes can also be used to carry out key agreement, the present embodiment is to this
It is not construed as limiting.
From the foregoing, it will be observed that the embodiment of the present application provides a kind of method of key agreement, by sending first to second terminal
Random number and the first public key, second terminal return to the second random number and the second public key, in this way, first terminal and second terminal can be with
According to the first random number, the second random number, the first public key and the second public key, exported in conjunction with corresponding cipher key agreement algorithm, key
Algorithm generates encryption key.The encryption key generated by this method only has first terminal and second terminal and has, server and
Other equipment does not have, it is also difficult to steal the encryption key, therefore, ensure the safety in Message Record synchronizing process
Property.
The synchronous method of Message Record provided by the embodiments of the present application is described from the angle of first terminal above,
Next the synchronous method of Message Record provided by the embodiments of the present application is introduced from the angle of second terminal.
Fig. 4 is a kind of flow chart of the synchronous method of Message Record provided by the embodiments of the present application, referring to Fig. 4, this method
Including:
S401:Receive the key assignments item that the sync server is sent;The key assignments item includes the storage of Message Record ciphertext
Path.
Sync server refers to the server synchronized to Message Record.Sync server can be exclusively used in message note
Synchronous server is recorded, can also be the server with Message Record synchronizing function.Sync server is receiving first eventually
The Message Record ciphertext sent is held, Message Record ciphertext can be stored, and generate corresponding key assignments item, the key assignments item packet
Include the store path of Message Record ciphertext.
Second terminal receives the key assignments item that sync server is sent.Wherein, sync server can be in response to first eventually
The request that ciphertext is recorded to second terminal synchronization message that end is initiated, sends key assignments item.Can also be that response is sent out with second terminal
The request of the corresponding Message Record ciphertext of synchronization first terminal risen, and send key assignments item.For second terminal, if first
The synchronization request that terminal is initiated, then can be considered as a kind of synchronous method passively received, and the synchronization initiated if second terminal is asked
It asks, then can be considered as a kind of synchronous method of active request.The synchronization of Message Record ciphertext may be implemented in above-mentioned synchronous method.
S402:Download link corresponding with the Message Record ciphertext is generated according to the key assignments item.
After the key assignments item for receiving sync server transmission, since key assignments item includes deposits corresponding with Message Record ciphertext
Path is stored up, therefore, second terminal can generate download link corresponding with Message Record ciphertext according to key assignments item.
Further, in order to avoid being downloaded by illegal molecule, key assignments item can also include check value, be generated according to key assignments item
Download link corresponding with Message Record ciphertext the store path and check value of Message Record ciphertext can generate and disappear according to
The corresponding download link of breath record ciphertext.In this way, can show complete download address when check value verifies and passes through, for
User downloads.In some cases, if verification does not pass through, do not show that complete download address, user are also just difficult to through this
Download link downloads corresponding Message Record ciphertext.
S403:The Message Record ciphertext is downloaded from server according to the download link;The Message Record ciphertext
Using the encryption key negotiated in advance, to be recorded to target message and encrypting to obtain using symmetric encipherment algorithm.
Since download link includes the store path of Message Record ciphertext, which can be entered by the download link
Diameter, can by the path from server download message record ciphertext.
Wherein, Message Record ciphertext is the Message Record ciphertext in embodiment illustrated in fig. 2, and first terminal utilizes association in advance
The encryption key of quotient can obtain Message Record ciphertext to target message record using symmetric encipherment algorithm encryption.
S404:According to the encryption key, the Message Record ciphertext is carried out using the algorithm for inversion of symmetric encipherment algorithm
Decryption obtains the target message record.
After download message records ciphertext, second terminal can be according to encryption key, using the algorithm for inversion of symmetric encipherment algorithm
Message Record ciphertext is decrypted, target message record is obtained, in this way, realizing the target message record on first terminal
It is synchronized to second terminal.
In some possible realization methods, when Message Record ciphertext is first to be recorded to carry out to target message by first terminal
Compression, when then being encrypted to obtain to compressed message record, then second terminal, can be with when download obtains Message Record ciphertext
First Message Record ciphertext is decrypted, obtains compressed message record, then, then compressed message record is unziped it, is obtained
It is recorded to target message.
In some possible realization methods, second terminal can also calculate download link, encryption key and symmetric cryptography
Method is sent to third terminal, in this way, third terminal can record ciphertext according to download link download message, and it is close using encrypting
Message Record ciphertext is decrypted in the algorithm for inversion of key, combining encryption algorithm, obtains target message record.
In other possible realization methods, the download link of generation can also be shared community website, to lead to
Terminal device logs community website is crossed, downloads the Message Record ciphertext, and Message Record ciphertext is decrypted, realizes that target disappears
Cease the synchronization of record.
From the foregoing, it will be observed that the embodiment of the present application provides a kind of synchronous method of Message Record, including receive the synchronous clothes
The key assignments item that business device is sent, key assignments item includes the store path of Message Record ciphertext, is then generated according to key assignments item and is remembered with message
The corresponding download link of ciphertext is recorded, download message records ciphertext from server according to download link, adds according to what is negotiated in advance
Key can be decrypted the Message Record ciphertext using the algorithm for inversion of symmetric encipherment algorithm, obtain target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to used by target message recording of encrypted
Encryption key is that receiving-transmitting sides are negotiated to obtain, and sync server or illegal molecule can not get the encryption key, thus nothing
Method gets the plaintext of target message record, it is ensured that target message record will not be revealed in transmission process, ensure message
The safety and reliability of recording synchronism.
It is some specific implementations of the synchronous method of Message Record provided by the embodiments of the present application above, is based on this,
Present invention also provides a kind of synchronizing device of Message Record, it is applied to first terminal, it below will be from the angle of function modoularization
Device provided by the embodiments of the present application is introduced.
Fig. 5 show a kind of structural schematic diagram of the synchronizing device of Message Record provided by the embodiments of the present application, referring to figure
5, which includes:
Acquisition module 510 obtains target message record for the Message Record according to first terminal;
Encrypting module 520, for using the encryption key negotiated in advance with second terminal, in conjunction with symmetric encipherment algorithm to mesh
Mark Message Record is encrypted, and obtains Message Record ciphertext;
Sending module 530, for sending the Message Record ciphertext to sync server, so that the sync server is protected
The Message Record ciphertext is deposited, and generates key assignments item corresponding with the Message Record ciphertext, the second terminal is according to
Key assignments item downloads the Message Record ciphertext from the sync server, and according to the encryption key combination symmetric cryptography of negotiation
The Message Record ciphertext is decrypted in the algorithm for inversion of algorithm, obtains the target message record.
Optionally, referring to Fig. 6, Fig. 6 be the present embodiment provides another specific implementation of the synchronizing device of Message Record,
Described device 500 further includes receiving module 540 and computing module 550:
The sending module 530 is additionally operable to send the first random number and the first public key to second terminal;
The receiving module 540, the second random number and the second public key for receiving second terminal return;
The computing module 550 is used for according to first public key and second public key, using cipher key agreement algorithm meter
Calculation obtains shared key;According to first random number, second random number and the shared key, exported using key
Encryption key is calculated in algorithm.
Optionally, target message record include target complex Message Record or in the Message Record of target user extremely
It is one few.
Optionally, it is that the present embodiment provides the another specific implementation sides of the synchronizing device of Message Record referring to Fig. 7, Fig. 7
Formula, described device 500 further include:
Compression module 560 obtains compressed message record for being compressed to target message record;
Then the encrypting module is specifically used for:
Using the encryption key negotiated in advance with second terminal, compressed message record is added in conjunction with symmetric encipherment algorithm
It is close, obtain Message Record ciphertext.
From the foregoing, it will be observed that the embodiment of the present application provides a kind of synchronizing device of Message Record, by obtaining target message note
Record is encrypted target message record in conjunction with symmetric encipherment algorithm, is obtained using the encryption key negotiated in advance with second terminal
To Message Record ciphertext, Message Record ciphertext is then sent to sync server, sync server can be close to Message Record
Text is stored, and generates corresponding key assignments item, and second terminal, which can be downloaded according to key assignments item from sync server, to disappear
Breath record ciphertext carries out Message Record ciphertext in conjunction with the algorithm for inversion of symmetric encipherment algorithm then by the key negotiated in advance
Decryption obtains target message record, to realize the synchronization of target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to target message recording of encrypted
Used encryption key is that receiving-transmitting sides are negotiated to obtain, and it is close can not to get the encryption for sync server or illegal molecule
Key, thus the plaintext of target message record can not be got, it is ensured that target message record will not be revealed in transmission process, be protected
The safety and reliability of Message Record synchronization is hindered.
The embodiment of the present application also provides the synchronizing devices of another Message Record, are applied to second terminal, with reference to
The synchronizing device of Message Record provided by the embodiments of the present application is described in detail in attached drawing.
Fig. 8 show a kind of structural schematic diagram of the synchronizing device of Message Record provided by the embodiments of the present application, referring to figure
8, which includes:
Receiving module 810, the key assignments item sent for receiving the sync server;The key assignments item includes Message Record
The store path of ciphertext;
Generation module 820, for generating download link corresponding with the Message Record ciphertext according to the key assignments item;
Download module 830, for downloading the Message Record ciphertext from server according to the download link;It is described to disappear
Breath record ciphertext is to be recorded to target message using the encryption key negotiated in advance and encrypt to obtain using symmetric encipherment algorithm;
Deciphering module 840, for according to the encryption key, being remembered to the message using the algorithm for inversion of symmetric encipherment algorithm
Record ciphertext is decrypted, and obtains the target message record.
Optionally, the deciphering module 840 is specifically used for:
When the Message Record ciphertext is to be compressed to target message record, then compressed data are encrypted
Then, the Message Record is decrypted, obtains compressed message record, compressed message record is unziped it, is obtained
It is recorded to target message.
Optionally, the key assignments item further includes check value;
Then the generation module 820 is specifically used for:
According to the store path of the Message Record ciphertext and the check value generate with the Message Record ciphertext pair
The download link answered.
Optionally, referring to Fig. 9, Fig. 9 be the present embodiment provides another specific implementation of the synchronizing device of Message Record,
Described device 800 further includes:
Sending module 850, for the download link, the encryption key and the symmetric encipherment algorithm to be sent to
Three terminals;So that the third terminal downloads the Message Record ciphertext according to the download link, and it is close using the encryption
Key is decrypted the Message Record ciphertext in conjunction with the algorithm for inversion of the Encryption Algorithm, obtains the target message record.
From the foregoing, it will be observed that the embodiment of the present application provides a kind of synchronizing device of Message Record, including receive the synchronous clothes
The key assignments item that business device is sent, key assignments item includes the store path of Message Record ciphertext, is then generated according to key assignments item and is remembered with message
The corresponding download link of ciphertext is recorded, download message records ciphertext from server according to download link, adds according to what is negotiated in advance
Key can be decrypted the Message Record ciphertext using the algorithm for inversion of symmetric encipherment algorithm, obtain target message record.
It is transmitted with ciphertext form since target message is recorded in transmission process, and to used by target message recording of encrypted
Encryption key is that receiving-transmitting sides are negotiated to obtain, and sync server or illegal molecule can not get the encryption key, thus nothing
Method gets the plaintext of target message record, it is ensured that target message record will not be revealed in transmission process, ensure message
The safety and reliability of recording synchronism.
Above example is the angle from function modoularization, to the synchronizing device of Message Record provided by the embodiments of the present application
It is introduced, next device provided by the embodiments of the present application will be introduced from the angle of hardware entities.
The embodiment of the present application provides a kind of synchronizer of Message Record, as shown in Figure 10, for convenience of description, only shows
Go out and do not disclosed with the relevant part of the embodiment of the present application, particular technique details, has please referred to the embodiment of the present application method part.
The synchronizer of the Message Record can be terminal, the terminal can be include mobile phone, tablet computer, personal digital assistant (English
Literary full name:Personal Digital Assistant, english abbreviation:PDA), point-of-sale terminal (full name in English:Point of
Sales, english abbreviation:POS), the arbitrary terminal device such as vehicle-mounted computer, by taking terminal is mobile phone as an example:
Figure 10 shows the block diagram with the part-structure of the relevant mobile phone of terminal provided by the embodiments of the present application.Reference chart
10, mobile phone includes:Radio frequency (full name in English:Radio Frequency, english abbreviation:RF) circuit 1010, memory 1020, defeated
Enter unit 1030, display unit 1040, sensor 1050, voicefrequency circuit 1060, Wireless Fidelity (full name in English:wireless
Fidelity, english abbreviation:WiFi) the components such as module 1070, processor 1080 and power supply 1090.Those skilled in the art
It is appreciated that handset structure shown in Figure 10 does not constitute the restriction to mobile phone, may include more more or fewer than illustrating
Component either combines certain components or different components arrangement.
Each component parts of mobile phone is specifically introduced with reference to Figure 10:
RF circuits 1010 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, handled to processor 1080;In addition, the data for designing uplink are sent to base station.In general, RF circuits
1010 include but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (full name in English:Low
Noise Amplifier, english abbreviation:LNA), duplexer etc..In addition, RF circuits 1010 can also by radio communication with net
Network and other equipment communication.Above-mentioned wireless communication can use any communication standard or agreement, the including but not limited to whole world mobile
Communication system (full name in English:Global System of Mobile communication, english abbreviation:GSM), general point
Group wireless service (full name in English:General Packet Radio Service, GPRS), CDMA (full name in English:Code
Division Multiple Access, english abbreviation:CDMA), wideband code division multiple access (full name in English:Wideband Code
Division Multiple Access, english abbreviation:WCDMA), long term evolution (full name in English:Long Term
Evolution, english abbreviation:LTE), Email, short message service (full name in English:Short Messaging Service,
SMS) etc..
Memory 1020 can be used for storing software program and module, and processor 1080 is stored in memory by operation
1020 software program and module, to execute various function application and the data processing of mobile phone.Memory 1020 can be led
To include storing program area and storage data field, wherein storing program area can storage program area, needed at least one function
Application program (such as sound-playing function, image player function etc.) etc.;Storage data field can be stored uses institute according to mobile phone
Data (such as audio data, phone directory etc.) of establishment etc..In addition, memory 1020 may include high random access storage
Device, can also include nonvolatile memory, and a for example, at least disk memory, flush memory device or other volatibility are solid
State memory device.
Input unit 1030 can be used for receiving the number or character information of input, and generate with the user setting of mobile phone with
And the related key signals input of function control.Specifically, input unit 1030 may include touch panel 1031 and other inputs
Equipment 1032.Touch panel 1031, also referred to as touch screen collect user on it or neighbouring touch operation (such as user
Use the behaviour of any suitable object or attachment such as finger, stylus on touch panel 1031 or near touch panel 1031
Make), and corresponding attachment device is driven according to preset formula.Optionally, touch panel 1031 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 1080, and order that processor 1080 is sent can be received and executed.In addition,
The multiple types such as resistance-type, condenser type, infrared ray and surface acoustic wave may be used and realize touch panel 1031.In addition to touch surface
Plate 1031, input unit 1030 can also include other input equipments 1032.Specifically, other input equipments 1032 may include
But in being not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc.
It is one or more.
Display unit 1040 can be used for showing information input by user or be supplied to user information and mobile phone it is each
Kind menu.Display unit 1040 may include display panel 1041, optionally, liquid crystal display (full name in English may be used:
Liquid Crystal Display, english abbreviation:LCD), Organic Light Emitting Diode (full name in English:Organic Light-
Emitting Diode, english abbreviation:) etc. OLED forms configure display panel 1041.Further, touch panel 1031 can
Display panel 1041 is covered, when touch panel 1031 detects on it or after neighbouring touch operation, sends processor to
1080 to determine the type of touch event, is followed by subsequent processing device 1080 and is provided on display panel 1041 according to the type of touch event
Corresponding visual output.Although in Fig. 10, touch panel 1031 with display panel 1041 is come as two independent components
Realize input and the input function of mobile phone, but in some embodiments it is possible to by touch panel 1031 and display panel 1041
It is integrated and that realizes mobile phone output and input function.
Mobile phone may also include at least one sensor 1050, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel 1041, proximity sensor can close display panel when mobile phone is moved in one's ear
1041 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 1060, loud speaker 1061, microphone 1062 can provide the audio interface between user and mobile phone.Audio
The transformed electric signal of the audio data received can be transferred to loud speaker 1061, is converted by loud speaker 1061 by circuit 1060
It is exported for voice signal;On the other hand, the voice signal of collection is converted to electric signal by microphone 1062, by voicefrequency circuit 1060
Audio data is converted to after reception, then by after the processing of audio data output processor 1080, through RF circuits 1010 to be sent to ratio
Such as another mobile phone, or audio data is exported to memory 1020 to be further processed.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 1070
Part, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Figure 10 is shown
WiFi module 1070, but it is understood that, and it is not belonging to must be configured into for mobile phone, it can not change as needed completely
Become in the range of the essence of invention and omits.
Processor 1080 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone,
By running or execute the software program and/or module that are stored in memory 1020, and calls and be stored in memory 1020
Interior data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor
1080 may include one or more processing units;Preferably, processor 1080 can integrate application processor and modulation /demodulation processing
Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located
Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1080.
Mobile phone further includes the power supply 1090 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply
Management system and processor 1080 are logically contiguous, to realize management charging, electric discharge and power consumption pipe by power-supply management system
The functions such as reason.
Although being not shown, mobile phone can also include camera, bluetooth module etc., and details are not described herein.
In the embodiment of the present application, the processor 1080 included by the terminal is also with the following functions:
Obtain target message record;
Using the encryption key negotiated in advance with second terminal, target message record is added in conjunction with symmetric encipherment algorithm
It is close, obtain Message Record ciphertext;
The Message Record ciphertext is sent to sync server, so that the sync server preservation Message Record is close
Text, and generate corresponding with Message Record ciphertext key assignments item, the second terminal is according to the key assignments item from the synchronization
The Message Record ciphertext is downloaded in server, and according to the algorithm for inversion of the encryption key combination symmetric encipherment algorithm of negotiation to institute
It states Message Record ciphertext to be decrypted, obtains the target message record.
In the present embodiment in some possible realization methods, processor 1080 can be also used for executing above-mentioned Message Record
The step of any one realization method of synchronous method.
The embodiment of the present application provides the synchronizer of another Message Record, as shown in figure 11, for convenience of description, only
It shows and is not disclosed with the relevant part of the embodiment of the present application, particular technique details, please refer to the embodiment of the present application method portion
Point.The synchronizer of the Message Record can be terminal, the terminal can be include mobile phone, tablet computer, personal digital assistant
(full name in English:Personal Digital Assistant, english abbreviation:PDA), point-of-sale terminal (full name in English:Point of
Sales, english abbreviation:POS), the arbitrary terminal device such as vehicle-mounted computer, by taking terminal is mobile phone as an example:
Figure 11 shows the block diagram with the part-structure of the relevant mobile phone of terminal provided by the embodiments of the present application.Reference chart
11, mobile phone includes:Radio frequency (full name in English:Radio Frequency, english abbreviation:RF) circuit 1110, memory 1120, defeated
Enter unit 1130, display unit 1140, sensor 1150, voicefrequency circuit 1160, Wireless Fidelity (full name in English:wireless
Fidelity, english abbreviation:WiFi) the components such as module 1170, processor 1180 and power supply 1190.Those skilled in the art
It is appreciated that handset structure shown in Figure 11 does not constitute the restriction to mobile phone, may include more more or fewer than illustrating
Component either combines certain components or different components arrangement.
The function and connection relation of above-mentioned component may refer to the associated description of Figure 10 embodiments, and details are not described herein.
In the embodiment of the present application, the processor 1180 included by the terminal is also with the following functions:
Receive the key assignments item that the sync server is sent;The key assignments item includes the store path of Message Record ciphertext;
Download link corresponding with the Message Record ciphertext is generated according to the key assignments item;
The Message Record ciphertext is downloaded from server according to the download link;The Message Record ciphertext is to utilize
The encryption key negotiated in advance records target message and encrypts to obtain using symmetric encipherment algorithm;
According to the encryption key, the Message Record ciphertext is decrypted using the algorithm for inversion of symmetric encipherment algorithm,
Obtain the target message record.
In the present embodiment in some possible realization methods, processor 1180 can be also used for executing above-mentioned Message Record
The step of any one realization method of synchronous method.
The embodiment of the present application also provides a kind of computer readable storage medium, for storing program code, the program code
Any one embodiment in synchronous method for executing a kind of Message Record described in foregoing individual embodiments.
It includes the computer program product instructed that the embodiment of the present application, which also provides a kind of, when run on a computer,
Computer is made to execute any one embodiment in a kind of synchronous method of Message Record described in foregoing individual embodiments.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit
It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can be stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (full name in English:Read-Only
Memory, english abbreviation:ROM), random access memory (full name in English:Random Access Memory, english abbreviation:
RAM), the various media that can store program code such as magnetic disc or CD.
The above, above example are only to illustrate the technical solution of the application, rather than its limitations;Although with reference to before
Embodiment is stated the application is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding
The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
Modification or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of synchronous method of Message Record, which is characterized in that it is applied to first terminal, the method includes:
Obtain target message record;
Using the encryption key negotiated in advance with second terminal, target message record is encrypted in conjunction with symmetric encipherment algorithm,
Obtain Message Record ciphertext;
The Message Record ciphertext is sent to sync server, so that the sync server preserves the Message Record ciphertext,
And corresponding with Message Record ciphertext key assignments item is generated, the second terminal is according to the key assignments item from the synchronous service
The Message Record ciphertext is downloaded in device, and is disappeared to described according to the algorithm for inversion of the encryption key combination symmetric encipherment algorithm of negotiation
Breath record ciphertext is decrypted, and obtains the target message record.
2. according to the method described in claim 1, it is characterized in that, the encryption key obtains in the following way:
The first random number and the first public key are sent to second terminal;
Receive the second random number and the second public key that second terminal returns;
According to first public key and second public key, shared key is calculated using cipher key agreement algorithm;
According to first random number, second random number and the shared key, calculated using key exported algorithm
To encryption key.
3. according to the method described in claim 1, it is characterized in that, the target message record include target complex Message Record or
At least one of with the Message Record of target user.
4. according to the method described in claims 1 to 3 any one, which is characterized in that the method further includes:
Target message record is compressed, compressed message record is obtained;
It is then described using the encryption key negotiated in advance with second terminal, target message is recorded in conjunction with symmetric encipherment algorithm and is carried out
Encryption, obtaining Message Record ciphertext includes:
Using the encryption key negotiated in advance with second terminal, compressed message record is encrypted in conjunction with symmetric encipherment algorithm,
Obtain Message Record ciphertext.
5. a kind of synchronous method of Message Record, which is characterized in that it is applied to second terminal, the method includes:
Receive the key assignments item that the sync server is sent;The key assignments item includes the store path of Message Record ciphertext;
Download link corresponding with the Message Record ciphertext is generated according to the key assignments item;
The Message Record ciphertext is downloaded from server according to the download link;The Message Record ciphertext is using advance
The encryption key of negotiation records target message and encrypts to obtain using symmetric encipherment algorithm;
According to the encryption key, the Message Record ciphertext is decrypted using the algorithm for inversion of symmetric encipherment algorithm, is obtained
The target message record.
6. according to the method described in claim 5, it is characterized in that, when the Message Record ciphertext be to target message record into
When going and compress, then being encrypted to obtain to compressed data;
Described that the Message Record ciphertext is decrypted, obtaining the target message record includes:
The Message Record is decrypted, compressed message record is obtained;
Compressed message record is unziped it, target message record is obtained.
7. according to the method described in claim 5, it is characterized in that, the key assignments item further includes check value;
Then generating download link corresponding with the Message Record ciphertext according to the key assignments item includes:
It is generated according to the store path of the Message Record ciphertext and the check value and corresponding with the Message Record ciphertext
Download link.
8. according to the method described in claim 5 to 7 any one, which is characterized in that the method further includes:
The download link, the encryption key and the symmetric encipherment algorithm are sent to third terminal;
So that the third terminal downloads the Message Record ciphertext according to the download link, and the encryption key is utilized,
The Message Record ciphertext is decrypted in conjunction with the algorithm for inversion of the Encryption Algorithm, obtains the target message record.
9. a kind of synchronizing device of Message Record, which is characterized in that described device includes:
Acquisition module obtains target message record for the Message Record according to first terminal;
Encrypting module, for using the encryption key negotiated in advance with second terminal, in conjunction with symmetric encipherment algorithm to target message
Record is encrypted, and obtains Message Record ciphertext;
Sending module, for sending the Message Record ciphertext to sync server, described in sync server preservation
Message Record ciphertext, and key assignments item corresponding with the Message Record ciphertext is generated, the second terminal is according to the key assignments item
The Message Record ciphertext is downloaded from the sync server, and according to the encryption key combination symmetric encipherment algorithm of negotiation
The Message Record ciphertext is decrypted in algorithm for inversion, obtains the target message record.
10. a kind of synchronizing device of Message Record, which is characterized in that described device includes:
Receiving module, the key assignments item sent for receiving the sync server;The key assignments item includes Message Record ciphertext
Store path;
Generation module, for generating download link corresponding with the Message Record ciphertext according to the key assignments item;
Download module, for downloading the Message Record ciphertext from server according to the download link;The Message Record
Ciphertext is to be recorded to target message using the encryption key negotiated in advance and encrypt to obtain using symmetric encipherment algorithm;
Deciphering module is used for according to the encryption key, using the algorithm for inversion of symmetric encipherment algorithm to the Message Record ciphertext
It is decrypted, obtains the target message record.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810438823.0A CN108718302A (en) | 2018-05-09 | 2018-05-09 | A kind of synchronous method of Message Record, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810438823.0A CN108718302A (en) | 2018-05-09 | 2018-05-09 | A kind of synchronous method of Message Record, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108718302A true CN108718302A (en) | 2018-10-30 |
Family
ID=63899631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810438823.0A Pending CN108718302A (en) | 2018-05-09 | 2018-05-09 | A kind of synchronous method of Message Record, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108718302A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109345401A (en) * | 2018-11-19 | 2019-02-15 | 平安科技(深圳)有限公司 | Method of data synchronization, device, computer equipment and the storage medium of product data |
CN109951378A (en) * | 2019-03-22 | 2019-06-28 | 西安电子科技大学 | File encryption transmission and sharing method in a kind of instant messaging |
CN110324143A (en) * | 2019-05-24 | 2019-10-11 | 平安科技(深圳)有限公司 | Data transmission method, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101917270A (en) * | 2010-08-03 | 2010-12-15 | 中国科学院软件研究所 | Weak authentication and key agreement method based on symmetrical password |
EP2608446A1 (en) * | 2011-12-19 | 2013-06-26 | Siemens Aktiengesellschaft | Network device in a smart grid power network and method of encrypting communication between network devices |
CN103442059A (en) * | 2013-08-27 | 2013-12-11 | 华为终端有限公司 | File sharing method and device |
WO2014071885A1 (en) * | 2012-11-09 | 2014-05-15 | 华为终端有限公司 | Method, device and system for information configuration |
CN106101081A (en) * | 2016-05-31 | 2016-11-09 | 宇龙计算机通信科技(深圳)有限公司 | Speech ciphering method, device, terminal, key management platform and system |
CN106254336A (en) * | 2016-07-29 | 2016-12-21 | 北京北信源软件股份有限公司 | A kind of document transmission method based on File Mapping encryption |
CN106411504A (en) * | 2015-07-31 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Data encryption system, method and apparatus |
CN107592311A (en) * | 2017-09-18 | 2018-01-16 | 西南石油大学 | Towards the cloud storage medical treatment big data lightweight batch auditing method of wireless body area network |
-
2018
- 2018-05-09 CN CN201810438823.0A patent/CN108718302A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101917270A (en) * | 2010-08-03 | 2010-12-15 | 中国科学院软件研究所 | Weak authentication and key agreement method based on symmetrical password |
EP2608446A1 (en) * | 2011-12-19 | 2013-06-26 | Siemens Aktiengesellschaft | Network device in a smart grid power network and method of encrypting communication between network devices |
WO2014071885A1 (en) * | 2012-11-09 | 2014-05-15 | 华为终端有限公司 | Method, device and system for information configuration |
CN103812644A (en) * | 2012-11-09 | 2014-05-21 | 华为终端有限公司 | Information configuration method, device and system |
CN103442059A (en) * | 2013-08-27 | 2013-12-11 | 华为终端有限公司 | File sharing method and device |
CN106411504A (en) * | 2015-07-31 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Data encryption system, method and apparatus |
CN106101081A (en) * | 2016-05-31 | 2016-11-09 | 宇龙计算机通信科技(深圳)有限公司 | Speech ciphering method, device, terminal, key management platform and system |
CN106254336A (en) * | 2016-07-29 | 2016-12-21 | 北京北信源软件股份有限公司 | A kind of document transmission method based on File Mapping encryption |
CN107592311A (en) * | 2017-09-18 | 2018-01-16 | 西南石油大学 | Towards the cloud storage medical treatment big data lightweight batch auditing method of wireless body area network |
Non-Patent Citations (2)
Title |
---|
朱琳: "《异构网络快速切换和安全切换认证优化机制研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
杜先汝: "《VoIP系统密钥管理方案研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109345401A (en) * | 2018-11-19 | 2019-02-15 | 平安科技(深圳)有限公司 | Method of data synchronization, device, computer equipment and the storage medium of product data |
CN109951378A (en) * | 2019-03-22 | 2019-06-28 | 西安电子科技大学 | File encryption transmission and sharing method in a kind of instant messaging |
CN109951378B (en) * | 2019-03-22 | 2021-08-24 | 西安电子科技大学 | File encryption transmission and sharing method in instant messaging |
CN110324143A (en) * | 2019-05-24 | 2019-10-11 | 平安科技(深圳)有限公司 | Data transmission method, electronic equipment and storage medium |
CN110324143B (en) * | 2019-05-24 | 2022-03-11 | 平安科技(深圳)有限公司 | Data transmission method, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106850220B (en) | Data encryption method, data decryption method and device | |
CN110417543B (en) | Data encryption method, device and storage medium | |
WO2017185711A1 (en) | Method, apparatus and system for controlling smart device, and storage medium | |
RU2628488C2 (en) | Method, terminal device and server for nfc data transfer | |
CN104580167B (en) | A kind of methods, devices and systems transmitting data | |
CN105678553A (en) | Method, device and system for processing order information | |
CN105049213A (en) | File signature method and device | |
CN103763112B (en) | A kind of user identity protection method and apparatus | |
CN104376353A (en) | Two-dimension code generating method, terminal and server and two-dimension code reading method, terminal and server | |
CN108011879A (en) | File encryption, method, apparatus, equipment and the storage medium of decryption | |
CN112087362B (en) | Message forwarding method and device between clients and terminal | |
CN114553612B (en) | Data encryption and decryption method and device, storage medium and electronic equipment | |
CN108718302A (en) | A kind of synchronous method of Message Record, device and equipment | |
WO2017067369A1 (en) | Method and device for encrypting picture, method and device for decrypting picture, and equipment | |
CN108307529A (en) | A kind of hotspot connection method and its mobile terminal | |
CN113162956A (en) | Method, device and network equipment for establishing communication connection | |
CN107911818A (en) | The method, device and mobile terminal of data transfer between mobile terminal | |
CN116541865A (en) | Password input method, device, equipment and storage medium based on data security | |
CN107592409A (en) | Application control method and device | |
CN107995151A (en) | Login validation method, apparatus and system | |
CN109525666A (en) | A kind of data back up method and mobile terminal | |
CN109640067A (en) | Image transfer method and device, system, electronic equipment, readable storage medium storing program for executing | |
CN114629649B (en) | Data processing method and device based on cloud computing and storage medium | |
EP4283483A1 (en) | File continuation method and apparatus, and terminal device and storage medium | |
CN108880787B (en) | Information key processing method and related equipment |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181030 |