Skip to content

Codes of cryptanalysis of image encryption algorithm based on autoblocking and electrocardiography (IEAE)

Notifications You must be signed in to change notification settings

MrDongdongLin/Cryptanalysis_IEAE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptanalyzing an image encryption algorithm based on autoblocking and electrocardiography

The paper "cryptanalysis of image encryption algorithm based on autoblocking and electrocardiography" is now available on IEEE: https://ieeexplore.ieee.org/document/8495009. This project contains codes of this paper, LaTeX source codes of this paper can be downloaded: https://arxiv.org/abs/1711.01858. Cite this paper:

IEEE format:

C. Li, D. Lin, J. Lu, F. Hao, "Cryptanalyzing an image encryption algorithm based on autoblocking and electrocardiography," IEEE MultiMedia, arXiv:1711.01858, 2018.

@ARTICLE{Cqli:block:IM18,
  author =       {Chengqing Li and Dongdong Lin and Jinhu L\"u and Feng Hao},
  title =        {Cryptanalyzing an image encryption algorithm based on autoblocking and electrocardiography},
  journal =      {IEEE MultiMedia, arXiv:1711.01858},
  year =         {2018},
  LatexSource =  {https://arxiv.org/abs/1711.01858},
}

Getting Started

The matlab codes are complete and executable. To encrypt a gray scale image, please use encrypt.m, and use decrypt.m to decrypt a cipher image. The file get_key.m is used to get the equivalent version of the secret key of IEAE with a pair of plain image and cipher image. At last, kpa.m is used to decipher IEAE.

Initlization

pimg = imread('../../data/Baboon.bmp');
a=1; b=1; w1=50; w2=50; mu=3.999; mu1=20; mu2=15; N=3; p1=16; p2=16;
[v, D, C0] = init(pimg, p1, p2, a, b, mu, mu1, mu2);

Encryption

cimg = encrypt(pimg, p1, p2, v, D, C0);

Decryption

pimg = decrypt(cimg, p1, p2, v, D, C0)

Known-plaintext Attack

  • Encrypt rounds
T = 1;
  • Another cipher image encrypted with the same secret keys.
lena = imread('../../data/Lena.bmp');
[lena_e, ~, ~, ~] = encrypt(lena, p1, p2, v, D, C0);
for i =1:T-1
    [lena_e, ~, ~, ~] = encrypt(lena_e, p1, p2, v, D, C0);
end
  • Get the equivalent version of the secret key
[vD, blk_coeff, ~] = get_key(lena, lena_e, p1, p2, T);
  • attack
aimg = kpa(cimg, vD, blk_coeff);

TODO

python codes of IEAE in folder cipher

About

Codes of cryptanalysis of image encryption algorithm based on autoblocking and electrocardiography (IEAE)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published