CN118590589A - Image encryption method, device and related products - Google Patents
Image encryption method, device and related products Download PDFInfo
- Publication number
- CN118590589A CN118590589A CN202410663850.3A CN202410663850A CN118590589A CN 118590589 A CN118590589 A CN 118590589A CN 202410663850 A CN202410663850 A CN 202410663850A CN 118590589 A CN118590589 A CN 118590589A
- Authority
- CN
- China
- Prior art keywords
- image
- encrypted
- array
- channel
- bit packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/44—Secrecy systems
- H04N1/448—Rendering the image unintelligible, e.g. scrambling
- H04N1/4486—Rendering the image unintelligible, e.g. scrambling using digital data encryption
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本申请公开了一种图像加密方法、装置及相关产品。对待加密图像进行预处理,获得待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组;对红色通道数组、绿色通道数组和蓝色通道数组进行通道置乱处理,获得待加密图像对应的通道置乱数组;根据图像加密规则集对待加密图像对应的通道置乱数组进行加密处理,获得加密图像。可见,在本申请中将待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组进行置乱处理,也即将红色通道数组、绿色通道数组和蓝色通道数组混合为一个通道置乱数组,避免了相关技术中对红色通道数组、绿色通道数组和蓝色通道数组分别进行单一加密的方式,如此本申请通过进行通道置乱的操作提高了图像加密的安全性。
The present application discloses an image encryption method, device and related products. The image to be encrypted is preprocessed to obtain the red channel array, green channel array and blue channel array corresponding to the image to be encrypted; the red channel array, green channel array and blue channel array are subjected to channel scrambling processing to obtain the channel scrambled array corresponding to the image to be encrypted; the channel scrambled array corresponding to the image to be encrypted is encrypted according to the image encryption rule set to obtain the encrypted image. It can be seen that in the present application, the red channel array, green channel array and blue channel array corresponding to the image to be encrypted are scrambled, that is, the red channel array, green channel array and blue channel array are mixed into a channel scrambled array, avoiding the method of separately encrypting the red channel array, green channel array and blue channel array in the related art, so that the present application improves the security of image encryption by performing channel scrambling operations.
Description
技术领域Technical Field
本申请涉及图像加密技术领域,特别是涉及一种图像加密方法、装置及相关产品。The present application relates to the field of image encryption technology, and in particular to an image encryption method, device and related products.
背景技术Background Art
随着多媒体相关技术以及网络通讯技术的快速发展和普及,各个领域的图像越来越多地在信息传播中被使用,然而某些图像通常包含个人隐私及敏感信息,需要对其进行加密后传输,来保证图像在传输过程中的安全性。在相关技术中通常采用传统加密算法(如AES、RSA、IDEA等加密算法)对图像进行加密,由于图像作为一种特殊的数据格式,且图像存在大量高冗余度数据,从而导致通过传统加密算法获得的加密后的图像仍可以轻易被识别出来,从而导致图像加密的安全性较低。With the rapid development and popularization of multimedia related technologies and network communication technologies, images in various fields are increasingly used in information dissemination. However, some images usually contain personal privacy and sensitive information, which need to be encrypted before transmission to ensure the security of the image during transmission. In related technologies, traditional encryption algorithms (such as AES, RSA, IDEA, etc.) are usually used to encrypt images. Since images are a special data format and have a large amount of highly redundant data, the encrypted images obtained by traditional encryption algorithms can still be easily identified, resulting in low security of image encryption.
因此,如何提高图像加密的安全性是本领域技术人员关注的重点问题。Therefore, how to improve the security of image encryption is a key issue that technicians in this field are concerned about.
发明内容Summary of the invention
基于上述问题,本申请提供了一种图像加密方法、装置及相关产品,旨在提高图像加密的安全性。本申请实施例公开了如下技术方案:Based on the above problems, the present application provides an image encryption method, device and related products, aiming to improve the security of image encryption. The embodiments of the present application disclose the following technical solutions:
第一方面,本申请公开了一种图像加密方法,包括:In a first aspect, the present application discloses an image encryption method, comprising:
获取待加密图像和图像加密规则集,其中图像加密规则集用于对所述待加密图像进行加密;Acquire an image to be encrypted and an image encryption rule set, wherein the image encryption rule set is used to encrypt the image to be encrypted;
对所述待加密图像进行预处理,获得所述待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组;Preprocessing the image to be encrypted to obtain a red channel array, a green channel array, and a blue channel array corresponding to the image to be encrypted;
对所述红色通道数组、所述绿色通道数组和所述蓝色通道数组进行通道置乱处理,获得所述待加密图像对应的通道置乱数组;Performing channel scrambling processing on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted;
根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行加密处理,获得加密图像。The channel scrambled array corresponding to the image to be encrypted is encrypted according to the image encryption rule set to obtain an encrypted image.
可选的,所述红色通道数组包括第一红色通道和第二红色通道,所述绿色通道数组包括第一绿色通道和第二绿色通道,所述蓝色通道数组包括第一蓝色通道和第二蓝色通道;Optionally, the red channel array includes a first red channel and a second red channel, the green channel array includes a first green channel and a second green channel, and the blue channel array includes a first blue channel and a second blue channel;
所述对所述红色通道数组、所述绿色通道数组和所述蓝色通道数组进行置乱处理,获得所述待加密图像对应的通道置乱数组,包括:The scrambling process is performed on the red channel array, the green channel array, and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted, including:
对所述红色通道数组中的第一红色通道、所述绿色通道数组中的第一绿色通道和所述蓝色通道数组中的第一蓝色通道进行拼接,获得第一置乱数组;splicing the first red channel in the red channel array, the first green channel in the green channel array, and the first blue channel in the blue channel array to obtain a first scrambled array;
对所述红色通道数组中的第二红色通道、所述绿色通道数组中的第二绿色通道和所述蓝色通道数组中的第二蓝色通道进行拼接,获得第二置乱数组;splicing the second red channel in the red channel array, the second green channel in the green channel array, and the second blue channel in the blue channel array to obtain a second scrambled array;
对所述第一置乱数组和所述第二置乱数组进行拼接,获得所述待加密图像对应的通道置乱数组。The first scrambled array and the second scrambled array are concatenated to obtain a channel scrambled array corresponding to the image to be encrypted.
可选的,在所述根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行处理,获得加密图像之前,还包括:Optionally, before the channel scrambling array corresponding to the image to be encrypted is processed according to the image encryption rule set to obtain the encrypted image, the method further includes:
获取随机数生成器生成的图像加密密钥;Get the image encryption key generated by the random number generator;
对所述通道置乱数组进行分组处理,获得多个待加密分组;Performing group processing on the channel scrambled array to obtain a plurality of groups to be encrypted;
根据所述图像加密密钥和所述多个待加密分组,获得多个图像子密钥,其中多个待加密分组的数量与所述多个图像子密钥的数量相同。A plurality of image subkeys are obtained according to the image encryption key and the plurality of groups to be encrypted, wherein the number of the plurality of groups to be encrypted is the same as the number of the plurality of image subkeys.
可选的,所述多个待加密分组包括目标待加密分组,所述根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行处理,获得加密图像,包括:Optionally, the multiple groups to be encrypted include a target group to be encrypted, and the processing of the channel scrambling array corresponding to the image to be encrypted according to the image encryption rule set to obtain the encrypted image includes:
对所述目标待加密分组进行划分,获得第n-2个比特分组和第n-1个比特分组,其中所述n大于或等于3;Dividing the target to-be-encrypted group to obtain an n-2th bit group and an n-1th bit group, where n is greater than or equal to 3;
根据所述图像加密规则集和所述多个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The n-2th bit group and the n-1th bit group are encrypted according to the image encryption rule set and the multiple image subkeys to obtain an encrypted image.
可选的,在所述根据所述图像加密规则集和所述多个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像之前,还包括:Optionally, before encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the multiple image subkeys to obtain the encrypted image, the method further includes:
提取所述多个图像子密钥中与所述第n-2个比特分组和所述第n-1个比特分组对应的第n-2个图像子密钥;extracting an n-2th image subkey corresponding to the n-2th bit group and the n-1th bit group from the multiple image subkeys;
所述根据所述图像加密规则集和所述多个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像,包括:The step of encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the multiple image subkeys to obtain an encrypted image includes:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The n-2th bit group and the n-1th bit group are encrypted according to the image encryption rule set and the n-2th image subkey to obtain an encrypted image.
可选的,所述根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像,包括:Optionally, encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain an encrypted image includes:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得第n个比特分组;Encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain an nth bit group;
对所述第n-2个图像子密钥进行扩展处理,获得与所述第n-1个比特分组和所述第n个比特分组对应的第n-1个图像子密钥;Performing expansion processing on the n-2th image subkey to obtain the n-1th image subkey corresponding to the n-1th bit group and the nth bit group;
根据所述图像加密规则集和所述第n-1个图像子密钥对所述第n-1个比特分组和所述第n个比特分组进行加密,获得第n+1个比特分组;Encrypting the n-1th bit group and the nth bit group according to the image encryption rule set and the n-1th image subkey to obtain an n+1th bit group;
根据所述第n个比特分组和所述第n+1个比特分组,获得加密图像。An encrypted image is obtained according to the nth bit group and the (n+1)th bit group.
可选的,在所述根据所述第n个比特分组和所述第n+1个比特分组,获得加密图像之后,还包括:Optionally, after obtaining the encrypted image according to the nth bit group and the n+1th bit group, the method further includes:
对所述加密图像进行解析,获得所述第n个比特分组和所述第n+1个比特分组;Parsing the encrypted image to obtain the nth bit group and the n+1th bit group;
对所述第n个比特分组和所述第n+1个比特分组进行反向迭代处理,获得所述第n-2个比特分组和所述第n-1个比特分组;Performing reverse iterative processing on the nth bit group and the n+1th bit group to obtain the n-2th bit group and the n-1th bit group;
根据所述第n-2个比特分组和所述第n-1个比特分组,获得所述待加密图像。The image to be encrypted is obtained according to the n-2th bit group and the n-1th bit group.
第二方面,本申请公开了一种图像加密装置,包括:In a second aspect, the present application discloses an image encryption device, comprising:
图像规则获取单元,用于获取待加密图像和图像加密规则集,其中图像加密规则集用于对所述待加密图像进行加密;An image rule acquisition unit, used to acquire an image to be encrypted and an image encryption rule set, wherein the image encryption rule set is used to encrypt the image to be encrypted;
待加密图像处理单元,用于对所述待加密图像进行预处理,获得所述待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组;The image processing unit to be encrypted is used to pre-process the image to be encrypted to obtain a red channel array, a green channel array and a blue channel array corresponding to the image to be encrypted;
置乱数组获得单元,用于对所述红色通道数组、所述绿色通道数组和所述蓝色通道数组进行通道置乱处理,获得所述待加密图像对应的通道置乱数组;A scrambled array obtaining unit, used for performing channel scrambling processing on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted;
加密图像获得单元,用于根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行加密处理,获得加密图像。The encrypted image obtaining unit is used to encrypt the channel scrambling array corresponding to the image to be encrypted according to the image encryption rule set to obtain an encrypted image.
可选的,所述置乱数组获得单元,具体用于:Optionally, the scramble array obtaining unit is specifically used for:
对所述红色通道数组中的第一红色通道、所述绿色通道数组中的第一绿色通道和所述蓝色通道数组中的第一蓝色通道进行拼接,获得第一置乱数组;splicing the first red channel in the red channel array, the first green channel in the green channel array, and the first blue channel in the blue channel array to obtain a first scrambled array;
对所述红色通道数组中的第二红色通道、所述绿色通道数组中的第二绿色通道和所述蓝色通道数组中的第二蓝色通道进行拼接,获得第二置乱数组;splicing the second red channel in the red channel array, the second green channel in the green channel array, and the second blue channel in the blue channel array to obtain a second scrambled array;
对所述第一置乱数组和所述第二置乱数组进行拼接,获得所述待加密图像对应的通道置乱数组。The first scrambled array and the second scrambled array are concatenated to obtain a channel scrambled array corresponding to the image to be encrypted.
可选的,所述装置还包括:Optionally, the device further comprises:
图像密钥获取单元,用于获取随机数生成器生成的图像加密密钥;An image key acquisition unit, used to acquire an image encryption key generated by a random number generator;
待加密分组获得单元,用于对所述通道置乱数组进行分组处理,获得多个待加密分组;A unit for obtaining a group to be encrypted, used for performing group processing on the channel scrambling array to obtain a plurality of groups to be encrypted;
图像子密钥获得单元,用于根据所述图像加密密钥和所述多个待加密分组,获得多个图像子密钥,其中多个待加密分组的数量与所述多个图像子密钥的数量相同。The image subkey obtaining unit is used to obtain a plurality of image subkeys according to the image encryption key and the plurality of groups to be encrypted, wherein the number of the plurality of groups to be encrypted is the same as the number of the plurality of image subkeys.
可选的,所述加密图像获得单元,包括:Optionally, the encrypted image obtaining unit includes:
待加密分组划分单元,用于对所述目标待加密分组进行划分,获得第n-2个比特分组和第n-1个比特分组,其中所述n大于或等于3;a to-be-encrypted group division unit, configured to divide the target to-be-encrypted group into an n-2th bit group and an n-1th bit group, wherein n is greater than or equal to 3;
比特分组加密单元,用于根据所述图像加密规则集和所述多个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The bit group encryption unit is used to encrypt the n-2th bit group and the n-1th bit group according to the image encryption rule set and the multiple image subkeys to obtain an encrypted image.
可选的,所述装置还包括:Optionally, the device further comprises:
第一图像子密钥提取单元,用于提取所述多个图像子密钥中与所述第n-2个比特分组和所述第n-1个比特分组对应的第n-2个图像子密钥;a first image subkey extraction unit, configured to extract an n-2th image subkey corresponding to the n-2th bit group and the n-1th bit group from the plurality of image subkeys;
所述比特分组加密单元,具体用于:The bit group encryption unit is specifically used for:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The n-2th bit group and the n-1th bit group are encrypted according to the image encryption rule set and the n-2th image subkey to obtain an encrypted image.
可选的,所述比特分组加密单元,还用于:Optionally, the bit group encryption unit is further used for:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得第n个比特分组;Encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain an nth bit group;
对所述第n-2个图像子密钥进行扩展处理,获得与所述第n-1个比特分组和所述第n个比特分组对应的第n-1个图像子密钥;Performing expansion processing on the n-2th image subkey to obtain the n-1th image subkey corresponding to the n-1th bit group and the nth bit group;
根据所述图像加密规则集和所述第n-1个图像子密钥对所述第n-1个比特分组和所述第n个比特分组进行加密,获得第n+1个比特分组;Encrypting the n-1th bit group and the nth bit group according to the image encryption rule set and the n-1th image subkey to obtain an n+1th bit group;
根据所述第n个比特分组和所述第n+1个比特分组,获得加密图像。An encrypted image is obtained according to the nth bit group and the (n+1)th bit group.
可选的,所述装置还包括:Optionally, the device further comprises:
加密图像解析单元,用于对所述加密图像进行解析,获得所述第n个比特分组和所述第n+1个比特分组;An encrypted image parsing unit, used for parsing the encrypted image to obtain the nth bit group and the n+1th bit group;
分组反向迭代单元,用于对所述第n个比特分组和所述第n+1个比特分组进行反向迭代处理,获得所述第n-2个比特分组和所述第n-1个比特分组;a group reverse iteration unit, configured to perform reverse iteration processing on the nth bit group and the n+1th bit group to obtain the n-2th bit group and the n-1th bit group;
待加密图像获得单元,用于根据所述第n-2个比特分组和所述第n-1个比特分组,获得所述待加密图像。The to-be-encrypted image obtaining unit is used to obtain the to-be-encrypted image according to the n-2th bit group and the n-1th bit group.
第三方面,本申请实施例提供了一种电子设备,包括:In a third aspect, an embodiment of the present application provides an electronic device, including:
存储器,用于存储计算机程序;Memory for storing computer programs;
处理器,用于执行所述计算机程序时实现第一方面中图像加密方法的步骤。A processor is used to implement the steps of the image encryption method in the first aspect when executing the computer program.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面中图像加密方法的步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image encryption method in the first aspect are implemented.
相较于现有技术,本申请具有以下有益效果:Compared with the prior art, this application has the following beneficial effects:
在本申请中首先获取待加密图像和图像加密规则集;在此之后对待加密图像进行预处理,获得待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组,以及对红色通道数组、绿色通道数组和蓝色通道数组进行通道置乱处理,获得待加密图像对应的通道置乱数组;最后根据图像加密规则集对待加密图像对应的通道置乱数组进行加密处理,获得加密图像。In the present application, an image to be encrypted and an image encryption rule set are first obtained; thereafter, the image to be encrypted is preprocessed to obtain a red channel array, a green channel array and a blue channel array corresponding to the image to be encrypted, and channel scrambling processing is performed on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted; finally, the channel scrambled array corresponding to the image to be encrypted is encrypted according to the image encryption rule set to obtain an encrypted image.
可见,在本申请中将待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组进行置乱处理,也即将红色通道数组、绿色通道数组和蓝色通道数组混合为一个通道置乱数组,并利用图像加密规则集实现了对于待加密图像的加密,如此,避免了相关技术中对红色通道数组、绿色通道数组和蓝色通道数组分别进行单一加密的方式,如此本申请通过进行通道置乱的操作和图像加密规则集的加密操作提高了图像加密的安全性。It can be seen that in the present application, the red channel array, green channel array and blue channel array corresponding to the image to be encrypted are scrambled, that is, the red channel array, green channel array and blue channel array are mixed into a channel scrambled array, and the encryption of the image to be encrypted is implemented using the image encryption rule set. In this way, the method of performing separate encryption of the red channel array, the green channel array and the blue channel array in the related art is avoided. In this way, the present application improves the security of image encryption by performing channel scrambling operations and encryption operations of the image encryption rule set.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
图1为相关技术中提供的图像加密的示意图;FIG1 is a schematic diagram of image encryption provided in the related art;
图2为本申请实施例提供的一种图像加密方法的流程图;FIG2 is a flow chart of an image encryption method provided by an embodiment of the present application;
图3为本申请实施例提供的一种图像加密方法的通道置乱的流程图;FIG3 is a flow chart of channel scrambling of an image encryption method provided in an embodiment of the present application;
图4为本申请实施例提供的一种图像加密方法的迭代处理的流程图;FIG4 is a flowchart of an iterative process of an image encryption method provided in an embodiment of the present application;
图5为本申请实施例提供的一种图像加密方法的图像加密的全流程图;FIG5 is a full flow chart of image encryption of an image encryption method provided in an embodiment of the present application;
图6为本申请实施例提供的一种图像加密装置的结构示意图;FIG6 is a schematic diagram of the structure of an image encryption device provided in an embodiment of the present application;
图7为本申请实施例提供的一种电子设备结构示意图。FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
需要说明的是,本申请提供的一种图像加密方法、装置及相关产品,用于图像加密技术领域,上述仅为示例,并不对本申请提供的方法及装置名称的应用领域进行限定。It should be noted that the image encryption method, device and related products provided by the present application are used in the field of image encryption technology. The above are only examples and do not limit the application field of the method and device names provided by the present application.
正如前文描述,随着多媒体相关技术以及网络通讯技术的快速发展和普及,各个领域的图像越来越多地在信息传播中被使用,然而某些图像通常包含个人隐私及敏感信息,需要对其进行加密后传输,来保证图像在传输过程中的安全性。As described above, with the rapid development and popularization of multimedia related technologies and network communication technologies, images in various fields are increasingly used in information dissemination. However, some images usually contain personal privacy and sensitive information, which need to be encrypted before transmission to ensure the security of the image during transmission.
在相关技术中通常采用传统加密算法对图像进行加密,其中相关技术中的传统加密算法通常为AES、RSA、IDEA等加密算法,其通常被用于文本数据或者二进制数据的加密,而图像作为一种特殊的数据格式,使用AES等传统加密算法对图像进行加密时,密钥空间较小,加密算法抵抗攻击的能力较弱,因此导致图像加密的安全性较低。In the related technology, traditional encryption algorithms are usually used to encrypt images, wherein the traditional encryption algorithms in the related technology are usually encryption algorithms such as AES, RSA, IDEA, etc., which are usually used to encrypt text data or binary data. As an image is a special data format, when the image is encrypted using traditional encryption algorithms such as AES, the key space is small and the encryption algorithm has a weak ability to resist attacks, resulting in low security of image encryption.
如图1所示,图1为相关技术中提供的图像加密的示意图,图(a)为需要加密的图像,图(b)为采用传统加密算法获得的加密后的图像,可见通过图(b)仍然可以识别出图(a)的大致轮廓,即通过传统加密算法获得的加密后的图像仍可以轻易被识别出来,从而导致图像加密的安全性较低。因此,如何提高图像加密的安全性是本领域技术人员关注的重点问题。As shown in FIG1 , FIG1 is a schematic diagram of image encryption provided in the related art, FIG1 (a) is the image to be encrypted, and FIG1 (b) is the encrypted image obtained by using the traditional encryption algorithm. It can be seen that the general outline of FIG1 (a) can still be identified through FIG1 (b), that is, the encrypted image obtained by the traditional encryption algorithm can still be easily identified, resulting in low security of image encryption. Therefore, how to improve the security of image encryption is a key issue that those skilled in the art are concerned about.
所以发明人提出本申请技术方案,首先获取待加密图像和图像加密规则集,然后对待加密图像进行预处理,获得待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组,以及对红色通道数组、绿色通道数组和蓝色通道数组进行通道置乱处理,获得待加密图像对应的通道置乱数组,最后根据图像加密规则集对待加密图像对应的通道置乱数组进行加密处理,获得加密图像。Therefore, the inventor proposed the technical solution of the present application, first obtaining the image to be encrypted and the image encryption rule set, then preprocessing the image to be encrypted to obtain the red channel array, green channel array and blue channel array corresponding to the image to be encrypted, and performing channel scrambling processing on the red channel array, green channel array and blue channel array to obtain the channel scrambled array corresponding to the image to be encrypted, and finally encrypting the channel scrambled array corresponding to the image to be encrypted according to the image encryption rule set to obtain the encrypted image.
可见,在本申请中将待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组进行置乱处理,也即将红色通道数组、绿色通道数组和蓝色通道数组混合为一个通道置乱数组,并利用图像加密规则集实现了对于待加密图像的加密,如此,避免了相关技术中对红色通道数组、绿色通道数组和蓝色通道数组分别进行单一加密的方式,如此本申请通过进行通道置乱的操作和图像加密规则集的加密操作大大提高了图像加密的混淆程序,从而提高了图像加密的安全性。It can be seen that in the present application, the red channel array, green channel array and blue channel array corresponding to the image to be encrypted are scrambled, that is, the red channel array, green channel array and blue channel array are mixed into a channel scrambled array, and the encryption of the image to be encrypted is implemented using the image encryption rule set. In this way, the method of performing a single encryption of the red channel array, the green channel array and the blue channel array respectively in the related art is avoided. In this way, the present application greatly improves the obfuscation procedure of image encryption by performing channel scrambling operations and encryption operations of the image encryption rule set, thereby improving the security of image encryption.
本申请实施例提供的方法可以由终端设备上的软件执行。所述终端设备例如可以是手机、平板电脑、计算机等设备。所述软件例如可以是系统软件。The method provided in the embodiment of the present application can be executed by software on a terminal device. The terminal device can be, for example, a mobile phone, a tablet computer, a computer, etc. The software can be, for example, system software.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
以下通过一个实施例,对本申请提供的一种图像加密方法进行说明。The following is an example of an image encryption method provided by the present application.
参见图2,该图为本申请实施例提供的一种图像加密方法的流程图,如图2所示,该方法包括:Referring to FIG. 2 , which is a flow chart of an image encryption method provided in an embodiment of the present application, as shown in FIG. 2 , the method includes:
S201:获取待加密图像和图像加密规则集。S201: Obtain an image to be encrypted and an image encryption rule set.
在本步骤中,待加密图像包括待加密明文RGB图像,图像加密规则集为根据二阶平衡moore最近邻元胞自动机规则随机生成获得的,该图像加密规则集用于在后续过程中对待加密图像进行加密,也即对待加密图像进行迭代处理,其中本申请中图像加密规则集中图像加密规则的数量可以为64个,其中图像加密规则的数量与后续比特分组中元胞的数量相同,在此不做具体限定。In this step, the image to be encrypted includes a plaintext RGB image to be encrypted, and the image encryption rule set is randomly generated according to the second-order balanced Moore nearest neighbor cellular automaton rule. The image encryption rule set is used to encrypt the image to be encrypted in the subsequent process, that is, to iteratively process the encrypted image. The number of image encryption rules in the image encryption rule set in the present application can be 64, and the number of image encryption rules is the same as the number of cells in the subsequent bit grouping, which is not specifically limited here.
S202:对所述待加密图像进行预处理,获得所述待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组。S202: Preprocess the image to be encrypted to obtain a red channel array, a green channel array, and a blue channel array corresponding to the image to be encrypted.
在本步骤中,可以对待加密图像进行像素值提取,获得该待加密图像中的所有像素值,由于每个像素值均由红色通道值、绿色通道值和蓝色通道值组成,以通过这三个通道的组合可以生成彩色图像。在此之后,本申请可以对所有像素值分别对应的红色通道值、绿色通道值和蓝色通道值进行组合,获得待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组。In this step, the pixel value of the image to be encrypted can be extracted to obtain all the pixel values in the image to be encrypted. Since each pixel value is composed of a red channel value, a green channel value, and a blue channel value, a color image can be generated by combining these three channels. After that, the present application can combine the red channel values, green channel values, and blue channel values corresponding to all pixel values to obtain a red channel array, a green channel array, and a blue channel array corresponding to the image to be encrypted.
S203:对所述红色通道数组、所述绿色通道数组和所述蓝色通道数组进行通道置乱处理,获得所述待加密图像对应的通道置乱数组。S203: Perform channel scrambling processing on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted.
在本步骤中,可以从红色通道数组中提取一个红色通道,从绿色通道数组中提取一个绿色通道,和从蓝色通道数组中提取一个蓝色通道,并将红色通道、绿色通道和蓝色通道拼接起来,获取拼接后的通道。在此之后,继续从红色通道数组中提取一个红色通道,从绿色通道数组中提取一个绿色通道,和从蓝色通道数组中提取一个蓝色通道,并将红色通道、绿色通道和蓝色通道拼接起来,获取拼接后的通道。以及将两个拼接后的通道拼接起来,以此循环该拼接过程,直至红色通道数组、绿色通道数组和蓝色通道数组中的通道被全部提取完毕。In this step, a red channel can be extracted from the red channel array, a green channel can be extracted from the green channel array, and a blue channel can be extracted from the blue channel array, and the red channel, green channel and blue channel can be spliced together to obtain a spliced channel. After that, continue to extract a red channel from the red channel array, extract a green channel from the green channel array, and extract a blue channel from the blue channel array, and splice the red channel, green channel and blue channel together to obtain a spliced channel. And splice the two spliced channels together, so as to repeat the splicing process until all the channels in the red channel array, the green channel array and the blue channel array are extracted.
具体的,在本申请中红色通道数组包括第一红色通道和第二红色通道,绿色通道数组包括第一绿色通道和第二绿色通道,蓝色通道数组包括第一蓝色通道和第二蓝色通道。需要说明的是,在本申请中红色通道数组、绿色通道数组和蓝色通道数组各包括两个颜色通道,在实际应用中红色通道数组、绿色通道数组和蓝色通道数组可以各包括任意数量的颜色通道。Specifically, in the present application, the red channel array includes a first red channel and a second red channel, the green channel array includes a first green channel and a second green channel, and the blue channel array includes a first blue channel and a second blue channel. It should be noted that in the present application, the red channel array, the green channel array, and the blue channel array each include two color channels, and in actual applications, the red channel array, the green channel array, and the blue channel array can each include any number of color channels.
可以对红色通道数组中的第一红色通道、绿色通道数组中的第一绿色通道和蓝色通道数组中的第一蓝色通道进行拼接,获得第一置乱数组,以及对红色通道数组中的第二红色通道、绿色通道数组中的第二绿色通道和蓝色通道数组中的第二蓝色通道进行拼接,获得第二置乱数组,最后对第一置乱数组和第二置乱数组进行拼接,获得待加密图像对应的通道置乱数组。如此,相较于对每个通道分别进行加密的传统方法,在本申请中采用通道置乱的方式来实现对于待加密图像中颜色通道的混淆,提高了图像加密的安全性。The first red channel in the red channel array, the first green channel in the green channel array, and the first blue channel in the blue channel array can be spliced to obtain a first scrambled array, and the second red channel in the red channel array, the second green channel in the green channel array, and the second blue channel in the blue channel array can be spliced to obtain a second scrambled array, and finally the first scrambled array and the second scrambled array are spliced to obtain a channel scrambled array corresponding to the image to be encrypted. In this way, compared with the traditional method of encrypting each channel separately, the channel scrambling method is used in the present application to achieve the obfuscation of the color channels in the image to be encrypted, thereby improving the security of image encryption.
如图3所示,图3为本申请实施例提供的一种图像加密方法的通道置乱的流程图,在图3中示出了对图像大小为N×N的待加密图像进行处理获得待加密图像对应的通道置乱数组的过程。具体的,本申请通过待加密图像获得三个大小为N×N的颜色通道数组(红色通道数组R(N×N)、绿色通道数组G(N×N)和蓝色通道数组B(N×N)),然后对红色通道数组、绿色通道数组和蓝色通道数组进行通道置乱处理,获得大小为N×N×3的通道置乱数组,以及可见虚线框为由红色通道、绿色通道和蓝色通道拼接后获得的置乱数组。可以理解的,可以按照R(1,1)→G(1,1)→B(1,1)→R(1,2)→G(1,2)→B(1,2)→...→R(N,N)→G(N,N)→B(N,N)的顺序转化为一个长为N×N×3的数组,便于后续对于通道置乱数组的划分。As shown in Figure 3, Figure 3 is a flow chart of channel scrambling of an image encryption method provided by an embodiment of the present application, and Figure 3 shows the process of processing an image to be encrypted with an image size of N×N to obtain a channel scrambled array corresponding to the image to be encrypted. Specifically, the present application obtains three color channel arrays of size N×N (red channel array R(N×N), green channel array G(N×N) and blue channel array B(N×N)) through the image to be encrypted, and then performs channel scrambling processing on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array of size N×N×3, and the dotted box is a scrambled array obtained by splicing the red channel, the green channel and the blue channel. It can be understood that it can be converted into an array of length N×N×3 in the order of R(1,1)→G(1,1)→B(1,1)→R(1,2)→G(1,2)→B(1,2)→...→R(N,N)→G(N,N)→B(N,N), which is convenient for the subsequent division of the channel scrambled array.
S204:根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行加密处理,获得加密图像。S204: Encrypting the channel scrambling array corresponding to the image to be encrypted according to the image encryption rule set to obtain an encrypted image.
首先需要说明的是,本申请在根据图像加密规则集对待加密图像对应的通道置乱数组进行处理,获得加密图像之前,还可以获取随机数生成器生成的图像加密密钥,其中图像加密密钥的长度为128比特,以保证可以用足够大的密钥空间来抵抗蛮力密钥搜索攻击。First of all, it should be explained that before the present application processes the channel scrambled array corresponding to the encrypted image according to the image encryption rule set and obtains the encrypted image, it can also obtain the image encryption key generated by the random number generator, where the length of the image encryption key is 128 bits to ensure that a sufficiently large key space can be used to resist brute-force key search attacks.
进一步的,在本申请中可以对通道置乱数组进行分组处理,获得多个待加密分组,其中一个待加密分组的大小为128比特,并且每个待加密分组均携带32位的分组编号。可以理解的,通道置乱数组可以被划分为一个128比特的比特分组,通道置乱数组也可以被划分为连续的多个128比特的比特分组。当通道置乱数组被划分为连续的多个128比特的比特分组时,可以对该连续的多个128比特的比特分组标记分组编号,便于后续过程中对图像密钥进行扩展。Furthermore, in the present application, the channel scrambled array can be grouped to obtain multiple groups to be encrypted, wherein the size of one group to be encrypted is 128 bits, and each group to be encrypted carries a 32-bit group number. It can be understood that the channel scrambled array can be divided into a 128-bit bit group, and the channel scrambled array can also be divided into a plurality of consecutive 128-bit bit groups. When the channel scrambled array is divided into a plurality of consecutive 128-bit bit groups, the plurality of consecutive 128-bit bit groups can be marked with group numbers to facilitate the expansion of the image key in the subsequent process.
在此之后,可以将多个待加密分组分别对应的32位的分组编号ni重复4次组成128位与128位的加密密钥进行异或处理,得到对应于每个待加密分组的图像子密钥ski,其中i大于或等于1,多个置乱子数组的数量与多个图像子密钥的数量相同,以此防止使用ECB加密方式中,对于同一个原始明文分组数据加密为同一密文分组数据,保证一次一密,来提高图像加密的安全性。在一种可实现的实施方式中,当通道置乱数组被划分为一个128比特的比特分组时,即当多个待加密分组包括目标待加密分组时,可以将该一个128比特的比特分组(目标待加密分组)划分为第n-2个比特分组和第n-1个比特分组,其中第n-2个比特分组和第n-1个比特分组均为64比特的比特分组,该n大于或等于3。After that, the 32-bit group number n i corresponding to the multiple groups to be encrypted can be repeated 4 times to form a 128-bit encryption key and an XOR process is performed to obtain an image subkey sk i corresponding to each group to be encrypted, where i is greater than or equal to 1, and the number of multiple scrambled subarrays is the same as the number of multiple image subkeys, so as to prevent the same original plaintext group data from being encrypted into the same ciphertext group data in the ECB encryption method, ensure one-time one-key, and improve the security of image encryption. In an achievable implementation, when the channel scrambled array is divided into a 128-bit bit group, that is, when the multiple groups to be encrypted include the target group to be encrypted, the 128-bit bit group (target group to be encrypted) can be divided into the n-2th bit group and the n-1th bit group, where the n-2th bit group and the n-1th bit group are both 64-bit bit groups, and n is greater than or equal to 3.
此时可以利用图像加密规则集对第n-2个比特分组和第n-1个比特分组进行加密,获得待加密分组对应的加密分组。在另一种可实现的实施方式中,可以利用公式(1)获得加密分组,公式(1)具体体现如下:At this time, the image encryption rule set can be used to encrypt the n-2th bit group and the n-1th bit group to obtain an encrypted group corresponding to the group to be encrypted. In another achievable implementation, the encrypted group can be obtained using formula (1), which is specifically embodied as follows:
Ct=F(Ct-1) ⊕Ct-2 公式(1)C t = F(C t-1 ) ⊕ C t-2 Formula (1)
其中,Ct表示加密分组,F表示图像加密规则集中的图像加密规则,Ct-1表示加密分组的当前时刻状态,Ct-2表示加密分组的上一时刻状态。可以理解的,在本申请中主要利用图像加密规则实现图像中元胞的自动机演化,以通过不断迭代比特分组,来生成由不同时刻状态组成的加密分组,以此实现图像的加密过程。Wherein, C t represents an encryption group, F represents an image encryption rule in an image encryption rule set, C t-1 represents the current state of the encryption group, and C t-2 represents the previous state of the encryption group. It can be understood that in this application, the image encryption rule is mainly used to realize the automaton evolution of cells in the image, so as to generate encryption groups composed of different states at different times by continuously iterating bit groups, thereby realizing the encryption process of the image.
进一步的,本申请在根据图像加密规则集和多个图像子密钥对第n-2个比特分组和第n-1个比特分组进行加密,获得加密图像之前,还可以提取多个图像子密钥中与第n-2个比特分组和第n-1个比特分组对应的第n-2个图像子密钥,以便后续根据图像加密规则集和第n-2个图像子密钥对第n-2个比特分组和第n-1个比特分组进行加密,获得加密图像。如此,在图像加密规则集和比特分组对应的图像子密钥的基础下,实现了对于比特分组的加密。Furthermore, before the present application encrypts the n-2th bit group and the n-1th bit group according to the image encryption rule set and multiple image subkeys to obtain the encrypted image, the n-2th image subkey corresponding to the n-2th bit group and the n-1th bit group can be extracted from the multiple image subkeys, so that the n-2th bit group and the n-1th bit group can be encrypted according to the image encryption rule set and the n-2th image subkey to obtain the encrypted image. In this way, based on the image encryption rule set and the image subkey corresponding to the bit group, the encryption of the bit group is realized.
需要说明的是,在利用图像加密规则集和第n-2个图像子密钥对第n-2个比特分组和第n-1个比特分组进行加密时,可以分别将图像加密规则集中的每个图像加密规则赋给每个比特分组64个相应位置的元胞,其中图像子密钥ski的每一位用于决定对于每个比特分组在当前时刻j处的元胞是使用规则R[j]还是其相应的补规则。It should be noted that when the n-2th bit group and the n-1th bit group are encrypted using the image encryption rule set and the n-2th image sub-key, each image encryption rule in the image encryption rule set can be assigned to the cells at the 64 corresponding positions of each bit group, where each bit of the image sub-key sk i is used to determine whether to use rule R[j] or its corresponding complementary rule for the cell at the current time j of each bit group.
更进一步的,本申请中根据图像加密规则集和第n-2个图像子密钥对第n-2个比特分组和第n-1个比特分组进行加密,获得加密图像的过程,还可通过以下过程实现:首先根据图像加密规则集和第n-2个图像子密钥对第n-2个比特分组和第n-1个比特分组进行加密,获得第n个比特分组,然后对第n-2个图像子密钥进行扩展处理,获得与第n-1个比特分组和第n个比特分组对应的第n-1个图像子密钥,以及根据图像加密规则集和第n-1个图像子密钥对第n-1个比特分组和第n个比特分组进行加密,获得第n+1个比特分组,最后根据第n个比特分组和第n+1个比特分组,确定加密后的比特分组,以及根据加密后的比特分组获得加密图像。Furthermore, the process of encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain the encrypted image in the present application can also be achieved through the following process: first, encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain the nth bit group, then expanding the n-2th image subkey to obtain the n-1th image subkey corresponding to the n-1th bit group and the nth bit group, and encrypting the n-1th bit group and the n-1th bit group according to the image encryption rule set and the n-1th image subkey to obtain the n+1th bit group, finally determining the encrypted bit group according to the nth bit group and the n+1th bit group, and obtaining the encrypted image based on the encrypted bit group.
需要说明的是,本申请中获得第n个比特分组和第n+1个比特分组的过程为迭代过程,可以以待加密图像的第一个比特分组和第二个比特分组为起始基准,进行比特分组的不断迭代,以获得最终的比特分组,来实现在加密过程中对于比特分组的混淆,实现对于图像加密的安全性。It should be noted that the process of obtaining the nth bit group and the n+1th bit group in the present application is an iterative process. The first bit group and the second bit group of the image to be encrypted can be used as the starting basis to continuously iterate the bit grouping to obtain the final bit grouping, so as to achieve obfuscation of the bit grouping during the encryption process and achieve the security of image encryption.
接下来结合图4来详细说明本申请针对于比特分组的迭代过程,如图4所示,图4为本申请实施例提供的一种图像加密方法的迭代处理的流程图,在图4中示出了对比特分组进行迭代处理的过程。具体的,当通道置乱数组被划分为多个128比特的待加密分组时,此时可以多个待加密分组逐一进行加密处理,最终根据加密后的多个待加密分组确定待加密图像。Next, the iterative process of the bit grouping of the present application is described in detail in conjunction with FIG4 . As shown in FIG4 , FIG4 is a flowchart of iterative processing of an image encryption method provided by an embodiment of the present application, and FIG4 shows the process of iterative processing of the bit grouping. Specifically, when the channel scrambled array is divided into a plurality of 128-bit groups to be encrypted, the plurality of groups to be encrypted can be encrypted one by one, and finally the image to be encrypted is determined according to the plurality of encrypted groups to be encrypted.
进一步的,以目标待加密分组为例,根据目标待加密分组对应的分组编号结合图像加密密钥,以获得图像子密钥。在此之后,根据图像加密规则集和第一个图像子密钥SK1对目标待加密分组PB中的第一个比特分组C(0)和第二个比特分组C(1)进行迭代处理,以获得第三个比特分组C(2),以及继续根据图像加密规则集和第二个图像子密钥SK2对目标待加密分组PB中的第二个比特分组C(1)和第三个比特分组C(2)进行迭代处理,获得第四个比特分组C(3),以此不断执行迭代处理工作,直至根据图像加密规则集和第n个图像子密钥SKn对目标待加密分组PB中的第n-1个比特分组和第n个比特分组C(n)进行迭代处理,获得第n+1个比特分组C(n+1),最终根据第n个比特分组和第n+1个比特分组,确定加密分组CB。Further, taking the target group to be encrypted as an example, the image subkey is obtained according to the group number corresponding to the target group to be encrypted and the image encryption key. After that, the first bit group C(0) and the second bit group C(1) in the target group to be encrypted PB are iteratively processed according to the image encryption rule set and the first image subkey SK1 to obtain the third bit group C(2), and the second bit group C(1) and the third bit group C(2) in the target group to be encrypted PB are iteratively processed according to the image encryption rule set and the second image subkey SK2 to obtain the fourth bit group C(3), and the iterative processing work is continuously performed until the n-1th bit group and the nth bit group C(n) in the target group to be encrypted PB are iteratively processed according to the image encryption rule set and the nth image subkey SKn to obtain the n+1th bit group C(n+1), and finally the encryption group CB is determined according to the nth bit group and the n+1th bit group.
需要说明的是,在每个待加密分组的迭代过程中,使用的图像子密钥为根据该待加密分组确定的,只不过待加密分组的每个迭代过程可以进行密钥扩展处理,比如在对第i个待加密分组进行迭代加密时,对于每个图像子密钥ski,在每次迭代时可以将上次迭代后的图像子密钥向左移动8位,同时将ski位于低位的64比特取出作为当前迭代的图像子密钥,实现了对每个待加密分组采用不同的图像子密钥,以及在每次迭代过程中通过密钥扩展处理也使用了不同图像子密钥,以此来提高分组加密的安全性和可靠性。It should be noted that, in the iterative process of each group to be encrypted, the image subkey used is determined according to the group to be encrypted, but each iterative process of the group to be encrypted can be subjected to key expansion processing. For example, when iteratively encrypting the i-th group to be encrypted, for each image subkey sk i , the image subkey after the previous iteration can be shifted 8 bits to the left in each iteration, and the 64 bits of sk i located in the low order are taken out as the image subkey of the current iteration, thereby realizing the use of different image subkeys for each group to be encrypted, and using different image subkeys through key expansion processing in each iterative process, thereby improving the security and reliability of group encryption.
如此本申请通过对比特分组C(0)和比特分组C(1)进行n次连续的迭代,来生成最终比特分组C(n)和比特分组C(n+1),也即不断在确定下一时刻比特分组的状态,以此来提高图像加密的安全性。其中,在本申请中可以使n=80,即迭代80次,以此来提高图像加密的性能。In this way, the present application generates the final bit group C(n) and the bit group C(n+1) by performing n consecutive iterations on the bit group C(0) and the bit group C(1), that is, continuously determining the state of the bit group at the next moment, thereby improving the security of image encryption. In this application, n=80, that is, 80 iterations, thereby improving the performance of image encryption.
如表1所示,表1为本申请实施例提供的一种图像加密方法中图像加密规则的状态转移表,其中分别表示t时刻s的当前状态,t时刻s的左边邻居的状态,t时刻s的左边上方邻居的状态,t时刻s的上方邻居的状态,t时刻s的右边上方邻居的状态,t时刻s的右边邻居的状态,t时刻s的右边下方邻居的状态,t时刻s的下方邻居的状态,t时刻s的左边下方邻居的状态,表示当t-1时刻s的状态为0时,t+1时刻s的状态,表示当t-1时刻s的状态为1时,t+1时刻s的状态。如此本申请利用此种方式来实现图像加密规则对于比特分组的迭代过程,以此来生成比特分组的一下时刻状态。As shown in Table 1, Table 1 is a state transition table of image encryption rules in an image encryption method provided in an embodiment of the present application, wherein They represent the current state of s at time t, the state of the left neighbor of s at time t, the state of the upper left neighbor of s at time t, the state of the upper right neighbor of s at time t, the state of the right neighbor of s at time t, the state of the lower right neighbor of s at time t, the state of the lower left neighbor of s at time t, It means that when the state of s at time t-1 is 0, the state of s at time t+1 is It indicates the state of s at time t+1 when the state of s at time t-1 is 1. Thus, the present application uses this method to implement the iterative process of the image encryption rule for the bit grouping, so as to generate the state of the bit grouping at the following time.
表1Table 1
如图5所示,图5为本申请实施例提供的一种图像加密方法的图像加密的全流程图,在图5中首先对待加密图像进行处理,获得待加密图像对应的通道置乱数组,在此之后按照128比特将通道置乱数组划分为n个128位的待加密分组(PB0-PBn),以及依次对n个128位的待加密分组进行迭代处理,获得n个128位的加密分组(CB0-CBn),最后根据n个128位的加密分组获得最终的加密图像,以此来实现对于图像的加密,以及通过本申请技术方案加密后获得的加密图像可以很好的保护图像。As shown in Figure 5, Figure 5 is a full flow chart of image encryption of an image encryption method provided by an embodiment of the present application. In Figure 5, the image to be encrypted is first processed to obtain a channel scrambled array corresponding to the image to be encrypted, and then the channel scrambled array is divided into n 128-bit groups to be encrypted (PB0-PBn) according to 128 bits, and the n 128-bit groups to be encrypted are iteratively processed in turn to obtain n 128-bit encrypted groups (CB0-CBn), and finally the final encrypted image is obtained according to the n 128-bit encrypted groups, so as to realize the encryption of the image, and the encrypted image obtained after encryption by the technical solution of the present application can well protect the image.
此外,本申请在根据图像加密规则集对第n-2比特分组和第n-1比特分组进行加密,获得加密图像之后,也即在本申请中对多个待加密分组分别对应的第n-2个比特分组和第n-1个比特分组分别进行加密,获得多个加密后的分组,再根据多个加密后的分组获得加密图像之后。还可以对加密图像进行解析,获得加密图像对应的多个加密分组(即多个加密后的分组),并以此获得多个加密分组下的第n个比特分组和第n+1个比特分组,按照上述过程对第n个比特分组和第n+1个比特分组进行反向迭代处理,以获得多个加密分组下的第n-2个比特分组和第n-1个比特分组,以及根据多个第n-2个比特分组和第n-1个比特分组获得多个解密分组,并根据多个解密分组恢复获得待加密图像,如此便完成对于加密图像的解密。In addition, after the present application encrypts the n-2th bit group and the n-1th bit group according to the image encryption rule set to obtain the encrypted image, that is, in the present application, the n-2th bit group and the n-1th bit group corresponding to the multiple groups to be encrypted are encrypted respectively to obtain multiple encrypted groups, and then the encrypted image is obtained according to the multiple encrypted groups. The encrypted image can also be parsed to obtain multiple encrypted groups (i.e., multiple encrypted groups) corresponding to the encrypted image, and thereby obtain the nth bit group and the n+1th bit group under the multiple encrypted groups, and reverse iterate the nth bit group and the n+1th bit group according to the above process to obtain the n-2th bit group and the n-1th bit group under the multiple encrypted groups, and obtain multiple decrypted groups according to the multiple n-2th bit groups and the n-1th bit groups, and restore the image to be encrypted according to the multiple decrypted groups, so as to complete the decryption of the encrypted image.
在一种可实现的实施方式中,可以利用公式(2)获得解密图像,公式(2)具体体现如下:In an achievable implementation, the decrypted image can be obtained using formula (2), which is specifically embodied as follows:
Ct-2=F(Ct-1) ⊕Ct 公式(2)C t-2 = F(C t-1 ) ⊕ C t Formula (2)
其中,Ct-2表示待加密图像的当前时刻状态(在此处表示解密图像),F表示图像加密规则集中的图像加密规则(在此次可用作解密规则,来实现反向迭代过程),Ct-1表示待解密分组的上一时刻状态(或者在此处可以表示加密分组的下一时刻状态),也即Ct-1可以作为第n个比特分组和第n+1个比特分组。Among them, C t-2 represents the current state of the image to be encrypted (here it represents the decrypted image), F represents the image encryption rule in the image encryption rule set (which can be used as the decryption rule this time to realize the reverse iteration process), and C t-1 represents the previous state of the group to be decrypted (or here it can represent the next state of the encrypted group), that is, C t-1 can be used as the nth bit group and the n+1th bit group.
综上,在本实施例中首先获取待加密图像和图像加密规则集,然后对待加密图像进行预处理,获得待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组,以及对红色通道数组、绿色通道数组和蓝色通道数组进行通道置乱处理,获得待加密图像对应的通道置乱数组,最后根据图像加密规则集对待加密图像对应的通道置乱数组进行加密处理,获得加密图像。In summary, in this embodiment, the image to be encrypted and the image encryption rule set are first obtained, and then the image to be encrypted is preprocessed to obtain the red channel array, green channel array and blue channel array corresponding to the image to be encrypted, and the red channel array, green channel array and blue channel array are subjected to channel scrambling processing to obtain the channel scrambled array corresponding to the image to be encrypted, and finally, the channel scrambled array corresponding to the image to be encrypted is encrypted according to the image encryption rule set to obtain the encrypted image.
可见,在本申请中将待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组进行置乱处理,也即将红色通道数组、绿色通道数组和蓝色通道数组混合为一个通道置乱数组,并利用图像加密规则集实现了对于待加密图像的加密,如此,避免了相关技术中对红色通道数组、绿色通道数组和蓝色通道数组分别进行单一加密的方式,如此本申请通过进行通道置乱的操作和图像加密规则集的加密操作大大提高了图像加密的混淆程序,从而提高了图像加密的安全性,以及提高了图像加解密的性能。It can be seen that in the present application, the red channel array, green channel array and blue channel array corresponding to the image to be encrypted are scrambled, that is, the red channel array, green channel array and blue channel array are mixed into a channel scrambled array, and the encryption of the image to be encrypted is implemented using the image encryption rule set. In this way, the method of performing single encryption on the red channel array, green channel array and blue channel array respectively in the related art is avoided. In this way, the present application greatly improves the obfuscation program of image encryption by performing channel scrambling operations and encryption operations of the image encryption rule set, thereby improving the security of image encryption and improving the performance of image encryption and decryption.
此外,在本申请中在图像加密规则集的基础上使用最近邻元胞自动机演化方式进行图像加密,可以有效避免ECB并行加密中的攻击问题,对于图像加密具有较好的性能,以及在图像解密方面也具备一定的解密效率。另外本申请中所使用的最近邻元胞自动机演化方式相较于一般的二维元胞自动机具有更高的随机性,进一步也提升了加密性能。In addition, in this application, the nearest neighbor cellular automaton evolution method is used for image encryption based on the image encryption rule set, which can effectively avoid the attack problem in ECB parallel encryption, has good performance for image encryption, and also has a certain decryption efficiency in image decryption. In addition, the nearest neighbor cellular automaton evolution method used in this application has higher randomness than the general two-dimensional cellular automaton, which further improves the encryption performance.
下面对本申请实施例提供的一种图像加密装置进行介绍,下文描述的一种图像加密装置与上文描述的一种图像加密方法可相互对应参照。An image encryption device provided in an embodiment of the present application is introduced below. The image encryption device described below and the image encryption method described above can refer to each other.
参见图6,该图为本申请实施例提供的一种图像加密装置的结构示意图,如图6所示,该图像加密装置包括:Referring to FIG. 6 , which is a schematic diagram of the structure of an image encryption device provided in an embodiment of the present application, as shown in FIG. 6 , the image encryption device includes:
图像规则获取单元601,用于获取待加密图像和图像加密规则集,其中图像加密规则集用于对所述待加密图像进行加密;An image rule acquisition unit 601 is used to acquire an image to be encrypted and an image encryption rule set, wherein the image encryption rule set is used to encrypt the image to be encrypted;
待加密图像处理单元602,用于对所述待加密图像进行预处理,获得所述待加密图像对应的红色通道数组、绿色通道数组和蓝色通道数组;The image processing unit 602 to be encrypted is used to pre-process the image to be encrypted to obtain a red channel array, a green channel array and a blue channel array corresponding to the image to be encrypted;
置乱数组获得单元603,用于对所述红色通道数组、所述绿色通道数组和所述蓝色通道数组进行通道置乱处理,获得所述待加密图像对应的通道置乱数组;A scrambled array obtaining unit 603 is used to perform channel scrambling processing on the red channel array, the green channel array and the blue channel array to obtain a channel scrambled array corresponding to the image to be encrypted;
加密图像获得单元604,用于根据所述图像加密规则集对所述待加密图像对应的通道置乱数组进行加密处理,获得加密图像。The encrypted image obtaining unit 604 is used to perform encryption processing on the channel scrambling array corresponding to the image to be encrypted according to the image encryption rule set to obtain an encrypted image.
可选的,所述置乱数组获得单元603,具体用于:Optionally, the scrambled array obtaining unit 603 is specifically used to:
对所述红色通道数组中的第一红色通道、所述绿色通道数组中的第一绿色通道和所述蓝色通道数组中的第一蓝色通道进行拼接,获得第一置乱数组;splicing the first red channel in the red channel array, the first green channel in the green channel array, and the first blue channel in the blue channel array to obtain a first scrambled array;
对所述红色通道数组中的第二红色通道、所述绿色通道数组中的第二绿色通道和所述蓝色通道数组中的第二蓝色通道进行拼接,获得第二置乱数组;splicing the second red channel in the red channel array, the second green channel in the green channel array, and the second blue channel in the blue channel array to obtain a second scrambled array;
对所述第一置乱数组和所述第二置乱数组进行拼接,获得所述待加密图像对应的通道置乱数组。The first scrambled array and the second scrambled array are concatenated to obtain a channel scrambled array corresponding to the image to be encrypted.
可选的,所述装置还包括:Optionally, the device further comprises:
图像密钥获取单元,用于获取随机数生成器生成的图像加密密钥;An image key acquisition unit, used to acquire an image encryption key generated by a random number generator;
待加密分组获得单元,用于对所述通道置乱数组进行分组处理,获得多个待加密分组;A unit for obtaining a group to be encrypted, used for performing group processing on the channel scrambling array to obtain a plurality of groups to be encrypted;
图像子密钥获得单元,用于根据所述图像加密密钥和所述多个待加密分组,获得多个图像子密钥,其中多个待加密分组的数量与所述多个图像子密钥的数量相同。The image subkey obtaining unit is used to obtain a plurality of image subkeys according to the image encryption key and the plurality of groups to be encrypted, wherein the number of the plurality of groups to be encrypted is the same as the number of the plurality of image subkeys.
可选的,所述加密图像获得单元604,包括:Optionally, the encrypted image obtaining unit 604 includes:
待加密分组划分单元,用于对所述目标待加密分组进行划分,获得第n-2个比特分组和第n-1个比特分组,其中所述n大于或等于3;a to-be-encrypted group division unit, configured to divide the target to-be-encrypted group into an n-2th bit group and an n-1th bit group, wherein n is greater than or equal to 3;
比特分组加密单元,用于根据所述图像加密规则集和所述多个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The bit group encryption unit is used to encrypt the n-2th bit group and the n-1th bit group according to the image encryption rule set and the multiple image subkeys to obtain an encrypted image.
可选的,所述装置还包括:Optionally, the device further comprises:
第一图像子密钥提取单元,用于提取所述多个图像子密钥中与所述第n-2个比特分组和所述第n-1个比特分组对应的第n-2个图像子密钥;a first image subkey extraction unit, configured to extract an n-2th image subkey corresponding to the n-2th bit group and the n-1th bit group from the plurality of image subkeys;
所述比特分组加密单元,具体用于:The bit group encryption unit is specifically used for:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得加密图像。The n-2th bit group and the n-1th bit group are encrypted according to the image encryption rule set and the n-2th image subkey to obtain an encrypted image.
可选的,所述比特分组加密单元,还用于:Optionally, the bit group encryption unit is further used for:
根据所述图像加密规则集和所述第n-2个图像子密钥对所述第n-2个比特分组和所述第n-1个比特分组进行加密,获得第n个比特分组;Encrypting the n-2th bit group and the n-1th bit group according to the image encryption rule set and the n-2th image subkey to obtain an nth bit group;
对所述第n-2个图像子密钥进行扩展处理,获得与所述第n-1个比特分组和所述第n个比特分组对应的第n-1个图像子密钥;Performing expansion processing on the n-2th image subkey to obtain the n-1th image subkey corresponding to the n-1th bit group and the nth bit group;
根据所述图像加密规则集和所述第n-1个图像子密钥对所述第n-1个比特分组和所述第n个比特分组进行加密,获得第n+1个比特分组;Encrypting the n-1th bit group and the nth bit group according to the image encryption rule set and the n-1th image subkey to obtain an n+1th bit group;
根据所述第n个比特分组和所述第n+1个比特分组,获得加密图像。An encrypted image is obtained according to the nth bit group and the (n+1)th bit group.
可选的,所述装置还包括:Optionally, the device further comprises:
加密图像解析单元,用于对所述加密图像进行解析,获得所述第n个比特分组和所述第n+1个比特分组;An encrypted image parsing unit, used for parsing the encrypted image to obtain the nth bit group and the n+1th bit group;
分组反向迭代单元,用于对所述第n个比特分组和所述第n+1个比特分组进行反向迭代处理,获得所述第n-2个比特分组和所述第n-1个比特分组;a group reverse iteration unit, configured to perform reverse iteration processing on the nth bit group and the n+1th bit group to obtain the n-2th bit group and the n-1th bit group;
待加密图像获得单元,用于根据所述第n-2个比特分组和所述第n-1个比特分组,获得所述待加密图像。The to-be-encrypted image obtaining unit is used to obtain the to-be-encrypted image according to the n-2th bit group and the n-1th bit group.
本申请实施例所提供的图像加密装置与上述实施例提供的图像加密方法具有相同的有益效果,因此不再赘述。The image encryption device provided in the embodiment of the present application has the same beneficial effects as the image encryption method provided in the above embodiment, so they are not described in detail.
电子设备实施例Electronic device embodiment
参见图7,该图为本申请实施例提供的一种电子设备结构示意图,如图7所示,包括:Referring to FIG. 7 , this figure is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, as shown in FIG. 7 , including:
存储器11,用于存储计算机程序;A memory 11, used for storing computer programs;
处理器12,用于执行所述计算机程序时实现上述任意方法实施例所述图像加密方法的步骤。The processor 12 is used to implement the steps of the image encryption method described in any of the above method embodiments when executing the computer program.
在本实施例中,设备可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、掌上电脑、便携计算机等终端设备。In this embodiment, the device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet computer, a PDA, or a portable computer.
该设备可以包括存储器11、处理器12和总线13。其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是设备的内部存储单元,例如该设备的硬盘。存储器11在另一些实施例中也可以是设备的外部存储设备,例如设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(SecureDigital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括设备的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于设备的应用软件及各类数据,还可以用于暂时地存储已经输出或者将要输出的数据。The device may include a memory 11, a processor 12 and a bus 13. The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 11 may be an internal storage unit of the device in some embodiments, such as a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk equipped on the device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may be used not only to store application software and various types of data installed on the device, but also to temporarily store data that has been output or is to be output.
处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据。In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run program codes stored in the memory 11 or process data.
该总线13可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG7 only uses one thick line, but does not mean that there is only one bus or one type of bus.
进一步地,设备还可以包括网络接口14,网络接口14可选的可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该设备与其他电子设备之间建立通信连接。Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other electronic devices.
可选地,该设备还可以包括用户接口15,用户接口15可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口15还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在设备中处理的信息以及用于显示可视化的用户界面。Optionally, the device may further include a user interface 15, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.
图7仅示出了具有组件11-15的设备,本领域技术人员可以理解的是,图7示出的结构并不构成对设备的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG7 only shows a device having components 11-15. Those skilled in the art will appreciate that the structure shown in FIG7 does not constitute a limitation on the device, and may include fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
可读存储介质实施例Readable storage medium embodiment
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述图像加密方法的步骤。其中,该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned image encryption method are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
还需要说明的是,本申请实施例中提到的“第一”、“第二”(若存在)等名称中的“第一”、“第二”只是用来做名字标识,并不代表顺序上的第一、第二。It should also be noted that the "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
以上对本申请所提供的一种图像加密方法、装置及相关产品进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The above is a detailed introduction to an image encryption method, device and related products provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410663850.3A CN118590589A (en) | 2024-05-27 | 2024-05-27 | Image encryption method, device and related products |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410663850.3A CN118590589A (en) | 2024-05-27 | 2024-05-27 | Image encryption method, device and related products |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118590589A true CN118590589A (en) | 2024-09-03 |
Family
ID=92527229
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410663850.3A Pending CN118590589A (en) | 2024-05-27 | 2024-05-27 | Image encryption method, device and related products |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118590589A (en) |
-
2024
- 2024-05-27 CN CN202410663850.3A patent/CN118590589A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9336160B2 (en) | Low latency block cipher | |
| CN111428254B (en) | Key storage method, device, equipment and storage medium | |
| US9455833B2 (en) | Behavioral fingerprint in a white-box implementation | |
| KR20130041353A (en) | Apparatus and method for block cipher process for insecure environments | |
| US10326596B2 (en) | Techniques for secure authentication | |
| CN115941304B (en) | Data encryption method, device, terminal device and computer-readable storage medium | |
| US20170257212A1 (en) | Cryptographic Apparatuses And Methods For Encrypting And Decrypting Data Using Automata | |
| US11194933B2 (en) | Circuits supporting improved side channel and fault injection attack resistance | |
| US7496196B2 (en) | Method apparatus and system of performing one or more encryption and/or decryption operations | |
| CN117596346B (en) | Cloud data encryption transmission method and device | |
| US20250013430A1 (en) | Reconfigurable architecture for improvement and optimization of advanced encryption standard | |
| CN112330521B (en) | Image encryption method | |
| CN118632233A (en) | Encryption method and device, equipment and user identification card for resisting side channel attacks | |
| CN106982116B (en) | A Local File Encryption Method Based on AES Based on Reversible Logic Circuit | |
| US8774402B2 (en) | Encryption/decryption apparatus and method using AES rijndael algorithm | |
| US8347113B2 (en) | System and method for encrypting an electronic file in a mobile electronic device | |
| EP2940917B1 (en) | Behavioral fingerprint in a white-box implementation | |
| CN118590589A (en) | Image encryption method, device and related products | |
| CN107409041A (en) | The system and method for block encryption encryption are performed for including replacing the blender function of box and linear transformation by using look-up tables'implementation | |
| CN1795637B (en) | Method and apparatus for a low memory hardware implementation of the key expansion function | |
| RU2140709C1 (en) | Process of cryptographic conversion of blocks of digital data | |
| EP3258639A1 (en) | Cryptography apparatus protected against side-channel attack using constant hamming weight substitution-box | |
| CN117394983B (en) | Lightweight homomorphic encryption method for implementing symmetric and asymmetric encryption | |
| CN119254540B (en) | Encryption method and system of LED display screen, storage medium and display screen | |
| CN118509237A (en) | Encryption method and device for wind turbine generator data |
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 |