WO2017067369A1 - 一种加密图片、解密图片的方法、装置和设备 - Google Patents

一种加密图片、解密图片的方法、装置和设备 Download PDF

Info

Publication number
WO2017067369A1
WO2017067369A1 PCT/CN2016/100113 CN2016100113W WO2017067369A1 WO 2017067369 A1 WO2017067369 A1 WO 2017067369A1 CN 2016100113 W CN2016100113 W CN 2016100113W WO 2017067369 A1 WO2017067369 A1 WO 2017067369A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
key
value
location information
encrypted
Prior art date
Application number
PCT/CN2016/100113
Other languages
English (en)
French (fr)
Inventor
苏理泓
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2017067369A1 publication Critical patent/WO2017067369A1/zh
Priority to US15/705,098 priority Critical patent/US10454905B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2111Location-sensitive, e.g. geographical location, GPS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding
    • H04L2209/046Masking or blinding of operations, operands or results of the operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/062Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying encryption of the keys

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method, device and device for encrypting pictures and decrypting pictures.
  • the functions of instant messaging applications are becoming more and more powerful. Users can not only send voices to other users through instant messaging applications, but also send images to other users through instant messaging applications.
  • the corresponding sending device of the user needs to encrypt the picture before sending the picture, and send the encrypted picture to the receiving device corresponding to other users.
  • the receiving device receives the encrypted picture and encrypts the picture. The picture is decrypted to get the picture.
  • the process of encrypting the picture by the sending device may be: the sending device obtains the picture that needs to be encrypted, encrypts the picture by the encryption key to obtain the encrypted picture, sends the encrypted picture to the receiving device, and then receives the image through a secure method.
  • the device sends a decryption key.
  • the receiving device may decrypt the encrypted picture by receiving the encrypted picture sent by the sending device, receiving the decryption key sent by the sending device, and decrypting the encrypted picture by using the decryption key to obtain a picture.
  • the encrypted picture can be decrypted by the decryption key, thereby causing the encrypted picture to be Low security.
  • the present invention provides a method, device and device for encrypting pictures and decrypting pictures.
  • the technical solutions are as follows:
  • a method of encrypting a picture comprising:
  • the sending device acquires original data of the picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data;
  • the sending device encrypts the first data by using the first key to obtain second data, and encrypts the length of the first key and the interference data by using the second key to obtain first encrypted data.
  • the transmitting device sends the second data, the first encrypted data, and the second key to a receiving device.
  • a method of decrypting a picture comprising:
  • the receiving device decrypts the first encrypted data by using the second key to obtain a length of the first key and the interference data
  • the receiving device decrypts the second data by using the first key to obtain first data
  • the receiving device removes the interference data in the first data according to the location information and the length of the interference data, to obtain original data of the picture, where the location information is that the interference data is in the original The location in the data.
  • the transmitting device adds the interference data to the original data of the picture, encrypts the original data by using the first key to obtain the second data, and encrypts the location information of the first key and the interference data by using the second password.
  • An encrypted data In this way, the device other than the receiving device obtains the first encrypted data and cannot obtain the location information of the first key and the interference data, and thus cannot decrypt the original data from the second data by using the location information of the first key and the interference data. , so that the security of the original data of the transmitted picture can be improved.
  • An apparatus for encrypting a picture comprising:
  • a first acquiring module configured to acquire original data of a picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data
  • Adding a module configured to add the interference data to the original data according to the location information to obtain first data
  • a first encryption module configured to encrypt the first data by using the first key to obtain second data, and encrypt the length of the first key and the interference data by using the second key to obtain a first An encrypted data
  • a first sending module configured to send the second data, the first encrypted data, and the second key to a receiving device.
  • a device for decrypting a picture comprising:
  • a first receiving module configured to receive second data, first encrypted data, and second key obtained by encrypting a picture sent by the sending device
  • a first decryption module configured to decrypt the first encrypted data by using the second key, to obtain a length of the first key and the interference data
  • a second decrypting module configured to decrypt the second data by using the first key to obtain first data
  • a removing module configured to remove the interference data in the first data according to location information and a length of the interference data, to obtain original data of the picture, where the location information is the interference data in the The location in the raw data.
  • a transmitting device comprising: one or more processors; and
  • the memory stores one or more programs, the one or more programs being configured to be executed by the one or more processors, the one or more programs including instructions for:
  • a receiving device comprising: one or more processors; and
  • the memory stores one or more programs, the one or more programs being configured to be executed by the one or more processors, the one or more programs including instructions for:
  • the sending device acquires original data of the picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data; the sending device generates interference data; the sending device according to the location The information is added to the original data to obtain the first data; the sending device encrypts the first data by using the first key to obtain the second data, and encrypts the length of the first key and the interference data by using the second key to obtain the first
  • the data is encrypted, and the second data, the first encrypted data, and the second key are transmitted to the receiving device. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • 1-1 is a flowchart of a method for encrypting a picture according to Embodiment 1 of the present invention
  • 1-2 is a flowchart of a method for decrypting a picture according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for encrypting a picture according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a method for decrypting a picture according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for encrypting a picture according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for decrypting a picture according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic structural diagram of an apparatus for encrypting a picture according to Embodiment 6 of the present invention.
  • FIG. 7 is a schematic structural diagram of an apparatus for decrypting a picture according to Embodiment 7 of the present invention.
  • the content of the chat includes not only text, language, but also pictures.
  • the sender may send a picture to the receiver; in order to improve the security of the sent picture, the sender may encrypt the picture when sending the picture; correspondingly, the receiving method needs the picture when receiving the picture. Decrypt.
  • the present invention can encrypt a picture or decrypt a picture by any of the following embodiments.
  • An embodiment of the present invention provides a method for encrypting a picture.
  • the execution body of the method is a sending device. Referring to FIG. 1-1, the method includes:
  • Step 101a The sending device acquires original data of the picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data.
  • Step 102a The device sends the interference data, and according to the location information, the interference data is added to the original data to obtain the first data.
  • Step 103a The sending device encrypts the first data by using the first key to obtain the second data, and encrypts the length of the first key and the interference data by using the second key to obtain the first encrypted data.
  • Step 104a The sending device sends the second data, the first encrypted data, and the second key to the receiving device.
  • An embodiment of the present invention provides a method for decrypting a picture.
  • the method is performed by a receiving device. Referring to FIG. 1-2, the method includes:
  • Step 101b The receiving device receives the second data, the first encrypted data, and the second key obtained by encrypting the picture sent by the sending device, where the second data is the encrypted data obtained by encrypting the first data by using the first key, the first data.
  • the first encrypted data is encrypted data obtained by encrypting the length of the first key and the interference data by the second key;
  • Step 102b The receiving device decrypts the first encrypted data by using the second key to obtain a length of the first key and the interference data.
  • Step 103b The receiving device decrypts the second data by using the first key to obtain the first data.
  • Step 104b The receiving device removes the interference data in the first data according to the length of the location information and the interference data added to the original data to obtain the original data of the picture.
  • the sending device acquires original data of the picture to be encrypted, the first key, the second key, and location information used to add interference data to the original data; According to the location information, the sending device adds the interference data to the original data to obtain the first data; the sending device encrypts the first data by using the first key to obtain the second data, and encrypts the first key and the interference data by using the second key.
  • the length of the first encrypted data is obtained, and the second data, the first encrypted data, and the second key are transmitted to the receiving device. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • An embodiment of the present invention provides a method for encrypting a picture, where the execution body of the method is a sending device. Referring to FIG. 2, the method includes:
  • Step 201 The sending device acquires original data of the picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data.
  • the first user When the first user sends a picture to the second user through the receiving server, the first user selects the picture, and submits the picture to the sending device corresponding to the first user; the sending device obtains the original data of the picture, and the picture may be the current shooting. Images, locally saved images, or images from third-party apps.
  • the sending device does not negotiate the first key with the receiving device, but randomly generates the first key and the second key, and the length of the first key is also random, in order to ensure the original The security of the data does not increase the amount of computation of the transmitting device.
  • the length of the first key is set in the range of 1024 bits to 8192 bits.
  • the transmitting device Since the transmitting device randomly generates the first key, the security of encrypting the original data can be improved. Moreover, in order to further improve the security of the original data, the transmitting device may also add interference data to the original data. Therefore, in this step, the transmitting device needs to acquire location information that adds interference data to the original data.
  • the sending device may negotiate with the receiving device corresponding to the second user to add location information of the interference data to the original data. Then, the sending device directly acquires the location information that is added to the original data and the interference data is negotiated with the receiving device. For example, the transmitting device and the receiving device negotiate to add interference data to the data header of the original data, or the transmitting device and the receiving device negotiate to add interference data to the data tail of the original data.
  • the sending device may also negotiate with different receiving devices to add location information of the interference data to the original data, thereby improving the security of the original data of the picture; then the transmitting device and the receiving device negotiate well. After the location information of the interference data is added to the original data, the device identifier of the receiving device and the location information are stored in the corresponding relationship between the device identifier and the location information. In the department. or,
  • the receiving server may specify location information for adding interference data to the original data on the sending device and the receiving device, and the sending device may directly obtain the location information that the receiving server adds to the original data to the interference data specified by the receiving device.
  • the receiving server may specify to add interference data to the data header of the original data on the transmitting device and the receiving device, or specify to add interference data or the like to the data tail of the original data.
  • the receiving server may periodically specify the location information of the transmitting device and the different receiving device to add interference data to the original data, thereby improving the security of the original data of the picture;
  • the sending device may store the device identifier of the receiving device and the location information in a correspondence between the device identifier and the location information.
  • the step of the sending device acquiring location information for adding interference data to the original data may be:
  • the sending device acquires location information that adds interference data to the original data according to the device identifier of the receiving device, from the correspondence between the device identifier and the location information.
  • the sending device may also negotiate with the receiving device to add a mode identifier corresponding to the location information of the interference data to the original data, and store a correspondence between the mode identifier and the location information; for example, the mode identifier 1 corresponds to the original data.
  • the data header adds interference data
  • the mode identifier 2 adds interference data to the data tail of the original data.
  • the pattern identifier 3 adds interference data to the original data every 2 bits of data
  • the pattern identifier 4 adds interference data to the original data every 10 bits of data. Wait.
  • the sending device and the receiving device negotiate a mode identifier corresponding to the location information of the interference data added to the original data and store the corresponding relationship between the mode identifier and the location information
  • the sending device selects to add a mode identifier of the interference data to the original data, And acquiring, according to the mode identifier, location information that adds interference data to the original data, and sending the mode identifier to the receiving device; and receiving, by the receiving device, the mode identifier sent by the sending device.
  • the step of the sending device acquiring the location information for adding the interference data to the original data according to the mode identifier may be:
  • the sending device acquires location information that adds interference data to the original data from the correspondence between the mode identifier and the location information according to the mode identifier.
  • the sending device needs to send the mode identifier to the receiving device, and the receiving device receives the mode identifier sent by the sending device, and according to the mode identifier, the correspondence between the mode identifier and the location information The location information of adding the interference data to the original data is obtained, so that the interference data in the original data can be removed to obtain the original data.
  • the original data of the picture is PicData
  • the first key is K1
  • the length of the first key is N
  • the location information for adding interference data to the original data is the data header of the picture data of the original data.
  • the sending device when the sending device sends the location information or the mode identifier to the receiving device, the location information or the mode identifier may be encrypted by using the second key, and then the sending device passes the The second key encrypts the location information and adds it to the first encrypted data; or the transmitting device encrypts the mode identifier by the second key and adds it to the first encrypted data.
  • the sending device may be a terminal or a server; similarly, the receiving device may be a terminal or a server.
  • Step 202 The sending device generates interference data.
  • the transmitting device randomly generates interference data, and the length of the interference data is also random.
  • the length of the interference data is set in the range of 10-4000 bytes.
  • the sending device randomly generates interference data of length w1 bytes, and w1 may be greater than 10 and less than 4000.
  • w1 may be a value of 50, 100, 1000, 3000, or the like.
  • the sending device may also periodically generate interference data and save, for example, the sending device may generate interference data once a hour and save.
  • the length of the interference data periodically generated by the sending device is also random, and the length of the interference data may also be set in a range of 10-4000 bytes.
  • the sending device may perform the operation of step 203 directly using the most recently generated interference data stored by itself without performing this step.
  • Step 203 The sending device adds the interference data to the original data according to the location information to obtain the first data.
  • the sending device adds the interference data to the data header of the picture data of the original data, and obtains the first data as Data[wl]+PicData.
  • the sending device adds the interference data to the data tail of the picture data of the original data, and obtains the first data as PicData+Data[wl].
  • Step 204 The sending device encrypts the first data by using the first key to obtain the second data.
  • the sending device obtains an iterative XOR encryption algorithm, and the second data is obtained by using the iterative XOR encryption algorithm and the first key to obtain the second data, which can be implemented by the following steps (1) to (3), including:
  • the transmitting device divides the picture data of the first data into a plurality of picture data fragments according to the length of the first key
  • each picture data fragment in the plurality of picture data fragments is equal to the length of the first key; or, each picture data fragment of the plurality of picture data fragments except the last picture data fragment
  • the length is equal to the length of the first key, and the length of the last picture data block is less than the length of the first key.
  • the sending device divides the first data into 4 picture data fragments according to the length N of the first key, and each picture data of the 4 picture data fragments is fragmented.
  • the length is equal to N; for example, if the length of the first data is greater than 3N and less than 4N, the sending device divides the first data into 4 picture data fragments according to the length N of the first key, and the first 3 picture data fragments
  • the length in the middle is equal to N, and the length of the fourth picture data fragment is less than N.
  • the transmitting device performs iterative XOR on the first key and the plurality of picture data fragments to obtain the second data.
  • the sending device segments the first picture data of the first key and the plurality of picture data.
  • the fragment is XORed to obtain the first fragment XOR result;
  • the transmitting device uses the first fragment XOR result as the XOR key of the second picture data fragment, and the second picture data fragmentation XOR
  • the key is XORed with the second picture data fragment to obtain a second fragment XOR result;
  • the sending device uses the second fragment XOR result as the XOR key of the third picture data fragment, and thus iterates to
  • the last picture data is fragmented, and the fragmented XOR result of the last picture data fragment is obtained, and the fragmentation exclusive OR result of the last picture data fragment is the second data.
  • the XOR processing described above is performed.
  • the method performs iterative processing to obtain a sliced XOR result of the previous picture data slice closest to the last picture data slice, and the sliced exclusive OR result of the previous picture data slice closest to the last picture data slice Selecting an XOR result of the length of the last picture data fragment, and XORing the selected XOR result with the last picture data allocation to obtain a sliced XOR result of the last picture data fragment, and the second data
  • Step 205 The sending device encrypts the first key, the length of the interference data, and the MD5 (Message Digest Algorithm MD5) value of the original data as the first MD5 value by using the second key to obtain the first encryption.
  • MD5 Message Digest Algorithm MD5
  • the sending device obtains an encryption algorithm, and encrypts the length of the first key and the interference data by using the encryption algorithm and the second key to obtain the first encrypted data; the sending device calculates the MD5 value of the original data as the first MD5 value, and passes the second The key encrypts the first MD5 value of the original data and adds it to the first encrypted data.
  • the sending device may encrypt the mode identifier by using the second key, and the step may be:
  • the sending device acquires the second key, and encrypts the first key, the length of the interference data, the mode identifier, and the first MD5 value of the original data by using the second key to obtain the first encrypted data.
  • the encryption algorithm may be AES (an encryption algorithm), IDEA (an encryption algorithm), or TEA (an encryption algorithm).
  • the transmitting device can randomly generate the second key K2, and the length of the second key is also random.
  • the sending device may also use the session key SessionKey that communicates with the receiving device as the second key.
  • the sending device randomly generates the second key, and the length of the second key is also random, which can improve the security of encrypting the original data.
  • the transmitting device randomly generates the second key or uses the session key as the second key to reduce the amount of calculation, thereby reducing the computing resources of the transmitting device.
  • the sending device and the receiving device have a SessionKey and adopt the second key
  • the first encrypted data is SessionKey (K1+wl). Then, step 206 and step 207 are not performed, and the sending device directly sends the second data and the first encrypted data to the receiving device.
  • the sending device randomly generates the second key to be K2
  • the first encrypted data is K2 (K1+wl+Md5(Picdata))
  • steps 206 and 207 need to be performed, and the sending device notifies Receive the device second key.
  • Step 206 The sending device acquires a third key, and encrypts the second key by using the third key to obtain second encrypted data.
  • the transmitting device acquires an RSA (a public key encryption algorithm) public key between the receiving server and the receiving server, and uses the RSA public key between the sending device and the receiving server as the third key.
  • RSA a public key encryption algorithm
  • the receiving server can be an instant messaging server. For example, if the third key is K3, the second encrypted data is K3 (K2).
  • Step 207 The sending device sends the MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data to the receiving device.
  • the MD5 value of the second data is referred to as the second MD5 value.
  • the step can be implemented by the following steps (1) to (3), including:
  • the sending device sends the second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data to the receiving server;
  • the sending device further sends the terminal identifier of the receiving device to the receiving server; the terminal identifier of the receiving device may be a user account registered by the second user in the receiving server, etc.; the second MD5 value of the second data is the sending device pair The second data is calculated.
  • the receiving server receives the second data, the first encrypted data, and the second encrypted data sent by the sending device, and sends the second MD5 of the second data, the first encrypted data, the second encrypted data, and the second data to the receiving device. value;
  • the receiving server receives the device identifier of the receiving device sent by the sending device, and sends a second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data to the receiving device according to the device identifier of the receiving device. Or the receiving server sends a notification message to the receiving device according to the device identifier of the receiving device; the receiving device receives the notification message sent by the receiving server, and sends a download request to the receiving server; the receiving server receives the download request sent by the receiving device, and according to the downloading A second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data is requested to be transmitted to the receiving device.
  • the download request further carries a signature including an RSA public key between the receiving device and the receiving server, that is, carrying the RSA public key between the receiving device and the receiving server and the device identifier of the receiving device;
  • the receiving server is configured according to the receiving device and Receiving an RSA public key between the server and a device identifier of the receiving device, determining whether the receiving device is a legal device; if the receiving device is a legal device, the receiving server sends the second data, the first encrypted data, and the second encrypted data to the receiving device; If the receiving device is not a legitimate device, it ends.
  • the receiving server determines, according to the RSA public key between the receiving device and the receiving server, and the device identifier of the receiving device, whether the receiving device is a legal device, or the following:
  • the receiving server stores the correspondence between the device identifier and the public key, and the receiving server determines whether the device identifier including the receiving device and the receiving device and the receiving device exist in the correspondence between the device identifier and the public key.
  • the record of the correspondence between the RSA public keys between the servers if included, the receiving server determines that the receiving device is a legitimate device, and if not, the receiving server determines that the receiving device is an illegal device, and ends.
  • the receiving server may further decrypt the second encrypted data according to the RSA private key between the sending device and the receiving server to obtain a second key.
  • the receiving server acquires an RSA public key between the receiving device and the receiving server, and encrypts the second key by using an RSA public key between the receiving device and the receiving server to obtain second data.
  • the receiving device receives the second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data sent by the receiving server.
  • the first MD5 value of the original data may be MD5 (PicData)
  • the second MD5 value of the second data may be MD5 (EncData)
  • the encrypted data may be K2 (MD5 (PicData)).
  • the sending device acquires original data, a first key, a second key, and location information used to add interference data to the original data, where the transmitting device generates Interfering data; the transmitting device adds the interference data to the original data according to the location information to obtain the first data; the sending device encrypts the first data by using the first key to obtain the second data, and encrypts the first key and the interference by using the second key.
  • the length of the data, the first encrypted data is obtained, and the second data, the first encrypted data, and the second key are transmitted to the receiving device. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • An embodiment of the present invention provides a method for decrypting a picture.
  • the method is performed by a receiving device. Referring to FIG. 3, the method includes:
  • Step 301 The receiving device acquires a second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data.
  • the receiving device Receiving, by the receiving device, a second MD5 value of the second data, the first encrypted data, the second encrypted data, and the second data sent by the sending device, where the first encrypted data is the length of the first key and the interference data encrypted by the second key Obtaining the encrypted data; or, the first encrypted data is the encrypted data obtained by encrypting the first key, the length of the interference data, the mode identifier, and the first MD5 value of the original data of the picture by the second key; the second encrypted data Encrypted data obtained by encrypting the second key by the third key.
  • Step 302 The receiving device calculates the MD5 value of the received second data as the fourth MD5 value, and verifies the received second data according to the second MD5 value and the fourth MD5 value.
  • the receiving device determines whether the received second MD5 value and the calculated fourth MD5 value are equal; If the data is equal, the receiving device determines that the received second data is not damaged during the transmission, that is, the second data is verified to pass, and step 303 is performed; if not, the receiving device determines that the received second data is in the transmission process. It was damaged and ended.
  • the receiving device determines that the received second data is damaged in the transmission process, the receiving device sends a retransmission request to the sending device, and the sending device receives the retransmission request sent by the receiving device, and retransmits the second data to the receiving device.
  • Step 303 The receiving device acquires a third key when the received second data is verified.
  • the receiving device uses the RSA private key between the receiving device and the receiving server as a third key.
  • Step 304 The receiving device decrypts the second encrypted data by using the third key to obtain a second key.
  • the transmitting device encrypts the second key by using an exclusive OR encryption algorithm and a third key
  • the second encrypted data is obtained; therefore, when the receiving device decrypts the second encrypted data, the third key and the second encryption key are directly performed. XOR, get the second key.
  • Step 305 The receiving device decrypts the first encrypted data by using the second key, to obtain a first key, a length of the interference data, and a first MD5 value of the original data.
  • the sending device encrypts the first key and the length of the interference data by using an exclusive OR encryption algorithm and a second key; therefore, when the first encrypted data is decrypted, the receiving device directly performs the second key and the first encryption key. XOR, the first key, the length of the interference data, the mode identifier, and the first MD5 value of the original data are obtained.
  • the receiving device acquires the negotiated location information of the interference data; if the sending device and the receiving device negotiate to add the interference data to the original data.
  • the mode corresponding to the information identifies and stores the correspondence between the mode identifier and the location information, and the receiving device acquires the location information of the interference data included in the second data from the correspondence between the mode identifier and the location information according to the mode identifier.
  • the receiving device receives the location information or the mode identifier sent by the sending device. If the sending device sends the location information to the receiving device or the mode identifier is encrypted by the second key and is added to the first encrypted data, the first encrypted data further includes location information encrypted by the second key, or The first encrypted data further includes a mode identifier encrypted by the second key, the mode identifier being used to identify the location information.
  • the step of the receiving device acquiring the location information of adding the interference data to the original data may be:
  • the receiving device decrypts the first encrypted data by using the second key to obtain a mode identifier, and according to the mode identifier, obtains location information that adds interference data to the original data from the correspondence between the mode identifier and the location information.
  • Step 306 The receiving device decrypts the second data by using the first key to obtain the first data.
  • the receiving device acquires an iterative XOR decryption algorithm, and decrypts the second data by using an iterative XOR decryption algorithm and the first key to obtain the first data.
  • Step 307 The receiving device removes the interference data in the first data according to the location information and the length of the interference data, to obtain the original data.
  • Step 308 The receiving device calculates the MD5 value of the decrypted original data as the third MD5 value, and verifies the decrypted original data according to the first MD5 value and the third MD5.
  • the receiving device determines whether the first MD5 value and the third MD5 value are equal; if the first MD5 value and the third MD5 value are equal, the receiving device determines that the decrypted original data is not damaged during the transmission, that is, the decrypted original data is verified. Passing; if the first MD5 value and the third MD5 value are not equal, the receiving device determines that the decrypted original data is corrupted during transmission, that is, the decrypted original data fails to pass, and sends a retransmission request to the transmitting device, and sends The device receives the retransmission request sent by the receiving device, and resends the second data to the receiving device according to the retransmission request.
  • the public key system of the RSA may not be used, and the sending device and the receiving device obtain the third key through the ECCDH (a key exchange algorithm) algorithm, so that the instant communication server
  • ECCDH a key exchange algorithm
  • the instant communication server The second encrypted data is not decrypted, and the second encrypted data is not obtained by re-encrypting, which shortens the time for encrypting and decrypting the picture, and improves the efficiency of encrypting and decrypting the picture.
  • the sending device acquires original data, a first key, a second key, and location information used to add interference data to the original data, where the transmitting device generates Interfering data; the transmitting device adds the interference data to the original data according to the location information to obtain the first data; the sending device encrypts the first data by using the first key to obtain the second data, and encrypts the first key and the interference by using the second key.
  • the length of the data, the first encrypted data is obtained, and the second data, the first encrypted data, and the second key are transmitted to the receiving device. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • the embodiment of the present invention provides an apparatus for encrypting a picture, and the apparatus may be a sending device.
  • the apparatus includes:
  • a first obtaining module 401 configured to acquire original data of a picture to be encrypted, a first key, a second key, and location information used to add interference data to the original data;
  • a generating module 402 configured to generate interference data
  • the module 403 is configured to add interference data to the original data according to the location information to obtain the first data.
  • the first encryption module 404 is configured to encrypt the first data by using the first key to obtain the second data, and encrypt the length of the first key and the interference data by using the second key to obtain the first encrypted data;
  • the first sending module 405 is configured to send the second data, the first encrypted data, and the second key to the receiving device.
  • the first sending module includes:
  • a first encryption unit configured to acquire a third key, and encrypt the second key by using the third key to obtain second encrypted data
  • a sending unit configured to send the second encrypted data to the receiving device.
  • the device further includes:
  • a first calculation module configured to calculate a message digest algorithm fifth version MD5 value of the original data as the first MD5 value and the MD5 value of the second data as the second MD5 value;
  • a second encryption module configured to encrypt a first MD5 value of the original data by using the second key, and add the first MD5 data to the first encrypted data
  • the second sending module is configured to send a second MD5 value of the second data to the receiving device.
  • the first encryption module includes:
  • a first acquiring unit configured to acquire an iterative XOR encryption algorithm
  • a second encryption unit configured to encrypt the first data by using an iterative exclusive OR encryption algorithm and the first key to obtain the second data.
  • the device further includes:
  • a third encryption module configured to encrypt the location information by using the second key, and add the information to the first encrypted data
  • the third encryption module is configured to be identified by the second key encryption mode and added to the first encrypted data, where the mode identifier is used by the receiving device to obtain the location information according to the mode identifier.
  • the sending device acquires original data, a first key, a second key, and location information used to add interference data to the original data, where the transmitting device generates Interference data; the transmitting device adds the interference data to the original data according to the location information. Go to the first data; the sending device encrypts the first data by using the first key, obtains the second data, encrypts the length of the first key and the interference data by using the second key, obtains the first encrypted data, and sends the second data to the receiving device. Data, first encrypted data, and second key. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • An embodiment of the present invention provides an apparatus for encrypting a picture, and the apparatus may be a receiving device.
  • the apparatus includes:
  • the first receiving module 501 is configured to receive second data, first encrypted data, and second key obtained by encrypting a picture sent by the sending device, where the second data is encrypted data obtained by encrypting the first data by using the first key,
  • the first data is data obtained by adding interference data to the original data of the picture, and the first encrypted data is encrypted data obtained by encrypting the length of the first key and the interference data by the second key;
  • a first decryption module 502 configured to decrypt the first encrypted data by using the second key, to obtain a length of the first key and the interference data;
  • a second decryption module 503, configured to decrypt the second data by using the first key to obtain the first data
  • the removing module 504 is configured to remove the interference data in the first data according to the length of the location information and the interference data added to the original data to obtain the original data of the picture.
  • the first receiving module 501 includes:
  • a receiving unit configured to receive second encrypted data sent by the sending device, where the second encrypted data is encrypted data obtained by encrypting the second key by using the third key;
  • a second acquiring unit configured to acquire a third key
  • the first decrypting unit is configured to decrypt the second encrypted data by using the third key to obtain the second key.
  • the first decryption module 502 includes:
  • a third obtaining unit configured to acquire an iterative XOR decryption algorithm
  • a second decrypting unit configured to decrypt the second data by using an iterative exclusive OR decryption algorithm and the first key to obtain the first data.
  • the device further includes:
  • a third decryption module configured to decrypt the first encrypted data by using the second key, to obtain an MD5 value of the original data
  • a second receiving module configured to receive a second MD5 value of the second data sent by the sending device
  • a second calculating module configured to calculate an MD5 value of the decrypted original data as a third MD5 value and connect The MD5 value of the received second data is taken as the fourth MD5 value;
  • a first verification module configured to verify the decrypted original data according to the first MD5 value and the third MD5 value
  • the second verification module is configured to verify the received second data according to the second MD5 value and the fourth MD5 value.
  • the first encrypted data further includes encrypting the location information by using the second key, or the first encrypted data further includes: identifying, by using the second key, a mode identifier, where the mode identifier is used to identify the location information;
  • the device also includes:
  • a fourth decrypting module configured to decrypt the first encrypted data by using the second key to obtain location information
  • the fourth decryption module is configured to decrypt the first encrypted data by using the second key to obtain a mode identifier, and obtain location information from the correspondence between the mode identifier and the location information according to the mode identifier.
  • the sending device acquires original data, a first key, a second key, and location information used to add interference data to the original data, where the transmitting device generates Interfering data; the transmitting device adds the interference data to the original data according to the location information to obtain the first data; the sending device encrypts the first data by using the first key to obtain the second data, and encrypts the first key and the interference by using the second key.
  • the length of the data, the first encrypted data is obtained, and the second data, the first encrypted data, and the second key are transmitted to the receiving device. Since the interference data is added to the original data, the security of the original data of the picture can be improved.
  • FIG. 6 is a schematic structural diagram of a terminal having a touch-sensitive surface according to an embodiment of the present invention.
  • the terminal provides an operating environment for the device for encrypting pictures provided in the above example 4. Specifically:
  • the terminal 800 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and a WiFi (wireless fidelity, wireless).
  • the fidelity module 170 includes a processor 180 having one or more processing cores, and a power supply 190 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 6 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, receiving and transmitting signals, and in particular, receiving downlink information of the base station and then processing it by one or more processors 180; The data related to the uplink is sent to the base station.
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc.
  • SIM Subscriber Identity Module
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • e-mail Short Messaging Service
  • the memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 800 (such as audio data, phone book, etc.) and the like.
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
  • the input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 130 can include touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • Display unit 140 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 800, which can be constructed from graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Terminal 800 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the terminal 800 moves to the ear. / or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal 800 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal 800.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the terminal, for example, via the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 800.
  • WiFi is a short-range wireless transmission technology
  • the terminal 800 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users.
  • FIG. 6 shows the WiFi module 170, it can be understood that it does not belong to the end.
  • the necessary configuration of the end 800 can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is the control center of the terminal 800, connecting various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the terminal 800 are performed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the terminal 800 also includes a power source 190 (such as a battery) for powering various components.
  • a power source 190 such as a battery
  • the power source can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 800 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the display unit of the terminal 800 is a touch screen display
  • the terminal 800 further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one
  • the above processor executes one or more programs including any of the operational instructions executed by the transmitting device in Embodiment 2.
  • FIG. 7 is a schematic diagram showing the structure of a terminal having a touch-sensitive surface according to an embodiment of the present invention.
  • the terminal provides an operating environment for the device for decrypting pictures provided in the above example 5. Specifically:
  • the terminal 900 may include an RF (Radio Frequency) circuit 210, a memory 220 including one or more computer readable storage media, an input unit 230, a display unit 240, a sensor 250, an audio circuit 260, and a WiFi (wireless fidelity, wireless).
  • the fidelity module 270 includes a processor 280 having one or more processing cores, and a power supply 290 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 7 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 210 can be used for receiving and transmitting signals during and after receiving or transmitting information, in particular, receiving downlink information of the base station, and then processing it by one or more processors 280; and transmitting data related to the uplink to the base station.
  • the RF circuit 210 includes but is not limited to an antenna, at least one An amplifier, tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like.
  • SIM Subscriber Identity Module
  • RF circuitry 210 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • e-mail Short Messaging Service
  • the memory 220 can be used to store software programs and modules, and the processor 280 executes various functional applications and data processing by running software programs and modules stored in the memory 220.
  • the memory 220 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 900 (such as audio data, phone book, etc.) and the like.
  • memory 220 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 220 may also include a memory controller to provide access to memory 220 by processor 280 and input unit 230.
  • the input unit 230 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 230 can include touch-sensitive surface 231 as well as other input devices 232.
  • a touch-sensitive surface 231, also referred to as a touch display or trackpad, can collect touch operations on or near the user (eg, the user uses a finger, stylus, etc., on any suitable object or accessory on the touch-sensitive surface 231 or The operation near the touch-sensitive surface 231) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 231 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 280 is provided and can receive commands from the processor 280 and execute them.
  • the touch-sensitive surface 231 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 230 can also include other input devices 232.
  • other input devices 232 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), One or more of a trackball, a mouse, a joystick, and the like.
  • Display unit 240 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 900, which can be constructed from graphics, text, icons, video, and any combination thereof.
  • the display unit 240 may include a display panel 241.
  • the display panel 241 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch-sensitive surface 231 can cover the display panel 241, and when the touch-sensitive surface 231 detects a touch operation thereon or nearby, it is transmitted to the processor 280 to determine the type of the touch event, and then the processor 280 according to the touch event The type provides a corresponding visual output on display panel 241.
  • touch-sensitive surface 231 and display panel 241 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 231 can be integrated with display panel 241 for input. And output function.
  • Terminal 900 can also include at least one type of sensor 250, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 241 according to the brightness of the ambient light, and the proximity sensor may close the display panel 241 when the terminal 900 moves to the ear. / or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the terminal 900 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the audio circuit 260, the speaker 261, and the microphone 262 can provide an audio interface between the user and the terminal 900.
  • the audio circuit 260 can transmit the converted electrical data of the received audio data to the speaker 261, and convert it into a sound signal output by the speaker 261.
  • the microphone 262 converts the collected sound signal into an electrical signal, and the audio circuit 260 After receiving, it is converted into audio data, and then processed by the audio data output processor 280, transmitted to the terminal, for example, via the RF circuit 220, or outputted to the memory 220 for further processing.
  • the audio circuit 260 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 900.
  • WiFi is a short-range wireless transmission technology
  • the terminal 900 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 270, which provides wireless broadband Internet access for users.
  • FIG. 7 shows the WiFi module 270, it can be understood that it does not belong to the essential configuration of the terminal 900, and may be omitted as needed within the scope of not changing the essence of the invention.
  • Processor 280 is the control center of terminal 900, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in memory 220, and recalling data stored in memory 220, The various functions and processing data of the terminal 900 are performed to perform overall monitoring of the mobile phone.
  • the processor 280 may include one or more processing cores; preferably, the processor 280 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 280.
  • the terminal 900 also includes a power source 290 (such as a battery) that supplies power to the various components.
  • the power source can be logically coupled to the processor 280 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • Power supply 290 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 900 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the display unit of the terminal 900 is a touch screen display
  • the terminal 900 further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one
  • the above processor executes one or more programs including any of the operational instructions executed by the receiving device in Embodiment 3.
  • the apparatus for encrypting a picture and decrypting a picture is only illustrated by the division of the above functional modules. In an actual application, the function may be allocated according to requirements. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device for encrypting a picture provided by the foregoing embodiment belongs to the same concept as the method for encrypting a picture.
  • the device for decrypting a picture and the method for decrypting the picture belong to the same concept, and the specific implementation process is described in the method embodiment. Narration.
  • a non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of a terminal to perform the above method of encrypting a picture, and decrypting a picture method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Power Engineering (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Telephonic Communication Services (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

一种加密图片、解密图片的方法、装置和设备,属于计算机技术领域。加密图片的方法包括:发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息(101a);发送设备生成所述干扰数据,根据该位置信息,将干扰数据加入原始数据中得到第一数据(102a);发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据(103a);发送设备向接收设备发送第二数据、第一加密数据和第二密钥(104a)。加密图片的装置包括:第一获取模块(401),加入模块(403),第一加密模块(404)和第一发送模块(405)。可以提高图片的原始数据的安全性。

Description

一种加密图片、解密图片的方法、装置和设备
本申请要求于2015年10月19日提交中国专利局、申请号为201510676194.1、发明名称为“一种加密图片、解密图片的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,特别涉及一种加密图片、解密图片的方法、装置和设备。
背景技术
随着互联网技术的发展和智能终端的普及,即时通信应用程序的功能越来越强大,用户不仅可以通过即时通信应用程序向其他用户发送语音,还可以通过即时通信应用程序向其他用户发送图片,为了保证图片的安全性,用户对应的发送设备在发送图片之前,需要对图片进行加密,向其他用户对应的接收设备发送加密后的图片;同样,接收设备接收加密后的图片,对加密后的图片进行解密得到该图片。
发送设备对图片进行加密的过程可以为:发送设备获取需要加密的图片,通过加密密钥对该图片进行加密得到加密后的图片,向接收设备发送加密后的图片,然后通过安全的方法向接收设备发送解密密钥。
接收设备解密加密后的图片的过程可以为:接收设备接收发送设备发送的加密后的图片,接收发送设备发送的解密密钥,通过该解密密钥对加密后的图片进行解密得到图片。
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:
当除第一终端和第二终端之外的第三终端通过网络监听获取到加密后的图片以及解密密钥时,就可以通过该解密密钥对加密后的图片进行解密,从而导致加密图片的安全性低。
发明内容
为了解决现有技术的问题,本发明提供了一种加密图片、解密图片的方法、装置和设备。技术方案如下:
一种加密图片的方法,所述方法包括:
发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
所述发送设备根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
所述发送设备通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
所述发送设备向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
一种解密图片的方法,所述方法包括:
接收设备接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
所述接收设备通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
所述接收设备通过所述第一密钥解密所述第二数据,得到第一数据;
所述接收设备根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
其中,由于发送设备在图片的原始数据中添加干扰数据,使用第一密钥对原始数据进行加密得到第二数据,以及使用第二密码对第一密钥和干扰数据的位置信息进行加密得到第一加密数据。这样除接收设备以外的其他设备获取到第一加密数据无法得到第一密钥和干扰数据的位置信息,进而无法通过第一密钥和干扰数据的位置信息,从第二数据中解密出原始数据,从而可以提高传输图片的原始数据的安全性。
一种加密图片的装置,所述装置包括:
第一获取模块,用于获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
加入模块,用于根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
第一加密模块,用于通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
第一发送模块,用于向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
一种解密图片的装置,所述装置包括:
第一接收模块,用于接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
第一解密模块,用于通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
第二解密模块,用于通过所述第一密钥解密所述第二数据,得到第一数据;
去除模块,用于根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
一种发送设备,其特征在于,所述发送设备包括:一个或多个处理器;和
存储器;
所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于进行以下操作的指令:
获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
一种接收设备,其特征在于,所述接收设备包括:一个或多个处理器;和
存储器;
所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于进行以下操作的指令:
接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
通过所述第一密钥解密所述第二数据,得到第一数据;
根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数据;发送设备根据位置信息,将干扰数据加入原始数据中得到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
附图说明
图1-1是本发明实施例1提供的一种加密图片的方法流程图;
图1-2是本发明实施例1提供的一种解密图片的方法流程图;
图2是本发明实施例2提供的一种加密图片的方法流程图;
图3是本发明实施例3提供的一种解密图片的方法流程图;
图4是本发明实施例4提供的一种加密图片的装置结构示意图;
图5是本发明实施例5提供的一种解密图片的装置结构示意图;
图6是本发明实施例6提供的一种加密图片的装置结构示意图;
图7是本发明实施例7提供的一种解密图片的装置结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
目前用户常使用社交应用进行聊天,聊天内容不仅包括文字、语言,还可能包括图片等。在聊天的过程中,发送方可以向接收方发送图片;为了提高发送图片的安全性,发送方在发送图片时可以对该图片进行加密;相应地,接收方法接收到该图片时需要对该图片进行解密。本发明可以通过如下任一实施例来加密图片或解密图片。
实施例1
本发明实施例提供了一种加密图片的方法,该方法的执行主体为发送设备,参见图1-1,该方法包括:
步骤101a:发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;
步骤102a:发送设备该干扰数据,根据该位置信息,将干扰数据加入原始数据中得到第一数据;
步骤103a:发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据;
步骤104a:发送设备向接收设备发送第二数据、第一加密数据和第二密钥。
本发明实施例提供了一种解密图片的方法,该方法的执行主体为接收设备,参见图1-2,该方法包括:
步骤101b:接收设备接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥,第二数据为通过第一密钥加密第一数据得到的加密数据,第一数据为向图片的原始数据添加干扰数据得到的数据,第一加密数据为通过第二密钥加密第一密钥和干扰数据的长度得到的加密数据;
步骤102b:接收设备通过第二密钥解密第一加密数据,得到第一密钥和干扰数据的长度;
步骤103b:接收设备通过第一密钥解密第二数据,得到第一数据;
步骤104b:接收设备根据向原始数据添加干扰数据的位置信息和干扰数据的长度,将第一数据中的干扰数据去除,得到图片的原始数据。
在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数 据;发送设备根据位置信息,将干扰数据加入原始数据中得到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
实施例2
本发明实施例提供了一种加密图片的方法,该方法的执行主体为发送设备,参见图2,其中,该方法包括:
步骤201:发送设备获取待加密图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;
当第一用户通过接收服务器向第二用户发送图片时,第一用户选择图片,将该图片提交给第一用户对应的发送设备;发送设备获取该图片的原始数据,该图片可以为当前拍摄的图片、本地保存的图片或者第三方应用中的图片等。
在本发明实施例中,发送设备并不和接收设备协商第一密钥,而是随机生成第一密钥和第二密钥,并且第一密钥的长度也是随机的,为了既能保证原始数据的安全性又不增加发送设备的运算量,第一密钥的长度设于1024bit-8192bit范围内。
由于发送设备随机生成第一密钥,从而可以提高加密原始数据的安全性。并且,为了进一步提高原始数据的安全性,发送设备还可以向原始数据中添加干扰数据。因此,在本步骤中,发送设备需要获取向原始数据添加干扰数据的位置信息。
在本步骤之前,发送设备可以和第二用户对应的接收设备协商向原始数据添加干扰数据的位置信息;则发送设备直接获取与接收设备协商的向原始数据添加干扰数据的位置信息。例如,发送设备和接收设备协商好在原始数据的数据头部添加干扰数据,或者发送设备和接收设备协商好在原始数据的数据尾部添加干扰数据。
为了提高图片的原始数据的安全性,发送设备还可以和不同的接收设备协商不同的向原始数据添加干扰数据的位置信息,进而提高图片的原始数据的安全性;则发送设备和接收设备协商好向原始数据添加干扰数据的位置信息之后,将接收设备的设备标识和该位置信息存储在设备标识和位置信息的对应关 系中。或者,
在步骤之前,接收服务器可以在发送设备和接收设备上指定向原始数据添加干扰数据的位置信息,发送设备可以直接获取接收服务器为接收设备指定的向原始数据添加干扰数据的位置信息。例如,接收服务器可以在发送设备和接收设备上指定向原始数据的数据头部添加干扰数据,或者指定向原始数据的数据尾部添加干扰数据等。
为了提高图片的原始数据的安全性,接收服务器可以周期性地指定发送设备与不同接收设备向原始数据添加干扰数据的位置信息,进而提高图片的原始数据的安全性;在接收服务器指定发送设备与某个接收设备向原始数据添加干扰数据的位置信息后,发送设备可以将该接收设备的设备标识和该位置信息存储在设备标识和位置信息的对应关系中。
相应的,发送设备获取用于向原始数据添加干扰数据的位置信息的步骤可以为:
发送设备根据接收设备的设备标识,从设备标识和位置信息的对应关系中获取向原始数据添加干扰数据的位置信息。
在本步骤之前,发送设备也可以和接收设备协商向原始数据添加干扰数据的位置信息对应的模式标识,并存储该模式标识和该位置信息的对应关系;例如,模式标识1对应向原始数据的数据头部添加干扰数据,模式标识2对应向原始数据的数据尾部添加干扰数据,模式标识3对应每隔2bit数据向原始数据添加干扰数据,模式标识4对应每隔10bit数据向原始数据添加干扰数据等。
进一步地,如果发送设备和接收设备协商向原始数据添加干扰数据的位置信息对应的模式标识并存储了该模式标识和该位置信息的对应关系,发送设备选择向原始数据添加干扰数据的模式标识,根据该模式标识,获取向原始数据添加干扰数据的位置信息,并向接收设备发送该模式标识;接收设备接收发送设备发送的该模式标识。
发送设备中存储模式标识和位置信息的对应关系。相应的,发送设备根据该模式标识,获取向原始数据添加干扰数据的位置信息的步骤可以为:
发送设备根据该模式标识,从模式标识和位置信息的对应关系中获取向原始数据添加干扰数据的位置信息。
进一步地,发送设备需要向接收设备发送该模式标识,接收设备接收发送设备发送的该模式标识,根据该模式标识,从模式标识和位置信息的对应关系 中获取向原始数据添加干扰数据的位置信息,从而可以将原始数据中的干扰数据去除,得到原始数据。
例如,图片的原始数据为PicData,第一密钥为K1,第一密钥的长度为N,用于向原始数据添加干扰数据的位置信息为原始数据的图片数据的数据头部。
进一步地,为了提高图片的原始数据的安全性,发送设备向接收设备发送该位置信息或者该模式标识时,可以通过第二密钥对该位置信息或者该模式标识进行加密,则发送设备通过第二密钥加密该位置信息,并添加到第一加密数据中;或者,发送设备通过第二密钥加密该模式标识,并添加到第一加密数据中。
需要说明的的是,发送设备可以为终端,也可以为服务器;同样,接收设备可以为终端,也可以为服务器。
步骤202:发送设备生成干扰数据;
发送设备随机生成干扰数据,该干扰数据的长度也是随机的,为了既能保证原始数据的安全性又不增加发送设备的运算量,干扰数据的长度设于10-4000字节范围内。
例如,发送设备随机生成wl字节长的干扰数据,wl可以大于10,小于4000,如w1可以为50、100、1000、3000等数值。
可选的,在本实施例中,发送设备也可以周期性地生成干扰数据并保存,例如,发送设备可以每个小时生成一次干扰数据并保存。其中,发送设备周期性生成的干扰数据的长度也是随机的,且干扰数据的长度也可以设于10-4000字节范围内。
相应的,发送设备可以不执行本步骤,直接使用自身存储的最近一次生成的干扰数据执行步骤203的操作。
步骤203:发送设备根据该位置信息,将该干扰数据加入原始数据中得到第一数据;
例如,该位置信息为原始数据的图片数据的数据头部,则发送设备将该干扰数据加入原始数据的图片数据的数据头部,得到第一数据为Data[wl]+PicData。再如,该位置信息为原始数据的图片数据的数据尾部,则发送设备将该干扰数据加入原始数据的图片数据的数据尾部,得到第一数据为PicData+Data[wl]。
步骤204:发送设备通过第一密钥加密第一数据,得到第二数据;
发送设备获取迭代异或加密算法,通过该迭代异或加密算法和第一密钥加密第一数据,得到第二数据,具体可以通过以下步骤(1)至(3)实现,包括:
(1):发送设备根据第一密钥的长度,将第一数据的图片数据划分为多个图片数据分片;
多个图片数据分片中的每个图片数据分片的长度等于第一密钥的长度;或者,多个图片数据分片中除最后一个图片数据分片以外的其他每个图片数据分片的长度等于第一密钥的长度,最后一个图片数据块的长度小于第一密钥的长度。
例如,第一数据的长度为4N,则发送设备根据第一密钥的长度N,将第一数据划分为4个图片数据分片,4个图片数据分片中的每个图片数据分片的长度等于N;再如,第一数据的长度大于3N且小于4N,则发送设备根据第一密钥的长度N,将第一数据划分为4个图片数据分片,前3个图片数据分片中的长度等于N,第4个图片数据分片的长度小于N。
(2):发送设备将第一密钥和多个图片数据分片进行迭代异或,得到第二数据。
如果该多个图片数据分片中的每个图片数据分片的长度均与第一密钥的长度相等,则发送设备将第一密钥和多个图片数据分片中的第一个图片数据分片进行异或,得到第一分片异或结果;发送设备将第一分片异或结果作为第二个图片数据分片的异或密钥,将第二个图片数据分片的异或密钥与第二图片数据分片进行异或,得到第二分片异或结果;发送设备将第二分片异或结果再作为第三个图片数据分片的异或密钥,如此迭代到最后一个图片数据分片,并得到最后一个图片数据分片的分片异或结果,该最后一个图片数据分片的分片异或结果即为第二数据。
如果该多个图片数据分片中的最后一个图片数据分片的长度小于第一密钥的长度时,对于除最后一个图片数据分片以外的其他图片数据分片,按上述介绍的异或处理方法进行迭代处理,得到离最后一个图片数据分片最近的前一个图片数据分片的分片异或结果,从离最后一个图片数据分片最近的前一个图片数据分片的分片异或结果中选择与最后一个图片数据分片的长度的异或结果,将选择的异或结果与最后一个图片数据分配进行异或,得到最后一个图片数据分片的分片异或结果,且第二数据包括离最后一个图片数据分片最近的前一个图片数据分片的分片异或结果和最后一个图片数据分片的分片异或结果。
例如,发送设备通过第一密钥加密第一数据,得到第二数据为EncData=K1(Data[wl]+PicData)。
步骤205:发送设备通过第二密钥加密第一密钥、该干扰数据的长度和原始数据的MD5(Message Digest Algorithm MD5,消息摘要算法第五版)值作为第一MD5值,得到第一加密数据;
发送设备获取加密算法,通过该加密算法和第二密钥加密第一密钥和该干扰数据的长度,得到第一加密数据;发送设备计算原始数据的MD5值作为第一MD5值,通过第二密钥加密原始数据的第一MD5值,并添加到第一加密数据中。
进一步地,为了提高图片的原始数据的安全性,发送设备可以通过第二密钥加密该模式标识,则本步骤可以为:
发送设备获取第二密钥,通过第二密钥加密第一密钥、该干扰数据的长度、该模式标识和原始数据的第一MD5值,得到第一加密数据。
其中,该加密算法可以为AES(一种加密算法)、IDEA(一种加密算法)或TEA(一种加密算法)等。
发送设备可以随机生成第二密钥K2,第二密钥的长度也是随机的。发送设备还可以将与接收设备通讯的会话密钥SessionKey作为第二密钥。
需要说明的是,发送设备随机生成第二密钥,且第二密钥的长度也是随机的,能够提高加密原始数据的安全性。并且,发送设备随机生成第二密钥或者将会话密钥作为第二密钥能够减少计算量,从而能够减少发送设备的计算资源。
如果发送设备和接收设备有SessionKey且采用为第二密钥,则第一加密数据为SessionKey(K1+wl)。则不执行步骤206和步骤207,发送设备直接向接收设备发送第二数据和第一加密数据。
如果发送设备随机生成第二密钥为K2,第一加密数据为K2(K1+wl+Md5(Picdata)),由于接收设备不知道第二密钥,需要执行步骤206和207,发送设备以通知接收设备第二密钥。
步骤206:发送设备获取第三密钥,通过第三密钥加密第二密钥,得到第二加密数据;
发送设备获取与接收服务器之间的RSA(一种公钥加密算法)公钥,将该发送设备与接收服务器之间的RSA公钥作为第三密钥。
接收服务器可以为即时通信服务器。例如,第三密钥为K3,则第二加密数据为K3(K2)。
步骤207:发送设备向接收设备发送第二数据、第一加密数据、第二加密数据和第二数据的MD5值,为了便于说明称第二数据的MD5值为第二MD5值。
其中,本步骤可以通过以下步骤(1)至(3)实现,包括:
(1):发送设备向接收服务器发送第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值;
进一步地,发送设备还向接收服务器发送接收设备的终端标识;接收设备的终端标识可以为第二用户事先在接收服务器中注册的用户账号等;第二数据的第二MD5值是发送设备对第二数据进行计算得到的。
(2):接收服务器接收发送设备发送的第二数据、第一加密数据和第二加密数据,向接收设备发送第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值;
接收服务器接收发送设备发送的接收设备的设备标识,根据接收设备的设备标识,向接收设备发送第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值。或者,接收服务器根据接收设备的设备标识,向接收设备发送通知消息;接收设备接收接收服务器发送的通知消息,并向接收服务器发送下载请求;接收服务器接收接收设备发送的下载请求,并根据该下载请求向接收设备发送第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值。
进一步地,该下载请求还携带含接收设备与接收服务器之间的RSA公钥的签名,也即携带接收设备与接收服务器之间的RSA公钥和接收设备的设备标识;接收服务器根据接收设备与接收服务器之间的RSA公钥和接收设备的设备标识,确定接收设备是否为合法设备;如果接收设备是合法设备,接收服务器向接收设备发送第二数据、第一加密数据和第二加密数据;如果接收设备不是合法设备,结束。
进一步地,接收服务器根据接收设备与接收服务器之间的RSA公钥和接收设备的设备标识,确定接收设备是否为合法设备的步骤可以为:
接收服务器中存储有设备标识和公钥对应关系,接收服务器确定设备标识和公钥的对应关系中是否存在包含接收设备的设备标识和接收设备与接收服 务器之间的RSA公钥的对应关系的记录,如果包含,则接收服务器确定接收设备为合法设备,如果不包含,则接收服务器确定接收设备为非法设备,结束。
进一步地,接收服务器还可以根据发送设备与接收服务器之间的RSA私钥,解密第二加密数据,得到第二密钥。接收服务器获取接收设备与接收服务器之间的RSA公钥,通过接收设备与接收服务器之间的RSA公钥加密第二密钥,得到第二数据。
(3):接收设备接收接收服务器发送的第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值。
例如,原始数据的第一MD5值可以为MD5(PicData),第二数据的第二MD5值可以为MD5(EncData),加密数据可以为K2(MD5(PicData))。
在本发明实施例中,在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数据;发送设备根据位置信息,将干扰数据加入原始数据中得到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
实施例3
本发明实施例提供了一种解密图片的方法,该方法的执行主体为接收设备,参见图3,其中,该方法包括:
步骤301:接收设备获取第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值;
接收设备接收发送设备发送的第二数据、第一加密数据、第二加密数据和第二数据的第二MD5值,第一加密数据为通过第二密钥加密第一密钥和干扰数据的长度得到的加密数据;或者,第一加密数据为通过第二密钥加密第一密钥、干扰数据的长度、该模式标识和图片的原始数据的第一MD5值得到的加密数据;第二加密数据为通过第三密钥加密第二密钥得到的加密数据。
步骤302:接收设备计算接收的第二数据的MD5值作为第四MD5值,并根据第二MD5值和第四MD5值,对接收的第二数据进行验证;
接收设备确定接收的第二MD5值和计算的第四MD5值是否相等;如果 相等,则接收设备确定接收的第二数据在传输过程中没有被损坏,也即对接收的第二数据验证通过,执行步骤303;如果不相等,则接收设备确定接收的第二数据在传输过程中被损坏,结束。
进一步地,如果接收设备确定接收的第二数据在传输过程中被损坏,则接收设备向发送设备发送重传请求,发送设备接收接收设备发送的重传请求,并重新向接收设备发送第二数据。
步骤303:接收设备对接收的第二数据验证通过时,获取第三密钥;
接收设备将接收设备与接收服务器之间的RSA私钥作为第三密钥。
步骤304:接收设备通过第三密钥解密第二加密数据,得到第二密钥;
由于发送设备通过异或加密算法和第三密钥加密第二密钥,得到第二加密数据;因此,接收设备在解密第二加密数据时,直接将第三密钥和第二加密密钥进行异或,得到第二密钥。
步骤305:接收设备通过第二密钥解密第一加密数据,得到第一密钥、该干扰数据的长度和原始数据的第一MD5值;
由于发送设备通过异或加密算法和第二密钥加密第一密钥和该干扰数据的长度;因此,接收设备在解密第一加密数据时,直接将第二密钥和第一加密密钥进行异或,得到第一密钥、该干扰数据的长度、该模式标识和原始数据的第一MD5值。
进一步地,如果发送设备和接收设备事先协商向原始数据添加干扰数据的位置信息,则接收设备获取协商好的该干扰数据的位置信息;如果发送设备和接收设备协商向原始数据添加干扰数据的位置信息对应的模式标识并存储了该模式标识和该位置信息的对应关系,则接收设备根据该模式标识,从模式标识和位置信息的对应关系中获取第二数据中包括的干扰数据的位置信息。
如果发送设备向接收设备发送该位置信息或者该模式标识,则接收设备接收发送设备发送的位置信息或者模式标识。如果发送设备向接收设备发送该位置信息或者该模式标识时通过第二密钥进行加密,并添加到第一加密数据中,则第一加密数据还包括通过第二密钥加密的位置信息,或者,第一加密数据还包括通过第二密钥加密的模式标识,该模式标识用于标识该位置信息。则接收设备获取向原始数据中添加干扰数据的位置信息的步骤可以为:
接收设备通过第二密钥解密第一加密数据,得到向原始数据中添加干扰数据的位置信息;或者,
接收设备通过第二密钥解密第一加密数据,得到模式标识,根据该模式标识,从模式标识和位置信息的对应关系中获取向原始数据中添加干扰数据的位置信息。
步骤306:接收设备通过第一密钥解密第二数据,得到第一数据;
接收设备获取迭代异或解密算法,通过迭代异或解密算法和第一密钥解密第二数据,得到第一数据。
步骤307:接收设备根据该位置信息和该干扰数据的长度,将第一数据中的干扰数据去除,得到原始数据;
步骤308:接收设备计算解密的原始数据的MD5值作为第三MD5值,根据第一MD5值和第三MD5,对解密的原始数据进行验证。
接收设备确定第一MD5值和三MD5值是否相等;如果第一MD5值和第三MD5值相等,则接收设备确定解密的原始数据在传输过程中没有被损坏,也即对解密的原始数据验证通过;如果第一MD5值和第三MD5值不相等,则接收设备确定解密的原始数据在传输过程中被损坏,也即对解密的原始数据验证不通过,向发送设备发送重传请求,发送设备接收接收设备发送的重传请求,并根据该重传请求重新向接收设备发送第二数据。
现有说明的是,在本发明实施例中,也可以不采用RSA的公钥体系,发送设备和接收设备通过ECCDH(一种密钥交换算法)算法,得到第三密钥,这样即时通信服务器不用解密第二加密数据,也不用重新加密得到第二加密数据,缩短了加密和解密图片的时间,提高了加密和解密图片的效率。
在本发明实施例中,在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数据;发送设备根据位置信息,将干扰数据加入原始数据中得到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
实施例4
本发明实施例提供了一种加密图片的装置,该装置可以为发送设备,参见图4,其中,该装置包括:
第一获取模块401,用于获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;
生成模块402,用于生成干扰数据;
加入模块403,用于根据位置信息,将干扰数据加入原始数据中得到第一数据;
第一加密模块404,用于通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据;
第一发送模块405,用于向接收设备发送第二数据、第一加密数据和第二密钥。
第一发送模块,包括:
第一加密单元,用于获取第三密钥,通过第三密钥加密第二密钥,得到第二加密数据;
发送单元,用于向接收设备发送第二加密数据。
进一步地,装置还包括:
第一计算模块,用于计算原始数据的消息摘要算法第五版MD5值作为第一MD5值和第二数据的MD5值作为第二MD5值;
第二加密模块,用于通过第二密钥加密原始数据的第一MD5值,并添加到第一加密数据中;
第二发送模块,用于向接收设备发送第二数据的第二MD5值。
进一步地,第一加密模块,包括:
第一获取单元,用于获取迭代异或加密算法;
第二加密单元,用于通过迭代异或加密算法和第一密钥加密第一数据,得到第二数据。
进一步地,装置还包括:
第三加密模块,用于通过第二密钥加密位置信息,并添加到第一加密数据中;或者,
第三加密模块,用于通过第二密钥加密模式标识,并添加到第一加密数据中,模式标识用于接收设备根据模式标识获取位置信息。
在本发明实施例中,在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数据;发送设备根据位置信息,将干扰数据加入原始数据中得 到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
实施例5
本发明实施例提供了一种加密图片的装置,该装置可以为接收设备,参见图5,其中,该装置包括:
第一接收模块501,用于接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥,第二数据为通过第一密钥加密第一数据得到的加密数据,第一数据为向图片的原始数据添加干扰数据得到的数据,第一加密数据为通过第二密钥加密第一密钥和干扰数据的长度得到的加密数据;
第一解密模块502,用于通过第二密钥解密第一加密数据,得到第一密钥和干扰数据的长度;
第二解密模块503,用于通过第一密钥解密第二数据,得到第一数据;
去除模块504,用于根据向原始数据添加干扰数据的位置信息和干扰数据的长度,将第一数据中的干扰数据去除,得到图片的原始数据。
进一步地,第一接收模块501,包括:
接收单元,用于接收发送设备发送的第二加密数据,第二加密数据为通过第三密钥加密第二密钥得到的加密数据;
第二获取单元,用于获取第三密钥;
第一解密单元,用于通过第三密钥解密第二加密数据,得到第二密钥。
进一步地,第一解密模块502,包括:
第三获取单元,用于获取迭代异或解密算法;
第二解密单元,用于通过迭代异或解密算法和第一密钥解密第二数据,得到第一数据。
进一步地,装置还包括:
第三解密模块,用于通过第二密钥解密第一加密数据,得到原始数据的MD5值;
第二接收模块,用于接收发送设备发送的第二数据的第二MD5值;
第二计算模块,用于计算解密的原始数据的MD5值作为第三MD5值和接 收的第二数据的MD5值作为第四MD5值;
第一验证模块,用于根据第一MD5值和第三MD5值,对解密的原始数据进行验证;
第二验证模块,用于根据第二MD5值和第四MD5值,对接收的第二数据进行验证。
进一步地,第一加密数据还包括通过第二密钥加密位置信息,或者,第一加密数据还包括通过第二密钥加密模式标识,模式标识用于标识位置信息;
装置还包括:
第四解密模块,用于通过第二密钥解密第一加密数据,得到位置信息;或者,
第四解密模块,用于通过第二密钥解密第一加密数据,得到模式标识,根据模式标识,从模式标识和位置信息的对应关系中获取位置信息。
在本发明实施例中,在本发明实施例中,发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向原始数据添加干扰数据的位置信息;发送设备生成干扰数据;发送设备根据位置信息,将干扰数据加入原始数据中得到第一数据;发送设备通过第一密钥加密第一数据,得到第二数据,通过第二密钥加密第一密钥和干扰数据的长度,得到第一加密数据,向接收设备发送第二数据、第一加密数据和第二密钥。由于在原始数据中添加了干扰数据,从而可以提高图片的原始数据的安全性。
实施例6
请参考图6,其示出了本发明实施例所涉及的具有触敏表面的终端结构示意图,该终端为上述实例4提供的加密图片的装置提供运行环境。具体来讲:
终端800可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(wireless fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器180处理;另外,将 涉及上行的数据发送给基站。通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端800的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器120还可以包括存储器控制器,以提供处理器180和输入单元130对存储器120的访问。
输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元130可包括触敏表面131以及其他输入设备132。触敏表面131,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。除了触敏表面131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备 132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端800的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图6中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。
终端800还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端800移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端800还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160、扬声器161,传声器162可提供用户与终端800之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一终端,或者将音频数据输出至存储器120以便进一步处理。音频电路160还可能包括耳塞插孔,以提供外设耳机与终端800的通信。
WiFi属于短距离无线传输技术,终端800通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块170,但是可以理解的是,其并不属于终 端800的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器180是终端800的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端800的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理核心;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
终端800还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管未示出,终端800还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,终端800的显示单元是触摸屏显示器,终端800还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含实施例2中发送设备执行的任一操作指令。
实施例7
请参考图7,其示出了本发明实施例所涉及的具有触敏表面的终端结构示意图,该终端为上述实例5提供的解密图片的装置提供运行环境。具体来讲:
终端900可以包括RF(Radio Frequency,射频)电路210、包括有一个或一个以上计算机可读存储介质的存储器220、输入单元230、显示单元240、传感器250、音频电路260、WiFi(wireless fidelity,无线保真)模块270、包括有一个或者一个以上处理核心的处理器280、以及电源290等部件。本领域技术人员可以理解,图7中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
RF电路210可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器280处理;另外,将涉及上行的数据发送给基站。通常,RF电路210包括但不限于天线、至少一 个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路210还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。
存储器220可用于存储软件程序以及模块,处理器280通过运行存储在存储器220的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器220可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端900的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器220还可以包括存储器控制器,以提供处理器280和输入单元230对存储器220的访问。
输入单元230可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元230可包括触敏表面231以及其他输入设备232。触敏表面231,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面231上或在触敏表面231附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面231可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器280,并能接收处理器280发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面231。除了触敏表面231,输入单元230还可以包括其他输入设备232。具体地,其他输入设备232可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、 轨迹球、鼠标、操作杆等中的一种或多种。
显示单元240可用于显示由用户输入的信息或提供给用户的信息以及终端900的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元240可包括显示面板241,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板241。进一步的,触敏表面231可覆盖显示面板241,当触敏表面231检测到在其上或附近的触摸操作后,传送给处理器280以确定触摸事件的类型,随后处理器280根据触摸事件的类型在显示面板241上提供相应的视觉输出。虽然在图7中,触敏表面231与显示面板241是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面231与显示面板241集成而实现输入和输出功能。
终端900还可包括至少一种传感器250,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板241的亮度,接近传感器可在终端900移动到耳边时,关闭显示面板241和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端900还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路260、扬声器261,传声器262可提供用户与终端900之间的音频接口。音频电路260可将接收到的音频数据转换后的电信号,传输到扬声器261,由扬声器261转换为声音信号输出;另一方面,传声器262将收集的声音信号转换为电信号,由音频电路260接收后转换为音频数据,再将音频数据输出处理器280处理后,经RF电路220以发送给比如另一终端,或者将音频数据输出至存储器220以便进一步处理。音频电路260还可能包括耳塞插孔,以提供外设耳机与终端900的通信。
WiFi属于短距离无线传输技术,终端900通过WiFi模块270可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图7示出了WiFi模块270,但是可以理解的是,其并不属于终端900的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器280是终端900的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器220内的软件程序和/或模块,以及调用存储在存储器220内的数据,执行终端900的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器280可包括一个或多个处理核心;优选的,处理器280可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器280中。
终端900还包括给各个部件供电的电源290(比如电池),优选的,电源可以通过电源管理系统与处理器280逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源290还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管未示出,终端900还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,终端900的显示单元是触摸屏显示器,终端900还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含实施例3中接收设备执行的任一操作指令。
需要说明的是:上述实施例提供的加密图片和解密图片的装置在加密图片和解密图片像时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的加密图片的装置与加密图片的方法实施例属于同一构思,解密图片的装置与解密图片的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由终端的处理器执行以完成上述加密图片的方法,以及解密图片的方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (30)

  1. 一种加密图片的方法,其特征在于,所述方法包括:
    发送设备获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
    所述发送设备根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
    所述发送设备通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
    所述发送设备向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
  2. 如权利要求1所述的方法,其特征在于,所述发送设备向接收设备发送所述第二密钥,包括:
    所述发送设备通过第三密钥加密所述第二密钥,得到第二加密数据;
    所述发送设备向所述接收设备发送所述第二加密数据。
  3. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述发送设备计算所述原始数据的消息摘要算法第五版MD5值作为第一MD5值和所述第二数据的MD5值作为第二MD5值;
    所述发送设备通过所述第二密钥加密所述第一MD5值,并添加到所述第一加密数据中;
    所述发送设备向所述接收设备发送所述第二MD5值。
  4. 如权利要求1所述的方法,其特征在于,所述发送设备通过所述第一密钥加密所述第一数据,得到第二数据,包括:
    所述发送设备通过迭代异或加密算法和所述第一密钥加密所述第一数据,得到第二数据。
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述发送设备通过所述第二密钥加密所述位置信息,并添加到所述第一加 密数据中;或者,
    所述发送设备通过所述第二密钥加密模式标识,并添加到所述第一加密数据中,所述模式标识用于标识所述位置信息。
  6. 一种解密图片的方法,其特征在于,所述方法包括:
    接收设备接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
    所述接收设备通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
    所述接收设备通过所述第一密钥解密所述第二数据,得到第一数据;
    所述接收设备根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
  7. 如权利要求6所述的方法,其特征在于,所述接收设备接收发送设备发送的第二密钥,包括:
    所述接收设备接收发送设备发送的第二加密数据;
    所述接收设备获取第三密钥,通过所述第三密钥解密所述第二加密数据,得到第二密钥。
  8. 如权利要求6所述的方法,其特征在于,所述接收设备通过所述第一密钥解密所述第二数据,得到第一数据,包括:
    所述接收设备通过迭代异或解密算法和所述第一密钥解密所述第二数据,得到所述第一数据。
  9. 如权利要求6所述的方法,其特征在于,所述第一加密数据还包括通过第二密钥加密所述原始数据的第一消息摘要算法第五版MD5值,所述方法还包括:
    所述接收设备通过所述第二密钥解密所述第一加密数据,得到所述第一MD5值;
    所述接收设备接收所述发送设备发送的所述第二数据的第二MD5值,并计 算所述解密的原始数据的MD5值作为第三MD5值和所述接收的第二数据的MD5值作为第四MD5值;
    所述接收设备根据所述第一MD5值和所述第三MD5值,对所述解密的原始数据进行验证,以及根据所述第二MD5值和所述第四MD5值,对所述接收的第二数据进行验证。
  10. 如权利要求6所述的方法,其特征在于,所述第一加密数据还包括通过第二密钥加密所述位置信息,或者,所述第一加密数据还包括通过第二密钥加密模式标识,所述模式标识用于标识所述位置信息;
    所述方法还包括:
    所述接收设备通过所述第二密钥解密所述第一加密数据,得到所述位置信息;或者,
    所述接收设备通过所述第二密钥解密所述第一加密数据,得到所述模式标识,根据所述模式标识,从模式标识和位置信息的对应关系中获取所述位置信息。
  11. 一种加密图片的装置,其特征在于,所述装置包括:
    第一获取模块,用于获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
    加入模块,用于根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
    第一加密模块,用于通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
    第一发送模块,用于向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
  12. 如权利要求11所述的装置,其特征在于,所述第一发送模块,包括:
    第一加密单元,用于通过第三密钥加密所述第二密钥,得到第二加密数据;
    发送单元,用于向所述接收设备发送所述第二加密数据。
  13. 如权利要求11所述的装置,其特征在于,所述装置还包括:
    第一计算模块,用于计算所述原始数据的消息摘要算法第五版MD5值作为第一MD5值和所述第二数据的MD5值作为第二MD5值;
    第二加密模块,用于通过所述第二密钥加密所述原始数据的第一MD5值,并添加到所述第一加密数据中;
    第二发送模块,用于向所述接收设备发送所述第二数据的第二MD5值。
  14. 如权利要求10所述的装置,其特征在于,所述第一加密模块,包括:
    第二加密单元,用于通过迭代异或加密算法和所述第一密钥加密所述第一数据,得到第二数据。
  15. 如权利要求10所述的装置,其特征在于,所述装置还包括:
    第三加密模块,用于通过所述第二密钥加密所述位置信息,并添加到所述第一加密数据中;或者,
    第三加密模块,用于通过所述第二密钥加密模式标识,并添加到所述第一加密数据中,所述模式标识用于标识所述位置信息。
  16. 一种解密图片的装置,其特征在于,所述装置包括:
    第一接收模块,用于接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
    第一解密模块,用于通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
    第二解密模块,用于通过所述第一密钥解密所述第二数据,得到第一数据;
    去除模块,用于根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
  17. 如权利要求16所述的接收设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    接收单元,用于接收发送设备发送的第二加密数据,;
    第二获取单元,用于获取第三密钥;
    第一解密单元,用于通过所述第三密钥解密所述第二加密数据,得到第二密钥。
  18. 如权利要求16所述的装置,其特征在于,所述第一解密模块,包括:
    第二解密单元,用于通过迭代异或解密算法和所述第一密钥解密所述第二数据,得到所述第一数据。
  19. 如权利要求16所述的装置,其特征在于,所述装置还包括:
    第三解密模块,用于通过所述第二密钥解密所述第一加密数据,得到所述原始数据的第一消息摘要算法第五版MD5值;
    第二接收模块,用于接收所述发送设备发送的所述第二数据的第二MD5值;
    第二计算模块,用于计算所述解密的原始数据的MD5值作为第三MD5值和所述接收的第二数据的MD5值作为第四MD5值;
    第一验证模块,用于根据所述第一MD5值和所述第三MD5值,对所述解密的原始数据进行验证;
    第二验证模块,用于根据所述第二MD5值和所述第四MD5值,对所述接收的第二数据进行验证。
  20. 如权利要求16所述的装置,其特征在于,所述第一加密数据还包括通过第二密钥加密所述位置信息,或者,所述第一加密数据还包括通过第二密钥加密模式标识,所述模式标识用于标识所述位置信息;
    所述装置还包括:
    第四解密模块,用于通过所述第二密钥解密所述第一加密数据,得到所述位置信息;或者,
    第四解密模块,用于通过所述第二密钥解密所述第一加密数据,得到所述模式标识,根据所述模式标识,从模式标识和位置信息的对应关系中获取所述位置信息。
  21. 一种发送设备,其特征在于,所述发送设备包括:一个或多个处理器;和
    存储器;
    所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于进行以下操作的指令:
    获取待加密的图片的原始数据、第一密钥、第二密钥和用于向所述原始数据添加干扰数据的位置信息;
    根据所述位置信息,将所述干扰数据加入所述原始数据中得到第一数据;
    通过所述第一密钥加密所述第一数据,得到第二数据,通过所述第二密钥加密所述第一密钥和所述干扰数据的长度,得到第一加密数据;
    向接收设备发送所述第二数据、所述第一加密数据和所述第二密钥。
  22. 如权利要求21所述的发送设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    通过第三密钥加密所述第二密钥,得到第二加密数据;
    向所述接收设备发送所述第二加密数据。
  23. 如权利要求21所述的发送设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    计算所述原始数据的消息摘要算法第五版MD5值作为第一MD5值和所述第二数据的MD5值作为第二MD5值;
    通过所述第二密钥加密所述原始数据的第一MD5值,并添加到所述第一加密数据中;
    向所述接收设备发送所述第二数据的第二MD5值。
  24. 如权利要求20所述的发送设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    通过所述迭代异或加密算法和所述第一密钥加密所述第一数据,得到第二数据。
  25. 如权利要求20所述的发送设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    通过所述第二密钥加密所述位置信息,并添加到所述第一加密数据中;或者,
    通过所述第二密钥加密模式标识,并添加到所述第一加密数据中,所述模式标识用于标识所述位置信息。
  26. 一种接收设备,其特征在于,所述接收设备包括:一个或多个处理器;和
    存储器;
    所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于进行以下操作的指令:
    接收发送设备发送的图片加密后得到的第二数据、第一加密数据和第二密钥;
    通过所述第二密钥解密所述第一加密数据,得到第一密钥和干扰数据的长度;
    通过所述第一密钥解密所述第二数据,得到第一数据;
    根据位置信息和所述干扰数据的长度,将所述第一数据中的所述干扰数据去除,得到所述图片的原始数据,所述位置信息是所述干扰数据在所述原始数据中的位置。
  27. 如权利要求26所述的接收设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    接收发送设备发送的第二加密数据;
    获取第三密钥;
    通过所述第三密钥解密所述第二加密数据,得到第二密钥。
  28. 如权利要求26所述的接收设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    通过迭代异或解密算法和所述第一密钥解密所述第二数据,得到第一数据。
  29. 如权利要求26所述的接收设备,其特征在于,所述一个或多个程序还包含用于进行以下操作的指令:
    通过所述第二密钥解密所述第一加密数据,得到所述原始数据的第一消息摘要算法第五版MD5值;
    接收所述发送设备发送的所述第二数据的第二MD5值;
    计算所述解密的原始数据的MD5值作为第三MD5值和所述接收的第二数据的MD5值作为第四MD5值;
    根据所述第一MD5值和所述第三MD5值,对所述解密的原始数据进行验证;
    根据所述第二MD5值和所述第四MD5值,对所述接收的第二数据进行验证。
  30. 如权利要求26所述的接收设备,其特征在于,所述第一加密数据还包括通过第二密钥加密所述位置信息,或者,所述第一加密数据还包括通过第二密钥加密模式标识,所述模式标识用于标识所述位置信息;
    所述一个或多个程序还包含用于进行以下操作的指令:
    通过所述第二密钥解密所述第一加密数据,得到所述位置信息;或者,
    通过所述第二密钥解密所述第一加密数据,得到所述模式标识,根据所述模式标识,从模式标识和位置信息的对应关系中获取所述位置信息。
PCT/CN2016/100113 2015-10-19 2016-09-26 一种加密图片、解密图片的方法、装置和设备 WO2017067369A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/705,098 US10454905B2 (en) 2015-10-19 2017-09-14 Method and apparatus for encrypting and decrypting picture, and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510676194.1A CN106599698B (zh) 2015-10-19 2015-10-19 一种加密图片、解密图片的方法和装置
CN201510676194.1 2015-10-19

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/705,098 Continuation-In-Part US10454905B2 (en) 2015-10-19 2017-09-14 Method and apparatus for encrypting and decrypting picture, and device

Publications (1)

Publication Number Publication Date
WO2017067369A1 true WO2017067369A1 (zh) 2017-04-27

Family

ID=58554539

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100113 WO2017067369A1 (zh) 2015-10-19 2016-09-26 一种加密图片、解密图片的方法、装置和设备

Country Status (3)

Country Link
US (1) US10454905B2 (zh)
CN (1) CN106599698B (zh)
WO (1) WO2017067369A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295069B (zh) * 2017-05-27 2020-06-02 Oppo广东移动通信有限公司 数据备份方法、装置、存储介质及服务器
CN110489386A (zh) * 2019-08-06 2019-11-22 Oppo广东移动通信有限公司 信息处理方法、装置、存储介质及电子设备
CN110855362B (zh) * 2019-11-18 2021-08-03 南京工程学院 基于可见光led矩阵的保密通信方法和系统
CN113364760A (zh) * 2021-06-01 2021-09-07 平安科技(深圳)有限公司 一种数据加密处理方法、装置、计算机设备及存储介质
CN113472967A (zh) * 2021-06-28 2021-10-01 上海观安信息技术股份有限公司 图像数据安全传输的方法、装置、处理设备、存储介质
CN113472537B (zh) * 2021-09-01 2021-11-26 深圳市通易信科技开发有限公司 数据加密方法、系统及计算机可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183685A (zh) * 1996-06-28 1998-06-03 株式会社东芝 加密译码方法,记录重放装置及记录媒体
CN103488915A (zh) * 2013-09-24 2014-01-01 无锡德思普科技有限公司 一种软硬件相结合的双重密钥加密的资源加密解密方法
CN103971323A (zh) * 2014-05-22 2014-08-06 复旦大学 一种基于置乱变换和形态成分分析的数字水印隐写方法
CN104115440A (zh) * 2011-12-30 2014-10-22 英特尔公司 防止电子码本加密中的图案识别
WO2014175830A1 (en) * 2013-04-25 2014-10-30 Treebox Solutions Pte Ltd Method performed by at least one server for processing a data packet from a first computing device to a second computing device to permit end-to-end encryption communication
US20150016602A1 (en) * 2013-07-15 2015-01-15 At&T Intellectual Propertyi, L.P. Method and apparatus for providing secure image encryption and decryption

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1014618A1 (en) * 1998-07-30 2000-06-28 Sony Corporation Content processing system
US7508941B1 (en) * 2003-07-22 2009-03-24 Cisco Technology, Inc. Methods and apparatus for use in surveillance systems
JP4596256B2 (ja) * 2005-08-02 2010-12-08 ソニー株式会社 送受信システムおよび方法、送信装置および方法、受信装置および方法、並びにプログラム
CN101262340A (zh) * 2008-04-22 2008-09-10 中兴通讯股份有限公司 彩信加密的方法及收发加密彩信的移动终端
JP2010028733A (ja) * 2008-07-24 2010-02-04 Victor Co Of Japan Ltd 画像データ暗号化装置、暗号化画像データ復号装置、画像データ暗号化方法、暗号化画像データ復号方法、および暗号化画像データの伝送方法
US9240883B2 (en) * 2008-09-04 2016-01-19 Intel Corporation Multi-key cryptography for encrypting file system acceleration
FR2941267B1 (fr) 2009-01-22 2011-01-21 Renault Sas Procede et dispositif de determination de la pression en amont d'une turbine d'un turbocompresseur de suralimentation d'un moteur thermique.
JP5255499B2 (ja) * 2009-03-30 2013-08-07 株式会社エヌ・ティ・ティ・ドコモ 鍵情報管理方法、コンテンツ送信方法、鍵情報管理装置、ライセンス管理装置、コンテンツ送信システム、及び端末装置
JP5454673B2 (ja) * 2010-03-17 2014-03-26 富士通株式会社 通信装置、プログラムおよび方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183685A (zh) * 1996-06-28 1998-06-03 株式会社东芝 加密译码方法,记录重放装置及记录媒体
CN104115440A (zh) * 2011-12-30 2014-10-22 英特尔公司 防止电子码本加密中的图案识别
WO2014175830A1 (en) * 2013-04-25 2014-10-30 Treebox Solutions Pte Ltd Method performed by at least one server for processing a data packet from a first computing device to a second computing device to permit end-to-end encryption communication
US20150016602A1 (en) * 2013-07-15 2015-01-15 At&T Intellectual Propertyi, L.P. Method and apparatus for providing secure image encryption and decryption
CN103488915A (zh) * 2013-09-24 2014-01-01 无锡德思普科技有限公司 一种软硬件相结合的双重密钥加密的资源加密解密方法
CN103971323A (zh) * 2014-05-22 2014-08-06 复旦大学 一种基于置乱变换和形态成分分析的数字水印隐写方法

Also Published As

Publication number Publication date
CN106599698A (zh) 2017-04-26
US10454905B2 (en) 2019-10-22
US20180007019A1 (en) 2018-01-04
CN106599698B (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
US12041165B2 (en) Key updating method, apparatus, and system
CN111193695B (zh) 一种第三方账号登录的加密方法、装置及存储介质
US10880746B2 (en) Network connection method, apparatus, storage medium and terminal
WO2018176781A1 (zh) 信息发送方法、信息接收方法、装置及系统
CN109257740B (zh) Profile下载方法、移动终端及可读存储介质
CN109600223B (zh) 验证方法、激活方法、装置、设备及存储介质
WO2018014723A1 (zh) 密钥管理方法、装置、设备及系统
CN110417543B (zh) 一种数据加密方法、装置和存储介质
CN106850220B (zh) 数据加密方法、数据解密方法及装置
WO2018177124A1 (zh) 业务处理方法、装置、数据共享系统及存储介质
WO2018157858A1 (zh) 信息存储方法、装置及计算机可读存储介质
WO2017067369A1 (zh) 一种加密图片、解密图片的方法、装置和设备
WO2017185711A1 (zh) 控制智能设备的方法、装置、系统和存储介质
WO2017041599A1 (zh) 业务处理方法及电子设备
CN104580167B (zh) 一种传输数据的方法、装置和系统
WO2020164526A1 (zh) 一种分布式系统中的节点控制方法和相关装置
WO2017024579A1 (zh) 一种消息保护的方法、相关设备以及系统
CN104954126B (zh) 敏感操作验证方法、装置及系统
CN107154935B (zh) 业务请求方法及装置
WO2018201991A1 (zh) 数据处理方法、系统、装置、存储介质及设备
CN106845177A (zh) 密码管理方法及系统
WO2014000652A1 (zh) 浏览器插件安装方法、装置及终端
WO2016192511A1 (zh) 远程删除信息的方法和装置
WO2018049969A1 (zh) 热点建立方法及相关设备
CN105488433B (zh) 终端密钥生成方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16856802

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29/08/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16856802

Country of ref document: EP

Kind code of ref document: A1