Image Encryption/Decryption using ECC

$ 180.00

Total downloads: 11

This is the code which simulates the encryption and decryption of an image using random and private keys in MATLAB. The elliptic curve cryptography is applied to achieve the security of any image before transmitting it to some one so that no other can see the data hidden in the image. At the receiver end the destined user will already have the decryption key used for this. If key is altered, image will not be decrypted.


In the modern scenario, the digital images contain important information which required proper security while transmitting from one point to another. The security is valuable for some applications like military picture database, medical imaging system, and cable TV broadcasting. Image encryption and decryption is the most popular security scheme of the data or information processing.

Thesis statement

In industries, the confidential images are required security function so that unauthorized access of images is not possible. For the encryption or decryption of images, some public and private keys are used. The public key image encryption/decryption process follows the symmetric cryptographic scheme, whereas asymmetric cryptographic system use in the public key encryption image. In public-key cryptography, the encryption and decryption key are not the same.

The pixel value of the image is first converted into the points and formed groups on to the elliptic curve finite field.  All the programs are developed in the MATLAB software, and performance is measured via some security analysis parameters. Simulate the MATLAB script and observed the results with different stages of encrypting and decrypting process.

Elliptical Curve Cryptography (ECC)

Elliptical curve cryptography is a traditional approach of image encryption and decryption. The ECC (Elliptical Curve Cryptography) is a public key type and uses for those applications in which secure transmission channel are not available. In the encryption process of ECC, the image message is mapping to point on the curve and converting the mapped point into the message types. The quality of the image depends on the pixel value, and the encryption process mapped these pixel values to point on to the curve.

ECC curve for various points

Figure 1 graph of an elliptical curve [1]

The ECC is a private-public key pair uses for encrypt and decrypt the data. ECC is the asymmetric in nature that means for encryption a private key is used and decryption is retained via public key. The image pixel value is encrypted with the private key and decrypt the ciphertext later using the corresponding public key. The image pixel value converted into the points on to Elliptical curve then mapping process applied in the finite filed.

A map table is created with respect to the group of elliptic points. A private key is applied to the mapped points and encrypted the pixel values of the image. Later a corresponding public key is used for the decryption process and retained the actual image from the encrypted image. The image encryption and decryption code are written in the MATLAB.

Mapping Process

The image consists of pixels values for different formats, like a grayscale image contains 8-bit pixel values from 0 to 255. A color image consists of three octet value separately; shows Red, Green, and Blue intensity of color.  An image is encrypted with ECC consider each pixel as a message which mapped to point on the predefined elliptical curve. A map table is created with the help of the elliptic group generated first and then points are placed into the 256 groups. ECC is used for the encryption of points after the mapping process of all pixel values of image related to point one by one. Mapping matrix generated after the code is debugging in the MATLAB.

Encryption and Decryption

  • The image pixel values generated the groups on the elliptical curve with different instant points after the mapping process. A points vector is added to the all instant points generated in the group.
  • After the pixel values mapped on to the elliptical curve through map table and then a public key is generated by the sender which multiplied with each pixel value or point value.
  • The pixel values of the image encrypted using the public key on to the elliptic curve points.
  • The mapped or converted image is retained using possession of a secret public key. Each pixel value is retained, and the real image is reconstructed from the encrypted image.

This thesis provided the secure encryption and decryption of an image using ECC. The image encryption and decryption code are generated in MATLAB tool.

Another technique Logistic map and Arnold cat scrambling are used for the image encryption and code is available at free-thesis.

Security Analysis

The security analysis of encrypted and decrypted image depends on the various attacks which affect the algorithm. Following analysis based on encrypted and decrypted performance of algorithm performed as

  • Histogram analysis
  • Correlation analysis
  • Entropy analysis
  • Key sensitive analysis

results of encrypted and decrypted via the ECC method

Figure 2 experimental results of encrypted and decrypted via the ECC method

All the performance analysis curves are the plot in MATLAB software, and mapping table is also generated in the command window of MATLAB.

Advantages of ECC

  • The ECC method is completely sensitive to the secret key so that the encrypted image cannot be decrypted while making some changes in the secret key.
  • The entropy value is higher (8) which provide the optimal length of the code assign to the pixel of an image.
  • The range of the correlation coefficient must be lie between 0 to 1. The adjacent pixels correlation coefficient is maximum for better security.
  • The input image contains some information which can be extracted for the encryption process. So histogram analysis provided the spectrum analysis of information of input and encrypted image.
  • The secret key size is smaller.
  • Low mathematical complexity.
  • High-speed encryption.


In this work, the ECC algorithm is proposed for the image encryption and decryption process. ECC is provided the fast encryption and use for high information images. The mapping is performed for the conversion of pixel value into point of an affine elliptic curve over a finite field using the map table. The encryption process is very fast and low complex in nature. The strength of the algorithm is checked by the security analysis function like histogram, key security, and correlation.


  1. Soleymani, Ali, Md Jan Nordin, Azadeh Noori Hoshyar, Zulkarnain Md Ali, and Elankovan Sundararajan. “An image encryption scheme based on elliptic curve and a novel mapping method.” International Journal of Digital Content Technology and its Applications7, no. 13 (2013): 85.
  2. Astya, Dr ParmaNand, Ms Bhairvee Singh, and Mr Divyanshu Chauhan. “Image encryption and decryption using elliptic curve cryptography.” International Journal of Advance Research In Science And Engineering IJARSE3 (2014).
  3. Singh, Laiphrakpam Dolendro, and Khumanthem Manglem Singh. “Image encryption using elliptic curve cryptography.” Procedia Computer Science54 (2015): 472-481.
  4. Soleymani, Ali, Md Jan Nordin, and Zulkarnain Md Ali. “A Novel Public Key Image Encryption Based on Elliptic Curves over Prime Group Field.” Journal of Image and Graphics1, no. 1 (2013): 43-49.
  5. Nagaraj, Srinivasan, G. S. V. P. Raju, and K. Koteswara Rao. “Image encryption using elliptic curve cryptograhy and matrix.” Procedia Computer Science48 (2015): 276-281.
  6. Shankar, Tarun Narayan, and G. Sahoo. “Cryptography by karatsuba multiplier with ASCII codes.” International journal on computer applications(2010): 53-60.


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.