Abstract
For traditional JPEG image encryption, block position shuffling can achieve a better encryption effect and is resistant to non-zero counting attack. However, the numbers of non-zero coefficients in the 8 × 8 sub-blocks are unchanged using block position shuffle. For this defect, this paper proposes a fast attack algorithm for JPEG image encryption based on inter-block shuffle and non-zero quantization discrete cosine transformation coefficient attack. The algorithm analyzes the position mapping relationship before and after encryption of image blocks by detecting the pixel values of an image by the designed plaintext image. Then the preliminary attack result of the image blocks can be obtained from the inverse mapping relationship. Finally, the final attack result of the algorithm is generated according to the numbers of non-zero coefficients in each 8 × 8 block of the preliminary attack result. Every 8 × 8 block position is related with its number of non-zero discrete cosine transform coefficients in the designed plaintext. It is verified that the main content of the original image could be obtained without knowledge of the encryption algorithm and keys in a relatively short time.
摘要
对于传统的JPEG图像加密, 区块位置洗牌可以达到更好的加密效果并且可以抵抗非零计数攻击。但是区块位置洗牌并不改变 子块内非零系数的个数。针对这个缺陷, 提出了一种基于块间洗牌和非零量化离散余弦变换系数攻击的 JPEG 图像加密的快速攻击算法。该算法通过设计的明文图像检测一张图像的像素值, 分析加密前后图像块位置映射关系。然后通过逆映射得到图像块的初步攻击结果, 最后根据初步攻击结果中每个 块中的非零系数个数生成算法的最终攻击结果。在设计的明文中, 每个 块的位置都与其非零离散余弦变换系数的个数相关。经过验证, 在不了解加密算法和密钥的情况下, 可以在较短时间内获得原始图像的主要内容。
Similar content being viewed by others
References
XUE F, LU W, REN H L, et al. Forensics of visual privacy protection in digital images [J]. Multimedia Tools and Applications, 2020, 79(17/18): 12427–12445.
MANGA I, GARBA E J, AHMADU A S. Enhanced image compression and processing scheme [J]. Current Journal of Applied Science and Technology, 2021, 40(38): 1–11.
DIMILILER K. DCT-based medical image compression using machine learning [J]. Signal, Image and Video Processing, 2022, 16(1): 55–62.
MEI Y X, LI L, LI Z, et al. Learning-based scalable image compression with latent-feature reuse and prediction [J]. IEEE Transactions on Multimedia, 2022, 24: 4143–4157.
ANNALAKSHMI N. Lossy image compression techniques [J]. International Journal of Computer Applications, 2021, 183(20): 30–34.
HUSSAIN A J, AL-FAYADH A, RADI N. Image compression techniques: A survey in lossless and lossy algorithms [J]. Neurocomputing, 2018, 300: 44–69.
BULL D R, ZHANG F. Digital picture formats and representations [M]//Intelligent image and video compression. Amsterdam: Elsevier, 2021: 107–142.
NAVEEN KUMAR S, VAMSHI BHARADWAJ M V, SUBBARAYAPPA S. Performance comparison of jpeg, jpeg XT, jpeg LS, jpeg 2000, jpeg XR, HEVC, EVC and VVC for images [C]//2021 6th International Conference for Convergence in Technology. Maharashtra: IEEE, 2021: 1–8.
AHMAD N, YOUNUS M U, ANJUM M R, et al. Efficient JPEG encoding using bernoulli shift map for secure communication [J]. Wireless Personal Communications, 2022, 125(4): 3405–3424.
RAMADHAN M K, AL-RAMMAHI A. Image cryptography with least squares approximations [J]. Journal of Computer Science, 2019, 15(11): 1659–1668.
YANG N, ZHANG S X, BAI M D, et al. Medical image encryption based on Josephus traversing and hyperchaotic Lorenz system [J]. Journal of Shanghai Jiao Tong University (Science), 2022. https://doi.org/10.1007/s12204-022-2555-x.
DENG Z J, ZHONG S J. A digital image encryption algorithm based on chaotic mapping [J]. Journal of Algorithms & Computational Technology, 2019, 13: 174830261985347.
ZHUANG Z B, WANG J, LIU J Y, et al. A new digital image encryption algorithm based on improved logistic mapping and Josephus circle [J]. Journal of Computer and Communications, 2018, 6(6): 31–44.
SUN S L. A novel hyperchaotic image encryption scheme based on DNA encoding, pixel-level scrambling and bit-level scrambling [J]. IEEE Photonics Journal, 2018, 10(2): 1–14.
HUANG J X, GUO Y L, GAO R Y, et al. Medical image encryption based on fisher-yates scrambling and filter diffusion [J]. Journal of Shanghai Jiao Tong University (Science), 2023. https://doi.org/10.1007/s12204-023-2618-7.
KANG S W, CHOI U S, CHO S J. Fast image encryption algorithm based on (n, m, k)-PCMLCA [J]. Multimedia Tools and Applications, 2022, 81(1): 1209–1235.
YANG X L, WU H Z, YIN Y K, et al. Multiple-image encryption base on compressed coded aperture imaging [J]. Optics and Lasers in Engineering, 2020, 127: 105976.
MOUSSA M I, ABD EL-LATIF E I, ABU EL-ATTA A H. Diagonalize three-dimensional nonlinear chaotic map to encrypt color image [J]. Egyptian Informatics Journal, 2023, 24(3): 100376.
CHEN B J, YU M, TIAN Y H, et al. Multiple-parameter fractional quaternion Fourier transform and its application in colour image encryption [J]. IET Image Processing, 2018, 12(12): 2238–2249.
WANG X Y, SU Y N. Color image encryption based on chaotic compressed sensing and two-dimensional fractional Fourier transform [J]. Scientific Reports, 2020, 10: 18556.
ZHANG L Z, ZHOU Y Y, HUO D M, et al. Multiple-image encryption based on double random phase encoding and compressive sensing by using a measurement array preprocessed with orthogonal-basis matrices [J]. Optics & Laser Technology, 2018, 105: 162–170.
LI P Y, LO K T. Survey on JPEG compatible joint image compression and encryption algorithms [J]. IET Signal Processing, 2020, 14(8): 475–488.
QIN C, HU J C, LI F Y, et al. JPEG image encryption with adaptive DC coefficient prediction and RS pair permutation [J]. IEEE Transactions on Multimedia, 2023, 25: 2528–2542.
HE H J, YUAN Y, YE Y Y, et al. Chosen plaintext attack on JPEG image encryption with adaptive key and Run consistency [J]. Journal of Visual Communication and Image Representation, 2023, 90: 103733.
PHATAK A G. A non-format compliant scalable RSA-based JPEG encryption algorithm [J]. International Journal of Image, Graphics and Signal Processing, 2016, 8(6): 64–71.
HERNANDEZ-DIAZ E, PEREZ-MEANA H, SILVA-GARCIA V, et al. JPEG images encryption scheme using elliptic curves and A new S-box generated by chaos [J]. Electronics, 2021, 10(4): 413.
DIAB H, EL-SEMARY A M. Secure image cryptosystem with unique key streams via hyper-chaotic system [J]. Signal Processing, 2018, 142: 53–68.
JIAO S M, LEI T, GAO Y, et al. Known-plaintext attack and ciphertext-only attack for encrypted single-pixel imaging [J]. IEEE Access, 2019, 7: 119557–119565.
YE G D. Image scrambling encryption algorithm of pixel bit based on chaos map [J]. Pattern Recognition Letters, 2010, 31(5): 347–354.
LI C Q, LIN D D, LU J H. Cryptanalyzing an image-scrambling encryption algorithm of pixel bits [J]. IEEE MultiMedia, 2017, 24(3): 64–71.
LI M, LU D D, XIANG Y, et al. Cryptanalysis and improvement in a chaotic image cipher using two-round permutation and diffusion [J]. Nonlinear Dynamics, 2019, 96(1): 31–47.
LI S S, MA R L, ZHANG H L. Enhancing security for JPEG image against mosaic attack using inter-block shuffle encryption [J]. IEEE Access, 2019, 7: 72696–72702.
OZTURK E, MESUT A. Performance evaluation of JPEG standards, WebP and PNG in terms of compression ratio and time for lossless encoding [C]//2021 6th International Conference on Computer Science and Engineering. Ankara: IEEE, 2021: 15–20.
CHEN C H, SHI Y Q. JPEG image steganalysis utilizing both intrablock and interblock correlations [C]//’2008 IEEE International Symposium on Circuits and Systems. Seattle: IEEE, 2008: 3029–3032.
LI J X, LU W, WENG J, et al. Double JPEG compression detection based on block statistics [J]. Multimedia Tools and Applications, 2018, 77(24): 31895–31910.
ALZAIN M A. Efficient scrambling-substitution image security scheme using chaotic arnold-logistic maps in the discrete cosine transform [J]. International Journal of Computer Networks & Communications, 2022, 14(6): 67–79.
ZHU L Y, LUO X Y, YANG C F, et al. Invariances of JPEG-quantized DCT coefficients and their application in robust image steganography [J]. Signal Processing, 2021, 183: 108015.
SUN M D, HE X H, XIONG S H, et al. Reduction of JPEG compression artifacts based on DCT coefficients prediction [J]. Neurocomputing, 2020, 384: 335–345.
KO H J, HUANG C T, HORNG G, et al. Robust and blind image watermarking in DCT domain using interblock coefficient correlation [J]. Information Sciences, 2020, 517: 128–147.
BASHIR T, USMAN I, ALBESHER A A, et al. A DCT domain smart vicinity reliant fragile watermarking technique for DIBR 3D-TV [J]. Automatika, 2020, 61(1): 58–65.
WANG Y Y, NI R R, ZHAO Y. A novel block sorting scheme for reversible data hiding in JPEG images [C]//2018 14th IEEE International Conference on Signal Processing. Beijing: IEEE, 2018: 389–394.
LIAO X, YIN J J, GUO S J, et al. Medical JPEG image steganography based on preserving inter-block dependencies [J]. Computers & Electrical Engineering, 2018, 67: 320–329.
ABDMOULEH M K, KHALFALLAH A, BOUHLEL M S. A novelselectiveencryptionschemeformedical images transmission based-on JPEG compression algorithm [J]. Procedia Computer Science, 2017, 112: 369–376.
ONG S, WONG K, QI X J, et al. Beyond format-compliant encryption for JPEG image [J]. Signal Processing: Image Communication, 2015, 31: 47–60.
QIANZ X, ZHANG X P, RENY L. JPEG encryption for image rescaling in the encrypted domain [J]. Journal of Visual Communication and Image Representation, 2015, 26: 9–13.
ZHANG Y S, XIAO D, LIU H, et al. GLS coding based security solution to JPEG with the structure of aggregated compression and encryption [J]. Communications in Nonlinear Science and Numerical Simulation, 2014, 19(5): 1366–1374.
LI W H, YUAN Y A. A leak and its remedy in JPEG image encryption [J]. International Journal of Computer Mathematics, 2007, 84(9): 1367–1378.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest The authors declare no conflict of interest.
Rights and permissions
About this article
Cite this article
Li, S., Guo, Y., Huang, J. et al. Fast Attack Algorithm for JPEG Image Encryption with Block Position Shuffle. J. Shanghai Jiaotong Univ. (Sci.) (2023). https://doi.org/10.1007/s12204-023-2676-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s12204-023-2676-x