CN112637442A - Method and device for encrypting circulating image by cloud server and local end - Google Patents

Method and device for encrypting circulating image by cloud server and local end Download PDF

Info

Publication number
CN112637442A
CN112637442A CN202011586072.0A CN202011586072A CN112637442A CN 112637442 A CN112637442 A CN 112637442A CN 202011586072 A CN202011586072 A CN 202011586072A CN 112637442 A CN112637442 A CN 112637442A
Authority
CN
China
Prior art keywords
image
encrypted
cloud server
encryption
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011586072.0A
Other languages
Chinese (zh)
Other versions
CN112637442B (en
Inventor
孙全刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinrun Ark Technology Co ltd
Original Assignee
Dezhou Zhengjie Electric Co ltd
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 Dezhou Zhengjie Electric Co ltd filed Critical Dezhou Zhengjie Electric Co ltd
Priority to CN202011586072.0A priority Critical patent/CN112637442B/en
Publication of CN112637442A publication Critical patent/CN112637442A/en
Application granted granted Critical
Publication of CN112637442B publication Critical patent/CN112637442B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Facsimile Transmission Control (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention belongs to the technical field of cloud service, and particularly relates to a method and a device for encrypting a circulating image by a cloud server and a local terminal. The method performs the steps of: step 1: the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server; step 2: and the cloud server encrypts the received second partial image to obtain a cloud service encrypted image. The images to be encrypted are separated, then different parts of the separated images to be encrypted are encrypted at the local end and the cloud server respectively, meanwhile, the local end and the cloud server also mutually transmit the encrypted images, and the steps of segmentation and encryption are executed in a circulating mode, so that the circulating encryption of the images to be encrypted is realized, the encrypted images cannot be cracked, and the security is extremely high.

Description

Method and device for encrypting circulating image by cloud server and local end
Technical Field
The invention belongs to the technical field of cloud servers, and particularly relates to a method and a device for encrypting a circulating image by a cloud server and a local terminal.
Background
With the widespread application of multimedia information technology, multimedia data is increasingly spread and stored between the internet, so that the basic measures taken to effectively protect user information from being used by illegal persons are information secret transmission and storage. Traditional encryption algorithms such as International Data Encryption Algorithm (IDEA), Advanced Encryption Standard (AES), etc. are designed for one-dimensional data streams, and are relatively unsuitable for image data encryption because image information has the characteristics of large data volume, strong correlation between data, high redundancy, etc., so that when the traditional encryption algorithm is adopted for encryption, the encryption efficiency is not high.
Meanwhile, in some application scenarios with high requirements on data security, the traditional encryption algorithm is easy to be cracked and utilized by lawbreakers because the algorithm is known. Therefore, an encryption algorithm different from the prior art is developed, and the security of image encryption is promoted.
Patent No. CN201310412691.1A discloses a color image encryption method based on a chaos sequence and a hyper-chaos system, which mainly comprises the following steps: performing bit-level joint scrambling on the original color image to obtain a scrambled image; decomposing the scrambled image into R, G, B three-primary-color components, and generating an encryption matrix for encrypting the scrambled image by using a hyperchaotic system; and changing all pixel values of the three-primary-color components of the scrambled image by using the encryption matrix and combining the plaintext information and the three-primary-color component information, and performing joint diffusion to obtain the three-primary-color components of the image after joint diffusion, thereby obtaining a final encrypted image. The method greatly increases the key space, so that the security, the encryption effect and the key sensitivity are higher, the attack resistance is stronger, and the hardware implementation is easier.
The image encryption method includes scrambling an image to be encrypted, and encrypting the scrambled image to finish image encryption. Although the method is different from the encryption standard and the encryption means in the prior art, the security is improved, but after the image data encrypted by the method is stolen, the key and all the data are locally existed and are easily cracked violently.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for performing cyclic image encryption on a cloud server and a local terminal, wherein images to be encrypted are separated, and then different parts of the separated images to be encrypted are respectively encrypted on the local terminal and the cloud server, and meanwhile, the local terminal and the cloud server also perform mutual transmission of the encrypted images, and perform the steps of segmentation and encryption in a cyclic manner, so as to achieve cyclic encryption of the images to be encrypted, and the encrypted images cannot be decrypted, which is very high in security.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the method for encrypting the circulating image by the cloud server and the local end comprises the following steps:
step 1: the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server;
step 2: the cloud server encrypts the received second partial image to obtain a cloud service encrypted image;
and step 3: the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end;
and 4, step 4: the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again;
and 5: step 3 and step 4 are performed periodically, namely: the cloud server encrypts all the received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
Further, the method for encrypting the image by the local terminal performs the following steps: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
Further, the method for encrypting the single line of data comprises the following steps: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
Further, the selecting at least one target data segment from the single line of data includes: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
Further, the method for encrypting the image by the cloud server performs the following steps: obtaining a gray level image of the image; processing the gray level image to obtain a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure BDA0002865777080000041
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image; m isiAnd mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for representing resources consumed when the computing center is used; the penalty function is used for exceeding the set resource calculated by the cost functionCalculating a penalty value, substituting the penalty value into a formula for calculation, and changing the position of the calculated optimal center; the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
The device for encrypting the circulating image by the cloud server and the local end comprises: the system comprises a local end and a cloud server; the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server; the cloud server encrypts the received second partial image to obtain a cloud service encrypted image; the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end; the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again; periodically, the cloud server encrypts all received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
Further, the method for encrypting the image by the local terminal performs the following steps: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
Further, the method for encrypting the single line of data comprises the following steps: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
Further, the selecting at least one target data segment from the single line of data includes: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
Further, the method for encrypting the image by the cloud server performs the following steps: obtaining a gray level image of the image; processing the gray level image to obtain a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure BDA0002865777080000051
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image; m isiAnd mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for representing resources consumed when the computing center is used; the penalty function is used for calculating a penalty value when the resource calculated by the cost function exceeds a set threshold value, substituting the penalty value into a formula for calculation, and changing the calculated optimal centerThe position of (a); the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
The method and the device for encrypting the circulating image by the cloud server and the local end have the following beneficial effects that: the images to be encrypted are separated, then different parts of the separated images to be encrypted are encrypted at the local end and the cloud server respectively, meanwhile, the local end and the cloud server also mutually transmit the encrypted images, and the steps of segmentation and encryption are executed in a circulating mode, so that the circulating encryption of the images to be encrypted is realized, the encrypted images cannot be cracked, and the security is extremely high. The method is mainly realized by the following steps: 1. and (3) separate encryption of the local end and the cloud server: the method separates the images to be encrypted, encrypts one part at the local end and encrypts one part at the cloud server, so that the whole image information is difficult to restore even if one part of the encrypted images is stolen; meanwhile, the local end and the cloud server end use different encryption algorithms, so that the cracking difficulty is further improved; 2. and (3) circular encryption: aiming at more than one process of encrypting an image to be encrypted, after the local and cloud servers are encrypted, the cloud server returns an encrypted result to the local end, the local end sends the encrypted result to the cloud server, meanwhile, the local end executes the process of segmenting and encrypting all the received image data again, and the whole encryption process is completed after the processes are executed circularly for a plurality of times; the result of this is that half of the final encrypted image is encrypted once, one fourth of the final encrypted image is encrypted twice, and one eighth of the final encrypted image is encrypted three times, so that different parts of the image are cracked by using different cracking times and cracking means, the cracking difficulty is greatly increased, and the security of the encrypted image is improved.
Drawings
Fig. 1 is a schematic flowchart of a method for performing cyclic image encryption by a cloud server and a local end according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for performing cyclic image encryption by a cloud server and a local end according to an embodiment of the present invention.
Detailed Description
The method of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments of the invention.
Example 1
As shown in fig. 1, a cloud server and a local side perform a method for encryption of a loop image, where the method includes:
step 1: the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server;
step 2: the cloud server encrypts the received second partial image to obtain a cloud service encrypted image;
and step 3: the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end;
and 4, step 4: the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again;
and 5: step 3 and step 4 are performed periodically, namely: the cloud server encrypts all the received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
By adopting the technical scheme, the images to be encrypted are separated, then different parts of the separated images to be encrypted are respectively encrypted at the local end and the cloud server, and meanwhile, the local end and the cloud server also mutually transmit the encrypted images and circularly execute the steps of segmentation and encryption, so that the cyclic encryption of the images to be encrypted is realized, the encrypted images cannot be cracked, and the security is extremely high. The method is mainly realized by the following steps: 1. and (3) separate encryption of the local end and the cloud server: the method separates the images to be encrypted, encrypts one part at the local end and encrypts one part at the cloud server, so that the whole image information is difficult to restore even if one part of the encrypted images is stolen; meanwhile, the local end and the cloud server end use different encryption algorithms, so that the cracking difficulty is further improved; 2. and (3) circular encryption: aiming at more than one process of encrypting an image to be encrypted, after the local and cloud servers are encrypted, the cloud server returns an encrypted result to the local end, the local end sends the encrypted result to the cloud server, meanwhile, the local end executes the process of segmenting and encrypting all the received image data again, and the whole encryption process is completed after the processes are executed circularly for a plurality of times; the result of this is that half of the final encrypted image is encrypted once, one fourth of the final encrypted image is encrypted twice, and one eighth of the final encrypted image is encrypted three times, so that different parts of the image are cracked by using different cracking times and cracking means, the cracking difficulty is greatly increased, and the security of the encrypted image is improved.
Example 2
On the basis of the previous embodiment, the method for encrypting the image by the local terminal performs the following steps: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
Specifically, the cryptographic technique is a secret technique in which both communication parties perform special information transformation according to an agreed rule. According to a specific rule, Plaintext (Plaintext) is converted into Ciphertext (cipertext). The process of changing from plaintext to ciphertext is called Encryption (Encryption); the process of recovering the original plaintext from the ciphertext is called Decryption (Decryption). The cipher only encrypts and decrypts characters or numbers in the early stage, and with the development of communication technology, the cipher can implement encryption and decryption transformation on voice, images, data and the like. Cryptography is composed of cryptology, which mainly studies the encoding of information to achieve information concealment, and cryptanalysis, which mainly studies the acquisition of corresponding plaintext information by means of ciphertext. Cryptography studies cryptographic theory, cryptographic algorithms, cryptographic protocols, cryptographic techniques, cryptographic applications, and the like. With the continuous maturity of cryptography, a large number of password products are applied to the national civilians, such as USB keys, PIN EntryDevice, RFID cards, bank cards, and the like. In a broad sense, application products including the password function are also password products, such as various internet of things products, and the structures of the application products are similar to those of computers, and the application products also include parts such as operation, control, storage, input and output. The cryptographic chip is the key of the security of the cryptographic product, and is generally composed of key components such as a system control module, a cryptographic service module, a memory control module, a function auxiliary module, a communication module and the like.
Data encryption technology requires that the password be released to obtain the original data only under a designated user or network, which requires that special information, called keys, be given to the data sender and receiver for encryption and decryption. The value of the key is selected from a large number of random numbers. The encryption algorithm is divided into a private key and a public key.
Example 3
On the basis of the above embodiment, the method for encrypting the single line of data includes: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
In particular, end-to-end encryption allows data to always exist in ciphertext form during transmission from a source point to an endpoint point. With end-to-end encryption (also called offline encryption or packet encryption), messages are not decrypted when being transmitted until reaching the end point, and because the messages are protected in the whole transmission process, the messages cannot be leaked even if nodes are damaged.
End-to-end encryption systems are less expensive and more reliable and easier to design, implement and maintain than link encryption and node encryption. End-to-end encryption also avoids synchronization problems inherent in other encryption systems, because each packet is encrypted independently, transmission errors occurring in one packet do not affect subsequent packets. Furthermore, end-to-end encryption is more natural from the user's intuition of security requirements. A single user may choose this encryption method so as not to affect other users on the network, which only requires that the source and destination nodes be kept secret.
End-to-end encryption systems typically do not allow the destination address of a message to be encrypted because the node through which each message passes uses the address to determine how to transmit the message. This encryption method is vulnerable to preventing an attacker from analyzing the traffic, since it cannot mask the origin and destination of the transmitted message.
Example 4
On the basis of the above embodiment, the selecting at least one target data segment from the single line of data includes: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
Example 5
On the basis of the previous embodiment, the method for encrypting the image by the cloud server performs the following steps: obtaining a gray level image of the image; processing the gray scale imageAcquiring a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure BDA0002865777080000101
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image; m isiAnd mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for representing resources consumed when the computing center is used; the penalty function is used for calculating a penalty value when the resources calculated by the cost function exceed a set threshold value, substituting the penalty value into a formula for calculation, and changing the position of the calculated optimal center; the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
Example 6
The device for encrypting the circulating image by the cloud server and the local end comprises: the system comprises a local end and a cloud server; the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server; the cloud server encrypts the received second partial image to obtain a cloud service encrypted image; the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end; the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again; periodically, the cloud server encrypts all received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
Specifically, the images to be encrypted are separated, then different parts of the separated images to be encrypted are encrypted at the local end and the cloud server respectively, and meanwhile, the local end and the cloud server also transmit the encrypted images to each other, and the steps of segmenting and encrypting are executed in a circulating mode, so that the circulating encryption of the images to be encrypted is realized, the encrypted images cannot be cracked, and the security is extremely high.
Example 7
On the basis of the previous embodiment, the method for encrypting the image by the local terminal performs the following steps: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
Specifically, the image to be encrypted is separated, one part of the image is encrypted at the local end, and the other part of the image is encrypted at the cloud server, so that the whole image information is difficult to restore even if one part of the encrypted image is stolen; meanwhile, the local end and the cloud server end use different encryption algorithms, so that the cracking difficulty is further improved.
Example 8
On the basis of the above embodiment, the method for encrypting the single line of data includes: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
Aiming at more than one process of encrypting an image to be encrypted, after the local and cloud servers are encrypted, the cloud server returns an encrypted result to the local end, the local end sends the encrypted result to the cloud server, meanwhile, the local end executes the process of segmenting and encrypting all the received image data again, and the whole encryption process is completed after the processes are executed circularly for a plurality of times; the result of this is that half of the final encrypted image is encrypted once, one fourth of the final encrypted image is encrypted twice, and one eighth of the final encrypted image is encrypted three times, so that different parts of the image are cracked by using different cracking times and cracking means, the cracking difficulty is greatly increased, and the security of the encrypted image is improved.
Example 9
On the basis of the above embodiment, the selecting at least one target data segment from the single line of data includes: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
Example 10
On the basis of the previous embodiment, the method for encrypting the image by the cloud server performs the following steps: obtaining a gray level image of the image; processing the gray level image to obtain a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure BDA0002865777080000131
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image;miand mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for representing resources consumed when the computing center is used; the penalty function is used for calculating a penalty value when the resources calculated by the cost function exceed a set threshold value, substituting the penalty value into a formula for calculation, and changing the position of the calculated optimal center; the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
It should be noted that, the system provided in the foregoing embodiment is only illustrated by dividing the functional units, and in practical applications, the functions may be distributed by different functional units according to needs, that is, the units or steps in the embodiments of the present invention are further decomposed or combined, for example, the units in the foregoing embodiment may be combined into one unit, or may be further decomposed into multiple sub-units, so as to complete all or the functions of the units described above. The names of the units and steps involved in the embodiments of the present invention are only for distinguishing the units or steps, and are not to be construed as unduly limiting the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Those of skill in the art would appreciate that the various illustrative elements, method steps, described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the elements, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or unit/apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or unit/apparatus.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent modifications or substitutions of the related art marks may be made by those skilled in the art without departing from the principle of the present invention, and the technical solutions after such modifications or substitutions will fall within the protective scope of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. The method for encrypting the circulating image by the cloud server and the local end is characterized by comprising the following steps:
step 1: the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server;
step 2: the cloud server encrypts the received second partial image to obtain a cloud service encrypted image;
and step 3: the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end;
and 4, step 4: the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again;
and 5: step 3 and step 4 are performed periodically, namely: the cloud server encrypts all the received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
2. The method of claim 1, wherein the method of encrypting the image at the local end performs the steps of: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
3. The method of claim 2, wherein the method of encrypting the single line of data comprises: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
4. The method of claim 3, wherein said selecting at least one target data segment from a single line of data comprises: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
5. The method of claim 4, wherein the cloud server encrypting the image performs the steps of: obtaining a gray level image of the image; processing the gray level image to obtain a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure FDA0002865777070000021
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image; m isiAnd mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for characterizing in the calculationResources consumed in the center; the penalty function is used for calculating a penalty value when the resources calculated by the cost function exceed a set threshold value, substituting the penalty value into a formula for calculation, and changing the position of the calculated optimal center; the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
6. Apparatus for encryption of looping images by a cloud server and a local side, which are used to implement the method of any of claims 1 to 5, wherein the apparatus comprises: the system comprises a local end and a cloud server; the local terminal equally divides the image to be encrypted into two parts, namely a first part and a second part; encrypting the first part to obtain a local encrypted image; sending the second partial image to a cloud server; the cloud server encrypts the received second partial image to obtain a cloud service encrypted image; the local end sends the local encrypted image to the cloud server, and meanwhile, the cloud server sends the cloud service encrypted image to the local end; the cloud server encrypts the received local encrypted image again, the local end equally divides the received cloud service encrypted image into two parts, namely a first part of cloud service encrypted image and a second part of cloud service encrypted image, encrypts the first part of cloud service encrypted image again, and directly sends the second part of cloud service encrypted image to the cloud server; the cloud server encrypts the received cloud service encrypted image of the second part again; periodically, the cloud server encrypts all received images, the local terminal equally divides the received images to obtain a first part and a second part, the first part is directly encrypted, and the second part is sent to the cloud server; until the number of times of encryption by the cloud server reaches a set threshold value.
7. The apparatus of claim 6, wherein the method for encrypting the image by the local end performs the steps of: and carrying out image processing on the image to be encrypted to convert the image data into matrixed numerical data, processing the matrixed numerical data to convert the matrixed numerical data into single-row data, and encrypting the converted single-row data to finish image encryption.
8. The apparatus of claim 7, wherein the method of encrypting the single line of data comprises: selecting at least one target data segment from the single line of data; carrying out encryption operation on the selected target data segment according to a preset encryption algorithm to obtain a corresponding encryption character string; adjusting the character arrangement sequence of the encrypted character string to obtain a target character string; and replacing the target data segment in the single-line data with a corresponding target character string to realize data encryption.
9. The apparatus of claim 8, wherein said selecting at least one target data segment from a single line of data comprises: selecting a data segment located at a fixed position and/or a data segment specified by a user in the single line of data as the target data segment; the encryption operation of the selected target data segment according to a preset encryption algorithm comprises the following steps: carrying out encryption operation on the target data segment by adopting a message digest encryption algorithm; the adjusting the character arrangement sequence of the encrypted character string to obtain a target character string includes: adjusting the character arrangement sequence of the encrypted character strings according to a preset rule; and carrying out first cyclic displacement coding on the character string after the character arrangement sequence is adjusted to obtain a target character string.
10. The apparatus of claim 9, wherein the method of the cloud server encrypting the image performs the steps of: obtaining a gray level image of the image; processing the gray level image to obtain a complex resolution image corresponding to the gray level image; calculating the center probability of the complex resolution image, and obtaining the optimal center position by using the following formula:
Figure FDA0002865777070000041
wherein i and j are respectively a pixel abscissa value and an ordinate value of the complex resolution image; m isiAnd mjRespectively representing the horizontal coordinate value and the vertical coordinate value corresponding to the center mapping pixel of the pixel corresponding to the coordinate value; di(mi) As a cost function, V (m)i,mj) As a penalty function, t is the number of pixels; the cost function is used for representing resources consumed when the computing center is used; the penalty function is used for calculating a penalty value when the resources calculated by the cost function exceed a set threshold value, substituting the penalty value into a formula for calculation, and changing the position of the calculated optimal center; the abscissa and ordinate of the position of the center are joined by the calculated position of the optimum center, the joined value is used as a generated key value, and the image is encrypted using the key value.
CN202011586072.0A 2020-12-28 2020-12-28 Method and device for encrypting circulating images by cloud server and local end Active CN112637442B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011586072.0A CN112637442B (en) 2020-12-28 2020-12-28 Method and device for encrypting circulating images by cloud server and local end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011586072.0A CN112637442B (en) 2020-12-28 2020-12-28 Method and device for encrypting circulating images by cloud server and local end

Publications (2)

Publication Number Publication Date
CN112637442A true CN112637442A (en) 2021-04-09
CN112637442B CN112637442B (en) 2022-07-22

Family

ID=75285815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011586072.0A Active CN112637442B (en) 2020-12-28 2020-12-28 Method and device for encrypting circulating images by cloud server and local end

Country Status (1)

Country Link
CN (1) CN112637442B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113689321A (en) * 2021-08-23 2021-11-23 陈凤妹 Image information transmission method and device based on stereoscopic projection encryption

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517059A (en) * 2014-12-19 2015-04-15 张凡 Cloud-based image encryption method and device
CN107302706A (en) * 2017-06-21 2017-10-27 北京奇艺世纪科技有限公司 Image anti-stealing link method, device and electronic equipment
US20190280865A1 (en) * 2018-03-08 2019-09-12 Ubiq Security, Inc. Systems and methods for secure storage and transmission of a data stream
US20200341702A1 (en) * 2019-04-24 2020-10-29 Kyocera Document Solutions Inc. Image forming system, server, image forming apparatus, and image forming method that reduce server capacity and allows to pull print

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517059A (en) * 2014-12-19 2015-04-15 张凡 Cloud-based image encryption method and device
CN107302706A (en) * 2017-06-21 2017-10-27 北京奇艺世纪科技有限公司 Image anti-stealing link method, device and electronic equipment
US20190280865A1 (en) * 2018-03-08 2019-09-12 Ubiq Security, Inc. Systems and methods for secure storage and transmission of a data stream
US20200341702A1 (en) * 2019-04-24 2020-10-29 Kyocera Document Solutions Inc. Image forming system, server, image forming apparatus, and image forming method that reduce server capacity and allows to pull print

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113689321A (en) * 2021-08-23 2021-11-23 陈凤妹 Image information transmission method and device based on stereoscopic projection encryption
CN113689321B (en) * 2021-08-23 2023-12-22 深圳普汇智为科技有限公司 Image information transmission method and device based on stereoscopic projection encryption

Also Published As

Publication number Publication date
CN112637442B (en) 2022-07-22

Similar Documents

Publication Publication Date Title
Rashmi et al. An improved method for reversible data hiding steganography combined with cryptography
CN104468090B (en) Character cipher coding method based on image pixel coordinates
US8687800B2 (en) Encryption method for message authentication
CN109840425B (en) File encryption method and device
Abusukhon et al. A novel network security algorithm based on private key encryption
Abusukhon et al. Secure network communication based on text-to-image encryption
Jain et al. Secret data transmission using vital image steganography over transposition cipher
Mehndiratta Data hiding system using cryptography & steganography: a comprehensive modern investigation
CN112637442B (en) Method and device for encrypting circulating images by cloud server and local end
Atee et al. Cryptography and image steganography using dynamic encryption on LSB and color image based data hiding
Saha et al. Secret image sharing schemes: A comprehensive survey
Tiwari et al. A Robust Method for Image Steganography based on chaos theory
CN111541652B (en) System for improving security of secret information keeping and transmission
Negi et al. Hybrid approach for Data Security using Coverless Image Steganography with AES
CN114826730A (en) Block chain hidden communication model capable of hiding sensitive document and sender identity
Belkaid et al. Meteosat images encryption based on AES and RSA algorithms
CN107169912A (en) A kind of improved method of Image Chaos encryption technology
Gunasekaran et al. Encrypting and decrypting image using computer visualization techniques
Mohd Salleh et al. A review on structured scheme representation on data security application
CN117676032B (en) Multi-party reversible information hiding method and device for ciphertext binary image
Abduljabbar et al. Robust scheme to protect authentication code of message/image documents in cloud computing
Prasad et al. Design and Analysis of Secure and Efficient Image with Embedded Sensitive Information Transferring Technique using Blowfish Algorithm
Rao et al. A Novel Image Encryption Algorithm with Image Integrity Check
Parihar et al. Efficient Single Secret Image Sharing in Resource-Constrained Environment using Counting-Based Secret Sharing over Cloud
Prajanati et al. Image security enhancement on cloud storage using AES algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220630

Address after: Room 1, floor 13-14, unit 1, building 3, Zheshang international, chagu Avenue, Liuwu New District, Lhasa, Tibet Autonomous Region, 850000

Applicant after: Jinrun Ark Technology Co.,Ltd.

Address before: 253039 No.150, Honghai Road, Luquantun Town, Wucheng County, Dezhou City, Shandong Province

Applicant before: Dezhou Zhengjie Electric Co.,Ltd.

GR01 Patent grant
GR01 Patent grant