Image encryption based on elliptic curve cryptosystem

Received Feb 16, 2020 Revised Aug 5, 2020 Accepted Sep 23, 2020 Image encryption based on elliptic curve cryptosystem and reducing its complexity is still being actively researched. Generating matrix for encryption algorithm secret key together with Hilbert matrix will be involved in this study. For a first case we will need not to compute the inverse matrix for the decryption processing cause the matrix that be generated in encryption step was self invertible matrix. While for the second case, computing the inverse matrix will be required. Peak signal to noise ratio (PSNR), and unified average changing intensity (UACI) will be used to assess which case is more efficiency to encryption the grayscale image.


INTRODUCTION
Cryptography is a strategy for putting away and transmitting information in a verified structure with the goal that lone proposed client can peruse and process it [1]. It includes encryption and decoding of messages.Encryption is the way toward changing over plain information into cipher text and decoding is the way toward getting back the first message from the encoded content. There are many uses for Cryptography such like: protect e-mail information, credit card information. Indeed it provides confidentiality, authentication, Integrity and non-repudiation [2].
Elliptic curves are arithmeticcurves which have been studied by numerous mathematicians for quite a while [3]. One of its most important applications appeared in 1985, where Neal [4] and Miller [5] independently proposed the public key cryptosystems based on elliptic curve they named elliptic curve cryptosystem (ECC). From that point forward, numerous scientists have gone through years concentrating the quality of ECC and improving procedures for its execution. In ECC a 160-bit key provides the same security as compared to the traditional cryptosystem RSA [6] with a 1024-bit key, in this way it can reduced computational cost or processing cost [7]. The security of ECC depends on the difficulty of solving elliptic curve discrete logarithm problem (ECDLP) [8].
Digital images are an appealing information type that offers a far reaching scope of utilization. Any clients are keen on actualizing content security strategies to their pictures [9]. Recently, many image encryption techniques have been proposed to verify interactive media data before transmission over insecure channels such like [10,11]. Elliptic curve cryptosystem is a superior strategy to transmit the picture safely [12].
The matrix that appears to have an endless interest for mathematicians, is symmetric and definite, it is The Hilbert matrix, with (i, j) element . It is too special matrix that is because symmetric positive  [13]. For the purposes of the work in this study, we will use this matrix for a specific modulo, so no denominator will appear in any element of this matrix.
The security of images is exceptional compelling in this paper. Indeed new image encryption techniques have been proposed in this paper to combine ECC with Hilbert matrix. The new approaches use ECC to generate the private and public keys, and then both sender and receiver have the ability to produce the secret key with no need to share it through the internet or unsecured communication channel. One of the most important things that these technologies will focus on is that the matrices must be invertible. So, if the key matrix is not invertible, the decryption process cannot be done, and the receiver cannot get the original data.
Many researchrs were working on this subject such like Singh [14], in 2015 used image encryption using elliptic curve cryptography. They implement the elliptic curve cryptography to encrypt, decrypt and digitally sign the cipher image to provide authenticity and integrity. Ahmed [15], in 2013 used a hybrid chaotic system and cyclic elliptic curve for image encryption. The new scheme generates an initial key stream based on chaotic system and an external secret key of 256-bit in a feedback manner. Then, the generated key stream are mixed with key sequences derived from the cyclic elliptic curve points. Thorough encryption performance and security analysis ascertains efficacy of the proposed encryption scheme. Nagaraj [16] they propose in 2015 a new encryption technique using elliptic curve cryptography with a magic matrix operations for securing images that transmits over a public unsecured channel. There are two most important groups of image encryption algorithms: some are non chaos-based selective methods and chaos-based selective methods. The majority of these algorithms is planned for a specific image format, compressed or uncompressed.

ELLIPTIC CURVE FUNCTION
Elliptic curve cryptosystem (ECC) it is a reasonable encryption strategy to be utilized in for example: embedded systems and mobile devices, that is because it can provide high security with smaller key size and fewer computations with less memory usage and lower power consumptions [17].  Definition: An elliptic curve over a prime field is defined by ( , ): 2 = 3 + + , where > 3, , ∈ and satisfy the condition 4 3 + 27 2 ≢ 0. The elliptic curve group ( ) consists of all points ( , ) that satisfy the elliptic curve ( , ) and the point at the infinity ∞ [18,19].  Elliptic curve operations: The primary operations related to elliptic curve function is the elliptic curve scalar multiplication which is the main operation on the elliptic curve that consumes more time in encryption and decryption operations. Two operations are involved in calculating the elliptic curve scalar multiplication, they are point addition and point doubling [20]. . is also point on an elliptic curve ( , ).
 Elliptic curve scalar multiplication: Let be any point on the elliptic curve ( , ). Elliptic curve scalar multiplication operation over is defined by the repeated addition

