GithubHelp home page GithubHelp logo

mrdongdonglin / cryptanalysis_ieae Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 11 KB

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

MATLAB 35.59% Python 64.41%
cryptanalysis encryption image ecg

cryptanalysis_ieae's Introduction

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

cryptanalysis_ieae's People

Contributors

mrdongdonglin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

junxiu6 ltyong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.