如Table 9所示,NPCR和UACI的计算值与理论值十分接近,说明本文的图像加密算法的密钥在加密过程中是敏感的。如Table 10所示,NPCR和UACI的计算值与理论值十分接近,说明该密钥在解密过程中也是敏感的。因此,本文的图像加密算法具备良好的密钥敏感性,能够抵御穷举密钥攻击(exhaustive key attacks)。
时间: 2024-04-20 13:25:35 浏览: 30
As shown in Table 9, the calculated values of NPCR and UACI are very close to the theoretical values, indicating that the key used in the image encryption algorithm in this paper is sensitive during the encryption process. Similarly, as shown in Table 10, the calculated values of NPCR and UACI are also very close to the theoretical values, indicating that the key is sensitive during the decryption process as well. Therefore, the image encryption algorithm proposed in this paper demonstrates good key sensitivity and is capable of resisting exhaustive key attacks.
相关问题
图像处理中npcr与uaci的值matlab
NPCR(Normalized Pixel Change Ratio)和UACI(Unified Average Changing Intensity)是两个常用的图像质量评价指标,用于评估加密算法的性能。在Matlab中,可以使用以下代码计算图像加密前后的NPCR和UACI值:
```matlab
% 加载原始图像和加密后的图像
im1 = imread('原始图像.png');
im2 = imread('加密后的图像.png');
% 计算像素差异
diff = im1 - im2;
% 计算NPCR值
npcr = sum(diff(:) ~= 0) / numel(im1);
% 计算UACI值
uaci = sum(abs(diff(:))) / (255*numel(im1));
```
其中,im1表示原始图像,im2表示加密后的图像,diff表示两者的像素差异。NPCR值表示像素差异的比例,取值范围在0到1之间,值越大表示加密算法越好;UACI值表示像素差异的平均强度,取值范围在0到1之间,值越小表示加密算法越好。
首先,使用如Fig. 1(a)所示的生物特征密钥对三维医学图像进行加密,生成密文图像。然后,随机选取Fig. 1(a)中任一像素点的任一比特位进行反转,生成新密钥。新密钥用于解密密文图像,获得解密图像。最后,计算明文图像与解密图像之间的NPCR和UACI值。重复实验100次,计算NPCR和UACI的平均值,列在Table 10中。
First, the three-dimensional medical image is encrypted using the biometric key as shown in Figure 1(a), resulting in a ciphertext image. Next, a random bit of a pixel in Figure 1(a) is selected and inverted to generate a new key. This new key is then used to decrypt the ciphertext image, obtaining the decrypted image. Finally, the NPCR and UACI values between the original image and the decrypted image are calculated. The experiment is repeated 100 times, and the average NPCR and UACI values are listed in Table 10.
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![m](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)