HILBERT MATRIX
Hilbert [21] in 1894 presented a square matrix with entries being the unit fractions. That is mean each element of this matrix say h ij will be written as ].
Involved Hilbert matrix with cryptography is new subject duscude recently by Roopaei [22]. In this work, we will try to use this matrix to high level of security to encrypte images. Indeed, there are another types of invertible matrix [23,24] can be subject to future studies.

Proposed algorithms
Hybrid the ECC and Hilbert matrix is approach to encrypt the image is a technique has been introduced in this section in two cases. These techniques increase the security and make the system more efficient, also it speeds up the decryption computations since it does not need the computation of the key matrix inverse for the first case.
Suppose the sender (User A) wants to send an image M to the other party (User B) using this technique over an insecure channel. Firstly, they should agree on the elliptic curve E p (a, b) and share the domain parameters {a, b, p, G}, where G is the generator point. Then each party needs to choose randomly his private key from the interval [1, p − 1]; n A for User A and n B for User B, and generates his public key as P A =n A • G and P B =n B • G. Each user multiplies his private key by the public key of the other user to get the initial key as: The next step is generating the secret key matrix K m by sender and receiver. The inverse of the key matrix does not always exist. So, if the key matrix is not invertible, the recipient cannot decrypt the encrypted data. To solve this problem, the self invertible key matrix [25] will be generated, and the same key will be used for encryption and decryption and no need to find the inverse key matrix in the first case. But the second case, we need compute inverse for the key matrix.
The first case and the second case will be implemented on grayscale images. The image will be divided into blocks of size four pixel values. So, each party produces the 4×4 key matrix K m , where K m be a self invertible matrix partitioned as four square matrices: K 11 , K 12 , K 21  other partitions of the secret matrix key K m is obtained by solving K 12 = I − K 11 , K 21 = I + K 11 , K 11 + K 22 = 0, where I is the identity matrix. Now, separate the image pixel values into blocks of size four, each block will be converted to a vector of size 4 × 1: P 1 , P 2 , P 3 , …. Next step will be calculating the ciphered vectors C 1 , C 2 , C 3 , … as: C i = K m . P i mod 256, i = 1, 2, 3, …. The last step for the encryption algorithm is reconstruct the ciphered image from the values of C i and send it to the other party B. For the decryption processes, party B will separate the ciphered image pixel values into blocks of 4 × 1: C 1 , C 2 , C 3 , …. The next step is computing P 1 , P 2 , P 3 , … as: P i = K m . C i mod 256, i = 1, 2, 3, …. The last step for the decryption algorithm is reconstruct the plain image from the values of P i . , each block will be converted to a vector of size 4 × 1: P 1 , P 2 , P 3 , …. Next step will be calculating the ciphered vectors C 1 , C 2 , C 3 , … as: C i = K m . P i mod 256, i = 1, 2, 3, …. The last step for the encryption algorithm is reconstruct the ciphered image from the values of C i and send it to the other party B. For the decryption processes, party B will separate the ciphered image pixel values into blocks of 4 × 1: C 1 , C 2 , C 3 , …. The next step is computing P 1 , P 2 , P 3 , … as: P i = K M −1 . C i mod 256, i = 1, 2, 3, …. The last step for the decryption algorithm is reconstruct the plain image from the values of P i .

CONCLUSION
ECC provides equivalent security with less key size, low mathematical rather than the Global RSA cryptosystem. Algorithms for image encryption based on elliptic curve cryptosystem in two cases are proposed in this work. Hilbert matrix is involved in the first and the second case for the proposed algorithms with dimension 2×2 and 4×4 respectively. Table 1 shows that the proposed algorithms for both cases on cat image 256×256 gives great outcomes PSNR, and UACI. PSNR has been computed for the ciphered image and plain image using the first and second proposed algorithm were 7.8654 and 7.6568 respectively, which means it is hard for an aggressor to recover the plain image. In the other hand,UACI has been computed for the ciphered image and plain image using the first and second proposed algorithm were 31.6912 and 34.0998 respectively, which means it is hard for an aggressor to recover the plain image.