CN110677551A - Image encryption method, device, equipment and storage medium - Google Patents

Image encryption method, device, equipment and storage medium Download PDF

Info

Publication number
CN110677551A
CN110677551A CN201810719408.2A CN201810719408A CN110677551A CN 110677551 A CN110677551 A CN 110677551A CN 201810719408 A CN201810719408 A CN 201810719408A CN 110677551 A CN110677551 A CN 110677551A
Authority
CN
China
Prior art keywords
information
image
encrypted
encryption
shooting
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
CN201810719408.2A
Other languages
Chinese (zh)
Other versions
CN110677551B (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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810719408.2A priority Critical patent/CN110677551B/en
Publication of CN110677551A publication Critical patent/CN110677551A/en
Application granted granted Critical
Publication of CN110677551B publication Critical patent/CN110677551B/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/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • 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

Abstract

The embodiment of the application provides an image encryption method, an image encryption device and a storage medium, wherein an image and shooting information of the image are acquired; encrypting the shooting information based on a preset encryption algorithm to generate encrypted information; and embedding the encryption information into the image to generate an encrypted image, and sending the encrypted image to a server so that the server detects whether the encrypted image is tampered based on the encryption information. The technical scheme provided by the embodiment of the application can prevent the image from being tampered, and the reliability of the image information is ensured.

Description

Image encryption method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to an image encryption method, device, equipment and storage medium.
Background
With the development of network technology, more and more businesses can perform auditing by submitting corresponding image data (such as a field picture, a business license picture, an identity card picture and the like). In order to ensure the authenticity of image data, service providers must check the authenticity of user image data to prevent lawbreakers from earning benefits by tampering with the image.
In the prior art, two methods for detecting whether a picture is tampered are mainly adopted, one method is a manual checking method, and whether the picture is changed is judged through human eyes; the other method is a machine auditing method, and the method judges whether the picture is tampered by EXIF information in the picture.
Among the two methods, the manual auditing method has low accuracy and high labor cost. In the machine auditing method, because some existing third-party tools can change the EXIF information without leaving modification traces, the machine auditing method can also be deceived, and the problem of inaccurate auditing results occurs.
Disclosure of Invention
The embodiment of the application provides an image encryption method, an image encryption device, image encryption equipment and a storage medium, which are used for preventing an image from being tampered and improving the reliability of image information.
A first aspect of an embodiment of the present application provides an image encryption method, including: acquiring an image and shooting information of the image; encrypting the shooting information based on a preset encryption algorithm to generate encrypted information; and embedding the encryption information into the image to generate an encrypted image, and sending the encrypted image to a server so that the server detects whether the encrypted image is tampered based on the encryption information.
A second aspect of the embodiments of the present application provides an image encryption apparatus, including: the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an image and shooting information of the image; the encryption module is used for encrypting the shooting information based on a preset encryption algorithm to generate encrypted information; and the generating module is used for embedding the encryption information into the image, generating an encrypted image and sending the encrypted image to a server so that the server can detect whether the encrypted image is tampered based on the encryption information.
A third aspect of the embodiments of the present application provides a terminal device, including: one or more processors; one or more shooting devices for shooting images and recording shooting information of the images; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method according to the first aspect as described above.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to the first aspect.
Based on the above aspects, the embodiment of the present application generates the encrypted image by acquiring the image and the shooting information of the image, encrypting the shooting information of the image based on the preset encryption algorithm, and embedding the encrypted information into the image. The encrypted information in the embodiment of the application is not easy to be tampered and identified, so that the image can be effectively prevented from being tampered, the reliability of the image information is improved, the algorithm in the embodiment of the application is simple, the requirement on the processing capacity of the equipment is low, the method can be executed on terminal equipment such as a mobile phone, the usability of the technical scheme of the application is improved, and the requirement of scenes such as electronic map merchant labels on the authenticity of the image can be particularly solved.
It should be understood that what is described in the summary section above is not intended to limit key or critical features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present disclosure will become apparent from the following description.
Drawings
Fig. 1 is a flowchart of an image encryption method provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for executing step S12 according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an image encryption apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of the encryption module 32 provided in the embodiment of the present application;
fig. 5 is a block diagram illustrating a terminal device according to an example embodiment.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustration purposes only and are not intended to limit the scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the embodiments of the application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As can be seen from the introduction of the background section, in some business scenarios (e.g., electronic map merchant labeling, etc.), it is necessary that the image submitted by the user is authentic and reliable. In order to ensure the authenticity and reliability of an image and avoid the falsification of image information, the existing method generally detects the authenticity of the image through human eyes or EXIF information of the image, however, both methods have certain defects, are poor in reliability and cannot accurately and effectively detect the authenticity of the image.
In view of the foregoing problems of the prior art, embodiments of the present application provide an image encryption method that generates encryption information based on captured information of an image and generates an encrypted image by embedding the encryption information in the image. The encrypted information in the method is not easy to identify and tamper, the image can be effectively prevented from being tampered, the reliability of the image information is ensured, the algorithm is simple, the requirement on the processing capacity of equipment is low, and the method can be executed on terminal equipment such as a mobile phone, so that the technical scheme has high usability, and the requirement of scenes such as electronic map merchant labels on the authenticity of the image can be particularly solved.
Technical solutions of embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of an image encryption method provided in an embodiment of the present application, which may be performed by an image encryption apparatus. Referring to FIG. 1, the method includes steps S11-S13:
and S11, acquiring the image and shooting information of the image.
The image in the present embodiment may be one of a black-and-white image, a color image, a grayscale image, or a depth image.
The image in this embodiment may be a history captured image acquired from a database, or may be a real-time image captured by a capturing device.
The shooting information referred to in the present embodiment only includes one of the following information: shooting time, coordinate information, exposure information, focal length information, shutter time information, model information of the shooting device.
And S12, carrying out encryption processing on the shooting information based on a preset encryption algorithm to generate encrypted information.
The encryption algorithm may be set as needed, and is not specifically limited in this embodiment. The process of encrypting the shooting information based on the encryption algorithm can be referred to in the prior art and is not described in detail herein.
S13, embedding the encryption information into the image, generating an encrypted image, and sending the encrypted image to a server, so that the server detects whether the encrypted image is tampered based on the encryption information.
Specifically, when an encrypted image is generated based on the encryption information, discrete wavelet transform (dwt) or discrete cosine transform (dct) may be performed on the image to obtain a transformed data matrix, and then the encryption information may be embedded into the least significant bit of each position in the data matrix to obtain an encrypted data matrix, so that the encrypted image may be obtained by performing inverse dwt or dct transformation on the encrypted data matrix.
Further, after the server receives the encrypted image containing the encrypted information, the server needs to perform dwt or dct transformation on the encrypted image to obtain the encrypted data matrix, extract the encrypted information from the least significant bit of each position in the data matrix, and finally decrypt the encrypted information through a preset encryption algorithm to obtain the original image. And when the server cannot decrypt or verifies abnormal after decryption, judging that the picture is modified, otherwise, judging that the picture is not modified.
The present embodiment generates encrypted information by acquiring an image and shooting information of the image, encrypting the shooting information of the image based on a preset encryption algorithm, and thereby generating an encrypted image by embedding the encrypted information in the image. The encrypted information in the embodiment of the application is not easy to be tampered and identified, so that the image can be effectively prevented from being tampered, the reliability of the image information is improved, the algorithm of the embodiment is simple, the requirement on the processing capacity of the equipment is low, the method can be executed on terminal equipment such as a mobile phone, the usability of the technical scheme of the application is improved, and the requirement of scenes such as electronic map merchant labels on the authenticity of the image can be particularly solved.
The above embodiments are further optimized and expanded with reference to the attached drawings.
Fig. 2 is a flowchart of a method for executing step S12 according to an embodiment of the present application, and as shown in fig. 2, on the basis of the embodiment of fig. 1, the method includes steps S21-S24:
and S21, carrying out encryption processing on the shooting information based on a preset encryption algorithm to obtain encrypted shooting information.
For example, if the shooting information includes coordinate information, time information, and angle information during shooting, when performing encryption processing, it is necessary to perform splicing processing on the information according to a preset splicing manner (such as kv structure, fixed separator splicing, etc.) to form a shooting information stream, and perform encryption processing on the shooting information stream based on a preset encryption algorithm to obtain encrypted shooting information. It is understood that this is by way of illustration and not by way of limitation.
S22, determining a second length of the filling data based on the first length of the encrypted shooting information and the preset association relationship between the length of the encrypted information and the size of the picture, so that the total length of the first length and the second length is matched with the size of the picture.
In this embodiment, the association relationship between the encryption information length and the picture size may be set as required, and is not limited to a specific relationship form. In this embodiment, the length of the encrypted information is equal to the size of the picture. Assuming that the length of the obtained encrypted shot information is a and the picture size is b, the size of the padding data is determined to be b-a. It is understood that this is by way of illustration and not by way of limitation.
And S23, generating the filling data with the second length.
In addition, the generated filling data has verifiability, so that the server side can verify the encrypted information and judge whether the image is modified according to the verification result.
In order to achieve the above object, there are many methods that can be used in this embodiment, and in order to simplify the description and clarify the technical solution of this embodiment, only the method of the random password table is taken as an example in the following description:
after determining the length of the padding data (i.e., the second length) based on the length of the shooting information, the embodiment may first use a preset random password table to generate the ciphertext sequence based on the obtained shooting information (e.g., shooting time, shooting coordinates, etc.) as a random factor. And extracting data with a second length from the ciphertext sequence as filling data. When the padding data is extracted from the ciphertext sequence, the data with the second length may be taken as the padding data according to the data arrangement order in the ciphertext sequence and the order from front to back, or the data with the second length may be taken as the padding data according to the order from back to front, or other preset extraction rules may be adopted to extract the data, for example, one data is extracted every other data.
And S24, splicing the filling data and the encrypted shooting information to obtain encrypted information.
The filling data can be spliced at the front section of the encrypted shooting information or at the tail of the encrypted shooting information, or can be spliced according to other preset splicing modes, and specific limitation is not made in the embodiment.
The embodiment determines the length of the filling data based on the preset incidence relation between the length of the encrypted information and the size of the picture, and simultaneously generates the ciphertext sequence based on the shooting information by adopting the random password table, so that the data with the corresponding length is extracted from the ciphertext sequence to be used as the filling data, the encrypted information has no regularity and is difficult to find and tamper, meanwhile, the encrypted information has the check property, whether the image is tampered or not can be conveniently and accurately detected, and the reliability of the image information is improved.
Fig. 3 is a schematic structural diagram of an image encryption apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus 30 includes:
an acquiring module 31, configured to acquire an image and shooting information of the image;
the encryption module 32 is configured to encrypt the shooting information based on a preset encryption algorithm to generate encrypted information;
a generating module 33, configured to embed the encryption information into the image, generate an encrypted image, and send the encrypted image to a server, so that the server detects whether the encrypted image is tampered based on the encryption information.
In one possible embodiment, the shooting information includes at least one of the following information:
shooting time, coordinate information, exposure information, focal length information, shutter time information, model information of the shooting device.
In yet another possible design, the generating module 33 includes:
the first transformation submodule is used for carrying out discrete wavelet transformation (dwt) on the image to obtain a transformed data matrix;
the embedding submodule is used for embedding the encryption information into the least significant bit of each position in the data matrix to obtain an encrypted data matrix;
and the second transformation submodule is used for carrying out dw inverse transformation on the encrypted data matrix to generate an encrypted image.
The apparatus 30 provided in this embodiment can be used to execute the method in the embodiment of fig. 1, and the execution manner and the beneficial effects are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of an encryption module 32 provided in an embodiment of the present application, and as shown in fig. 4, on the basis of the embodiment of fig. 3, the encryption information includes shooting information and padding data. An encryption module 32 comprising:
the encryption sub-module 321 is configured to encrypt the shooting information based on a preset encryption algorithm to obtain encrypted shooting information;
a determining sub-module 322, configured to determine a second length of padding data based on a first length of the encrypted shooting information and a preset association relationship between the length of the encrypted information and a picture size, so that a total length of the first length and the second length matches the size of the picture;
a generating submodule 323 configured to generate padding data of the second length;
and the splicing submodule 324 is configured to splice the filling data and the encrypted shooting information to obtain encrypted information.
In one possible design, the generating submodule 323 is specifically configured to:
generating a ciphertext sequence by adopting a preset random password table and taking the shooting information as a random factor;
and extracting the data with the second length from the ciphertext sequence as filling data.
The apparatus provided in this embodiment can be used to execute the method in the embodiment of fig. 2, and the execution manner and the beneficial effects are similar, which are not described herein again.
An embodiment of the present application further provides a terminal device, including: one or more processors;
one or more shooting devices for shooting images and recording shooting information of the images;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of any of the above embodiments.
Illustratively, fig. 5 is a block diagram illustrating a terminal device according to an exemplary embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 5, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 800.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 814 includes one or more sensors for providing various aspects of state assessment for terminal device 800. For example, sensor assembly 814 can detect the open/closed state of device 800, the relative positioning of components, such as a display and keypad of terminal device 800, sensor assembly 814 can also detect a change in the position of terminal device 800 or a component of terminal device 800, the presence or absence of user contact with terminal device 800, orientation or acceleration/deceleration of terminal device 800, and a change in the temperature of terminal device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, 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, an optical data storage device, and the like.
The present application also provides a computer readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method of any one of the above embodiments.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (14)

1. An image encryption method, comprising:
acquiring an image and shooting information of the image;
encrypting the shooting information based on a preset encryption algorithm to generate encrypted information;
and embedding the encryption information into the image to generate an encrypted image, and sending the encrypted image to a server so that the server detects whether the encrypted image is tampered based on the encryption information.
2. The method according to claim 1, wherein the photographing information includes at least one of:
shooting time, coordinate information, exposure information, focal length information, shutter time information, model information of the shooting device.
3. The method according to claim 1 or 2, wherein the encryption information includes photographing information and padding data.
4. The method according to claim 3, wherein the encrypting the shooting information based on a preset encryption algorithm to generate encrypted information comprises:
encrypting the shooting information based on a preset encryption algorithm to obtain encrypted shooting information;
determining a second length of padding data based on a first length of the encrypted shooting information and a preset association relationship between the length of the encrypted information and the size of the picture, so that the total length of the first length and the second length is matched with the size of the picture;
generating padding data of the second length;
and splicing the filling data and the encrypted shooting information to obtain encrypted information.
5. The method of claim 4, wherein the generating the padding data of the second length comprises:
generating a ciphertext sequence by adopting a preset random password table and taking the shooting information as a random factor;
and extracting the data with the second length from the ciphertext sequence as filling data.
6. The method of claim 1, wherein said embedding the encryption information into the image to generate an encrypted image comprises:
performing discrete wavelet transform (dwt) on the image to obtain a transformed data matrix;
embedding the encryption information into the least significant bit of each position in the data matrix to obtain an encrypted data matrix;
and carrying out the dwt inverse transformation on the encrypted data matrix to generate an encrypted image.
7. An image encryption apparatus characterized by comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an image and shooting information of the image;
the encryption module is used for encrypting the shooting information based on a preset encryption algorithm to generate encrypted information;
and the generating module is used for embedding the encryption information into the image, generating an encrypted image and sending the encrypted image to a server so that the server can detect whether the encrypted image is tampered based on the encryption information.
8. The apparatus according to claim 7, wherein the photographing information includes at least one of:
shooting time, coordinate information, exposure information, focal length information, shutter time information, model information of the shooting device.
9. The apparatus according to claim 7 or 8, wherein the encryption information includes photographing information and padding data.
10. The apparatus of claim 9, wherein the encryption module comprises:
the encryption sub-module is used for carrying out encryption processing on the shooting information based on a preset encryption algorithm to obtain encrypted shooting information;
the determining sub-module is used for determining a second length of the filling data based on a first length of the encrypted shooting information and a preset incidence relation between the length of the encrypted information and the size of the picture, so that the total length of the first length and the second length is matched with the size of the picture;
a generating submodule for generating the padding data of the second length;
and the splicing submodule is used for splicing the filling data and the encrypted shooting information to obtain encrypted information.
11. The apparatus according to claim 10, wherein the generating submodule is specifically configured to:
generating a ciphertext sequence by adopting a preset random password table and taking the shooting information as a random factor;
and extracting the data with the second length from the ciphertext sequence as filling data.
12. The apparatus of claim 7, wherein the generating module comprises:
the first transformation submodule is used for carrying out discrete wavelet transformation (dwt) on the image to obtain a transformed data matrix;
the embedding submodule is used for embedding the encryption information into the least significant bit of each position in the data matrix to obtain an encrypted data matrix;
and the second transformation submodule is used for carrying out dw inverse transformation on the encrypted data matrix to generate an encrypted image.
13. A terminal device, comprising:
one or more processors;
one or more shooting devices for shooting images and recording shooting information of the images;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201810719408.2A 2018-07-03 2018-07-03 Image encryption method, device, equipment and storage medium Active CN110677551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810719408.2A CN110677551B (en) 2018-07-03 2018-07-03 Image encryption method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810719408.2A CN110677551B (en) 2018-07-03 2018-07-03 Image encryption method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110677551A true CN110677551A (en) 2020-01-10
CN110677551B CN110677551B (en) 2021-08-17

Family

ID=69065441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810719408.2A Active CN110677551B (en) 2018-07-03 2018-07-03 Image encryption method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110677551B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177214A (en) * 2021-04-29 2021-07-27 百度在线网络技术(北京)有限公司 Image publishing and auditing method, related device and computer program product
CN114898539A (en) * 2022-01-25 2022-08-12 中网道科技集团股份有限公司 High-safety self-help correction terminal
CN115695924A (en) * 2021-07-30 2023-02-03 瑞庭网络技术(上海)有限公司 Data processing method, client, server, and computer-readable recording medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207481A (en) * 2006-12-21 2008-06-25 日立通讯技术株式会社 Encryption apparatus
US20110058225A1 (en) * 2009-09-09 2011-03-10 Samsung Electronics Co., Ltd. Image forming apparatus, image processing method thereof, and image forming system
CN104079830A (en) * 2014-06-30 2014-10-01 广东欧珀移动通信有限公司 Cipher adding method and device and cipher picture processing method and device
CN107241302A (en) * 2016-03-29 2017-10-10 展讯通信(上海)有限公司 Image data transfer method, device and terminal
CN107845118A (en) * 2017-11-23 2018-03-27 矽图(厦门)科技有限公司 A kind of digitization image processing method
CN108021814A (en) * 2017-11-27 2018-05-11 河海大学 A kind of image encryption method of the bionical cellular automata based on balance rule

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207481A (en) * 2006-12-21 2008-06-25 日立通讯技术株式会社 Encryption apparatus
US20110058225A1 (en) * 2009-09-09 2011-03-10 Samsung Electronics Co., Ltd. Image forming apparatus, image processing method thereof, and image forming system
CN104079830A (en) * 2014-06-30 2014-10-01 广东欧珀移动通信有限公司 Cipher adding method and device and cipher picture processing method and device
CN107241302A (en) * 2016-03-29 2017-10-10 展讯通信(上海)有限公司 Image data transfer method, device and terminal
CN107845118A (en) * 2017-11-23 2018-03-27 矽图(厦门)科技有限公司 A kind of digitization image processing method
CN108021814A (en) * 2017-11-27 2018-05-11 河海大学 A kind of image encryption method of the bionical cellular automata based on balance rule

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177214A (en) * 2021-04-29 2021-07-27 百度在线网络技术(北京)有限公司 Image publishing and auditing method, related device and computer program product
CN115695924A (en) * 2021-07-30 2023-02-03 瑞庭网络技术(上海)有限公司 Data processing method, client, server, and computer-readable recording medium
CN114898539A (en) * 2022-01-25 2022-08-12 中网道科技集团股份有限公司 High-safety self-help correction terminal
CN114898539B (en) * 2022-01-25 2024-04-09 中网道科技集团股份有限公司 Self-service correction terminal of high security

Also Published As

Publication number Publication date
CN110677551B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
EP3001637B1 (en) Methods and devices for authorizing operation
US20180367315A1 (en) Method and apparatus for signing and verifying application installation package, and storage medium
US10452890B2 (en) Fingerprint template input method, device and medium
CN111049978B (en) Notification information display method and device
EP3151507A1 (en) Methods and apparatuses for controlling device
US20220382884A1 (en) Method and device for parsing shared password
CN106454392A (en) Live broadcast processing method, device and terminal
CN110677551B (en) Image encryption method, device, equipment and storage medium
CN110765434A (en) Identity authentication method and device, electronic equipment and storage medium
JP6101863B2 (en) Information transmission method, apparatus, program, and recording medium for voice service
EP3324662A1 (en) Identity verification method, apparatus and system, computer program and recording medium
CN111431724B (en) Data transmission method and device and electronic equipment
EP2978162A1 (en) Anti-counterfeiting verification method, device and system
CN107169320A (en) Method of calibration and device
CN105282162A (en) Processing method and device for account management business
CN107302519B (en) Identity authentication method and device for terminal equipment, terminal equipment and server
CN111050209A (en) Multimedia resource playing method and device
CN111158748B (en) Information acquisition method and device and storage medium
CN115438345A (en) Log encryption and decryption method, device, equipment and storage medium
CN113868505A (en) Data processing method and device, electronic equipment, server and storage medium
CN111371563A (en) Password verification method and device, electronic equipment and storage medium
CN111724536A (en) Vehicle unlocking method and device, electronic equipment and storage medium
CN112887590B (en) Image processing method, device and storage medium
US11375379B1 (en) Method and apparatus for identifying terminals
CN110139230B (en) Method and device for forwarding short message and intelligent equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant