| Resumen |
JPEG images are widely used in multimedia transmission, such as on social media platforms, owing to their efficiency for reducing storage and transmission requirements. However, because such images may contain sensitive information, encryption is essential to ensure data privacy. Traditional image encryption schemes face challenges when applied to JPEG images, as maintaining compatibility with the JPEG structure and managing the effects of lossy compression can distort encrypted data. Existing JPEG-compatible encryption methods, such as Encryption-then-Compression (EtC) and Compression-then-Encryption (CtE), typically employ a single encryption stage, either before or after compression, and often involve trade-offs between security, storage efficiency, and visual quality. In this work, an Encryption–Compression–Encryption algorithm is presented that preserves full JPEG compatibility while combining the advantages of both EtC and CtE schemes. In the proposed method, pixel-block encryption is first applied prior to JPEG compression, followed by selective coefficient encryption after compression, in which the quantized DC coefficient differences are permuted. Experimental results indicate that the second encryption stage enhances the entropy achieved in the first stage, with both stages complementing each other in terms of resistance to attacks. The addition of this second layer does not significantly impact storage efficiency or the visual quality of the decompressed image; however, it introduces a moderate increase in computational time due to the two-stage encryption process. © 2025 by the authors. |